Imported GNU Classpath 0.19 + gcj-import-20051115.

* sources.am: Regenerated.
       * Makefile.in: Likewise.
       * scripts/makemake.tcl: Use glob -nocomplain.

From-SVN: r107049
This commit is contained in:
Mark Wielaard 2005-11-15 23:20:01 +00:00
parent 02e549bfaa
commit 8f523f3a10
1241 changed files with 97711 additions and 25284 deletions

View File

@ -1,3 +1,10 @@
2005-11-15 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
2005-11-15 Scott Gilbertson <scottg@mantatest.com>
* Makefile.in: Re-generated.

View File

@ -150,14 +150,18 @@ lib_gnu_java_awt_peer_qt_la_OBJECTS = \
@QT_AWT_TRUE@am_lib_gnu_java_awt_peer_qt_la_rpath = -rpath \
@QT_AWT_TRUE@ $(toolexeclibdir)
am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
gnu/classpath/debug.lo gnu/gcj.lo gnu/gcj/convert.lo \
gnu/gcj/io.lo gnu/gcj/runtime.lo gnu/gcj/util.lo \
gnu/java/awt.lo gnu/java/awt/color.lo gnu/java/awt/image.lo \
gnu/java/awt/peer.lo gnu/java/io.lo gnu/java/lang.lo \
gnu/java/lang/reflect.lo gnu/java/locale.lo gnu/java/math.lo \
gnu/java/net.lo gnu/java/net/protocol/file.lo \
gnu/classpath/debug.lo gnu/classpath/jdwp.lo \
gnu/classpath/jdwp/event.lo \
gnu/classpath/jdwp/event/filters.lo \
gnu/classpath/jdwp/exception.lo gnu/classpath/jdwp/id.lo \
gnu/classpath/jdwp/processor.lo \
gnu/classpath/jdwp/transport.lo gnu/classpath/jdwp/util.lo \
gnu/gcj.lo gnu/gcj/convert.lo gnu/gcj/io.lo gnu/gcj/runtime.lo \
gnu/gcj/util.lo gnu/java/awt.lo gnu/java/awt/color.lo \
gnu/java/awt/image.lo gnu/java/awt/peer.lo gnu/java/io.lo \
gnu/java/lang.lo gnu/java/lang/reflect.lo gnu/java/locale.lo \
gnu/java/math.lo gnu/java/net.lo gnu/java/net/protocol/file.lo \
gnu/java/net/protocol/ftp.lo gnu/java/net/protocol/http.lo \
gnu/java/net/protocol/http/event.lo \
gnu/java/net/protocol/https.lo gnu/java/net/protocol/jar.lo \
gnu/java/nio.lo gnu/java/nio/channels.lo \
gnu/java/nio/charset.lo gnu/java/rmi.lo gnu/java/rmi/dgc.lo \
@ -167,8 +171,8 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
gnu/java/security/pkcs.lo gnu/java/security/provider.lo \
gnu/java/security/util.lo gnu/java/security/x509.lo \
gnu/java/security/x509/ext.lo gnu/java/text.lo \
gnu/java/util.lo gnu/java/util/prefs.lo \
gnu/javax/swing/text/html/parser.lo \
gnu/java/util.lo gnu/java/util/prefs.lo gnu/javax/crypto.lo \
gnu/javax/imageio/bmp.lo gnu/javax/swing/text/html/parser.lo \
gnu/javax/swing/text/html/parser/models.lo \
gnu/javax/swing/text/html/parser/support.lo \
gnu/javax/swing/text/html/parser/support/low.lo gnu/regexp.lo \
@ -196,7 +200,9 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
javax/print/event.lo javax/security/auth.lo \
javax/security/auth/callback.lo javax/security/auth/login.lo \
javax/security/auth/spi.lo javax/security/auth/x500.lo \
javax/security/cert.lo javax/security/sasl.lo javax/sql.lo \
javax/security/cert.lo javax/security/sasl.lo \
javax/sound/midi.lo javax/sound/midi/spi.lo \
javax/sound/sampled.lo javax/sound/sampled/spi.lo javax/sql.lo \
javax/swing.lo javax/swing/border.lo \
javax/swing/colorchooser.lo javax/swing/event.lo \
javax/swing/filechooser.lo javax/swing/plaf.lo \
@ -206,8 +212,8 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \
javax/swing/text/html/parser.lo javax/swing/text/rtf.lo \
javax/swing/tree.lo javax/swing/undo.lo javax/transaction.lo \
javax/transaction/xa.lo org/ietf/jgss.lo
am__DEPENDENCIES_3 = gnu-java-beans.lo gnu-xml.lo javax-imageio.lo \
javax-xml.lo org-w3c.lo org-xml.lo
am__DEPENDENCIES_3 = gnu-java-beans.lo gnu-javax-sound-midi.lo \
gnu-xml.lo javax-imageio.lo javax-xml.lo org-w3c.lo org-xml.lo
am__DEPENDENCIES_4 = $(patsubst classpath/resource/%,%,$(addsuffix \
.lo,$(property_files)))
am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
@ -837,6 +843,7 @@ gnu/awt/xlib/XToolkit.java
gnu_awt_xlib_header_files = $(patsubst %.java,%.h,$(gnu_awt_xlib_source_files))
gnu_classpath_source_files = \
classpath/gnu/classpath/ByteArray.java \
classpath/gnu/classpath/Configuration.java \
classpath/gnu/classpath/Pointer.java \
classpath/gnu/classpath/Pointer32.java \
@ -852,6 +859,116 @@ classpath/gnu/classpath/debug/PreciseFilter.java \
classpath/gnu/classpath/debug/SystemLogger.java
gnu_classpath_debug_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_debug_source_files)))
gnu_classpath_jdwp_source_files = \
classpath/gnu/classpath/jdwp/Jdwp.java \
classpath/gnu/classpath/jdwp/JdwpConstants.java \
gnu/classpath/jdwp/VMFrame.java \
gnu/classpath/jdwp/VMIdManager.java \
gnu/classpath/jdwp/VMVirtualMachine.java
gnu_classpath_jdwp_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_source_files)))
gnu_classpath_jdwp_event_source_files = \
classpath/gnu/classpath/jdwp/event/ClassPrepareEvent.java \
classpath/gnu/classpath/jdwp/event/Event.java \
classpath/gnu/classpath/jdwp/event/EventManager.java \
classpath/gnu/classpath/jdwp/event/EventRequest.java \
classpath/gnu/classpath/jdwp/event/ThreadEndEvent.java \
classpath/gnu/classpath/jdwp/event/ThreadStartEvent.java \
classpath/gnu/classpath/jdwp/event/VmDeathEvent.java \
classpath/gnu/classpath/jdwp/event/VmInitEvent.java
gnu_classpath_jdwp_event_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_event_source_files)))
gnu_classpath_jdwp_event_filters_source_files = \
classpath/gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java \
classpath/gnu/classpath/jdwp/event/filters/ClassMatchFilter.java \
classpath/gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java \
classpath/gnu/classpath/jdwp/event/filters/ConditionalFilter.java \
classpath/gnu/classpath/jdwp/event/filters/CountFilter.java \
classpath/gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java \
classpath/gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java \
classpath/gnu/classpath/jdwp/event/filters/IEventFilter.java \
classpath/gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java \
classpath/gnu/classpath/jdwp/event/filters/LocationOnlyFilter.java \
classpath/gnu/classpath/jdwp/event/filters/StepFilter.java \
classpath/gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java
gnu_classpath_jdwp_event_filters_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_event_filters_source_files)))
gnu_classpath_jdwp_exception_source_files = \
classpath/gnu/classpath/jdwp/exception/InvalidClassException.java \
classpath/gnu/classpath/jdwp/exception/InvalidClassLoaderException.java \
classpath/gnu/classpath/jdwp/exception/InvalidCountException.java \
classpath/gnu/classpath/jdwp/exception/InvalidEventTypeException.java \
classpath/gnu/classpath/jdwp/exception/InvalidFieldException.java \
classpath/gnu/classpath/jdwp/exception/InvalidLocationException.java \
classpath/gnu/classpath/jdwp/exception/InvalidMethodException.java \
classpath/gnu/classpath/jdwp/exception/InvalidObjectException.java \
classpath/gnu/classpath/jdwp/exception/InvalidStringException.java \
classpath/gnu/classpath/jdwp/exception/InvalidThreadException.java \
classpath/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java \
classpath/gnu/classpath/jdwp/exception/JdwpException.java \
classpath/gnu/classpath/jdwp/exception/JdwpIllegalArgumentException.java \
classpath/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java \
classpath/gnu/classpath/jdwp/exception/NotImplementedException.java \
classpath/gnu/classpath/jdwp/exception/VmDeadException.java
gnu_classpath_jdwp_exception_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_exception_source_files)))
gnu_classpath_jdwp_id_source_files = \
classpath/gnu/classpath/jdwp/id/ArrayId.java \
classpath/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java \
classpath/gnu/classpath/jdwp/id/ClassLoaderId.java \
classpath/gnu/classpath/jdwp/id/ClassObjectId.java \
classpath/gnu/classpath/jdwp/id/ClassReferenceTypeId.java \
classpath/gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java \
classpath/gnu/classpath/jdwp/id/JdwpId.java \
classpath/gnu/classpath/jdwp/id/ObjectId.java \
classpath/gnu/classpath/jdwp/id/ReferenceTypeId.java \
classpath/gnu/classpath/jdwp/id/StringId.java \
classpath/gnu/classpath/jdwp/id/ThreadGroupId.java \
classpath/gnu/classpath/jdwp/id/ThreadId.java
gnu_classpath_jdwp_id_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_id_source_files)))
gnu_classpath_jdwp_processor_source_files = \
classpath/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java \
classpath/gnu/classpath/jdwp/processor/CommandSet.java \
classpath/gnu/classpath/jdwp/processor/EventRequestCommandSet.java \
classpath/gnu/classpath/jdwp/processor/FieldCommandSet.java \
classpath/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java \
classpath/gnu/classpath/jdwp/processor/MethodCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/PacketProcessor.java \
classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java \
classpath/gnu/classpath/jdwp/processor/StackFrameCommandSet.java \
classpath/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java \
classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
gnu_classpath_jdwp_processor_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_processor_source_files)))
gnu_classpath_jdwp_transport_source_files = \
classpath/gnu/classpath/jdwp/transport/ITransport.java \
classpath/gnu/classpath/jdwp/transport/JdwpCommandPacket.java \
classpath/gnu/classpath/jdwp/transport/JdwpConnection.java \
classpath/gnu/classpath/jdwp/transport/JdwpPacket.java \
classpath/gnu/classpath/jdwp/transport/JdwpReplyPacket.java \
classpath/gnu/classpath/jdwp/transport/SocketTransport.java \
classpath/gnu/classpath/jdwp/transport/TransportException.java \
classpath/gnu/classpath/jdwp/transport/TransportFactory.java
gnu_classpath_jdwp_transport_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_transport_source_files)))
gnu_classpath_jdwp_util_source_files = \
classpath/gnu/classpath/jdwp/util/JdwpString.java \
classpath/gnu/classpath/jdwp/util/LineTable.java \
classpath/gnu/classpath/jdwp/util/Location.java \
classpath/gnu/classpath/jdwp/util/MethodResult.java \
classpath/gnu/classpath/jdwp/util/Signature.java \
classpath/gnu/classpath/jdwp/util/Value.java \
classpath/gnu/classpath/jdwp/util/VariableTable.java
gnu_classpath_jdwp_util_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_classpath_jdwp_util_source_files)))
gnu_gcj_source_files = \
gnu/gcj/Core.java \
gnu/gcj/RawData.java \
@ -942,7 +1059,6 @@ classpath/gnu/java/awt/ClasspathToolkit.java \
classpath/gnu/java/awt/ComponentDataBlitOp.java \
classpath/gnu/java/awt/EmbeddedWindow.java \
classpath/gnu/java/awt/EventModifier.java \
classpath/gnu/java/awt/FocusManager.java \
classpath/gnu/java/awt/GradientPaintContext.java
gnu_java_awt_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_awt_source_files)))
@ -1335,7 +1451,6 @@ gnu_java_net_protocol_ftp_header_files = $(patsubst classpath/%,%,$(patsubst %.j
gnu_java_net_protocol_http_source_files = \
classpath/gnu/java/net/protocol/http/Authenticator.java \
classpath/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java \
classpath/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java \
classpath/gnu/java/net/protocol/http/ChunkedInputStream.java \
classpath/gnu/java/net/protocol/http/Cookie.java \
classpath/gnu/java/net/protocol/http/CookieManager.java \
@ -1345,21 +1460,14 @@ classpath/gnu/java/net/protocol/http/HTTPDateFormat.java \
classpath/gnu/java/net/protocol/http/HTTPURLConnection.java \
classpath/gnu/java/net/protocol/http/Handler.java \
classpath/gnu/java/net/protocol/http/Headers.java \
classpath/gnu/java/net/protocol/http/LimitedLengthInputStream.java \
classpath/gnu/java/net/protocol/http/Request.java \
classpath/gnu/java/net/protocol/http/RequestBodyWriter.java \
classpath/gnu/java/net/protocol/http/Response.java \
classpath/gnu/java/net/protocol/http/ResponseBodyReader.java \
classpath/gnu/java/net/protocol/http/ResponseHeaderHandler.java \
classpath/gnu/java/net/protocol/http/SimpleCookieManager.java
gnu_java_net_protocol_http_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_net_protocol_http_source_files)))
gnu_java_net_protocol_http_event_source_files = \
classpath/gnu/java/net/protocol/http/event/ConnectionEvent.java \
classpath/gnu/java/net/protocol/http/event/ConnectionListener.java \
classpath/gnu/java/net/protocol/http/event/RequestEvent.java \
classpath/gnu/java/net/protocol/http/event/RequestListener.java
gnu_java_net_protocol_http_event_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_net_protocol_http_event_source_files)))
gnu_java_net_protocol_https_source_files = \
classpath/gnu/java/net/protocol/https/Handler.java
@ -1490,6 +1598,7 @@ gnu_java_rmi_registry_header_files = $(patsubst classpath/%,%,$(patsubst %.java,
gnu_java_rmi_server_source_files = \
classpath/gnu/java/rmi/server/ConnectionRunnerPool.java \
classpath/gnu/java/rmi/server/ProtocolConstants.java \
classpath/gnu/java/rmi/server/RMIClassLoaderImpl.java \
classpath/gnu/java/rmi/server/RMIDefaultSocketFactory.java \
classpath/gnu/java/rmi/server/RMIHashes.java \
classpath/gnu/java/rmi/server/RMIIncomingThread.java \
@ -1546,6 +1655,8 @@ classpath/gnu/java/security/provider/DSAParameterGenerator.java \
classpath/gnu/java/security/provider/DSAParameters.java \
classpath/gnu/java/security/provider/DSASignature.java \
classpath/gnu/java/security/provider/DefaultPolicy.java \
classpath/gnu/java/security/provider/DiffieHellmanKeyFactoryImpl.java \
classpath/gnu/java/security/provider/DiffieHellmanKeyPairGeneratorImpl.java \
classpath/gnu/java/security/provider/EncodedKeyFactory.java \
classpath/gnu/java/security/provider/Gnu.java \
classpath/gnu/java/security/provider/GnuDHPublicKey.java \
@ -1626,6 +1737,38 @@ classpath/gnu/java/util/prefs/NodeReader.java \
classpath/gnu/java/util/prefs/NodeWriter.java
gnu_java_util_prefs_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_util_prefs_source_files)))
gnu_javax_crypto_source_files = \
classpath/gnu/javax/crypto/DiffieHellmanImpl.java \
classpath/gnu/javax/crypto/GnuDHPrivateKey.java \
classpath/gnu/javax/crypto/RSACipherImpl.java
gnu_javax_crypto_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_javax_crypto_source_files)))
gnu_javax_imageio_bmp_source_files = \
classpath/gnu/javax/imageio/bmp/BMPDecoder.java \
classpath/gnu/javax/imageio/bmp/BMPException.java \
classpath/gnu/javax/imageio/bmp/BMPFileHeader.java \
classpath/gnu/javax/imageio/bmp/BMPImageReader.java \
classpath/gnu/javax/imageio/bmp/BMPImageReaderSpi.java \
classpath/gnu/javax/imageio/bmp/BMPInfoHeader.java \
classpath/gnu/javax/imageio/bmp/DecodeBF16.java \
classpath/gnu/javax/imageio/bmp/DecodeBF32.java \
classpath/gnu/javax/imageio/bmp/DecodeRGB1.java \
classpath/gnu/javax/imageio/bmp/DecodeRGB24.java \
classpath/gnu/javax/imageio/bmp/DecodeRGB4.java \
classpath/gnu/javax/imageio/bmp/DecodeRGB8.java \
classpath/gnu/javax/imageio/bmp/DecodeRLE4.java \
classpath/gnu/javax/imageio/bmp/DecodeRLE8.java
gnu_javax_imageio_bmp_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_javax_imageio_bmp_source_files)))
gnu_javax_sound_midi_source_files = \
classpath/gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java \
classpath/gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java \
classpath/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java \
classpath/gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java \
classpath/gnu/javax/sound/midi/alsa/AlsaPortDevice.java \
classpath/gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java \
classpath/gnu/javax/sound/midi/dssi/DSSISynthesizer.java
gnu_javax_swing_text_html_parser_source_files = \
classpath/gnu/javax/swing/text/html/parser/HTML_401F.java \
classpath/gnu/javax/swing/text/html/parser/gnuDTD.java \
@ -1850,6 +1993,33 @@ classpath/gnu/xml/pipeline/ValidationConsumer.java \
classpath/gnu/xml/pipeline/WellFormednessFilter.java \
classpath/gnu/xml/pipeline/XIncludeFilter.java \
classpath/gnu/xml/pipeline/XsltFilter.java \
classpath/gnu/xml/stream/AttributeImpl.java \
classpath/gnu/xml/stream/CharactersImpl.java \
classpath/gnu/xml/stream/CommentImpl.java \
classpath/gnu/xml/stream/DTDImpl.java \
classpath/gnu/xml/stream/EndDocumentImpl.java \
classpath/gnu/xml/stream/EndElementImpl.java \
classpath/gnu/xml/stream/EndEntityImpl.java \
classpath/gnu/xml/stream/EntityDeclarationImpl.java \
classpath/gnu/xml/stream/EntityReferenceImpl.java \
classpath/gnu/xml/stream/FilteredEventReader.java \
classpath/gnu/xml/stream/FilteredStreamReader.java \
classpath/gnu/xml/stream/LocationImpl.java \
classpath/gnu/xml/stream/NamespaceImpl.java \
classpath/gnu/xml/stream/NotationDeclarationImpl.java \
classpath/gnu/xml/stream/ProcessingInstructionImpl.java \
classpath/gnu/xml/stream/StartDocumentImpl.java \
classpath/gnu/xml/stream/StartElementImpl.java \
classpath/gnu/xml/stream/StartEntityImpl.java \
classpath/gnu/xml/stream/XMLEventAllocatorImpl.java \
classpath/gnu/xml/stream/XMLEventFactoryImpl.java \
classpath/gnu/xml/stream/XMLEventImpl.java \
classpath/gnu/xml/stream/XMLEventReaderImpl.java \
classpath/gnu/xml/stream/XMLEventWriterImpl.java \
classpath/gnu/xml/stream/XMLInputFactoryImpl.java \
classpath/gnu/xml/stream/XMLOutputFactoryImpl.java \
classpath/gnu/xml/stream/XMLStreamReaderImpl.java \
classpath/gnu/xml/stream/XMLStreamWriterImpl.java \
classpath/gnu/xml/transform/AbstractNumberNode.java \
classpath/gnu/xml/transform/ApplyImportsNode.java \
classpath/gnu/xml/transform/ApplyTemplatesNode.java \
@ -2497,6 +2667,7 @@ classpath/java/lang/Comparable.java \
classpath/java/lang/Compiler.java \
java/lang/ConcreteProcess.java \
java/lang/Double.java \
classpath/java/lang/EnumConstantNotPresentException.java \
classpath/java/lang/Error.java \
classpath/java/lang/Exception.java \
classpath/java/lang/ExceptionInInitializerError.java \
@ -2782,6 +2953,7 @@ classpath/java/rmi/activation/ActivationException.java \
classpath/java/rmi/activation/ActivationGroup.java \
classpath/java/rmi/activation/ActivationGroupDesc.java \
classpath/java/rmi/activation/ActivationGroupID.java \
classpath/java/rmi/activation/ActivationGroup_Stub.java \
classpath/java/rmi/activation/ActivationID.java \
classpath/java/rmi/activation/ActivationInstantiator.java \
classpath/java/rmi/activation/ActivationMonitor.java \
@ -3076,6 +3248,7 @@ classpath/java/util/HashMap.java \
classpath/java/util/HashSet.java \
classpath/java/util/Hashtable.java \
classpath/java/util/IdentityHashMap.java \
classpath/java/util/InvalidPropertiesFormatException.java \
classpath/java/util/Iterator.java \
classpath/java/util/LinkedHashMap.java \
classpath/java/util/LinkedHashSet.java \
@ -3274,15 +3447,12 @@ classpath/javax/imageio/event/IIOReadUpdateListener.java \
classpath/javax/imageio/event/IIOReadWarningListener.java \
classpath/javax/imageio/event/IIOWriteProgressListener.java \
classpath/javax/imageio/event/IIOWriteWarningListener.java \
classpath/javax/imageio/metadata/IIOAttr.java \
classpath/javax/imageio/metadata/IIOInvalidTreeException.java \
classpath/javax/imageio/metadata/IIOMetadata.java \
classpath/javax/imageio/metadata/IIOMetadataController.java \
classpath/javax/imageio/metadata/IIOMetadataFormat.java \
classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java \
classpath/javax/imageio/metadata/IIOMetadataNode.java \
classpath/javax/imageio/metadata/IIONamedNodeMap.java \
classpath/javax/imageio/metadata/IIONodeList.java \
classpath/javax/imageio/spi/IIORegistry.java \
classpath/javax/imageio/spi/IIOServiceProvider.java \
classpath/javax/imageio/spi/ImageInputStreamSpi.java \
@ -3645,6 +3815,72 @@ classpath/javax/security/sasl/SaslServer.java \
classpath/javax/security/sasl/SaslServerFactory.java
javax_security_sasl_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_security_sasl_source_files)))
javax_sound_midi_source_files = \
classpath/javax/sound/midi/ControllerEventListener.java \
classpath/javax/sound/midi/Instrument.java \
classpath/javax/sound/midi/InvalidMidiDataException.java \
classpath/javax/sound/midi/MetaEventListener.java \
classpath/javax/sound/midi/MetaMessage.java \
classpath/javax/sound/midi/MidiChannel.java \
classpath/javax/sound/midi/MidiDevice.java \
classpath/javax/sound/midi/MidiEvent.java \
classpath/javax/sound/midi/MidiFileFormat.java \
classpath/javax/sound/midi/MidiMessage.java \
classpath/javax/sound/midi/MidiSystem.java \
classpath/javax/sound/midi/MidiUnavailableException.java \
classpath/javax/sound/midi/Patch.java \
classpath/javax/sound/midi/Receiver.java \
classpath/javax/sound/midi/Sequence.java \
classpath/javax/sound/midi/Sequencer.java \
classpath/javax/sound/midi/ShortMessage.java \
classpath/javax/sound/midi/Soundbank.java \
classpath/javax/sound/midi/SoundbankResource.java \
classpath/javax/sound/midi/Synthesizer.java \
classpath/javax/sound/midi/SysexMessage.java \
classpath/javax/sound/midi/Track.java \
classpath/javax/sound/midi/Transmitter.java \
classpath/javax/sound/midi/VoiceStatus.java
javax_sound_midi_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_sound_midi_source_files)))
javax_sound_midi_spi_source_files = \
classpath/javax/sound/midi/spi/MidiDeviceProvider.java \
classpath/javax/sound/midi/spi/MidiFileReader.java \
classpath/javax/sound/midi/spi/MidiFileWriter.java \
classpath/javax/sound/midi/spi/SoundbankReader.java
javax_sound_midi_spi_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_sound_midi_spi_source_files)))
javax_sound_sampled_source_files = \
classpath/javax/sound/sampled/AudioFileFormat.java \
classpath/javax/sound/sampled/AudioFormat.java \
classpath/javax/sound/sampled/AudioInputStream.java \
classpath/javax/sound/sampled/AudioPermission.java \
classpath/javax/sound/sampled/AudioSystem.java \
classpath/javax/sound/sampled/BooleanControl.java \
classpath/javax/sound/sampled/Clip.java \
classpath/javax/sound/sampled/CompoundControl.java \
classpath/javax/sound/sampled/Control.java \
classpath/javax/sound/sampled/DataLine.java \
classpath/javax/sound/sampled/EnumControl.java \
classpath/javax/sound/sampled/FloatControl.java \
classpath/javax/sound/sampled/Line.java \
classpath/javax/sound/sampled/LineEvent.java \
classpath/javax/sound/sampled/LineListener.java \
classpath/javax/sound/sampled/LineUnavailableException.java \
classpath/javax/sound/sampled/Mixer.java \
classpath/javax/sound/sampled/Port.java \
classpath/javax/sound/sampled/ReverbType.java \
classpath/javax/sound/sampled/SourceDataLine.java \
classpath/javax/sound/sampled/TargetDataLine.java \
classpath/javax/sound/sampled/UnsupportedAudioFileException.java
javax_sound_sampled_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_sound_sampled_source_files)))
javax_sound_sampled_spi_source_files = \
classpath/javax/sound/sampled/spi/AudioFileReader.java \
classpath/javax/sound/sampled/spi/AudioFileWriter.java \
classpath/javax/sound/sampled/spi/FormatConversionProvider.java \
classpath/javax/sound/sampled/spi/MixerProvider.java
javax_sound_sampled_spi_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_sound_sampled_spi_source_files)))
javax_sql_source_files = \
classpath/javax/sql/ConnectionEvent.java \
classpath/javax/sql/ConnectionEventListener.java \
@ -3746,6 +3982,7 @@ classpath/javax/swing/JTree.java \
classpath/javax/swing/JViewport.java \
classpath/javax/swing/JWindow.java \
classpath/javax/swing/KeyStroke.java \
classpath/javax/swing/KeyboardManager.java \
classpath/javax/swing/LayoutFocusTraversalPolicy.java \
classpath/javax/swing/ListCellRenderer.java \
classpath/javax/swing/ListModel.java \
@ -3972,12 +4209,16 @@ javax_swing_plaf_basic_header_files = $(patsubst classpath/%,%,$(patsubst %.java
javax_swing_plaf_metal_source_files = \
classpath/javax/swing/plaf/metal/DefaultMetalTheme.java \
classpath/javax/swing/plaf/metal/MetalBorders.java \
classpath/javax/swing/plaf/metal/MetalButtonListener.java \
classpath/javax/swing/plaf/metal/MetalButtonUI.java \
classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java \
classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java \
classpath/javax/swing/plaf/metal/MetalComboBoxButton.java \
classpath/javax/swing/plaf/metal/MetalComboBoxEditor.java \
classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java \
classpath/javax/swing/plaf/metal/MetalComboBoxUI.java \
classpath/javax/swing/plaf/metal/MetalDesktopIconUI.java \
classpath/javax/swing/plaf/metal/MetalFileChooserUI.java \
classpath/javax/swing/plaf/metal/MetalIconFactory.java \
classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java \
classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java \
@ -3988,6 +4229,7 @@ classpath/javax/swing/plaf/metal/MetalProgressBarUI.java \
classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java \
classpath/javax/swing/plaf/metal/MetalRootPaneUI.java \
classpath/javax/swing/plaf/metal/MetalScrollBarUI.java \
classpath/javax/swing/plaf/metal/MetalScrollButton.java \
classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java \
classpath/javax/swing/plaf/metal/MetalSeparatorUI.java \
classpath/javax/swing/plaf/metal/MetalSliderUI.java \
@ -4000,7 +4242,8 @@ classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java \
classpath/javax/swing/plaf/metal/MetalToolBarUI.java \
classpath/javax/swing/plaf/metal/MetalToolTipUI.java \
classpath/javax/swing/plaf/metal/MetalTreeUI.java \
classpath/javax/swing/plaf/metal/MetalUtils.java
classpath/javax/swing/plaf/metal/MetalUtils.java \
classpath/javax/swing/plaf/metal/OceanTheme.java
javax_swing_plaf_metal_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_plaf_metal_source_files)))
javax_swing_plaf_multi_source_files = \
@ -4066,6 +4309,7 @@ classpath/javax/swing/text/DefaultEditorKit.java \
classpath/javax/swing/text/DefaultFormatter.java \
classpath/javax/swing/text/DefaultHighlighter.java \
classpath/javax/swing/text/DefaultStyledDocument.java \
classpath/javax/swing/text/DefaultTextUI.java \
classpath/javax/swing/text/Document.java \
classpath/javax/swing/text/DocumentFilter.java \
classpath/javax/swing/text/EditorKit.java \
@ -4105,10 +4349,12 @@ classpath/javax/swing/text/TabableView.java \
classpath/javax/swing/text/TextAction.java \
classpath/javax/swing/text/Utilities.java \
classpath/javax/swing/text/View.java \
classpath/javax/swing/text/ViewFactory.java
classpath/javax/swing/text/ViewFactory.java \
classpath/javax/swing/text/WrappedPlainView.java
javax_swing_text_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_swing_text_source_files)))
javax_swing_text_html_source_files = \
classpath/javax/swing/text/html/CSS.java \
classpath/javax/swing/text/html/HTML.java \
classpath/javax/swing/text/html/HTMLDocument.java \
classpath/javax/swing/text/html/HTMLEditorKit.java \
@ -4208,6 +4454,43 @@ classpath/javax/xml/parsers/FactoryConfigurationError.java \
classpath/javax/xml/parsers/ParserConfigurationException.java \
classpath/javax/xml/parsers/SAXParser.java \
classpath/javax/xml/parsers/SAXParserFactory.java \
classpath/javax/xml/stream/EventFilter.java \
classpath/javax/xml/stream/FactoryConfigurationError.java \
classpath/javax/xml/stream/Location.java \
classpath/javax/xml/stream/StreamFilter.java \
classpath/javax/xml/stream/XMLEventFactory.java \
classpath/javax/xml/stream/XMLEventReader.java \
classpath/javax/xml/stream/XMLEventWriter.java \
classpath/javax/xml/stream/XMLFilter.java \
classpath/javax/xml/stream/XMLInputFactory.java \
classpath/javax/xml/stream/XMLIterator.java \
classpath/javax/xml/stream/XMLOutputFactory.java \
classpath/javax/xml/stream/XMLReporter.java \
classpath/javax/xml/stream/XMLResolver.java \
classpath/javax/xml/stream/XMLStreamConstants.java \
classpath/javax/xml/stream/XMLStreamException.java \
classpath/javax/xml/stream/XMLStreamReader.java \
classpath/javax/xml/stream/XMLStreamWriter.java \
classpath/javax/xml/stream/events/Attribute.java \
classpath/javax/xml/stream/events/Characters.java \
classpath/javax/xml/stream/events/Comment.java \
classpath/javax/xml/stream/events/DTD.java \
classpath/javax/xml/stream/events/EndDocument.java \
classpath/javax/xml/stream/events/EndElement.java \
classpath/javax/xml/stream/events/EndEntity.java \
classpath/javax/xml/stream/events/EntityDeclaration.java \
classpath/javax/xml/stream/events/EntityReference.java \
classpath/javax/xml/stream/events/Namespace.java \
classpath/javax/xml/stream/events/NotationDeclaration.java \
classpath/javax/xml/stream/events/ProcessingInstruction.java \
classpath/javax/xml/stream/events/StartDocument.java \
classpath/javax/xml/stream/events/StartElement.java \
classpath/javax/xml/stream/events/StartEntity.java \
classpath/javax/xml/stream/events/XMLEvent.java \
classpath/javax/xml/stream/util/EventReaderDelegate.java \
classpath/javax/xml/stream/util/ReaderDelegate.java \
classpath/javax/xml/stream/util/XMLEventAllocator.java \
classpath/javax/xml/stream/util/XMLEventConsumer.java \
classpath/javax/xml/transform/ErrorListener.java \
classpath/javax/xml/transform/OutputKeys.java \
classpath/javax/xml/transform/Result.java \
@ -4449,6 +4732,14 @@ all_packages_source_files = \
gnu/awt/j2d.list \
gnu/classpath.list \
gnu/classpath/debug.list \
gnu/classpath/jdwp.list \
gnu/classpath/jdwp/event.list \
gnu/classpath/jdwp/event/filters.list \
gnu/classpath/jdwp/exception.list \
gnu/classpath/jdwp/id.list \
gnu/classpath/jdwp/processor.list \
gnu/classpath/jdwp/transport.list \
gnu/classpath/jdwp/util.list \
gnu/gcj.list \
gnu/gcj/convert.list \
gnu/gcj/io.list \
@ -4467,7 +4758,6 @@ all_packages_source_files = \
gnu/java/net/protocol/file.list \
gnu/java/net/protocol/ftp.list \
gnu/java/net/protocol/http.list \
gnu/java/net/protocol/http/event.list \
gnu/java/net/protocol/https.list \
gnu/java/net/protocol/jar.list \
gnu/java/nio.list \
@ -4489,6 +4779,8 @@ all_packages_source_files = \
gnu/java/text.list \
gnu/java/util.list \
gnu/java/util/prefs.list \
gnu/javax/crypto.list \
gnu/javax/imageio/bmp.list \
gnu/javax/swing/text/html/parser.list \
gnu/javax/swing/text/html/parser/models.list \
gnu/javax/swing/text/html/parser/support.list \
@ -4563,6 +4855,10 @@ all_packages_source_files = \
javax/security/auth/x500.list \
javax/security/cert.list \
javax/security/sasl.list \
javax/sound/midi.list \
javax/sound/midi/spi.list \
javax/sound/sampled.list \
javax/sound/sampled/spi.list \
javax/sql.list \
javax/swing.list \
javax/swing/border.list \
@ -4589,6 +4885,14 @@ ordinary_header_files = \
$(gnu_awt_j2d_header_files) \
$(gnu_classpath_header_files) \
$(gnu_classpath_debug_header_files) \
$(gnu_classpath_jdwp_header_files) \
$(gnu_classpath_jdwp_event_header_files) \
$(gnu_classpath_jdwp_event_filters_header_files) \
$(gnu_classpath_jdwp_exception_header_files) \
$(gnu_classpath_jdwp_id_header_files) \
$(gnu_classpath_jdwp_processor_header_files) \
$(gnu_classpath_jdwp_transport_header_files) \
$(gnu_classpath_jdwp_util_header_files) \
$(gnu_gcj_header_files) \
$(gnu_gcj_convert_header_files) \
$(gnu_gcj_io_header_files) \
@ -4607,7 +4911,6 @@ ordinary_header_files = \
$(gnu_java_net_protocol_file_header_files) \
$(gnu_java_net_protocol_ftp_header_files) \
$(gnu_java_net_protocol_http_header_files) \
$(gnu_java_net_protocol_http_event_header_files) \
$(gnu_java_net_protocol_https_header_files) \
$(gnu_java_net_protocol_jar_header_files) \
$(gnu_java_nio_header_files) \
@ -4629,6 +4932,8 @@ ordinary_header_files = \
$(gnu_java_text_header_files) \
$(gnu_java_util_header_files) \
$(gnu_java_util_prefs_header_files) \
$(gnu_javax_crypto_header_files) \
$(gnu_javax_imageio_bmp_header_files) \
$(gnu_javax_swing_text_html_parser_header_files) \
$(gnu_javax_swing_text_html_parser_models_header_files) \
$(gnu_javax_swing_text_html_parser_support_header_files) \
@ -4703,6 +5008,10 @@ ordinary_header_files = \
$(javax_security_auth_x500_header_files) \
$(javax_security_cert_header_files) \
$(javax_security_sasl_header_files) \
$(javax_sound_midi_header_files) \
$(javax_sound_midi_spi_header_files) \
$(javax_sound_sampled_header_files) \
$(javax_sound_sampled_spi_header_files) \
$(javax_sql_header_files) \
$(javax_swing_header_files) \
$(javax_swing_border_header_files) \
@ -4726,6 +5035,7 @@ ordinary_header_files = \
bc_objects = \
gnu-java-beans.lo \
gnu-javax-sound-midi.lo \
gnu-xml.lo \
javax-imageio.lo \
javax-xml.lo \
@ -6584,6 +6894,86 @@ gnu/classpath/debug.list: $(gnu_classpath_debug_source_files)
-include gnu/classpath/debug.deps
gnu/classpath/jdwp.list: $(gnu_classpath_jdwp_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp.list
-include gnu/classpath/jdwp.deps
gnu/classpath/jdwp/event.list: $(gnu_classpath_jdwp_event_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_event_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/event.list
-include gnu/classpath/jdwp/event.deps
gnu/classpath/jdwp/event/filters.list: $(gnu_classpath_jdwp_event_filters_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_event_filters_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/event/filters.list
-include gnu/classpath/jdwp/event/filters.deps
gnu/classpath/jdwp/exception.list: $(gnu_classpath_jdwp_exception_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_exception_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/exception.list
-include gnu/classpath/jdwp/exception.deps
gnu/classpath/jdwp/id.list: $(gnu_classpath_jdwp_id_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_id_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/id.list
-include gnu/classpath/jdwp/id.deps
gnu/classpath/jdwp/processor.list: $(gnu_classpath_jdwp_processor_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_processor_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/processor.list
-include gnu/classpath/jdwp/processor.deps
gnu/classpath/jdwp/transport.list: $(gnu_classpath_jdwp_transport_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_transport_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/transport.list
-include gnu/classpath/jdwp/transport.deps
gnu/classpath/jdwp/util.list: $(gnu_classpath_jdwp_util_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_classpath_jdwp_util_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/classpath/jdwp/util.list
-include gnu/classpath/jdwp/util.deps
gnu/gcj.list: $(gnu_gcj_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_gcj_source_files); do \
@ -6789,16 +7179,6 @@ gnu/java/net/protocol/http.list: $(gnu_java_net_protocol_http_source_files)
-include gnu/java/net/protocol/http.deps
gnu/java/net/protocol/http/event.list: $(gnu_java_net_protocol_http_event_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_java_net_protocol_http_event_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/java/net/protocol/http/event.list
-include gnu/java/net/protocol/http/event.deps
gnu/java/net/protocol/https.list: $(gnu_java_net_protocol_https_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_java_net_protocol_https_source_files); do \
@ -7009,6 +7389,31 @@ gnu/java/util/prefs.list: $(gnu_java_util_prefs_source_files)
-include gnu/java/util/prefs.deps
gnu/javax/crypto.list: $(gnu_javax_crypto_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_javax_crypto_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/javax/crypto.list
-include gnu/javax/crypto.deps
gnu/javax/imageio/bmp.list: $(gnu_javax_imageio_bmp_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_javax_imageio_bmp_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > gnu/javax/imageio/bmp.list
-include gnu/javax/imageio/bmp.deps
gnu-javax-sound-midi.lo: $(gnu_javax_sound_midi_source_files)
@find classpath/lib/gnu/javax/sound/midi -name '*.class' > gnu-javax-sound-midi.list
$(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-javax-sound-midi.lo @gnu-javax-sound-midi.list
@rm -f gnu-javax-sound-midi.list
gnu/javax/swing/text/html/parser.list: $(gnu_javax_swing_text_html_parser_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(gnu_javax_swing_text_html_parser_source_files); do \
@ -7759,6 +8164,46 @@ javax/security/sasl.list: $(javax_security_sasl_source_files)
-include javax/security/sasl.deps
javax/sound/midi.list: $(javax_sound_midi_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_sound_midi_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > javax/sound/midi.list
-include javax/sound/midi.deps
javax/sound/midi/spi.list: $(javax_sound_midi_spi_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_sound_midi_spi_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > javax/sound/midi/spi.list
-include javax/sound/midi/spi.deps
javax/sound/sampled.list: $(javax_sound_sampled_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_sound_sampled_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > javax/sound/sampled.list
-include javax/sound/sampled.deps
javax/sound/sampled/spi.list: $(javax_sound_sampled_spi_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_sound_sampled_spi_source_files); do \
if test -f $(srcdir)/$$file; then \
echo $(srcdir)/$$file; \
else echo $$file; fi; \
done > javax/sound/sampled/spi.list
-include javax/sound/sampled/spi.deps
javax/sql.list: $(javax_sql_source_files)
@$(mkinstalldirs) $(dir $@)
@for file in $(javax_sql_source_files); do \

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="compat/|examples/|external/|gnu/classpath/jdwp/|gnu/javax/swing/plaf/|test/|testsuite/|vm/reference/|resource/" kind="src" path=""/>
<classpathentry excluding=".externalToolBuilders/|.settings/|ChangeLog*|Makefile*|autom4te.cache/|compat/|config*|doc/|examples/|external/|gnu/javax/swing/plaf/|include/|install/|lib/|m4/|native/|resource/|scripts/|test/|testsuite/|vm/reference/" kind="src" path=""/>
<classpathentry kind="src" path="resource"/>
<classpathentry excluding="gnu/classpath/jdwp/" kind="src" path="vm/reference"/>
<classpathentry kind="src" path="vm/reference"/>
<classpathentry kind="src" path="external/sax"/>
<classpathentry kind="src" path="external/w3c_dom"/>
<classpathentry kind="src" path="examples"/>

View File

@ -1,12 +1,13 @@
#Mon Apr 25 22:37:20 MDT 2005
#Tue Sep 13 16:15:04 MDT 2005
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@ -22,9 +23,20 @@ org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
@ -50,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.4
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,8 @@ caught bugs or submitted minor patches. If your name does not appear
on either list, but should, let us know. Please keep this list in
alphabetic order.
Stuart Ballard (stuart.ballard@mcmail.com)
Lillian Angel (langel@redhat.com)
Stuart Ballard (stuart.a.ballard@gmail.com)
Mark Benvenuto (mcb54@columbia.edu)
Geoff Berry (gcb@gnu.org)
James E. Blair (corvus@gnu.org)
@ -12,8 +13,10 @@ Eric Blake (ebb9@email.byu.edu)
Sascha Brawer (brawer@acm.org)
Nic Ferrier (nferrier@tapsellferrier.co.uk)
Paul Fisher (rao@gnu.org)
David Gilbert (david.gilbert@object-refinery.com)
Anthony Green (green@redhat.com)
Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de)
Andrew John Hughes (gnu_andrew@member.fsf.org)
Brian Jones (cbj@gnu.org)
Roman Kennke (roman@kennke.org)
Michael Koch (konqueror@gmx.de)
@ -25,6 +28,7 @@ Bryce McKinlay (bryce@waitaki.otago.ac.nz)
Audrius Meskauskas (audriusa@Bioinformatics.org)
Aaron M. Renn (arenn@urbanophile.com)
Andrew Selkirk (aselkirk@sympatico.ca)
Christian Thalinger (twisti@complang.tuwien.ac.at)
Tom Tromey (tromey@cygnus.com)
Ronald Veldema (rveldema@cs.vu.nl)
Mark Wielaard (mark@klomp.org)

View File

@ -2,4 +2,4 @@ This package is still in the early development phase. That means too
early to start listing bugs in a file like this one!
Report bugs to classpath@gnu.org or much better via Savannah at this
URL: http://savannah.gnu.org/bugs/?group=classpath
URL: http://www.gnu.org/software/classpath/bugs.html

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
Installing GNU Classpath - Last updated: August 31, 2005
Installing GNU Classpath - Last updated: September 7, 2005
First, this is a development release only! Unless you are interested in
active development and debugging, or just like running random alpha code,
@ -31,12 +31,17 @@ Suggested Software
--with-jikes, --with-gcj, --with-ecj or --with-kjc as argument to
configure; the present default is gcj.
- GCJ 3.3+ (part of the GNU GCC package).
- GCJ 4.0+ (part of the GNU GCC package).
- IBM jikes 1.19+.
- Eclipse Compiler for Java 3.1+
- The kjc compiler is supported with configure but we have
been unable to successfully compile with it.
IMPORTANT: Versions of GCJ which are earlier than 4.0 contain
bugs which make it impossible to compile the class library and
are *not* supported any more. If you are stuck on a system where
GCC 3.x is the system compiler we recommend using Jikes.
For building the gtk+ AWT peer JNI native libraries, the following
are required unless --disable-gtk-peer is used as an argument to
configure.
@ -74,6 +79,29 @@ Suggested Software
- texinfo 4.2 or higher.
For building the ALSA midi provider code you will need
ALSA. http://www.alsa-project.org.
For building the DSSI midi synthesizer provider code you will
need DSSI from http://dssi.sourceforge.net. This, in turn,
introduces many dependencies, including:
- liblo: the Lightweight OSC implementation
http://plugin.org.uk/liblo/
- LADSPA: Linux Audio Developer's Simple Plugin API
http://www.ladspa.org
- the JACK Audio Connection Kit: A low latency audio server
http://jackit.sourceforge.net
- libsndfile: an audio file I/O library
http://www.mega-nerd.com/libsndfile/
- fluidsynth: a real-time SoundFont 2 based soft-synth
http://www.fluidsynth.org/
This package was designed to use the GNU standard for configuration
and makefiles. To build and install do the following:
@ -99,8 +127,7 @@ gives a complete list.
--enable-Werror whether to compile C code with -Werror which turns
any compiler warning into a compilation failure
default=no
--enable-xmlj compile native libxml/xslt library default=no
--with-gjdoc generate documentation using gjdoc default=no
--with-gjdoc generate documentation using gjdoc default=no
--with-jay Regenerate the parsers with jay must be given the
path to the jay executable

View File

@ -284,3 +284,17 @@ All these files are distributed under the following terms:
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
The file native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c
contains two functions (get_port_default and set_control) derived from
example code in the DSSI distribution (http://dssi.sourceforge.net).
The original DSSI example code is distributed under the following
terms:
Copyright 2004 Chris Cannam, Steve Harris and Sean Bolton.
Permission to use, copy, modify, distribute, and sell this software
for any purpose is hereby granted without fee, provided that the
above copyright notice and this permission notice are included in
all copies or substantial portions of the software.

View File

@ -11,7 +11,8 @@ native: lib
EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
ChangeLog-2003 ChangeLog-2004 \
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \
autogen.sh
#DISTCHECK_CONFIGURE_FLAGS = --enable-gjdoc

View File

@ -44,10 +44,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
ltmain.sh missing mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -100,10 +98,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -240,6 +242,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -253,6 +256,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@ -272,7 +276,8 @@ DIST_SUBDIRS = lib doc external include native resource scripts examples
ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config
EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \
ChangeLog-2003 ChangeLog-2004 \
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj
ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \
autogen.sh
all: all-recursive
@ -446,7 +451,7 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../config $(distdir)/examples $(distdir)/gnu/classpath $(distdir)/lib $(distdir)/m4 $(distdir)/scripts
$(mkdir_p) $(distdir)/../.. $(distdir)/examples $(distdir)/gnu/classpath $(distdir)/lib $(distdir)/m4 $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \

View File

@ -1,3 +1,58 @@
New in release 0.20
Runtime interface changes:
* New method VMStackWalker.getClassLoader() was added to avoid an infinite
loop between getCallingClassLoader() and Class.getClassLoader().
New in release 0.19 (Nov 2, 2005)
* The Swing RepaintManager has been reworked for more efficient painting,
especially for large GUIs.
* The Swing layout manager OverlayLayout has been implemented, the BoxLayout
has been rewritten to make use of the SizeRequirements utility class and
caching for more efficient layout.
* Improved accessibility support for Swing.
* The java.net.HttpURLConnection implementation no longer buffers the
entire response body in memory. This means that response bodies
larger than available memory can now be handled.
* The Andrew Watson, Vice President and Technical Director of the Object
Management Group, has officially assigned us 20 bit Vendor Minor Code Id:
0x47430 ("GC") that will mark remote Classpath - specific system exceptions.
Obtaining the VMCID means that GNU Classpath now is a recogniseable type of
node in a highly interoperable CORBA world.
* Classpath now includes the first working draft to support the RMI over
IIOP protocol. The current implementation is capable for remote invocations,
transferring various Serializables and Externalizables via RMI-IIOP protocol.
It can flatten graphs and, at least for the simple cases, is interoperable
with Sun's jdk 1.5.
* Qt4 configury switches for OS-X. Additional to the --enable-qt-peer, OS-X
users with a Qt4 installation can build the qt-peers with the argument
--with-qt4dir=<Qt4-installation-dir>.
* Significant progress has been made in the implementation of the
javax.swing.plaf.metal.* package, with most UI delegates in a working state
now. Please test this with your own applications and provide feedback that
will help us to improve this package.
* The GUI demo (gnu.classpath.examples.swing.Demo) has been extended to
highlight various features in our free-swing implementation. And includes
a look and feel switcher (Metal default, Ocean or GNU).
Runtime interface changes:
* Changed implementation of VMClassLoader.getPackage(s) : new method
VMClassLoader.getBootPackages should be implemented by the vm, and sould
return a string array of boot package names ("java.lang", "java.net", ...).
Feedback from vm implementors for usability and relevance of the
getBootPackages method would be greatly appreciated.
New in release 0.18 (Sep 6, 2005)
* GNU JAWT implementation, the AWT Native Interface, which allows direct

View File

@ -547,6 +547,39 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# -*- Autoconf -*-
# Copyright (C) 2003 Free Software Foundation, Inc.
# This program 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.
# This program 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.
# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
@ -1053,10 +1086,8 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../../config/depstand.m4])
m4_include([../../config/lead-dot.m4])
m4_include([../../config/no-executables.m4])
m4_include([../../libtool.m4])
m4_include([m4/acattribute.m4])
m4_include([m4/accross.m4])
m4_include([m4/acinclude.m4])
m4_include([m4/iconv.m4])

View File

@ -16,7 +16,7 @@ LIBTOOLIZE=libtoolize
have_libtool=false
if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`${LIBTOOLIZE} --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
libtool_version=`${LIBTOOLIZE} --version | sed 's/^.*[^0-9.]\([0-9]\{1,\}\.[0-9.]\{1,\}\).*/\1/'`
case $libtool_version in
1.5*)
have_libtool=true

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2003-06-18'
timestamp='2005-07-08'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,14 +21,15 @@ timestamp='2003-06-18'
#
# 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
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@ -70,7 +71,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -83,11 +84,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit 0 ;;
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit 0 ;;
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@ -99,7 +100,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit 0;;
exit ;;
* )
break ;;
@ -118,7 +119,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -144,7 +146,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@ -228,14 +230,16 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -244,31 +248,37 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| s390 | s390x \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@ -296,19 +306,19 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -317,34 +327,40 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| s390-* | s390x-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@ -361,6 +377,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@ -378,6 +397,9 @@ case $basic_machine in
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@ -437,12 +459,27 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@ -465,6 +502,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -643,10 +684,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -727,10 +764,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -738,9 +771,12 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
openrisc | openrisc-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
@ -833,6 +869,12 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
@ -956,6 +998,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
@ -999,6 +1045,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1029,6 +1079,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1045,12 +1098,9 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@ -1124,19 +1174,21 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1154,12 +1206,15 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@ -1172,6 +1227,9 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
@ -1193,6 +1251,9 @@ case $os in
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
@ -1215,6 +1276,9 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
@ -1251,6 +1315,9 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)
@ -1282,9 +1349,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1328,9 +1395,15 @@ case $basic_machine in
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@ -1463,9 +1536,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
@ -1490,7 +1569,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit 0
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
AC_INIT([GNU Classpath],[0.18],[classpath@gnu.org],[classpath])
AC_INIT([GNU Classpath],[0.20-pre],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
AC_CANONICAL_TARGET
@ -65,15 +65,15 @@ AC_ARG_ENABLE([core-jni],
[COMPILE_CORE_JNI=yes])
AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
dnl -----------------------------------------------------------
dnl Whether to compile with -Werror or not (enabled by default)
dnl -----------------------------------------------------------
dnl ------------------------------------------------------------
dnl Whether to compile with -Werror or not (disabled by default)
dnl ------------------------------------------------------------
AC_ARG_ENABLE([Werror],
[AS_HELP_STRING(--disable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
[AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
[case "${enableval}" in
yes) ENABLE_WERROR=yes ;;
no) ENABLE_WERROR=no ;;
*) ENABLE_WERROR=yes ;;
*) ENABLE_WERROR=no ;;
esac],
[ENABLE_WERROR=no])
@ -102,6 +102,32 @@ AC_ARG_ENABLE([xmlj],
[COMPILE_XMLJ=no])
AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
dnl -----------------------------------------------------------
dnl ALSA code (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([alsa],
[AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
[case "${enableval}" in
yes) COMPILE_ALSA=yes ;;
no) COMPILE_ALSA=no ;;
*) COMPILE_ALSA=yes ;;
esac],
[AC_CHECK_HEADERS([alsa/asoundlib.h],COMPILE_ALSA=yes,COMPILE_ALSA=no)])
AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
dnl -----------------------------------------------------------
dnl DSSI code (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([dssi],
[AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
[case "${enableval}" in
yes) COMPILE_DSSI=yes ;;
no) COMPILE_DSSI=no ;;
*) COMPILE_DSSI=yes ;;
esac],
[AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])
AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
dnl -----------------------------------------------------------
dnl GTK native peer (enabled by default)
dnl -----------------------------------------------------------
@ -150,6 +176,35 @@ AC_ARG_ENABLE([qt-peer],
[COMPILE_QT_PEER=no])
AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
dnl -----------------------------------------------------------
dnl Sets the native libraries installation dir
dnl -----------------------------------------------------------
AC_ARG_WITH([native-libdir],
[AS_HELP_STRING(--with-native-libdir,sets the installation directore for native libraries [default='${libdir}/${PACKAGE}'])],
[
nativelibdir=${withval}
],
[
nativelibdir='${libdir}/${PACKAGE}'
])
AC_SUBST(nativelibdir)
dnl -----------------------------------------------------------
dnl Sets the Java library installation dir.
dnl -----------------------------------------------------------
AC_ARG_WITH([glibj-dir],
[AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
[
glibjdir=${withval}
],
[
glibjdir='${datadir}/${PACKAGE}'
])
AC_SUBST(glibjdir)
dnl -----------------------------------------------------------
dnl Regenerate headers at build time (disabled by default)
dnl -----------------------------------------------------------
@ -246,6 +301,7 @@ if test "x${COMPILE_JNI}" = xyes; then
[AC_MSG_RESULT(no)])])])
AC_C_CONST
AC_C_ATTRIBUTE
dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
AM_ICONV
@ -286,45 +342,78 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl Check for AWT related gthread/gtk
if test "x${COMPILE_GTK_PEER}" = xyes; then
AC_PATH_XTRA
if test "$no_x" = yes; then
AC_MSG_ERROR([GTK+ peers requested but no X library available])
fi
dnl We explicitly want the XTest Extension for Robot support.
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.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_PATH_XTRA
if test "$no_x" = yes; then
AC_MSG_ERROR([GTK+ peers requested but no X library available])
fi
dnl We explicitly want the XTest Extension for Robot support.
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.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
if test "x${enable_gtk_cairo}" = xyes; then
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
fi
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)
AC_SUBST(PANGOFT2_CFLAGS)
fi
dnl Check for AWT related Qt4
if test "x${COMPILE_QT_PEER}" = xyes; then
PKG_CHECK_MODULES(QT, QtGui >= 4.0.1)
dnl Check needed because in some cases the QtGui includedir
dnl doesn't contain the subsystem dir.
QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])))
PKG_CHECK_MODULES(QT, QtGui >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no")
if test "x$HAVE_QT4" = "xyes"; then
dnl Check needed because in some cases the QtGui includedir
dnl doesn't contain the subsystem dir.
QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])))
AC_CHECK_PROG(MOC, [moc], [moc])
fi
if test "x$HAVE_QT4" = "xno"; then
AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
case "$host_os" in
darwin*)
AC_ARG_WITH([qt4dir],
[AS_HELP_STRING([--with-qt4dir=DIR],
[Qt4 installation directory used for OS-X.
For other systems use pkg-config.])],
[QT4DIR=$withval]
)
if test x"$QT4DIR" = x ; then
AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
fi
AC_MSG_RESULT([QT4DIR... $QT4DIR])
AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
if test x"$MOC" = x; then
AC_MSG_ERROR([*** This is not the right Qt installation])
fi
QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
;;
*)
AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
of your installed Qt4 installation.])
;;
esac
fi
AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
AC_CHECK_PROG(MOC, [moc], [moc])
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
fi
if test "x${enable_gtk_cairo}" = xyes; then
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
fi
AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)
AC_SUBST(PANGOFT2_CFLAGS)
fi
CLASSPATH_WITH_JAVAH
@ -493,6 +582,8 @@ native/jni/java-util/Makefile
native/jni/gtk-peer/Makefile
native/jni/qt-peer/Makefile
native/jni/xmlj/Makefile
native/jni/midi-alsa/Makefile
native/jni/midi-dssi/Makefile
native/target/Makefile
native/target/Linux/Makefile
native/target/generic/Makefile
@ -501,7 +592,9 @@ scripts/Makefile
scripts/classpath.spec
lib/Makefile
lib/gen-classlist.sh
lib/copy-vmresources.sh
examples/Makefile
examples/Makefile.jawt])
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])
AC_OUTPUT

View File

@ -39,10 +39,8 @@ target_triplet = @target@
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -84,10 +82,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -224,6 +226,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -237,6 +240,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -40,10 +40,8 @@ target_triplet = @target@
subdir = doc/api
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -77,10 +75,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -217,6 +219,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -230,6 +233,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -0,0 +1,221 @@
#!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="mjw">
#include <include/macros.wml>
<header title="GNU Classpath 0.18 Announcement (2005-09-06)">
<pre>
GNU Classpath 0.18 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 our first release after "The Big Merge" with GCC/GCJ. GNU
Classpath can now be used as a subdirectory of libgcj inside the GCC
tree so it will be much easier to keep GCC up-to-date with the latest
GNU Classpath developer release snapshots.
Some highlights of changes in this release (more extensive list below):
Added GNU JAWT for awt native interface support. Datatransfer
clipboard updated to 1.5 including support for copy/paste of
serialized objects, images and files. Completed the org.omg
PortableInterceptor, DynamicAny and Portable Object Adapter
packages. Multi plaf support for Free Swing. Editing support for
JTree and JTable. Lots of icons and look and feel improvements for
Free Swing basic and metal themes. NIO FileChannel.map implemented
and DirectByteBuffer put method speedups. Image loading speedups for
awt. Support for darwin and solaris out of the box.
29 people actively contributed to this release and made 535 CVS
commits during the two months of development. diffstat since 0.17:
994 files changed, 114744 insertions(+), 13663 deletions(-)
More details about the various changes and contributions below.
A full list of bug reports fixed for this release can be found at:
http://gcc.gnu.org/bugzilla/buglist.cgi?product=classpath&target_milestone=0.18
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 JFreeChart and 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.
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 32.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.
See for more information: http://www.sourceware.org/mauve/
This release passes 31194 out of 32253 Mauve core library tests.
Conformance reports for the included jaxp support can be found in the
doc/README.jaxp file.
GNU Classpath 0.18 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.18.tar.gz
MD5sum: c0650c257aa93eafb709553f172f0bbb
SHA1sum: 28061c750244cac4ff0151da6aba183b94b98b25
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.18 (Sep 6, 2005)
(See the ChangeLog file for a full list of changes.)
* GNU JAWT implementation, the AWT Native Interface, which allows
direct access to native screen resources from within a Canvas's
paint method. GNU Classpath Examples comes with a Demo, see
examples/README.
* awt.datatransfer updated to 1.5 with supports for FlavorEvents.
The gtk+ awt peers now allow copy/paste of text, images, uris/files
and serialized objects with other applications and tracking
clipboard change events with gtk+ 2.6 (for gtk+ 2.4 only text and
serialized objects are supported). A GNU Classpath Examples
datatransfer Demo was added to show the new functionality.
* org.omg.PortableInterceptor and related functionality in other
packages is now implemented:
- The sever and client interceptors work as required since 1.4.
- The IOR interceptor works as needed for 1.5.
* The org.omg.DynamicAny package is completed and passes the prepared
tests.
* The Portable Object Adapter should now 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 usager
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.
* The javax.swing.plaf.multi.* package is now implemented.
* Editing and several key actions for JTree and JTable were implemented.
* Lots of icons and look and feel improvements for Free Swing basic
and metal themes were added. Try running the GNU Classpath Swing
Demo in examples (gnu.classpath.examples.swing.Demo) with:
-Dswing.defaultlaf=javax.swing.plaf.basic.BasicLookAndFeel
-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
* Start of styled text capabilites for java.swing.text.
* NIO FileChannel.map implementation, fast bulk put implementation for
DirectByteBuffer (speeds up this method 10x).
* Split gtk+ awt peers event handling in two threads and improve gdk
lock handling (solves several AWT lock ups).
* Speed up awt Image loading.
* Updated TimeZone data against Olson tzdata2005l.
* Make zip and jar UTF-8 "clean".
* "native" code builds and compiles (warning free) on Darwin and
Solaris.
Runtime interface changes:
* All native resource "pointers" in the VM interface classes are now
exposed as gnu.classpath.Pointer objects. This might impact runtimes
that optimize and support java.nio.DirectByteBuffers. Creating these
classes and accessing the contents as void * pointers for the native
reference JNI implementation is done through the
JCL_NewRawDataObject and JCL_GetRawData functions.
* Simplified the Class/VMClass interface.
* Removed loadedClasses map from ClassLoader. It's now the VMs
responsibility to manage the list of defined and loaded classes for
each class loader.
* Moved native methods from java.lang.reflect.Proxy to VMProxy.
* Added hook to VMClassLoader to allow VM to do class caching.
New Untested/Disabled Features:
The following new features are included, but not ready for
production yet. They are explicitly disabled and not supported. But
if you want to help with the development of these new features we
are interested in feedback. You will have to explicitly enable them
to try them out (and they will most likely contain bugs). If you are
interested in any of these then please join the mailing-list and
follow development in CVS.
* QT4 AWT peers, enable by giving configure --enable-qt-peer.
* JDWP framework, enable by deleting the jdwp references from
lib/standard.omit and vm/reference/standard.omit. No default
implementation is provided. Work is being done on gcj/gij
integration.
* StAX java.xml.stream, enable by deleting the gnu.xml.stream and
java.xml.stream references in lib/standard.omit.
The following people helped with this release:
Aaron Luchko (Lots of JDWP work)
Andreas Tobler (Darwin and Solaris testing and fixing
Andrew Haley (gcj build speedups)
Anthony Balkissoon (Lots of Free Swing work including JTable editing)
Archie Cobbs (Build fixes)
Audrius Meskauskas (Lots of omg corba work plus testing and documenting)
Bastiaan Huisman (TimeZone bug fixing)
Casey Marshall (NIO FileChannel.map support, security and policy updates)
Chris Burdess (StAX work and gnu xml fixes)
Christian Schlichtherle (Zip fixes and cleanups)
Christian Thalinger (64-bit cleanups)
Dalibor Topic (Qt4 build infrastructure)
David Gilbert (Basic and Metal icon and plaf and lots of documenting)
Guilhem Lavaux (JCL native Pointer updates)
Ingo Proetel (Image, Logger and URLClassLoader updates)
Ito Kazumitsu (NetworkInterfaces implementation and updates)
Jan Roehrich (BasicTreeUI updates)
Jeroen Frijters (VMProxy and VMClassLoader updates, RMIClassLoader fixes)
Keith Seitz (Lots of JDWP work)
Kelley Cook (Build fixes)
Lillian Angel (Lots of Free Swing work including JTree editing)
Mark Wielaard (Clipboard implementation, build and release infrastructure)
Rainer Orth (Build fixes)
Robert Schuster (Documentation updates and beans fixes)
Roman Kennke (Lots of Free Swing work including styled text)
Sven de Marothy (Qt4 peers)
Thomas Fitzsimmons (Lots of gtk+ awt peer work)
Tom Tromey (Lots of fixes including coordinating The Big Merge)
Wolfgang Baer (GapContent bug fixes)
We would also like to thank the numerous bug reporters and testers!
</pre>
<footer>

View File

@ -0,0 +1,247 @@
#!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="mjw">
#include <include/macros.wml>
<header title="GNU Classpath 0.19 Announcement (2005-11-02)">
<pre>
GNU Classpath "95% and counting" 0.19 released
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.
Some highlights of changes in this release (more extensive list below):
Much more efficient painting for large Free Swing GUIs. Improved
accessibility support. HttpURLConnection rewrite. Official CORBA
VMCID assigned. Start of RMI over IIOP support. Qt4 support for
OS-X. Much improved Free Swing Metal theme. Free Swing Demo includes
theme switcher example (Metal, Ocean, GNU). JBoss now starts up and
Jonas testsuite passes for 95%. Support for the javax.sound.midi
framework and experimental DSSI and ALSA service providers. Early
version of the popular StAX API. Now has 96% coverage of 1.4 API.
This is the first time we also have a pre-release of our 1.5 generics
work. classpath-0.19-generics contains a version of the core library
that uses the new 1.5 language features such as generics and
enumerations. ECJ and JamVM are known to support the generics release
out of the box. And you should be able to run Eclipse 3.1 with it to
develop programs that use the new 1.5 language and core library
additions. classpath-generics is a work in progress and not as
extensively tested as our regular releases. But please try it out if
you want to help us test the new 1.5 support of the core libraries.
For this release we setup a Free Swing Test Application page
http://developer.classpath.org/mediation/FreeSwingTestApps
Please see that page for showcases of applications that work with this
release and to help test other applications.
It is also the first release that has GNU Classpath promotion banners.
http://developer.classpath.org/mediation/ClasspathBanners
Please feel free to add them to your project pages if your project is
known to work with GNU Classpath or just to promote the project.
32 people actively contributed to this release and made
787 CVS commits during the last two months of development
(excluding the generics branch work). diffstat since 0.18:
1158 files changed, 93916 insertions(+), 36407 deletions(-)
More details about the various changes and contributions below.
A full list of bug reports fixed for this release can be found at:
http://gcc.gnu.org/bugzilla/buglist.cgi?product=classpath&target_milestone=0.19
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 JFreeChart and 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.
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 around 34.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.
See for more information: http://www.sourceware.org/mauve/
This release passes 33.381 out of 34.262 Mauve core library tests.
Conformance reports for the included jaxp support can be found in the
doc/README.jaxp file.
GNU Classpath 0.19 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.19.tar.gz
MD5sum: 0b93b1c1dd3d33ef7fb6a47dbb29e41d
SHA1sum: 43d499e8b83e04a7fc4a1d4d301638c5cec6c679
File: classpath-0.19-generics.tar.gz (EXPERIMENTAL)
MD5sum: 4c0ccc91a147af4010d19f48dbf441b3
SHA1sum: b2a2b968523b3af35cd7e44bcc4f940621b3ca66
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.19 (Nov 2, 2005)
(See the ChangeLog file for a full list of changes.)
* The Swing RepaintManager has been reworked for more efficient
painting, especially for large GUIs.
* The Swing layout manager OverlayLayout has been implemented, the
BoxLayout has been rewritten to make use of the SizeRequirements
utility class and caching for more efficient layout.
* Improved accessibility support for Swing.
* The java.net.HttpURLConnection implementation no longer buffers the
entire response body in memory. This means that response bodies
larger than available memory can now be handled.
* The Andrew Watson, Vice President and Technical Director of the
Object Management Group, has officially assigned us 20 bit Vendor
Minor Code Id: 0x47430 ("GC") that will mark remote Classpath -
specific system exceptions. Obtaining the VMCID means that GNU
Classpath now is a recogniseable type of node in a highly
interoperable CORBA world.
* Classpath now includes the first working draft to support the RMI
over IIOP protocol. The current implementation is capable for remote
invocations, transferring various Serializables and Externalizables
via RMI-IIOP protocol. It can flatten graphs and, at least for the
simple cases, is interoperable with Sun's jdk 1.5.
* Qt4 configury switches for OS-X. Additional to the --enable-qt-peer,
OS-X users with a Qt4 installation can build the qt-peers with the
argument --with-qt4dir=<Qt4-installation-dir>.
* Significant progress has been made in the implementation of the
javax.swing.plaf.metal.* package, with most UI delegates in a
working state now. Please test this with your own applications and
provide feedback that will help us to improve this package.
* The GUI demo (gnu.classpath.examples.swing.Demo) has been extended
to highlight various features in our free-swing implementation. And
includes a look and feel switcher (Metal default, Ocean or GNU).
Runtime interface changes:
* Changed implementation of VMClassLoader.getPackage(s) : new method
VMClassLoader.getBootPackages should be implemented by the vm, and
sould return a string array of boot package names ("java.lang",
"java.net", ...). Feedback from vm implementors for usability and
relevance of the getBootPackages method would be greatly
appreciated.
New Untested/Disabled Features:
The following new features are included, but not ready for
production yet. They are explicitly disabled and not supported. But
if you want to help with the development of these new features we
are interested in feedback. You will have to explicitly enable them
to try them out (and they will most likely contain bugs). If you are
interested in any of these then please join the mailing-list and
follow development in CVS.
* Cairo Gtk+ Graphics2D support, enabled by giving configure
--enable-gtk-cairo.
* QT4 AWT peers, enable by giving configure --enable-qt-peer.
The following people helped with this release:
Andreas Tobler
Qt4 support for Darwin/OSX, Graphics2D support, gtk+ updates.
Andrew Haley
Serialization and URLClassLoader fixes.
Andrew John Hughes
Serialization fixes, Properties XML support and generic branch work.
Anthony Balkissoon
Lots of Free Swing additions.
Anthony Green
MIDI framework, ALSA and DSSI providers.
Audrius Meskauskas
Lots of new CORBA and RMI work and bugfixes.
Casey Marshall
Crypto algorithm fixes.
Chris Burdess
StAX and dom xml:id support.
Christian Thalinger
Configuration and VM inteface fixes and CACAO integration.
Dalibor Topic
Build cleanups and Kaffe integration.
David Daney
HttpURLConnection rewrite and improvements.
David Gilbert
Lots of Free Swing and metal theme additions.
David Lichteblau
JCL support library global/local reference cleanups.
Gael Thomas
VMClassLoader boot packages support sugestions.
Guilhem Lavaux
Configuration, thread and channel fixes and Kaffe integration.
Jan Roehrich
BasicTreeUI fixes.
Jeroen Frijters
Serialization fixes, better Proxy support, bug fixes and IKVM integration.
Julian Scheid
Documentation updates and gjdoc support.
Keith Seitz
JDWP support.
Lillian Angel
Lots of Free Swing additions.
Mark Wielaard
Bug fixes, packaging and release management
Martin Cordova
Suggestions for better SocketTimeoutException.
Michael Koch
Configuration fixes.
Nicolas Geoffray
VMClassLoader and AccessController improvements.
Paul Jenner
Better -Werror support.
Robert Schuster
XML and URL, AWT and Free Swing bug fixes
Roman Kennke
Lots of Free Swing additions.
Santiago Gala
AccessControlContext fixes.
Stuart Ballard
RMI constant fixes.
Sven de Marothy
BMP imageio support, CSS and TextLayout fixes.
Thomas Fitzsimmons
Lots of imageio framework additions, lots of AWT and Free Swing bug fixes.
Tom Tromey
Eclipse integration, generics work, lots of bug fixes and gcj integration.
We would also like to thank the numerous bug reporters and testers!
</pre>
<footer>

View File

@ -0,0 +1,37 @@
#include "include/layout.wml"
<subject "GNU Classpath CORBA interoperability page">
<box>
<boxtitle>GNU Classpath::Object management group</boxtitle>
<boxitem>
This page is referenced from the official
<a href="http://doc.omg.org/vendor-tags">OMG Vendor tag list</a>,
maintained by the <a href = "http://www.corba.org/">OMG</a>.
It is is designed to help programmers debugging interoperation
with our ORB.
</boxitem>
<boxtitle>GNU Classpath::CORBA interoperability</boxtitle>
<boxitem>
<ol>
<li><a href="http://developer.classpath.org/mediation/CorbaInteroperability">
Interoperability information (system exception minor codes, etc).</a></li>
<li><a href="http://developer.classpath.org/doc/">GNU Classpath API Specification</a></li>
<li><a href="bugs.html">Bug database.</a></li>
<li>GNU Classpath CORBA vs:
<a href="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath.html">JDK 1.2</a>
<a href="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-classpath.html">JDK 1.3</a>
<a href="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html">JDK 1.4</a>
(updated nightly)</li>
<li><a href="http://www.gnu.org/software/classpath/classpath.html">Project home page</a></li>
</ol>
Registered information
<ul>
<li>GNU Classpath Vendor Minor Code Id (VMCID) is 0x47430xxx
("GC\x00\x00" - "GC\x0f\xff").</li>
</ul>
</boxitem>
</box>

View File

@ -34,6 +34,15 @@ page describing them in more detail:
</boxitem>
</box>
<box>
<boxtitle><a name="Development">GNU Classpath::Tools::Downloads</a></boxtitle>
<boxitem>
At the moment there are only official releases of gjdoc on
<createlink url="ftp://ftp.gnu.org/gnu/classpath/" name="ftp.gnu.org"/>.
All other tools are available from CVS from the savannah project page below.
</boxitem>
</box>
<box>
<boxtitle><a name="Development">GNU Classpath::Tools::Development</a></boxtitle>
<boxitem>

View File

@ -77,10 +77,10 @@ sub mylink {
<download-block>
<download
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"
date="02 November 2005"
version="0.19"
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.19.tar.gz"
notes="http://www.gnu.org/software/classpath/announce/20051102.html"
>
<!-- download
@ -99,6 +99,18 @@ sub mylink {
<boxitem>
<download-block>
<download
date="06 September 2005"
version="0.18"
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.18.tar.gz"
notes="http://www.gnu.org/software/classpath/announce/20050906.html"
>
<download
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
date="30 June 2005"
version="0.16"

View File

@ -36,7 +36,7 @@ obtained by looking at these resources.
<ul>
<li><createlink url="tasks.html" name="Task descriptions"></li>
<li>GNU Classpath vs: <createlink url="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk10-classpath.html" name="JDK 1.0"> <createlink url="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk11-classpath.html" name="JDK 1.1"> <createlink url="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath.html" name="JDK 1.2"> <createlink url="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk13-classpath.html" name="JDK 1.3"> <createlink url="http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html" name="JDK 1.4"> (updated nightly)</li>
<li>GNU Classpath <createlink url="http://ontographics.com/classpath/mauve/mauvereport.cgi" name="Mauve Results"></li>
<li>GNU Classpath <createlink url="http://www.object-refinery.com/classpath/mauve/report/" name="Mauve Results"></li>
</ul>
</p>
</boxitem>

View File

@ -116,7 +116,7 @@
<menuitem><createlink name="CVS" url="http://savannah.gnu.org/cvs/?group=classpath"></menuitem>
<menutitle>Development</menutitle>
<menuitem><createlink name="Tasks" url="tasks.html"></menuitem>
<menuitem><createlink name="Tasks" url="http://developer.classpath.org/mediation/ClasspathOpenTasks"></menuitem>
<menuitem><createlink name="Docs" url="docs/docs.html"></menuitem>
<menuitem><createlink name="Testing" url="benchmarks.html#testing"></menuitem>
<menuitem><createlink name="Benchmarks" url="benchmarks.html#benchmarks"></menuitem>

View File

@ -1,3 +1,13 @@
<newsitem date="02 Nov 2005">
<createlink name="GNU Classpath 0.19"
url="announce/20051102.html">
</newsitem>
<newsitem date="06 Sep 2005">
<createlink name="GNU Classpath 0.18"
url="announce/20050906.html">
</newsitem>
<newsitem date="03 Aug 2005">
<createlink name="Generics Branch Merge Announcement"
url="http://lists.gnu.org/archive/html/classpath/2005-08/msg00002.html">

View File

@ -1,326 +1,14 @@
#include "include/layout.wml"
<html>
<head>
<title>GNU Classpath Tasklist - GNU Project - Free Software Foundation (FSF)</title>
<META HTTP-EQUIV="Refresh"
CONTENT="0; URL=http://developer.classpath.org/mediation/ClasspathOpenTasks">
</head>
<body>
This page has moved. If your browser doesn't automatically redirect to
its new location, click
<a href="http://developer.classpath.org/mediation/ClasspathOpenTasks">
http://developer.classpath.org/mediation/ClasspathOpenTasks</a>.
</body>
</html>
##
#
# Special Tags
#
# <task
# title="task title"
# contact="contact person"
# skills="..."
# estimation="..."
# >
# ... task description ...
# </task>
# the task counter
#
<set-var __TASKSEQCNT=1>
<define-tag task-section endtag=required>
<preserve name>
<set-var %attributes>
{#TASKINDEX#:
<boxitem>
<!---boxtitle--->
<strong><get-var __TASKSEQCNT>. <get-var name></strong> <br>
<!---/boxtitle--->
:#TASKINDEX#}
<boxtitle><get-var __TASKSEQCNT>. <get-var name></boxtitle>
<set-var __TASKCNT=1>
%body
{#TASKINDEX#:
</boxitem>
<br>
:#TASKINDEX#}
<increment __TASKSEQCNT>
<restore name>
</define-tag>
<define-tag task endtag=required>
<preserve title>
<preserve contact>
<preserve skills>
<preserve estimation>
<set-var %attributes>
{#TASKINDEX#:
<!---strong--><a href="tasks.html#task<get-var __TASKSEQCNT>_<get-var __TASKCNT>"><get-var __TASKSEQCNT>.<get-var __TASKCNT> <get-var title></a><!---/strong--> (<get-var estimation>)<br>
:#TASKINDEX#}
<boxitem>
<h3><a name="task<get-var __TASKSEQCNT>_<get-var __TASKCNT>"><get-var __TASKSEQCNT>.<get-var __TASKCNT> <get-var title></a></h3>
<table border="0">
<tr><td valign="top"><strong>Description:</strong></td><td>%body</td></tr>
<tr><td><strong>Skills:</strong></td><td><get-var skills></td></tr>
<tr><td><strong>Estimated time:</strong></td><td><get-var estimation></td></tr>
<tr><td><strong>Contact person:</strong></td><td><get-var contact></td></tr>
</table>
</boxitem>
<increment __TASKCNT>
<restore estimation>
<restore skills>
<restore contact>
<restore title>
</define-tag>
<define-tag sb>
Sascha Brawer
</define-tag>
<define-tag mw>
Mark Wielaard
</define-tag>
<define-tag pr>
Patrik Reali
</define-tag>
<define-tag cm>
Casey Marshall
</define-tag>
<define-tag dt>
Dalibor Topic
</define-tag>
<define-tag mk>
Michael Koch
</define-tag>
<set-var last-modified-author="prk">
<subject "GNU Classpath Tasklist">
<h1>GNU Classpath Tasklist</h1>
<box>
<boxitem>
This list is a collection of tasks for helping GNU Classpath's progress. They are a good starting point if you would like to help in producing a complete and high-quality free Java implementation.
<p>Another source of inspiration are GNU Classpath's <createlink name="task list" url="http://savannah.gnu.org/pm/?group=classpath"> and <createlink name="patch list" url="http://savannah.gnu.org/patch/?group=classpath"> on Savannah, though these are usually meant for the project members.
</boxitem>
<boxtitle>Index</boxtitle>
{#TASKINDEX#}
<task-section name="Graphics">
<task
title="javax.imageio"
estimation="2 weeks"
skills=""
contact="<sb> or <mk>"
>
Write an implementation of the javax.imageio framework.
</task>
<task
title="Constructive Area Geometry"
estimation="6 weeks (?)."
skills="Computational geometry skills"
contact="<sb>"
>
Implement java.awt.geom.Area. This would be useful for some
graphics applications.
</task>
<task
title="Composite Contexts"
estimation="2 days for each operator"
skills="It helps if you are familiar with the java.awt.image framework."
contact="<sb>"
>
Implement some CompositeContexts for Porter/Duff operators on raster
images. This would be useful for supporting 2D graphics. See
java.awt.AlphaComposite and its createContext method.
</task>
</task-section>
<task-section name="CORBA">
<task
title="Help with CORBA implementation"
estimation="This depends on the sub-task you pick."
skills="Know or be ready to read the OMG documentation."
contact="Audrius Meskauskas"
>
The CORBA implementation in the Classpath project is
now a working but incomplete prototype. A number of CORBA
related tasks are available. If you are not a CORBA expert, you should be ready
to learn by reading the <createlink name="OMG specifications"
url="http://www.omg.org/cgi-bin/doc?formal/04-03-12"> and probably by writing some
relatively simple classes.
</task>
</task-section>
<task-section name="Testing">
<task
title="Make Mauve an application"
estimation=""
skills=""
contact="<pr>"
>
On some environments, it is not possible to run shell scripts
because there is no shell. Make the Mauve test suite a self-contained
application (one big JAR file).
</task>
<task
title="Write Mauve tests"
estimation=""
skills=""
contact="<mw>"
>
Write Mauve tests.
</task>
<task
title="Mauve tests for javax.image.io"
estimation="1 week"
skills=""
contact="<sb>"
>
<p>Write Mauve tests for reading in images. You could use the test images
at libpng.org and write Mauve testlets that load each image from
a file. Compute a hash (such as SHA-1) over the contents of the
DataBuffer. If the hash matches, the test succeeds.
</p><p>
Note that we don't have javax.imageio yet, so you'd have to develop
this with the Sun JDK.
</p>
</task>
<task
title="Generator for Mauve tests"
estimation="2 weeks (prototype) + 2 weeks (tuning)"
skills=""
contact="<dt>"
>
Write a program which automatically generates basic Mauve tests.
</task>
</task-section>
<task-section name="Automation">
<task
title="Script for running regression tests"
estimation="1 week"
skills="???"
contact=""
>
Write a script that once a night checks out Classpath from cvs,
compiles it, runs the Mauve test suite (also from cvs) on it
using some free JVM (e.g. Kissme), and posts the results to
some web site. For comparison, it would be very helpful if the
same Mauve testlets were also run with a current Sun JVM.
</task>
<task
title="Integrate Classpath testsuite into Mauve"
estimation=""
skills=""
contact="<mw>"
>
Classpath has a rather small number of tests in the subdirectories
test/ and testsuite/. Look through these tests and check whether the
same functionality is already tested by Mauve. If not, write a
Mauve testlet and submit it to mauve-patches@sources.redhat.com <mailto:mauve-patches@sources.redhat.com>.
The goal is to remove the test suite from Classpath.
</task>
<task
title="Script for running Japitools"
estimation="1 week"
skills=""
contact="???"
>
Write a script that once a night checks out Classpath from cvs,
runs Japitools on it, and posts the results on some web site.
</task>
<task
title="Script for running gjdoc"
estimation="1 week"
skills=""
contact=""
>
Write a script that once a night checks out Classpath from cvs,
runs gjdoc on it, and posts the generated documentation on some
web site. While you're at it, fix gjdoc so it copies embedded
documentation images (classpath-tools support request #102205).
</task>
<task
title="JAR file verification"
estimation=""
skills=""
contact="<mw>"
>
</task>
</task-section>
<task-section name="Native stuff">
<task
title="Libiconv Service Provider for java.nio.charset"
estimation="2 weeks"
skills=""
contact=""
>Write a service provider for java.nio.charset that uses the
libiconv library for converting character encodings to and
from UTF-16. This would be a first step for replacing
gnu.java.io.EncodingManager by the java.nio.charset framework,
which is richer and not specific to Classpath.
</task>
</task-section>
<task-section name="Security">
<task
title="Security Audit"
estimation=""
skills=""
contact=""
>We need to make a pass over the Classpath Java source, making sure
that all required calls to the SecurityManager are in place. At the same
time we need to ensure that there is no way to get around
SecurityManager by directly calling code in gnu.*.
</task>
<task
title="Security Testing"
estimation=""
skills=""
contact=""
>We need Mauve tests for all the calls to SecurityManager.
Additionally, enabling a security manager will probably reveal
code in Classpath that needs to be wrapped in AccessController.doPrivileged().
</task>
</task-section>
<task-section name="Related Projects">
<task
title="Help GNU Crypto"
estimation=""
skills=""
contact="<cm>"
>
</task>
<task
title="Help Classpath-x"
estimation=""
skills=""
contact=""
>
??? (maybe this should be more specific, e.g. "Write an
IMAP plug-in for javax.mail on top of inetlib" (if they want
this at all)
</task-section>
</box>

View File

@ -41,10 +41,8 @@ subdir = examples
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.jawt.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -86,10 +84,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -226,6 +228,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -239,6 +242,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -73,7 +73,7 @@ import org.omg.CosNaming.NamingContextHelper;
*/
public class Demo
{
public static void main(final String[] args)
public static void main(String[] an_args)
{
// We create the following naming graph:
// <ROOT CONTEXT>
@ -90,6 +90,8 @@ public class Demo
System.out.println("Starting the GNU Classpath " +
"built-in transient naming service"
);
final String[] args = an_args;
new Thread()
{

View File

@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication;
import java.io.File;
import gnu.classpath.examples.CORBA.SimpleCommunication.communication.DirectTest;
import gnu.classpath.examples.CORBA.SimpleCommunication.communication.RequestTest;
@ -61,23 +63,34 @@ public class Demo
{
public static void main(final String[] args)
{
File ior = new File("IOR.txt");
if (ior.exists())
ior.delete();
// Start the server.
new Thread()
{
public void run()
{
comServer.start_server(args);
DemoServer.start_server(args);
}
}.start();
System.out.println("Waiting for three seconds for the server to start...");
// Pause some time for the server to start.
try {
Thread.sleep(3000);
}
catch (InterruptedException ex) {
}
System.out.print("Waiting for the server to start ");
while (!ior.exists())
{
// Pause some time for the server to start.
try
{
Thread.sleep(200);
}
catch (InterruptedException ex)
{
}
System.out.print(".");
}
System.out.println("ok.");
System.out.println();
// Test the stream oriented communication.
DirectTest.main(args);

View File

@ -1,4 +1,4 @@
/* comServer.java --
/* DemoServer.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication;
import gnu.classpath.examples.CORBA.SimpleCommunication.communication.comServant;
import gnu.classpath.examples.CORBA.SimpleCommunication.communication.DemoServant;
import org.omg.CORBA.ORB;
@ -47,7 +47,7 @@ import java.io.PrintStream;
/**
* This is the server class that handles the client requests,
* delegating the functionality to the {@link comServant}.
* delegating the functionality to the {@link DemoServant}.
*
* When starting, the server writes the IOR.txt file into the current
* folder. With the information, stored in this file, the server
@ -62,7 +62,7 @@ import java.io.PrintStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class comServer
public class DemoServer
{
public static void main(String[] args)
@ -78,7 +78,7 @@ public class comServer
final ORB orb = org.omg.CORBA.ORB.init(args, null);
// Create the servant and register it with the ORB.
comServant tester = new comServant();
DemoServant tester = new DemoServant();
orb.connect(tester);
// Storing the IOR reference.

View File

@ -1,4 +1,4 @@
/* comServant.java --
/* DemoServant.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -45,12 +45,6 @@ import org.omg.CORBA.DoubleHolder;
import org.omg.CORBA.ShortHolder;
import org.omg.CORBA.StringHolder;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;
/**
* This class handles the actual server functionality in this test
* application. When the client calls the remote method, this
@ -62,8 +56,8 @@ import java.io.PrintStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class comServant
extends _comTesterImplBase
public class DemoServant
extends _DemoTesterImplBase
{
/**
* The field, that can be set and checked by remote client.
@ -129,7 +123,7 @@ public class comServant
/**
* Accept and return the structures.
*/
public returnThis passStructure(passThis in_structure)
public StructureToReturn passStructure(StructureToPass in_structure)
{
System.out.println("SERVER: ***** Transferring structures");
System.out.println("SERVER: Received " + in_structure.a + ":" +
@ -137,7 +131,7 @@ public class comServant
);
// Create and send back the returned structure.
returnThis r = new returnThis();
StructureToReturn r = new StructureToReturn();
r.c = in_structure.a + in_structure.b;
r.n = 555;
r.arra = new int[] { 11, 22, 33 };
@ -147,14 +141,14 @@ public class comServant
/**
* Pass and return the tree structure
*/
public void passTree(nodeHolder tree)
public void passTree(TreeNodeHolder tree)
{
System.out.println("SERVER: ***** Transferring tree");
StringBuffer b = new StringBuffer();
// This both creates the tree string representation
// and changes the node names.
// and changes the TreeNode names.
getImage(b, tree.value);
System.out.println("SERVER: The tree was: " + b + ", returning changed.");
}
@ -190,11 +184,11 @@ public class comServant
*
* @param parameter specifies which exception will be thrown.
*
* @throws ourUserException for the non negative parameter.
* @throws WeThrowThisException for the non negative parameter.
* @throws BAD_OPERATION for the negative parameter.
*/
public void throwException(int parameter)
throws ourUserException
throws WeThrowThisException
{
System.out.println("SERVER: ***** Testing exceptions");
if (parameter > 0)
@ -202,7 +196,7 @@ public class comServant
System.out.println("SERVER: Throwing the user exception, " +
"specific field = "+parameter
);
throw new ourUserException(parameter);
throw new WeThrowThisException(parameter);
}
else
{
@ -215,12 +209,12 @@ public class comServant
/**
* Visit all tree nodes, getting the string representation
* and adding '++' to the node names.
* and adding '++' to the TreeNode names.
*
* @param b the buffer to collect the string representation.
* @param n the rott tree node.
* @param n the rott tree TreeNode.
*/
private void getImage(StringBuffer b, node n)
private void getImage(StringBuffer b, TreeNode n)
{
b.append(n.name);
n.name = n.name + "++";

View File

@ -1,4 +1,4 @@
/* comTester.java --
/* DemoTester.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -45,12 +45,12 @@ import org.omg.CORBA.StringHolder;
/**
* The interface of our remote object. Some IDL compiles split it
* into "comTester" and "comTesterOperations", but we do not see
* into "DemoTester" and "comTesterOperations", but we do not see
* much sense in doing this here.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface comTester
public interface DemoTester
{
/**
* Passes wide (UTF-16) string and narrow (ISO8859_1) string.
@ -77,14 +77,14 @@ public interface comTester
/**
* Passes and returns the structures.
*/
returnThis passStructure(passThis in_structure);
StructureToReturn passStructure(StructureToPass in_structure);
/**
* Pass and return the tree structure
*
* @param tree the root node of the tree.
* @param tree the root TreeNode of the tree.
*/
void passTree(nodeHolder tree);
void passTree(TreeNodeHolder tree);
/**
* Just prints the "Hello" message.
@ -102,10 +102,10 @@ public interface comTester
void theField(int newTheField);
/**
* Throws either 'ourUserException' with the 'ourField' field
* Throws either 'WeThrowThisException' with the 'ourField' field
* initialised to the passed positive value
* or system exception (if the parameter is zero or negative).
*/
void throwException(int parameter)
throws ourUserException;
throws WeThrowThisException;
}

View File

@ -57,7 +57,7 @@ import java.io.IOException;
* where the program has been started.
*
* The IOR.txt file is written by the server
* {@link gnu.classpath.examples.CORBA.SimpleCommunication.comServer}.
* {@link gnu.classpath.examples.CORBA.SimpleCommunication.DemoServer}.
* The server should be reachable over Internet, unless blocked by
* security tools.
*
@ -83,7 +83,7 @@ public class DirectTest
/**
* The invocation target.
*/
comTester object;
DemoTester object;
/**
* Get the object reference.
@ -102,7 +102,7 @@ public class DirectTest
String ior = new String(c);
DirectTest we = new DirectTest();
we.object = (comTester) orb.string_to_object(ior);
we.object = (DemoTester) orb.string_to_object(ior);
we.Demo();
orb.shutdown(false);
}
@ -199,11 +199,11 @@ public class DirectTest
{
System.out.println("***** Pass structure");
passThis arg = new passThis();
StructureToPass arg = new StructureToPass();
arg.a = "A";
arg.b = "B";
returnThis r = object.passStructure(arg);
StructureToReturn r = object.passStructure(arg);
System.out.println(" Fields of the returned structure:");
@ -257,15 +257,15 @@ public class DirectTest
// +-- bb
System.out.println("***** Pass and return the tree.");
node n = nod("Root");
TreeNode n = nod("Root");
n.children = new node[] { nod("a"), nod("b") };
n.children [ 1 ].children = new node[] { nod("ba"), nod("bb") };
n.children [ 1 ].children [ 0 ].children = new node[] { nod("bac") };
n.children = new TreeNode[] { nod("a"), nod("b") };
n.children [ 1 ].children = new TreeNode[] { nod("ba"), nod("bb") };
n.children [ 1 ].children [ 0 ].children = new TreeNode[] { nod("bac") };
nodeHolder nh = new nodeHolder(n);
TreeNodeHolder nh = new TreeNodeHolder(n);
// The server should add '++' to each node name.
// The server should add '++' to each TreeNode name.
object.passTree(nh);
// Convert the returned tree to some strig representation.
@ -288,7 +288,7 @@ public class DirectTest
object.throwException(123);
throw new InternalError();
}
catch (ourUserException uex)
catch (WeThrowThisException uex)
{
System.out.println(" The user exception with field " + uex.ourField +
", has been thrown on remote side."
@ -312,9 +312,9 @@ public class DirectTest
/**
* Get the string representation of the passed tree.
* @param b the string buffer to accumulate the representation.
* @param n the tree (root node).
* @param n the tree (root TreeNode).
*/
private void getImage(StringBuffer b, node n)
private void getImage(StringBuffer b, TreeNode n)
{
b.append(n.name);
b.append(": (");
@ -328,15 +328,15 @@ public class DirectTest
}
/**
* Create a node with the given header.
* Create a TreeNode with the given header.
*
* @param hdr the node header.
* @return the created node.
* @param hdr the TreeNode header.
* @return the created TreeNode.
*/
private node nod(String hdr)
private TreeNode nod(String hdr)
{
node n = new node();
n.children = new node[ 0 ];
TreeNode n = new TreeNode();
n.children = new TreeNode[ 0 ];
n.name = hdr;
return n;

View File

@ -1,3 +1,39 @@
/* RequestTest.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.classpath.examples.CORBA.SimpleCommunication.communication;
@ -7,14 +43,10 @@ import java.io.FileReader;
import java.io.IOException;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ByteHolder;
import org.omg.CORBA.DoubleHolder;
import org.omg.CORBA.ExceptionList;
import org.omg.CORBA.NVList;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.ShortHolder;
import org.omg.CORBA.StringHolder;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.UnknownUserException;
@ -25,7 +57,7 @@ import org.omg.CORBA.UnknownUserException;
* where the program has been started.
*
* The IOR.txt file is written by the server
* {@link gnu.classpath.examples.CORBA.SimpleCommunication.comServer}.
* {@link gnu.classpath.examples.CORBA.SimpleCommunication.DemoServer}.
* The server should be reachable over Internet, unless blocked by
* security tools.
*
@ -106,7 +138,6 @@ public class RequestTest
throw new InternalError();
}
testSystemException();
testUserException();
testWideNarrowStrings();
}
@ -135,13 +166,6 @@ public class RequestTest
Request r =
object._create_request(null, "passSimple", orb.create_list(0), null);
ByteHolder a_byte = new ByteHolder((byte) 0);
ShortHolder a_short = new ShortHolder((short) 3);
StringHolder a_string = new StringHolder("[string 4]");
// This is an 'out' parameter; the value must not be passed to servant.
DoubleHolder a_double = new DoubleHolder(56.789);
r.add_inout_arg().insert_octet((byte) 0);
r.add_in_arg().insert_long(2);
r.add_inout_arg().insert_short((short) 3);
@ -188,7 +212,7 @@ public class RequestTest
try
{
ExceptionList exList = orb.create_exception_list();
exList.add(ourUserExceptionHelper.type());
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1),
@ -217,7 +241,7 @@ public class RequestTest
System.out.println("**** Test user exception:");
ExceptionList exList = orb.create_exception_list();
exList.add(ourUserExceptionHelper.type());
exList.add(WeThrowThisExceptionHelper.type());
Request rq =
object._create_request(null, "throwException", orb.create_list(1), null,
@ -228,7 +252,7 @@ public class RequestTest
rq.invoke();
UnknownUserException uku = (UnknownUserException) rq.env().exception();
ourUserException our_exception = ourUserExceptionHelper.extract(uku.except);
WeThrowThisException our_exception = WeThrowThisExceptionHelper.extract(uku.except);
System.out.println(" Our user exception, field " + our_exception.ourField +
", has been thrown on remote side."

View File

@ -1,4 +1,4 @@
/* passThis.java --
/* StructureToPass.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -44,9 +44,14 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class passThis
public class StructureToPass
implements org.omg.CORBA.portable.IDLEntity
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* The first string, stored in this structure (defined as
* "narrow string").

View File

@ -1,4 +1,4 @@
/* passThisHelper.java --
/* StructureToPassHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TypeCode;
@ -46,17 +45,17 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
* The helper operations for the {@link passThis}.
* The helper operations for the {@link StructureToPass}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class passThisHelper
public abstract class StructureToPassHelper
{
/**
* The repository ID of the {@link passThis}.
* The repository ID of the {@link StructureToPass}.
*/
private static String id =
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/passThis:1.0";
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass:1.0";
/**
* Get the repository id.
@ -69,9 +68,9 @@ public abstract class passThisHelper
/**
* Read the structure from the CDR stram.
*/
public static passThis read(InputStream istream)
public static StructureToPass read(InputStream istream)
{
passThis value = new passThis();
StructureToPass value = new StructureToPass();
value.a = istream.read_string();
value.b = istream.read_wstring();
return value;
@ -88,13 +87,13 @@ public abstract class passThisHelper
members [ 0 ] = new StructMember("a", member, null);
member = ORB.init().create_string_tc(0);
members [ 1 ] = new StructMember("b", member, null);
return ORB.init().create_struct_tc(passThisHelper.id(), "passThis", members);
return ORB.init().create_struct_tc(StructureToPassHelper.id(), "StructureToPass", members);
}
/**
* Write the structure into the CDR stream.
*/
public static void write(OutputStream ostream, passThis value)
public static void write(OutputStream ostream, StructureToPass value)
{
ostream.write_string(value.a);
ostream.write_wstring(value.b);

View File

@ -6,32 +6,32 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
public final class passThisHolder
public final class StructureToPassHolder
implements Streamable
{
public passThis value;
public StructureToPass value;
public passThisHolder()
public StructureToPassHolder()
{
}
public passThisHolder(passThis initialValue)
public StructureToPassHolder(StructureToPass initialValue)
{
value = initialValue;
}
public void _read(InputStream i)
{
value = passThisHelper.read(i);
value = StructureToPassHelper.read(i);
}
public org.omg.CORBA.TypeCode _type()
{
return passThisHelper.type();
return StructureToPassHelper.type();
}
public void _write(OutputStream o)
{
passThisHelper.write(o, value);
StructureToPassHelper.write(o, value);
}
}

View File

@ -1,4 +1,4 @@
/* returnThis.java --
/* StructureToReturn.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -44,9 +44,14 @@ import org.omg.CORBA.portable.IDLEntity;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class returnThis
public class StructureToReturn
implements IDLEntity
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* The string field.
*/

View File

@ -1,4 +1,4 @@
/* returnThisHelper.java --
/* StructureToReturnHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -37,7 +37,6 @@ exception statement from your version. */
package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
@ -46,17 +45,17 @@ import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
/**
* This class defines the helper operations for {@link returnThis}.
* This class defines the helper operations for {@link StructureToReturn}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class returnThisHelper
public abstract class StructureToReturnHelper
{
/**
* The repository id.
*/
private static String _id =
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/returnThis:1.0";
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn:1.0";
/**
* Return the repository id.
@ -69,9 +68,9 @@ public abstract class returnThisHelper
/**
* Read the structure from the CDR stream.
*/
public static returnThis read(InputStream istream)
public static StructureToReturn read(InputStream istream)
{
returnThis value = new returnThis();
StructureToReturn value = new StructureToReturn();
value.n = istream.read_long();
value.c = istream.read_wstring();
value.arra = new int[ 3 ];
@ -95,7 +94,7 @@ public abstract class returnThisHelper
member = ORB.init().get_primitive_tc(TCKind.tk_long);
member = ORB.init().create_array_tc(3, member);
members [ 2 ] = new StructMember("arra", member, null);
return ORB.init().create_struct_tc(returnThisHelper.id(), "returnThis",
return ORB.init().create_struct_tc(StructureToReturnHelper.id(), "StructureToReturn",
members
);
}
@ -103,7 +102,7 @@ public abstract class returnThisHelper
/**
* Write the structure to the CDR stream.
*/
public static void write(OutputStream ostream, returnThis value)
public static void write(OutputStream ostream, StructureToReturn value)
{
ostream.write_long(value.n);
ostream.write_wstring(value.c);

View File

@ -10,25 +10,25 @@ import org.omg.CORBA.portable.Streamable;
/**
* The holder for the structure, returned from the server.
*/
public final class returnThisHolder
public final class StructureToReturnHolder
implements Streamable
{
/**
* The enclosed structure.
*/
public returnThis value = null;
public StructureToReturn value = null;
/**
* Create the empty holder.
*/
public returnThisHolder()
public StructureToReturnHolder()
{
}
/**
* Crate the holder with the defined initial value.
*/
public returnThisHolder(returnThis initialValue)
public StructureToReturnHolder(StructureToReturn initialValue)
{
value = initialValue;
}
@ -38,7 +38,7 @@ public final class returnThisHolder
*/
public void _read(InputStream in)
{
value = returnThisHelper.read(in);
value = StructureToReturnHelper.read(in);
}
/**
@ -46,7 +46,7 @@ public final class returnThisHolder
*/
public TypeCode _type()
{
return returnThisHelper.type();
return StructureToReturnHelper.type();
}
/**
@ -55,6 +55,6 @@ public final class returnThisHolder
*/
public void _write(OutputStream out)
{
returnThisHelper.write(out, value);
StructureToReturnHelper.write(out, value);
}
}

View File

@ -1,4 +1,4 @@
/* node.java --
/* TreeNode.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -44,12 +44,17 @@ package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class node
public class TreeNode
implements org.omg.CORBA.portable.IDLEntity
{
/** The node name */
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/** The TreeNode name */
public String name = null;
/** The node children. */
public node[] children = null;
/** The TreeNode children. */
public TreeNode[] children = null;
}

View File

@ -1,4 +1,4 @@
/* nodeHelper.java --
/* TreeNodeHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -51,13 +51,13 @@ import org.omg.CORBA.portable.OutputStream;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class nodeHelper
public abstract class TreeNodeHelper
{
/**
* The node repository id, used to identify the structure.
* The TreeNode repository id, used to identify the structure.
*/
private static String _id =
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/node:1.0";
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode:1.0";
/**
* Caches the typecode, allowing to compute it only once.
@ -66,21 +66,21 @@ public abstract class nodeHelper
/**
* This is used to handle the recursive object references in
* CORBA - supported way. The tree node definition is recursive,
* as the node contains the sequence of the nodes as its field.
* CORBA - supported way. The tree TreeNode definition is recursive,
* as the TreeNode contains the sequence of the nodes as its field.
*/
private static boolean active;
/**
* Extract the tree node from the unversal CORBA wrapper, Any.
* Extract the tree TreeNode from the unversal CORBA wrapper, Any.
*/
public static node extract(Any a)
public static TreeNode extract(Any a)
{
return read(a.create_input_stream());
}
/**
* Get the node string identifer.
* Get the TreeNode string identifer.
*/
public static String id()
{
@ -88,9 +88,9 @@ public abstract class nodeHelper
}
/**
* Insert the node into the universal CORBA wrapper, Any.
* Insert the TreeNode into the universal CORBA wrapper, Any.
*/
public static void insert(Any a, node that)
public static void insert(Any a, TreeNode that)
{
OutputStream out = a.create_output_stream();
a.type(type());
@ -99,22 +99,22 @@ public abstract class nodeHelper
}
/**
* Read the node from the common data reprentation (CDR) stream.
* Read the TreeNode from the common data reprentation (CDR) stream.
*/
public static node read(InputStream istream)
public static TreeNode read(InputStream istream)
{
node value = new node();
TreeNode value = new TreeNode();
value.name = istream.read_string();
int _len0 = istream.read_long();
value.children = new node[ _len0 ];
value.children = new TreeNode[ _len0 ];
for (int i = 0; i < value.children.length; ++i)
value.children [ i ] = nodeHelper.read(istream);
value.children [ i ] = TreeNodeHelper.read(istream);
return value;
}
/**
* Get the node type code definition.
* Get the TreeNode type code definition.
*/
public static synchronized TypeCode type()
{
@ -131,7 +131,7 @@ public abstract class nodeHelper
return ORB.init().create_recursive_tc(_id);
active = true;
// List all memebers of the node structure.
// List all memebers of the TreeNode structure.
StructMember[] members = new StructMember[ 2 ];
TypeCode memberType;
memberType = ORB.init().create_string_tc(0);
@ -139,7 +139,7 @@ public abstract class nodeHelper
memberType = ORB.init().create_recursive_tc("");
members [ 1 ] = new StructMember("children", memberType, null);
typeCode =
ORB.init().create_struct_tc(nodeHelper.id(), "node", members);
ORB.init().create_struct_tc(TreeNodeHelper.id(), "TreeNode", members);
active = false;
}
}
@ -148,13 +148,13 @@ public abstract class nodeHelper
}
/**
* Write the node into the common data reprentation (CDR) stream.
* Write the TreeNode into the common data reprentation (CDR) stream.
*/
public static void write(OutputStream ostream, node value)
public static void write(OutputStream ostream, TreeNode value)
{
ostream.write_string(value.name);
ostream.write_long(value.children.length);
for (int i = 0; i < value.children.length; ++i)
nodeHelper.write(ostream, value.children [ i ]);
TreeNodeHelper.write(ostream, value.children [ i ]);
}
}

View File

@ -1,4 +1,4 @@
/* nodeHolder.java --
/* TreeNodeHolder.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -44,57 +44,57 @@ import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
/**
* The node holder is a wrapper about the node data structure. It
* can be used where the node must be passed both to and from
* The TreeNode holder is a wrapper about the TreeNode data structure. It
* can be used where the TreeNode must be passed both to and from
* the method being called. The same structure holds the tree,
* as it can be represented as a root node with children.
* as it can be represented as a root TreeNode with children.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class nodeHolder
public class TreeNodeHolder
implements Streamable
{
/**
* Stores the node value.
* Stores the TreeNode value.
*/
public node value;
public TreeNode value;
/**
* Creates the node holder with the null initial value.
* Creates the TreeNode holder with the null initial value.
*/
public nodeHolder()
public TreeNodeHolder()
{
}
/**
* Creates the node holder with the given initial value.
* Creates the TreeNode holder with the given initial value.
*/
public nodeHolder(node initialValue)
public TreeNodeHolder(TreeNode initialValue)
{
value = initialValue;
}
/**
* Reads the node value from the common data representation (CDR)
* Reads the TreeNode value from the common data representation (CDR)
* stream.
*/
public void _read(InputStream in)
{
value = nodeHelper.read(in);
value = TreeNodeHelper.read(in);
}
/**
* Writes the node value into common data representation (CDR)
* Writes the TreeNode value into common data representation (CDR)
* stream.
* @return
*/
public TypeCode _type()
{
return nodeHelper.type();
return TreeNodeHelper.type();
}
public void _write(OutputStream out)
{
nodeHelper.write(out, value);
TreeNodeHelper.write(out, value);
}
}

View File

@ -1,4 +1,4 @@
/* ourUserException.java --
/* WeThrowThisException.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -49,10 +49,15 @@ import org.omg.CORBA.portable.IDLEntity;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class ourUserException
public class WeThrowThisException
extends UserException
implements IDLEntity
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* Our specific field, transferred to client.
*/
@ -63,7 +68,7 @@ public class ourUserException
*
* @param _ourField the value of our specific field.
*/
public ourUserException(int _ourField)
public WeThrowThisException(int _ourField)
{
ourField = _ourField;
}

View File

@ -1,4 +1,4 @@
/* ourUserExceptionHelper.java --
/* WeThrowThisExceptionHelper.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -50,14 +50,14 @@ import org.omg.CORBA.TypeCode;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class ourUserExceptionHelper
public abstract class WeThrowThisExceptionHelper
{
/**
* The exception repository id. This name is also used to find the
* mapping local CORBA class.
*/
private static String _id =
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException:1.0";
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException:1.0";
/**
* Get the exception repository id.
@ -71,7 +71,7 @@ public abstract class ourUserExceptionHelper
* Extract the exception from the given Any where it might be
* wrapped.
*/
public static ourUserException extract(Any a)
public static WeThrowThisException extract(Any a)
{
return read(a.create_input_stream());
}
@ -79,9 +79,9 @@ public abstract class ourUserExceptionHelper
/**
* Read the exception from the CDR stream.
*/
public static ourUserException read(org.omg.CORBA.portable.InputStream istream)
public static WeThrowThisException read(org.omg.CORBA.portable.InputStream istream)
{
ourUserException value = new ourUserException(0);
WeThrowThisException value = new WeThrowThisException(0);
// The repository ID is not used
istream.read_string();
@ -98,8 +98,8 @@ public abstract class ourUserExceptionHelper
TypeCode member = null;
member = ORB.init().get_primitive_tc(TCKind.tk_long);
members [ 0 ] = new StructMember("ourField", member, null);
return ORB.init().create_struct_tc(ourUserExceptionHelper.id(),
"ourUserException", members
return ORB.init().create_struct_tc(WeThrowThisExceptionHelper.id(),
"WeThrowThisException", members
);
}
@ -107,7 +107,7 @@ public abstract class ourUserExceptionHelper
* Write the exception into the CDR stream.
*/
public static void write(org.omg.CORBA.portable.OutputStream ostream,
ourUserException value
WeThrowThisException value
)
{
ostream.write_string(id());

View File

@ -1,4 +1,4 @@
/* _comTesterImplBase.java --
/* _DemoTesterImplBase.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -53,13 +53,16 @@ import org.omg.CORBA.portable.ResponseHandler;
/**
* The base for the class that is actually implementing the functionality
* of the object on the server side ({@link comServant} of our case).
* of the object on the server side ({@link DemoServant} of our case).
*
* Following CORBA standards, the name of this class must start from
* underscore and end by the "ImplBase".
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class _comTesterImplBase
public abstract class _DemoTesterImplBase
extends ObjectImpl
implements comTester, InvokeHandler
implements DemoTester, InvokeHandler
{
/**
* When the server receives the request message from client, it
@ -138,7 +141,7 @@ public abstract class _comTesterImplBase
}
else
/*
Throws either 'ourUserException' with the 'ourField' field
Throws either 'WeThrowThisException' with the 'ourField' field
initialised to the passed positive value
or system exception (if the parameter is zero or negative).
*/
@ -150,21 +153,21 @@ public abstract class _comTesterImplBase
throwException(parameter);
out = rh.createReply();
}
catch (ourUserException exception)
catch (WeThrowThisException exception)
{
out = rh.createExceptionReply();
ourUserExceptionHelper.write(out, exception);
WeThrowThisExceptionHelper.write(out, exception);
}
}
else
/* Passes and returns the structures. */
if (a_method.equals("passStructure"))
{
passThis in_structure = passThisHelper.read(in);
returnThis result = null;
StructureToPass in_structure = StructureToPassHelper.read(in);
StructureToReturn result = null;
result = passStructure(in_structure);
out = rh.createReply();
returnThisHelper.write(out, result);
StructureToReturnHelper.write(out, result);
}
else
/* Passes and returns the string sequence. */
@ -180,11 +183,11 @@ public abstract class _comTesterImplBase
/** Pass and return the tree structure */
if (a_method.equals("passTree"))
{
nodeHolder tree = new nodeHolder();
tree.value = nodeHelper.read(in);
TreeNodeHolder tree = new TreeNodeHolder();
tree.value = TreeNodeHelper.read(in);
passTree(tree);
out = rh.createReply();
nodeHelper.write(out, tree.value);
TreeNodeHelper.write(out, tree.value);
}
else
@ -201,6 +204,6 @@ public abstract class _comTesterImplBase
public String[] _ids()
{
// They are the same as for the stub.
return _comTesterStub._ids;
return _DemoTesterStub._ids;
}
}

View File

@ -1,4 +1,4 @@
/* _comTesterStub.java --
/* _DemoTesterStub.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -55,23 +55,26 @@ import org.omg.CORBA.portable.RemarshalException;
* side. It has all the same methods as the actual implementation
* on the server side. These methods contain the code for remote
* invocation.
*
* Following CORBA standards, the name of this class must start from
* underscore and end by the "Stub".
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class _comTesterStub
public class _DemoTesterStub
extends ObjectImpl
implements comTester
implements DemoTester
{
/**
* A string array of comTester repository ids.
* A string array of DemoTester repository ids.
*/
public static String[] _ids =
{
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/comTester:1.0"
"IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoTester:1.0"
};
/**
* Return an array of comTester repository ids.
* Return an array of DemoTester repository ids.
*/
public String[] _ids()
{
@ -217,7 +220,7 @@ public class _comTesterStub
/**
Passes and returns the structures.
*/
public returnThis passStructure(passThis in_structure)
public StructureToReturn passStructure(StructureToPass in_structure)
{
InputStream in = null;
try
@ -226,13 +229,13 @@ public class _comTesterStub
OutputStream out = _request("passStructure", true);
// Write the structure, using its helper.
passThisHelper.write(out, in_structure);
StructureToPassHelper.write(out, in_structure);
// Invoke the method.
in = _invoke(out);
// Read the returned structer, using another helper.
returnThis result = returnThisHelper.read(in);
StructureToReturn result = StructureToReturnHelper.read(in);
return result;
}
catch (ApplicationException ex)
@ -253,7 +256,7 @@ public class _comTesterStub
/**
* Pass and return the tree structure
*/
public void passTree(nodeHolder tree)
public void passTree(TreeNodeHolder tree)
{
InputStream in = null;
try
@ -261,15 +264,15 @@ public class _comTesterStub
// Get the stream where the parameters must be written.
OutputStream out = _request("passTree", true);
// Write the tree (node with its chilred, grandchildren and so on),
// Write the tree (TreeNode with its chilred, grandchildren and so on),
// using the appropriate helper.
nodeHelper.write(out, tree.value);
TreeNodeHelper.write(out, tree.value);
// Call the method.
in = _invoke(out);
// Read the returned tree.
tree.value = nodeHelper.read(in);
tree.value = TreeNodeHelper.read(in);
}
catch (ApplicationException ex)
{
@ -382,10 +385,10 @@ public class _comTesterStub
* of the positive value of this argument, and system
* exception otherwise.
*
* @throws ourUserException
* @throws WeThrowThisException
*/
public void throwException(int parameter)
throws ourUserException
throws WeThrowThisException
{
InputStream in = null;
try
@ -408,9 +411,9 @@ public class _comTesterStub
// If this is the user exception we expect to catch, read and throw
// it here. The system exception, if thrown, is handled by _invoke.
if (id.equals("IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/ourUserException:1.0")
if (id.equals("IDL:gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException:1.0")
)
throw ourUserExceptionHelper.read(in);
throw WeThrowThisExceptionHelper.read(in);
else
throw new MARSHAL(id);
}

View File

@ -0,0 +1,137 @@
/* Demo.java -- And example of MIDI support
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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. */
package gnu.classpath.examples.midi;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.sound.midi.*;
/**
* An example how javax.sound.midi facilities work.
*/
public class Demo extends Frame implements ItemListener
{
Choice midiInChoice = new Choice();
Choice midiOutChoice = new Choice();
MidiDevice inDevice = null;
MidiDevice outDevice = null;
ArrayList inDevices = new ArrayList();
ArrayList outDevices = new ArrayList();
public Demo () throws Exception
{
MenuBar mb = new MenuBar ();
Menu menu = new Menu ("File");
MenuItem quit = new MenuItem("Quit", new MenuShortcut('Q'));
quit.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.exit(0);
}
});
menu.add (quit);
mb.add(menu);
setTitle("synthcity: the GNU Classpath MIDI Demo");
setLayout(new FlowLayout());
MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();
for (int i = 0; i < infos.length; i++)
{
MidiDevice device = MidiSystem.getMidiDevice(infos[i]);
if (device.getMaxReceivers() > 0)
{
midiOutChoice.addItem(infos[i].getDescription());
outDevices.add(device);
}
if (device.getMaxTransmitters() > 0)
{
midiInChoice.addItem(infos[i].getDescription());
inDevices.add(device);
}
}
setMenuBar (mb);
add(new Label("MIDI IN: "));
add(midiInChoice);
add(new Label(" MIDI OUT: "));
add(midiOutChoice);
midiInChoice.addItemListener(this);
midiOutChoice.addItemListener(this);
pack();
show();
}
public void itemStateChanged (ItemEvent e)
{
try
{
if (e.getItemSelectable() == midiInChoice)
{
if (inDevice != null)
inDevice.close();
inDevice = (MidiDevice)
inDevices.get(midiInChoice.getSelectedIndex());
}
if (e.getItemSelectable() == midiOutChoice)
{
if (outDevice != null)
outDevice.close();
outDevice = (MidiDevice)
outDevices.get(midiOutChoice.getSelectedIndex());
}
if (inDevice != null && outDevice != null)
{
if (! inDevice.isOpen())
inDevice.open();
if (! outDevice.isOpen())
outDevice.open();
Transmitter t = inDevice.getTransmitter();
if (t == null)
System.err.println (inDevice + ".getTransmitter() == null");
Receiver r = outDevice.getReceiver();
if (r == null)
System.err.println (outDevice + ".getReceiver() == null");
if (t != null && r != null)
t.setReceiver (r);
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public static void main (String args[]) throws Exception
{
new Demo();
}
}

View File

@ -0,0 +1,284 @@
/* ButtonDemo.java -- An example showing various buttons in Swing.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;
import javax.swing.plaf.metal.MetalIconFactory;
/**
* A simple button demo showing various buttons in different states.
*/
public class ButtonDemo
extends JFrame
implements ActionListener
{
private JCheckBox buttonState;
private JButton button1;
private JButton button2;
private JButton button3;
private JButton button4;
private JCheckBox toggleState;
private JToggleButton toggle1;
private JToggleButton toggle2;
private JToggleButton toggle3;
private JToggleButton toggle4;
private JCheckBox checkBoxState;
private JCheckBox checkBox1;
private JCheckBox checkBox2;
private JCheckBox checkBox3;
private JCheckBox radioState;
private JRadioButton radio1;
private JRadioButton radio2;
private JRadioButton radio3;
/**
* Creates a new demo instance.
*
* @param title the frame title.
*/
public ButtonDemo(String title)
{
super(title);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel content = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(4, 1));
panel.add(createButtonPanel());
panel.add(createTogglePanel());
panel.add(createCheckBoxPanel());
panel.add(createRadioPanel());
content.add(panel);
return content;
}
private JPanel createButtonPanel()
{
JPanel panel = new JPanel(new BorderLayout());
this.buttonState = new JCheckBox("Enabled", true);
this.buttonState.setActionCommand("BUTTON_STATE");
this.buttonState.addActionListener(this);
panel.add(this.buttonState, BorderLayout.EAST);
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createTitledBorder("JButton"));
this.button1 = new JButton("Button 1");
this.button2 = new JButton("Button 2");
this.button2.setIcon(MetalIconFactory.getInternalFrameDefaultMenuIcon());
this.button3 = new JButton("Button 3");
this.button3.setIcon(MetalIconFactory.getFileChooserHomeFolderIcon());
this.button3.setHorizontalTextPosition(SwingConstants.CENTER);
this.button3.setVerticalTextPosition(SwingConstants.BOTTOM);
this.button4 = new JButton("Button 4");
this.button4.setIcon(MetalIconFactory.getFileChooserUpFolderIcon());
this.button4.setText(null);
buttonPanel.add(button1);
buttonPanel.add(button2);
buttonPanel.add(button3);
buttonPanel.add(button4);
panel.add(buttonPanel);
return panel;
}
private JPanel createTogglePanel()
{
JPanel panel = new JPanel(new BorderLayout());
this.toggleState = new JCheckBox("Enabled", true);
this.toggleState.setActionCommand("TOGGLE_STATE");
this.toggleState.addActionListener(this);
panel.add(this.toggleState, BorderLayout.EAST);
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createTitledBorder("JToggleButton"));
this.toggle1 = new JToggleButton("Toggle 1");
this.toggle2 = new JToggleButton("Toggle 2");
this.toggle2.setIcon(MetalIconFactory.getInternalFrameDefaultMenuIcon());
this.toggle3 = new JToggleButton("Toggle 3");
this.toggle3.setIcon(MetalIconFactory.getFileChooserHomeFolderIcon());
this.toggle3.setHorizontalTextPosition(SwingConstants.CENTER);
this.toggle3.setVerticalTextPosition(SwingConstants.BOTTOM);
this.toggle4 = new JToggleButton("Toggle 4");
this.toggle4.setIcon(MetalIconFactory.getFileChooserUpFolderIcon());
this.toggle4.setText(null);
ButtonGroup toggleGroup = new ButtonGroup();
toggleGroup.add(toggle1);
toggleGroup.add(toggle2);
toggleGroup.add(toggle3);
toggleGroup.add(toggle4);
buttonPanel.add(toggle1);
buttonPanel.add(toggle2);
buttonPanel.add(toggle3);
buttonPanel.add(toggle4);
panel.add(buttonPanel);
return panel;
}
private JPanel createCheckBoxPanel()
{
JPanel panel = new JPanel(new BorderLayout());
this.checkBoxState = new JCheckBox("Enabled", true);
this.checkBoxState.setActionCommand("CHECKBOX_STATE");
this.checkBoxState.addActionListener(this);
panel.add(this.checkBoxState, BorderLayout.EAST);
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createTitledBorder("JCheckBox"));
this.checkBox1 = new JCheckBox("CheckBox 1");
this.checkBox2 = new JCheckBox("CheckBox 2");
this.checkBox3 = new JCheckBox("CheckBox 3");
buttonPanel.add(checkBox1);
buttonPanel.add(checkBox2);
buttonPanel.add(checkBox3);
panel.add(buttonPanel);
return panel;
}
private JPanel createRadioPanel()
{
JPanel panel = new JPanel(new BorderLayout());
this.radioState = new JCheckBox("Enabled", true);
this.radioState.setActionCommand("RADIO_STATE");
this.radioState.addActionListener(this);
panel.add(this.radioState, BorderLayout.EAST);
JPanel buttonPanel = new JPanel();
buttonPanel.setBorder(BorderFactory.createTitledBorder("JRadioButton"));
this.radio1 = new JRadioButton("Radio 1");
this.radio2 = new JRadioButton("Radio 2");
this.radio3 = new JRadioButton("Radio 3");
ButtonGroup radioGroup = new ButtonGroup();
radioGroup.add(radio1);
radioGroup.add(radio2);
radioGroup.add(radio3);
buttonPanel.add(radio1);
buttonPanel.add(radio2);
buttonPanel.add(radio3);
panel.add(buttonPanel);
return panel;
}
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("BUTTON_STATE"))
{
button1.setEnabled(buttonState.isSelected());
button2.setEnabled(buttonState.isSelected());
button3.setEnabled(buttonState.isSelected());
button4.setEnabled(buttonState.isSelected());
}
else if (e.getActionCommand().equals("TOGGLE_STATE"))
{
toggle1.setEnabled(toggleState.isSelected());
toggle2.setEnabled(toggleState.isSelected());
toggle3.setEnabled(toggleState.isSelected());
toggle4.setEnabled(toggleState.isSelected());
}
else if (e.getActionCommand().equals("CHECKBOX_STATE"))
{
checkBox1.setEnabled(checkBoxState.isSelected());
checkBox2.setEnabled(checkBoxState.isSelected());
checkBox3.setEnabled(checkBoxState.isSelected());
}
else if (e.getActionCommand().equals("RADIO_STATE"))
{
radio1.setEnabled(radioState.isSelected());
radio2.setEnabled(radioState.isSelected());
radio3.setEnabled(radioState.isSelected());
}
else if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
}
public static void main(String[] args)
{
ButtonDemo app = new ButtonDemo("Button Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.cdt.launch.localCLaunch">
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="org.eclipse.cdt.debug.mi.core.CDebugger"/>
<stringAttribute key="org.eclipse.cdt.launch.protocol" value="mi"/>
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.STOP_ON_SOLIB_EVENTS" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<listAttribute key="org.eclipse.cdt.debug.mi.core.SOLIB_PATH"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB" value="true"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="jamvm"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="gdb"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="src/jamvm"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel gnu.classpath.examples.swing.Demo"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=""/>
</launchConfiguration>

View File

@ -0,0 +1,360 @@
/* ComboBoxDemo.java -- An example showing various combo boxes in Swing.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.plaf.metal.MetalIconFactory;
/**
* A simple demo showing various combo boxes in different states.
*/
public class ComboBoxDemo
extends JFrame
implements ActionListener
{
class CustomCellRenderer extends DefaultListCellRenderer
{
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
{
DefaultListCellRenderer result = (DefaultListCellRenderer)
super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
Icon icon = (Icon) value;
result.setIcon(icon);
result.setText("Index = " + index);
return result;
}
}
private JCheckBox comboState1;
private JComboBox combo1;
private JComboBox combo2;
private JCheckBox comboState2;
private JComboBox combo3;
private JComboBox combo4;
private JCheckBox comboState3;
private JComboBox combo5;
private JComboBox combo6;
private JCheckBox comboState4;
private JComboBox combo7;
private JComboBox combo8;
private JCheckBox comboState5;
private JComboBox combo9;
private JComboBox combo10;
private JCheckBox comboState6;
private JComboBox combo11;
private JComboBox combo12;
/**
* Creates a new demo instance.
*
* @param title the frame title.
*/
public ComboBoxDemo(String title)
{
super(title);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel content = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(6, 1));
panel.add(createPanel1());
panel.add(createPanel2());
panel.add(createPanel3());
panel.add(createPanel4());
panel.add(createPanel5());
panel.add(createPanel6());
content.add(panel);
return content;
}
private JPanel createPanel1()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState1 = new JCheckBox("Enabled", true);
this.comboState1.setActionCommand("COMBO_STATE1");
this.comboState1.addActionListener(this);
panel.add(this.comboState1, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Regular: "));
this.combo1 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo2 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo2.setEditable(true);
controlPanel.add(combo1);
controlPanel.add(combo2);
panel.add(controlPanel);
return panel;
}
private JPanel createPanel2()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState2 = new JCheckBox("Enabled", true);
this.comboState2.setActionCommand("COMBO_STATE2");
this.comboState2.addActionListener(this);
panel.add(this.comboState2, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Large Font: "));
this.combo3 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo3.setFont(new Font("Dialog", Font.PLAIN, 20));
this.combo4 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo4.setEditable(true);
this.combo4.setFont(new Font("Dialog", Font.PLAIN, 20));
controlPanel.add(combo3);
controlPanel.add(combo4);
panel.add(controlPanel);
return panel;
}
private JPanel createPanel3()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState3 = new JCheckBox("Enabled", true);
this.comboState3.setActionCommand("COMBO_STATE3");
this.comboState3.addActionListener(this);
panel.add(this.comboState3, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Colored Background: "));
this.combo5 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo5.setBackground(Color.yellow);
this.combo6 = new JComboBox(new Object[] {"Australia", "New Zealand",
"England"});
this.combo6.setEditable(true);
this.combo6.setBackground(Color.yellow);
controlPanel.add(combo5);
controlPanel.add(combo6);
panel.add(controlPanel);
return panel;
}
/**
* This panel contains combo boxes that are empty.
*
* @return A panel.
*/
private JPanel createPanel4()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState4 = new JCheckBox("Enabled", true);
this.comboState4.setActionCommand("COMBO_STATE4");
this.comboState4.addActionListener(this);
panel.add(this.comboState4, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Empty: "));
this.combo7 = new JComboBox();
this.combo8 = new JComboBox();
this.combo8.setEditable(true);
controlPanel.add(combo7);
controlPanel.add(combo8);
panel.add(controlPanel);
return panel;
}
/**
* This panel contains combo boxes that are narrow but contain long text
* items.
*
* @return A panel.
*/
private JPanel createPanel5()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState5 = new JCheckBox("Enabled", true);
this.comboState5.setActionCommand("COMBO_STATE5");
this.comboState5.addActionListener(this);
panel.add(this.comboState5, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Narrow: "));
this.combo9 = new JComboBox(new Object[] {
"A really long item that will be truncated when displayed"});
this.combo9.setPreferredSize(new Dimension(100, 30));
this.combo10 = new JComboBox(new Object[] {
"A really long item that will be truncated when displayed"});
this.combo10.setPreferredSize(new Dimension(100, 30));
this.combo10.setEditable(true);
controlPanel.add(combo9);
controlPanel.add(combo10);
panel.add(controlPanel);
return panel;
}
/**
* This panel contains combo boxes with a custom renderer.
*
* @return A panel.
*/
private JPanel createPanel6()
{
JPanel panel = new JPanel(new BorderLayout());
this.comboState6 = new JCheckBox("Enabled", true);
this.comboState6.setActionCommand("COMBO_STATE6");
this.comboState6.addActionListener(this);
panel.add(this.comboState6, BorderLayout.EAST);
JPanel controlPanel = new JPanel();
controlPanel.setBorder(BorderFactory.createTitledBorder("Custom Renderer: "));
this.combo11 = new JComboBox(new Object[] {
MetalIconFactory.getFileChooserHomeFolderIcon(),
MetalIconFactory.getFileChooserNewFolderIcon()});
this.combo11.setPreferredSize(new Dimension(100, 30));
this.combo11.setRenderer(new CustomCellRenderer());
this.combo12 = new JComboBox(new Object[] {
MetalIconFactory.getFileChooserHomeFolderIcon(),
MetalIconFactory.getFileChooserNewFolderIcon()});
this.combo12.setPreferredSize(new Dimension(100, 30));
this.combo12.setRenderer(new CustomCellRenderer());
this.combo12.setEditable(true);
controlPanel.add(combo11);
controlPanel.add(combo12);
panel.add(controlPanel);
return panel;
}
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("COMBO_STATE1"))
{
combo1.setEnabled(comboState1.isSelected());
combo2.setEnabled(comboState1.isSelected());
}
else if (e.getActionCommand().equals("COMBO_STATE2"))
{
combo3.setEnabled(comboState2.isSelected());
combo4.setEnabled(comboState2.isSelected());
}
else if (e.getActionCommand().equals("COMBO_STATE3"))
{
combo5.setEnabled(comboState3.isSelected());
combo6.setEnabled(comboState3.isSelected());
}
else if (e.getActionCommand().equals("COMBO_STATE4"))
{
combo7.setEnabled(comboState4.isSelected());
combo8.setEnabled(comboState4.isSelected());
}
else if (e.getActionCommand().equals("COMBO_STATE5"))
{
combo9.setEnabled(comboState5.isSelected());
combo10.setEnabled(comboState5.isSelected());
}
else if (e.getActionCommand().equals("COMBO_STATE6"))
{
combo11.setEnabled(comboState6.isSelected());
combo12.setEnabled(comboState6.isSelected());
}
else if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
}
public static void main(String[] args)
{
try
{
UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
}
catch (Exception e) {
e.printStackTrace();
}
ComboBoxDemo app = new ComboBoxDemo("ComboBox Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -24,20 +24,16 @@ package gnu.classpath.examples.swing;
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.image.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.tree.*;
import javax.swing.border.*;
import javax.swing.plaf.metal.DefaultMetalTheme;
import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.plaf.metal.OceanTheme;
import java.net.URL;
import java.util.*;
public class Demo
{
@ -51,26 +47,44 @@ public class Demo
if (System.getProperty("swing.defaultlaf") == null)
{
StringBuffer text = new StringBuffer();
text.append("\tYou may change the Look and Feel of this\n");
text.append("\tDemo by setting the system property\n");
text.append("\t-Dswing.defaultlaf=<LAFClassName>\n\n");
text.append("\tPossible values for <LAFClassName> are:\n");
text.append("\t * javax.swing.plaf.metal.MetalLookAndFeel\n");
text.append("\t\tthe default Java L&F\n");
text.append("\t * gnu.classpath.examples.swing.GNULookAndFeel\n");
text.append("\tthe GNU Look and Feel\n");
text.append("\t(derived from javax.swing.plaf.basic.BasicLookAndFeel\n\n");
text.append("\tthe default is gnu.classpath.examples.swing.GNULookAndFeel\n");
JEditorPane textPane = new JEditorPane();
// temporary hack, preferred size should be computed by the
// component
textPane.setPreferredSize(new Dimension(400, 300));
textPane.setText(text.toString());
JOptionPane.showMessageDialog(null, textPane,
"Look and Feel notice",
JOptionPane.INFORMATION_MESSAGE);
UIManager.setLookAndFeel(new GNULookAndFeel());
text.append("You may change the Look and Feel of this\n");
text.append("Demo by setting the system property\n");
text.append("-Dswing.defaultlaf=<LAFClassName>\n");
text.append("\n");
text.append("Possible values for <LAFClassName> are:\n");
text.append("\n");
text.append("* javax.swing.plaf.metal.MetalLookAndFeel\n");
text.append(" the default GNU Classpath L&F\n");
text.append("\n");
text.append("* gnu.classpath.examples.swing.GNULookAndFeel\n");
text.append(" the GNU Look and Feel\n");
text.append(" (derived from javax.swing.plaf.basic.BasicLookAndFeel)\n");
text.append("\n");
text.append("MetalLookAndFeel supports different Themes.\n");
text.append("DefaultMetalTheme (the default) and OceanTheme (in development)\n");
final String DEFAULT = "MetalLookAndFeel (default)";
final String OCEAN = "MetalLookAndFeel (Ocean)";
final String GNU = "GNULookAndFeel";
final String[] lafs = new String[] { DEFAULT, OCEAN, GNU };
int laf = JOptionPane.showOptionDialog(null, text /* textPane */,
"Look and Feel choice",
JOptionPane.OK_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, lafs, DEFAULT);
if (laf == 0)
{
MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
UIManager.setLookAndFeel(new MetalLookAndFeel());
}
if (laf == 1)
{
MetalLookAndFeel.setCurrentTheme(new OceanTheme());
UIManager.setLookAndFeel(new MetalLookAndFeel());
}
else if (laf == 2)
UIManager.setLookAndFeel(new GNULookAndFeel());
}
}
catch (UnsupportedLookAndFeelException e)
@ -147,10 +161,7 @@ public class Demo
JMenu examples = new JMenu("Examples");
new PopUpAction("Buttons",
mkPanel(new JComponent[]
{mkBigButton("mango"),
mkBigButton("guava"),
mkBigButton("lemon")}),
(new ButtonDemo("Button Demo")).createContent(),
examples);
new PopUpAction("Toggles",
@ -166,9 +177,13 @@ public class Demo
examples);
new PopUpAction("Slider",
mkSliders(),
(new SliderDemo("Slider Demo")).createContent(),
examples);
new PopUpAction("ProgressBar",
ProgressBarDemo.createContent(),
examples);
new PopUpAction("List",
mkListPanel(new String[] { "hello",
"this",
@ -181,7 +196,7 @@ public class Demo
examples);
new PopUpAction("Scrollbar",
mkScrollBar(),
(new ScrollBarDemo("ScrollBarDemo")).createContent(),
examples);
new PopUpAction("Viewport",
@ -189,8 +204,8 @@ public class Demo
examples);
new PopUpAction("ScrollPane",
mkScrollPane(mkBigButton("Scroll Me!")),
examples);
mkScrollPane(mkBigButton("Scroll Me!")),
examples);
new PopUpAction("TabPane",
mkTabs(new String[] {"happy",
@ -203,19 +218,19 @@ public class Demo
examples);
new PopUpAction("TextField",
mkTextField("Hello, World!"),
(new TextFieldDemo("TextField Demo")).createContent(),
examples);
new PopUpAction("FileChooser",
(new FileChooserDemo("FileChooser Demo")).createContent(),
examples);
new PopUpAction("ColorChooser",
mkColorChooser(),
examples);
new PopUpAction("ComboBox",
mkComboBox(new String[] {"Stop",
"Software",
"Hoarders",
"Support",
"GNU!"}),
(new ComboBoxDemo("ComboBox Demo")).createContent(),
examples);
new PopUpAction("Editor",
@ -317,6 +332,7 @@ public class Demo
else
b = new JButton(title, icon);
b.setToolTipText(title);
if (hAlign != -1) b.setHorizontalAlignment(hAlign);
if (vAlign != -1) b.setVerticalAlignment(vAlign);
if (hPos != -1) b.setHorizontalTextPosition(hPos);
@ -640,6 +656,14 @@ public class Demo
panel.add(but, BorderLayout.NORTH);
but.doClick();
but.doClick();
JInternalFrame palette = new JInternalFrame("Palette", true, true, true,
true);
palette.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
desk.add(palette, JDesktopPane.PALETTE_LAYER);
JLabel label = new JLabel("This is a floating palette!");
palette.getContentPane().add(label);
palette.pack();
palette.setVisible(true);
return panel;
}
@ -678,26 +702,6 @@ public class Demo
return tabs;
}
static JComponent mkSliders()
{
JSlider slider = new JSlider();
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);
progress.setModel(model);
slider.setModel(model);
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(1, 2));
panel.add(slider);
panel.add(progress);
return panel;
}
public Demo()
{
frame = new JFrame("Swing Activity Board");
@ -735,11 +739,17 @@ public class Demo
return c;
}
public static JRadioButton mkRadio(String label)
public static JPanel mkRadio(String label)
{
JPanel p = new JPanel();
JRadioButton c = new JRadioButton(label);
c.setFont(new Font("Luxi", Font.PLAIN, 14));
return c;
JRadioButton d = new JRadioButton("not " + label);
ButtonGroup bg = new ButtonGroup();
bg.add(c);
bg.add(d);
p.add(c);
p.add(d);
return p;
}
public static JList mkList(Object[] elts)
@ -1002,31 +1012,34 @@ public class Demo
private JPanel mkButtonBar()
{
JPanel panel = new JPanel ();
panel.setLayout(new FlowLayout());
JPanel panel = new JPanel (new GridLayout(2, 1));
JPanel panelA = new JPanel(new FlowLayout());
JPanel panelB = new JPanel(new FlowLayout());
new PopUpAction("Buttons",
mkPanel(new JComponent[]
{mkBigButton("mango"),
mkBigButton("guava"),
mkBigButton("lemon")}),
panel);
(new ButtonDemo("Button Demo")).createContent(),
panelA);
new PopUpAction("Toggles",
mkToggle("cool and refreshing"),
panel);
panelA);
new PopUpAction("Checkbox",
mkCheckbox("ice cold"),
panel);
panelA);
new PopUpAction("Radio",
mkRadio("delicious"),
panel);
panelA);
new PopUpAction("Slider",
mkSliders(),
panel);
(new SliderDemo("Slider Demo")).createContent(),
panelA);
new PopUpAction("ProgressBar",
ProgressBarDemo.createContent(),
panelA);
new PopUpAction("List",
mkListPanel(new String[] { "hello",
@ -1037,60 +1050,60 @@ public class Demo
"that",
"wraps",
"over"}),
panel);
panelA);
new PopUpAction("Scrollbar",
mkScrollBar(),
panel);
(new ScrollBarDemo("ScrollBar Demo")).createContent(),
panelA);
new PopUpAction("Viewport",
mkViewportBox(mkBigButton("View Me!")),
panel);
panelA);
new PopUpAction("ScrollPane",
mkScrollPane(mkBigButton("Scroll Me!")),
panel);
panelA);
new PopUpAction("TabPane",
mkTabs(new String[] {"happy",
"sad",
"indifferent"}),
panel);
panelB);
new PopUpAction("Spinner",
mkSpinner(),
panel);
panelB);
new PopUpAction("TextField",
mkTextField("Hello, World!"),
panel);
(new TextFieldDemo("TextField Demo")).createContent(),
panelB);
new PopUpAction("FileChooser",
(new FileChooserDemo("FileChooser Demo")).createContent(),
panelB);
new PopUpAction("ColorChooser",
mkColorChooser(),
panel);
panelB);
new PopUpAction("ComboBox",
mkComboBox(new String[] {"Stop",
"Software",
"Hoarders",
"Support",
"GNU!"}),
panel);
(new ComboBoxDemo("ComboBox Demo")).createContent(),
panelB);
new PopUpAction("Editor",
mkEditorPane(),
panel);
panelB);
new PopUpAction("Tree",
mkTree(),
panel);
panelB);
new PopUpAction("Table",
mkTable(),
panel);
panelB);
JButton exitDisposer = mkDisposerButton(frame);
panel.add(exitDisposer);
panelB.add(exitDisposer);
exitDisposer.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@ -1098,11 +1111,8 @@ public class Demo
System.exit(1);
}
});
panel.add(panelA);
panel.add(panelB);
return panel;
}
public static JTextField mkTextField(String sometext)
{
return new JTextField(sometext, 40);
}
}

View File

@ -0,0 +1,228 @@
/* FileChooserDemo.java -- An example showing file choosers in Swing.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.filechooser.FileFilter;
/**
* A simple demo showing the {@link JFileChooser} component used in different
* ways.
*/
public class FileChooserDemo extends JFrame implements ActionListener
{
/**
* A file filter for Java source files.
*/
static class JavaFileFilter extends FileFilter
{
public String getDescription()
{
return "Java Source Files (.java)";
}
public boolean accept(File f)
{
if (f != null)
{
return f.getName().endsWith(".java") || f.isDirectory();
}
else
return false;
}
}
/** A label to display the selected file. */
JLabel selectedFileLabel;
/**
* A list showing the selected files (where multi selections are
* allowed).
*/
JList selectedFilesList;
/** A label to display the return code for the JFileChooser. */
JLabel returnCodeLabel;
/**
* Creates a new demo instance.
*
* @param frameTitle the frame title.
*/
public FileChooserDemo(String frameTitle)
{
super(frameTitle);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel panel = new JPanel(new BorderLayout());
// create a panel of buttons to select the different styles of file
// chooser...
JPanel buttonPanel = new JPanel(new GridLayout(5, 1));
JButton openButton = new JButton("Open...");
openButton.setActionCommand("OPEN");
openButton.addActionListener(this);
buttonPanel.add(openButton);
JButton saveButton = new JButton("Save...");
saveButton.setActionCommand("SAVE");
saveButton.addActionListener(this);
buttonPanel.add(saveButton);
JButton queryButton = new JButton("Select Directory...");
queryButton.setActionCommand("SELECT_DIRECTORY");
queryButton.addActionListener(this);
buttonPanel.add(queryButton);
JButton openJavaButton = new JButton("Open Java file...");
openJavaButton.setActionCommand("OPEN_JAVA");
openJavaButton.addActionListener(this);
buttonPanel.add(openJavaButton);
JButton openMultiButton = new JButton("Open multiple files...");
openMultiButton.setActionCommand("OPEN_MULTI");
openMultiButton.addActionListener(this);
buttonPanel.add(openMultiButton);
panel.add(buttonPanel, BorderLayout.WEST);
// create a panel to display the selected file(s) and the return code
JPanel displayPanel = new JPanel(new BorderLayout());
selectedFileLabel = new JLabel("-");
selectedFileLabel.setBorder(BorderFactory.createTitledBorder("Selected File/Directory: "));
displayPanel.add(selectedFileLabel, BorderLayout.NORTH);
selectedFilesList = new JList();
JScrollPane sp = new JScrollPane(selectedFilesList);
sp.setBorder(BorderFactory.createTitledBorder("Selected Files: "));
displayPanel.add(sp);
returnCodeLabel = new JLabel("0");
returnCodeLabel.setBorder(BorderFactory.createTitledBorder("Return Code:"));
displayPanel.add(returnCodeLabel, BorderLayout.SOUTH);
panel.add(displayPanel);
return panel;
}
/**
* When the user clicks on a button, launch the appropriate file chooser
* and report the results.
*
* @param e the event.
*/
public void actionPerformed(ActionEvent e)
{
int option = 0;
File selectedFile = null;
File[] selectedFiles = new File[0];
if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
else if (e.getActionCommand().equals("OPEN"))
{
JFileChooser chooser = new JFileChooser();
option = chooser.showOpenDialog(this);
selectedFile = chooser.getSelectedFile();
selectedFiles = chooser.getSelectedFiles();
}
else if (e.getActionCommand().equals("OPEN_MULTI"))
{
JFileChooser chooser = new JFileChooser();
chooser.setMultiSelectionEnabled(true);
option = chooser.showOpenDialog(this);
selectedFile = chooser.getSelectedFile();
selectedFiles = chooser.getSelectedFiles();
}
else if (e.getActionCommand().equals("OPEN_JAVA"))
{
JFileChooser chooser = new JFileChooser();
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileFilter(new JavaFileFilter());
option = chooser.showOpenDialog(this);
selectedFile = chooser.getSelectedFile();
selectedFiles = chooser.getSelectedFiles();
}
else if (e.getActionCommand().equals("SAVE"))
{
JFileChooser chooser = new JFileChooser();
option = chooser.showSaveDialog(this);
selectedFile = chooser.getSelectedFile();
selectedFiles = chooser.getSelectedFiles();
}
else if (e.getActionCommand().equals("SELECT_DIRECTORY"))
{
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
option = chooser.showDialog(this, "Select");
selectedFile = chooser.getSelectedFile();
selectedFiles = chooser.getSelectedFiles();
}
// display the selection and return code
if (selectedFile != null)
selectedFileLabel.setText(selectedFile.toString());
else
selectedFileLabel.setText("null");
DefaultListModel listModel = new DefaultListModel();
for (int i = 0; i < selectedFiles.length; i++)
listModel.addElement(selectedFiles[i]);
selectedFilesList.setModel(listModel);
returnCodeLabel.setText(Integer.toString(option));
}
public static void main(String[] args)
{
FileChooserDemo app = new FileChooserDemo("File Chooser Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -22,8 +22,13 @@ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
package gnu.classpath.examples.swing;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.IconUIResource;
@ -64,8 +69,10 @@ public class GNULookAndFeel extends BasicLookAndFeel
"MenuBar.background", new ColorUIResource(blueGray),
"MenuItem.background", new ColorUIResource(blueGray),
"ScrollBar.background", new ColorUIResource(blueGray),
"Tree.closedIcon",
"CheckBox.icon", new CheckBoxIcon(),
"RadioButton.icon", new RadioButtonIcon(),
"Tree.closedIcon",
new IconUIResource(new ImageIcon
(getClass().getResource
(iconspath + "TreeClosed.png"))),
@ -82,4 +89,177 @@ public class GNULookAndFeel extends BasicLookAndFeel
}
return LAF_defaults;
}
/**
* 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;
}
/**
* 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)
{
Color save = g.getColor();
g.setColor(c.getForeground());
g.drawRect(x, y, getIconWidth(), getIconHeight());
JCheckBox item = (JCheckBox) c;
if (item.isSelected())
{
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);
}
g.setColor(save);
}
}
/**
* The icon used for RadioButtons in the GNULookAndFeel. This is an empty
* icon with a size of 13x13 pixels.
*/
static class RadioButtonIcon
implements Icon
{
/**
* Returns the height of the icon. The GNULookAndFeel 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 GNULookAndFeel RadioButton icon
* has a width of 13 pixels.
*
* @return the height of the icon
*/
public int getIconWidth()
{
return 13;
}
/**
* Paints the icon. The GNULookAndFeel 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)
{
Color savedColor = g.getColor();
JRadioButton b = (JRadioButton) c;
// draw outer circle
if (b.isEnabled())
g.setColor(Color.GRAY);
else
g.setColor(Color.GRAY);
g.drawLine(x + 2, y + 1, x + 3, y + 1);
g.drawLine(x + 4, y, x + 7, y);
g.drawLine(x + 8, y + 1, x + 9, y + 1);
g.drawLine(x + 10, y + 2, x + 10, y + 3);
g.drawLine(x + 11, y + 4, x + 11, y + 7);
g.drawLine(x + 10, y + 8, x + 10, y + 9);
g.drawLine(x + 8, y + 10, x + 9, y + 10);
g.drawLine(x + 4, y + 11, x + 7, y + 11);
g.drawLine(x + 2, y + 10, x + 3, y + 10);
g.drawLine(x + 1, y + 9, x + 1, y + 8);
g.drawLine(x, y + 7, x, y + 4);
g.drawLine(x + 1, y + 2, x + 1, y + 3);
if (b.getModel().isArmed())
{
g.setColor(Color.GRAY);
g.drawLine(x + 4, y + 1, x + 7, y + 1);
g.drawLine(x + 4, y + 10, x + 7, y + 10);
g.drawLine(x + 1, y + 4, x + 1, y + 7);
g.drawLine(x + 10, y + 4, x + 10, y + 7);
g.fillRect(x + 2, y + 2, 8, 8);
}
else
{
// only draw inner highlight if not filled
if (b.isEnabled())
{
g.setColor(Color.WHITE);
g.drawLine(x + 2, y + 8, x + 2, y + 9);
g.drawLine(x + 1, y + 4, x + 1, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 3);
g.drawLine(x + 3, y + 2, x + 3, y + 2);
g.drawLine(x + 4, y + 1, x + 7, y + 1);
g.drawLine(x + 8, y + 2, x + 9, y + 2);
}
}
// draw outer highlight
if (b.isEnabled())
{
g.setColor(Color.WHITE);
// outer
g.drawLine(x + 10, y + 1, x + 10, y + 1);
g.drawLine(x + 11, y + 2, x + 11, y + 3);
g.drawLine(x + 12, y + 4, x + 12, y + 7);
g.drawLine(x + 11, y + 8, x + 11, y + 9);
g.drawLine(x + 10, y + 10, x + 10, y + 10);
g.drawLine(x + 8, y + 11, x + 9, y + 11);
g.drawLine(x + 4, y + 12, x + 7, y + 12);
g.drawLine(x + 2, y + 11, x + 3, y + 11);
}
if (b.isSelected())
{
if (b.isEnabled())
g.setColor(Color.BLACK);
else
g.setColor(Color.GRAY);
g.drawLine(x + 4, y + 3, x + 7, y + 3);
g.fillRect(x + 3, y + 4, 6, 4);
g.drawLine(x + 4, y + 8, x + 7, y + 8);
}
g.setColor(savedColor);
}
}
}

View File

@ -0,0 +1,219 @@
/* ProgressBarDemo.java -- A demonstration of JProgressBars
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.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JSlider;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
public class ProgressBarDemo
extends JFrame
implements ActionListener
{
/**
* Creates a new ProgressBarDemo window with the specified title.
*
* @param title the title of the program window
*/
ProgressBarDemo(String title)
{
super(title);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
getContentPane().add(content);
getContentPane().add(closePanel, BorderLayout.SOUTH);
}
static JPanel createContent()
{
JPanel content = new JPanel();
content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
JPanel horizontalProgressBar = createHorizontalProgressBar();
content.add(horizontalProgressBar);
content.add(Box.createVerticalStrut(10));
JPanel verticalProgressBar = createVerticalProgressBar();
content.add(verticalProgressBar);
return content;
}
private static JPanel createHorizontalProgressBar()
{
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
// Plain progress bar.
final JProgressBar hor1 = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);
panel.add(hor1);
final JSlider slider1 = new JSlider(JSlider.HORIZONTAL, 0, 100, 0);
slider1.addChangeListener(new ChangeListener()
{
public void stateChanged(ChangeEvent event)
{
hor1.setValue(slider1.getValue());
}
});
panel.add(slider1);
panel.add(Box.createVerticalStrut(5));
// Plain progress bar with some text.
final JProgressBar hor2 = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);
hor2.setString("ProgressBar Demo");
hor2.setStringPainted(true);
panel.add(hor2);
final JSlider slider2 = new JSlider(JSlider.HORIZONTAL, 0, 100, 0);
slider2.addChangeListener(new ChangeListener()
{
public void stateChanged(ChangeEvent event)
{
hor2.setValue(slider2.getValue());
}
});
panel.add(slider2);
panel.add(Box.createVerticalStrut(5));
// Indeterminate progress bar.
final JProgressBar hor3 = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);
hor3.setIndeterminate(true);
panel.add(hor3);
panel.add(Box.createVerticalStrut(5));
// Indeterminate progress bar with text.
final JProgressBar hor4 = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);
hor4.setIndeterminate(true);
hor4.setString("Indeterminate ProgressBar");
hor4.setStringPainted(true);
panel.add(hor4);
return panel;
}
private static JPanel createVerticalProgressBar()
{
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
final JProgressBar vert = new JProgressBar(JProgressBar.VERTICAL, 0, 100);
panel.add(vert);
final JSlider slider = new JSlider(JSlider.VERTICAL, 0, 100, 0);
slider.addChangeListener(new ChangeListener()
{
public void stateChanged(ChangeEvent event)
{
vert.setValue(slider.getValue());
}
});
panel.add(slider);
panel.add(Box.createHorizontalStrut(5));
final JProgressBar vert2 = new JProgressBar(JProgressBar.VERTICAL, 0, 100);
vert2.setString("ProgressBar Demo");
panel.add(vert2);
vert2.setStringPainted(true);
final JSlider slider2 = new JSlider(JSlider.VERTICAL, 0, 100, 0);
slider2.addChangeListener(new ChangeListener()
{
public void stateChanged(ChangeEvent event)
{
vert2.setValue(slider2.getValue());
}
});
panel.add(slider2);
panel.add(Box.createHorizontalStrut(5));
// Indeterminate progress bar.
final JProgressBar vert3 = new JProgressBar(JProgressBar.VERTICAL, 0, 100);
vert3.setIndeterminate(true);
panel.add(vert3);
panel.add(Box.createHorizontalStrut(5));
// Indeterminate progress bar with text.
final JProgressBar vert4 = new JProgressBar(JProgressBar.VERTICAL, 0, 100);
vert4.setIndeterminate(true);
vert4.setString("Indeterminate ProgressBar");
vert4.setStringPainted(true);
panel.add(vert4);
return panel;
}
public void actionPerformed(ActionEvent event)
{
// TODO Auto-generated method stub
}
/**
* The entry point when running as a standalone program.
*
* @param args command line arguments
*/
public static void main(String[] args)
{
SwingUtilities.invokeLater(
new Runnable()
{
public void run()
{
ProgressBarDemo app = new ProgressBarDemo("ProgressBar Demo");
app.pack();
app.setVisible(true);
}
});
}
}

View File

@ -0,0 +1,141 @@
/* ScrollBarDemo.java -- An example showing scroll bars in Swing.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollBar;
/**
* A simple scroll bar demo showing various scroll bars in different states.
*/
public class ScrollBarDemo
extends JFrame
implements ActionListener
{
/**
* Creates a new demo instance.
*
* @param title the frame title.
*/
public ScrollBarDemo(String title)
{
super(title);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel content = new JPanel(new BorderLayout());
JPanel panel = createScrollBarPanel();
content.add(panel);
return content;
}
private JPanel createScrollBarPanel()
{
JPanel panel = new JPanel(new BorderLayout());
JPanel horizontalPanel = new JPanel();
JScrollBar scroll1a = new JScrollBar(JScrollBar.HORIZONTAL);
JScrollBar scroll1b = new JScrollBar(JScrollBar.HORIZONTAL);
scroll1b.setEnabled(false);
JScrollBar scroll1c = new JScrollBar(JScrollBar.HORIZONTAL);
scroll1c.putClientProperty("JScrollBar.isFreeStanding", Boolean.FALSE);
JScrollBar scroll1d = new JScrollBar(JScrollBar.HORIZONTAL);
scroll1d.putClientProperty("JScrollBar.isFreeStanding", Boolean.FALSE);
scroll1d.setEnabled(false);
horizontalPanel.add(scroll1a);
horizontalPanel.add(scroll1b);
horizontalPanel.add(scroll1c);
horizontalPanel.add(scroll1d);
panel.add(horizontalPanel, BorderLayout.NORTH);
JPanel verticalPanel = new JPanel();
verticalPanel.setLayout(new GridLayout(1, 7));
JScrollBar scroll2a = new JScrollBar(JScrollBar.VERTICAL);
JScrollBar scroll2b = new JScrollBar(JScrollBar.VERTICAL);
scroll2b.setEnabled(false);
JScrollBar scroll2c = new JScrollBar(JScrollBar.VERTICAL);
scroll2c.putClientProperty("JScrollBar.isFreeStanding", Boolean.FALSE);
JScrollBar scroll2d = new JScrollBar(JScrollBar.VERTICAL);
scroll2d.setEnabled(false);
scroll2d.putClientProperty("JScrollBar.isFreeStanding", Boolean.FALSE);
verticalPanel.add(scroll2a);
verticalPanel.add(new JPanel());
verticalPanel.add(scroll2b);
verticalPanel.add(new JPanel());
verticalPanel.add(scroll2c);
verticalPanel.add(new JPanel());
verticalPanel.add(scroll2d);
panel.add(verticalPanel, BorderLayout.EAST);
JPanel centerPanel = new JPanel(new GridLayout(1, 2));
centerPanel.add(new JScrollBar(JScrollBar.HORIZONTAL));
centerPanel.add(new JScrollBar(JScrollBar.VERTICAL));
panel.add(centerPanel);
return panel;
}
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
}
public static void main(String[] args)
{
ScrollBarDemo app = new ScrollBarDemo("ScrollBar Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -0,0 +1,249 @@
/* SliderDemo.java -- An example showing JSlider in various configurations.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSlider;
public class SliderDemo extends JFrame implements ActionListener
{
JSlider hslider1;
JSlider hslider2;
JSlider hslider3;
JSlider hslider4;
JSlider hslider5;
JSlider hslider6;
JSlider hslider7;
JSlider hslider8;
JSlider vslider1;
JSlider vslider2;
JSlider vslider3;
JSlider vslider4;
JSlider vslider5;
JSlider vslider6;
JSlider vslider7;
JSlider vslider8;
JCheckBox enabledCheckBox;
public SliderDemo(String frameTitle)
{
super(frameTitle);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel content = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(1, 2));
panel.add(createHorizontalPanel());
panel.add(createVerticalPanel());
enabledCheckBox = new JCheckBox("Enabled");
enabledCheckBox.setSelected(true);
enabledCheckBox.setActionCommand("TOGGLE_ENABLED");
enabledCheckBox.addActionListener(this);
JPanel checkBoxPanel = new JPanel();
checkBoxPanel.add(enabledCheckBox);
JPanel panel2 = new JPanel(new BorderLayout());
panel2.add(panel);
panel2.add(checkBoxPanel, BorderLayout.SOUTH);
content.add(panel2);
return content;
}
private JPanel createHorizontalPanel()
{
JPanel panel = new JPanel(new GridLayout(8, 1));
hslider1 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
panel.add(hslider1);
hslider2 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider2.setMajorTickSpacing(20);
hslider2.setMinorTickSpacing(5);
hslider2.setPaintTicks(true);
panel.add(hslider2);
hslider3 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider3.setMajorTickSpacing(20);
hslider3.setMinorTickSpacing(5);
hslider3.setPaintLabels(true);
hslider3.setPaintTicks(true);
panel.add(hslider3);
hslider4 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider4.putClientProperty("JSlider.isFilled", Boolean.TRUE);
hslider4.setMajorTickSpacing(20);
hslider4.setMinorTickSpacing(5);
hslider4.setPaintLabels(true);
hslider4.setPaintTicks(true);
panel.add(hslider4);
hslider5 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider5.setInverted(true);
panel.add(hslider5);
hslider6 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider6.setInverted(true);
hslider6.setMajorTickSpacing(20);
hslider6.setMinorTickSpacing(5);
hslider6.setPaintTicks(true);
panel.add(hslider6);
hslider7 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider7.setInverted(true);
hslider7.setMajorTickSpacing(20);
hslider7.setMinorTickSpacing(5);
hslider7.setPaintLabels(true);
hslider7.setPaintTicks(true);
panel.add(hslider7);
hslider8 = new JSlider(JSlider.HORIZONTAL, 0, 100, 35);
hslider8.putClientProperty("JSlider.isFilled", Boolean.TRUE);
hslider8.setInverted(true);
hslider8.setMajorTickSpacing(20);
hslider8.setMinorTickSpacing(5);
hslider8.setPaintLabels(true);
hslider8.setPaintTicks(true);
panel.add(hslider8);
return panel;
}
private JPanel createVerticalPanel()
{
JPanel panel = new JPanel(new GridLayout(1, 8));
vslider1 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
panel.add(vslider1);
vslider2 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider2.setMajorTickSpacing(20);
vslider2.setMinorTickSpacing(5);
vslider2.setPaintTicks(true);
panel.add(vslider2);
vslider3 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider3.setMajorTickSpacing(20);
vslider3.setMinorTickSpacing(5);
vslider3.setPaintLabels(true);
vslider3.setPaintTicks(true);
panel.add(vslider3);
vslider4 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider4.putClientProperty("JSlider.isFilled", Boolean.TRUE);
vslider4.setMajorTickSpacing(20);
vslider4.setMinorTickSpacing(5);
vslider4.setPaintLabels(true);
vslider4.setPaintTicks(true);
panel.add(vslider4);
vslider5 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider5.setInverted(true);
panel.add(vslider5);
vslider6 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider6.setInverted(true);
vslider6.setMajorTickSpacing(20);
vslider6.setMinorTickSpacing(5);
vslider6.setPaintTicks(true);
panel.add(vslider6);
vslider7 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider7.setInverted(true);
vslider7.setMajorTickSpacing(20);
vslider7.setMinorTickSpacing(5);
vslider7.setPaintLabels(true);
vslider7.setPaintTicks(true);
panel.add(vslider7);
vslider8 = new JSlider(JSlider.VERTICAL, 0, 100, 35);
vslider8.putClientProperty("JSlider.isFilled", Boolean.TRUE);
vslider8.setInverted(true);
vslider8.setMajorTickSpacing(20);
vslider8.setMinorTickSpacing(5);
vslider8.setPaintLabels(true);
vslider8.setPaintTicks(true);
panel.add(vslider8);
return panel;
}
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
else if (e.getActionCommand().equals("TOGGLE_ENABLED"))
{
boolean enabled = enabledCheckBox.isSelected();
hslider1.setEnabled(enabled);
hslider2.setEnabled(enabled);
hslider3.setEnabled(enabled);
hslider4.setEnabled(enabled);
hslider5.setEnabled(enabled);
hslider6.setEnabled(enabled);
hslider7.setEnabled(enabled);
hslider8.setEnabled(enabled);
vslider1.setEnabled(enabled);
vslider2.setEnabled(enabled);
vslider3.setEnabled(enabled);
vslider4.setEnabled(enabled);
vslider5.setEnabled(enabled);
vslider6.setEnabled(enabled);
vslider7.setEnabled(enabled);
vslider8.setEnabled(enabled);
}
}
public static void main(String[] args)
{
SliderDemo app = new SliderDemo("Slider Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -0,0 +1,488 @@
/* TextFieldDemo.java -- An example showing various textfields in Swing.
Copyright (C) 2005, Free Software Foundation, Inc.
This file is part of GNU Classpath examples.
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.
*/
package gnu.classpath.examples.swing;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultCaret;
import javax.swing.text.JTextComponent;
/**
* A simple textfield demo showing various textfields in different states.
*/
public class TextFieldDemo
extends JFrame
implements ActionListener
{
/**
* A custom caret for demonstration purposes. This class is inspired by the
* CornerCaret from the OReilly Swing book.
*
* @author Roman Kennke (kennke@aicas.com)
*/
static class CornerCaret extends DefaultCaret
{
public CornerCaret()
{
super();
setBlinkRate(500);
}
protected synchronized void damage(Rectangle r)
{
if (r == null) return;
x = r.x;
y = r.y + (r.height * 4 / 5 - 3);
width = 5;
height = 5;
repaint();
}
public void paint(Graphics g)
{
JTextComponent comp = getComponent();
if (comp == null) return;
int dot = getDot();
Rectangle r = null;
try
{
r = comp.modelToView(dot);
}
catch (BadLocationException e)
{
return;
}
if (r == null) return;
int dist = r.height * 4 / 5 - 3;
if ((x != r.x) || (y != r.y + dist))
{
repaint();
x = r.x;
y = r.y + dist;
width = 5;
height = 5;
}
if (isVisible())
{
g.drawLine(r.x, r.y + dist, r.x, r.y + dist + 4);
g.drawLine(r.x, r.y + dist + 4, r.x + 4, r.y + dist + 4);
}
}
}
/**
* The left aligned textfields and state buttons.
*/
JTextField textfield1;
JTextField textfield2;
JTextField textfield3;
JCheckBox enabled1;
JCheckBox editable1;
JPanel textFieldPanel1;
/**
* The right aligned textfields and state buttons.
*/
JTextField textfield4;
JTextField textfield5;
JTextField textfield6;
JCheckBox enabled2;
JCheckBox editable2;
/**
* The centered textfields and state buttons.
*/
JTextField textfield7;
JTextField textfield8;
JTextField textfield9;
JCheckBox enabled3;
JCheckBox editable3;
/**
* The custom colored textfields and state buttons.
*/
JTextField textfield10;
JTextField textfield11;
JTextField textfield12;
JTextField textfield13;
JTextField textfield14;
JCheckBox enabled4;
JCheckBox editable4;
/**
* Some miscallenous textfield demos.
*/
JTextField textfield15;
JTextField textfield16;
JCheckBox enabled5;
JCheckBox editable5;
/**
* Creates a new demo instance.
*
* @param title the frame title.
*/
public TextFieldDemo(String title)
{
super(title);
JPanel content = createContent();
JPanel closePanel = new JPanel();
JButton closeButton = new JButton("Close");
closeButton.setActionCommand("CLOSE");
closeButton.addActionListener(this);
closePanel.add(closeButton);
content.add(closePanel, BorderLayout.SOUTH);
getContentPane().add(content);
}
/**
* Returns a panel with the demo content. The panel
* uses a BorderLayout(), and the BorderLayout.SOUTH area
* is empty, to allow callers to add controls to the
* bottom of the panel if they want to (a close button is
* added if this demo is being run as a standalone demo).
*/
JPanel createContent()
{
JPanel content = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(5, 1));
panel.add(createLeftAlignedPanel());
panel.add(createRightAlignedPanel());
panel.add(createCenteredPanel());
panel.add(createCustomColoredPanel());
panel.add(createMiscPanel());
content.add(panel);
//content.setPreferredSize(new Dimension(400, 300));
return content;
}
private JPanel createLeftAlignedPanel()
{
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder("Left aligned"));
textFieldPanel1 = new JPanel();
textFieldPanel1.setLayout(new BoxLayout(textFieldPanel1, BoxLayout.X_AXIS));
textfield1 = new JTextField("Hello World!");
textfield1.setHorizontalAlignment(JTextField.LEFT);
textfield1.setFont(new Font("Dialog", Font.PLAIN, 8));
textFieldPanel1.add(textfield1);
textfield2 = new JTextField("Hello World!");
textfield2.setHorizontalAlignment(JTextField.LEFT);
textfield2.setFont(new Font("Dialog", Font.ITALIC, 12));
textFieldPanel1.add(textfield2);
textfield3 = new JTextField("Hello World!");
textfield3.setHorizontalAlignment(JTextField.LEFT);
textfield3.setFont(new Font("Dialog", Font.BOLD, 14));
textFieldPanel1.add(textfield3);
panel.add(textFieldPanel1);
JPanel statePanel = new JPanel();
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
statePanel.add(Box.createVerticalGlue());
enabled1 = new JCheckBox("enabled");
enabled1.setSelected(true);
enabled1.addActionListener(this);
enabled1.setActionCommand("ENABLED1");
statePanel.add(enabled1);
editable1 = new JCheckBox("editable");
editable1.setSelected(true);
editable1.addActionListener(this);
editable1.setActionCommand("EDITABLE1");
statePanel.add(editable1);
statePanel.add(Box.createVerticalGlue());
panel.add(statePanel, BorderLayout.EAST);
return panel;
}
private JPanel createRightAlignedPanel()
{
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder("Right aligned"));
JPanel textFieldPanel = new JPanel();
textFieldPanel.setLayout(new BoxLayout(textFieldPanel, BoxLayout.X_AXIS));
textfield4 = new JTextField("Hello World!");
textfield4.setHorizontalAlignment(JTextField.RIGHT);
textfield4.setFont(new Font("Dialog", Font.PLAIN, 8));
textFieldPanel.add(textfield4);
textfield5 = new JTextField("Hello World!");
textfield5.setHorizontalAlignment(JTextField.RIGHT);
textfield5.setFont(new Font("Dialog", Font.ITALIC, 12));
textFieldPanel.add(textfield5);
textfield6 = new JTextField("Hello World!");
textfield6.setHorizontalAlignment(JTextField.RIGHT);
textfield6.setFont(new Font("Dialog", Font.BOLD, 14));
textFieldPanel.add(textfield6);
panel.add(textFieldPanel);
JPanel statePanel = new JPanel();
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
statePanel.add(Box.createVerticalGlue());
enabled2 = new JCheckBox("enabled");
enabled2.setSelected(true);
enabled2.addActionListener(this);
enabled2.setActionCommand("ENABLED2");
statePanel.add(enabled2);
editable2 = new JCheckBox("editable");
editable2.setSelected(true);
editable2.addActionListener(this);
editable2.setActionCommand("EDITABLE2");
statePanel.add(editable2);
statePanel.add(Box.createVerticalGlue());
panel.add(statePanel, BorderLayout.EAST);
return panel;
}
private JPanel createCenteredPanel()
{
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder("Centered"));
JPanel textFieldPanel = new JPanel();
textFieldPanel.setLayout(new BoxLayout(textFieldPanel, BoxLayout.X_AXIS));
textfield7 = new JTextField("Hello World!");
textfield7.setHorizontalAlignment(JTextField.CENTER);
textfield7.setFont(new Font("Dialog", Font.PLAIN, 8));
textFieldPanel.add(textfield7);
textfield8 = new JTextField("Hello World!");
textfield8.setHorizontalAlignment(JTextField.CENTER);
textfield8.setFont(new Font("Dialog", Font.ITALIC, 12));
textFieldPanel.add(textfield8);
textfield9 = new JTextField("Hello World!");
textfield9.setHorizontalAlignment(JTextField.CENTER);
textfield9.setFont(new Font("Dialog", Font.BOLD, 14));
textFieldPanel.add(textfield9);
panel.add(textFieldPanel);
JPanel statePanel = new JPanel();
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
statePanel.add(Box.createVerticalGlue());
enabled3 = new JCheckBox("enabled");
enabled3.setSelected(true);
enabled3.addActionListener(this);
enabled3.setActionCommand("ENABLED3");
statePanel.add(enabled3);
editable3 = new JCheckBox("editable");
editable3.setSelected(true);
editable3.addActionListener(this);
editable3.setActionCommand("EDITABLE3");
statePanel.add(editable3);
statePanel.add(Box.createVerticalGlue());
panel.add(statePanel, BorderLayout.EAST);
return panel;
}
private JPanel createCustomColoredPanel()
{
JPanel panel = new JPanel(new BorderLayout());
JPanel textFieldPanel = new JPanel();
panel.setBorder(BorderFactory.createTitledBorder("Custom colors"));
textFieldPanel.setLayout(new BoxLayout(textFieldPanel, BoxLayout.X_AXIS));
textfield10 = new JTextField("custom foreground");
textfield10.setForeground(Color.GREEN);
textFieldPanel.add(textfield10);
textfield11 = new JTextField("custom background");
textfield11.setForeground(Color.YELLOW);
textFieldPanel.add(textfield11);
textfield12 = new JTextField("custom disabled textcolor");
textfield12.setDisabledTextColor(Color.BLUE);
textFieldPanel.add(textfield12);
textfield13 = new JTextField("custom selected text color");
textfield13.setSelectedTextColor(Color.RED);
textFieldPanel.add(textfield13);
textfield14 = new JTextField("custom selection color");
textfield14.setSelectionColor(Color.CYAN);
textFieldPanel.add(textfield14);
panel.add(textFieldPanel);
JPanel statePanel = new JPanel();
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
statePanel.add(Box.createVerticalGlue());
enabled4 = new JCheckBox("enabled");
enabled4.setSelected(true);
enabled4.addActionListener(this);
enabled4.setActionCommand("ENABLED4");
statePanel.add(enabled4);
editable4 = new JCheckBox("editable");
editable4.setSelected(true);
editable4.addActionListener(this);
editable4.setActionCommand("EDITABLE4");
statePanel.add(editable4);
statePanel.add(Box.createVerticalGlue());
panel.add(statePanel, BorderLayout.EAST);
return panel;
}
private JPanel createMiscPanel()
{
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createTitledBorder("Miscallenous"));
JPanel textFieldPanel = new JPanel();
textFieldPanel.setLayout(new BoxLayout(textFieldPanel, BoxLayout.X_AXIS));
textfield15 = new JTextField("Custom Caret");
textfield15.setCaret(new CornerCaret());
textFieldPanel.add(textfield15);
textfield16 = new JTextField("Custom Caret color");
textfield16.setCaretColor(Color.MAGENTA);
textFieldPanel.add(textfield16);
panel.add(textFieldPanel);
JPanel statePanel = new JPanel();
statePanel.setLayout(new BoxLayout(statePanel, BoxLayout.Y_AXIS));
statePanel.add(Box.createVerticalGlue());
enabled5 = new JCheckBox("enabled");
enabled5.setSelected(true);
enabled5.addActionListener(this);
enabled5.setActionCommand("ENABLED5");
statePanel.add(enabled5);
editable5 = new JCheckBox("editable");
editable5.setSelected(true);
editable5.addActionListener(this);
editable5.setActionCommand("EDITABLE5");
statePanel.add(editable5);
statePanel.add(Box.createVerticalGlue());
panel.add(statePanel, BorderLayout.EAST);
return panel;
}
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().equals("CLOSE"))
{
System.exit(0);
}
else if (e.getActionCommand().equals("ENABLED1"))
{
boolean enabled = enabled1.isSelected();
textfield1.setEnabled(enabled);
textfield2.setEnabled(enabled);
textfield3.setEnabled(enabled);
}
else if (e.getActionCommand().equals("EDITABLE1"))
{
boolean editable = editable1.isSelected();
textfield1.setEditable(editable);
textfield2.setEditable(editable);
textfield3.setEditable(editable);
}
else if (e.getActionCommand().equals("ENABLED2"))
{
boolean enabled = enabled2.isSelected();
textfield4.setEnabled(enabled);
textfield5.setEnabled(enabled);
textfield6.setEnabled(enabled);
}
else if (e.getActionCommand().equals("EDITABLE2"))
{
boolean editable = editable2.isSelected();
textfield4.setEditable(editable);
textfield5.setEditable(editable);
textfield6.setEditable(editable);
}
else if (e.getActionCommand().equals("ENABLED3"))
{
boolean enabled = enabled3.isSelected();
textfield7.setEnabled(enabled);
textfield8.setEnabled(enabled);
textfield9.setEnabled(enabled);
}
else if (e.getActionCommand().equals("EDITABLE3"))
{
boolean editable = editable3.isSelected();
textfield7.setEditable(editable);
textfield8.setEditable(editable);
textfield9.setEditable(editable);
}
else if (e.getActionCommand().equals("ENABLED4"))
{
boolean enabled = enabled4.isSelected();
textfield10.setEnabled(enabled);
textfield11.setEnabled(enabled);
textfield12.setEnabled(enabled);
textfield13.setEnabled(enabled);
textfield14.setEnabled(enabled);
}
else if (e.getActionCommand().equals("EDITABLE4"))
{
boolean editable = editable4.isSelected();
textfield10.setEditable(editable);
textfield11.setEditable(editable);
textfield12.setEditable(editable);
textfield13.setEditable(editable);
textfield14.setEditable(editable);
}
}
public static void main(String[] args)
{
TextFieldDemo app = new TextFieldDemo("TextField Demo");
app.pack();
app.setVisible(true);
}
}

View File

@ -39,10 +39,8 @@ target_triplet = @target@
subdir = external
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -84,10 +82,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -224,6 +226,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -237,6 +240,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -39,10 +39,8 @@ target_triplet = @target@
subdir = external/sax
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -75,10 +73,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -215,6 +217,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -228,6 +231,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -39,10 +39,8 @@ target_triplet = @target@
subdir = external/w3c_dom
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
$(top_srcdir)/../../config/lead-dot.m4 \
$(top_srcdir)/../../config/no-executables.m4 \
$(top_srcdir)/../../libtool.m4 $(top_srcdir)/m4/accross.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
$(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \
$(top_srcdir)/m4/acinclude.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
@ -75,10 +73,14 @@ CLASSPATH_MODULE = @CLASSPATH_MODULE@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CREATE_ALSA_LIBRARIES_FALSE = @CREATE_ALSA_LIBRARIES_FALSE@
CREATE_ALSA_LIBRARIES_TRUE = @CREATE_ALSA_LIBRARIES_TRUE@
CREATE_API_DOCS_FALSE = @CREATE_API_DOCS_FALSE@
CREATE_API_DOCS_TRUE = @CREATE_API_DOCS_TRUE@
CREATE_CORE_JNI_LIBRARIES_FALSE = @CREATE_CORE_JNI_LIBRARIES_FALSE@
CREATE_CORE_JNI_LIBRARIES_TRUE = @CREATE_CORE_JNI_LIBRARIES_TRUE@
CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@
CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@
CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@
CREATE_GTK_PEER_LIBRARIES_TRUE = @CREATE_GTK_PEER_LIBRARIES_TRUE@
CREATE_JNI_HEADERS_FALSE = @CREATE_JNI_HEADERS_FALSE@
@ -215,6 +217,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
default_toolkit = @default_toolkit@
exec_prefix = @exec_prefix@
glibjdir = @glibjdir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@ -228,6 +231,7 @@ libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
nativelibdir = @nativelibdir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@

View File

@ -1,4 +1,4 @@
/* cdrOutput.java --
/* AbstractCdrOutput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -39,27 +39,28 @@ exception statement from your version. */
package gnu.CORBA.CDR;
import gnu.CORBA.BigDecimalHelper;
import gnu.CORBA.GIOP.CharSets_OSF;
import gnu.CORBA.GIOP.cxCodeSet;
import gnu.CORBA.Poa.gnuServantObject;
import gnu.CORBA.IOR;
import gnu.CORBA.Simple_delegate;
import gnu.CORBA.IorProvider;
import gnu.CORBA.Minor;
import gnu.CORBA.TypeCodeHelper;
import gnu.CORBA.Unexpected;
import gnu.CORBA.Version;
import gnu.CORBA.primitiveTypeCode;
import gnu.CORBA.GIOP.CharSets_OSF;
import gnu.CORBA.GIOP.CodeSetServiceContext;
import gnu.CORBA.typecodes.PrimitiveTypeCode;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.DataInputStream;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.ORB;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.UserException;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.portable.Delegate;
import org.omg.CORBA.portable.ObjectImpl;
import org.omg.CORBA.portable.OutputStream;
@ -68,7 +69,6 @@ import org.omg.CORBA.portable.Streamable;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Serializable;
import java.math.BigDecimal;
/**
@ -79,18 +79,27 @@ import java.math.BigDecimal;
* The same class also implements the {@link DataInputStream},
* providing support for writing the value type objects
* in a user defined way.
*
* TODO This class uses 16 bits per Unicode character only, as it was until
* jdk 1.4 inclusive.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class cdrOutput
public abstract class AbstractCdrOutput
extends org.omg.CORBA_2_3.portable.OutputStream
implements org.omg.CORBA.DataOutputStream
{
/**
* The runtime, associated with this stream. This field is only used when
* reading and writing value types and filled-in in gnu.CORBA.CDR.Vio.
*/
public transient gnuRuntime runtime;
/**
* This instance is used to convert primitive data types into the
* byte sequences.
*/
protected abstractDataOutputStream b;
protected AbstractDataOutput b;
/**
* The associated orb, if any.
@ -105,7 +114,7 @@ public abstract class cdrOutput
/**
* The code set information.
*/
protected cxCodeSet codeset;
protected CodeSetServiceContext codeset;
/**
* The name of the currently used narrow charset.
@ -148,19 +157,19 @@ public abstract class cdrOutput
*
* @param writeTo a stream to write CORBA output to.
*/
public cdrOutput(java.io.OutputStream writeTo)
public AbstractCdrOutput(java.io.OutputStream writeTo)
{
setOutputStream(writeTo);
setCodeSet(cxCodeSet.STANDARD);
setCodeSet(CodeSetServiceContext.STANDARD);
}
/**
* Creates the stream, requiring the subsequent call
* of {@link #setOutputStream(java.io.OutputStream)}.
*/
public cdrOutput()
public AbstractCdrOutput()
{
setCodeSet(cxCodeSet.STANDARD);
setCodeSet(CodeSetServiceContext.STANDARD);
}
/**
@ -168,11 +177,22 @@ public abstract class cdrOutput
* stream is different from 0.
*/
public abstract void setOffset(int an_offset);
/**
* Clone all important settings to another stream.
*/
public void cloneSettings(AbstractCdrOutput stream)
{
stream.setBigEndian(!little_endian);
stream.setCodeSet(getCodeSet());
stream.setVersion(giop);
stream.setOrb(orb);
}
/**
* Set the current code set context.
*/
public void setCodeSet(cxCodeSet a_codeset)
public void setCodeSet(CodeSetServiceContext a_codeset)
{
this.codeset = a_codeset;
narrow_charset = CharSets_OSF.getName(codeset.char_data);
@ -185,7 +205,7 @@ public abstract class cdrOutput
/**
* Get the current code set context.
*/
public cxCodeSet getCodeSet()
public CodeSetServiceContext getCodeSet()
{
return codeset;
}
@ -255,9 +275,9 @@ public abstract class cdrOutput
*
* @return the encapsulated stream.
*/
public cdrOutput createEncapsulation()
public AbstractCdrOutput createEncapsulation()
{
return new encapsulatedOutput(this, !little_endian);
return new EncapsulationStream(this, !little_endian);
}
/**
@ -313,53 +333,56 @@ public abstract class cdrOutput
}
/**
* Read the CORBA object. The object is written
* 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).
*/
* Read the CORBA object. The object is written 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 == null)
ORB w_orb = orb;
if (x instanceof IorProvider)
{
IOR.write_null(this);
((IorProvider) x).getIor()._write_no_endian(this);
return;
}
else if (x instanceof gnuServantObject)
else if (x == null)
{
// The ORB may be different if several ORBs coexist
// in the same machine.
gnuServantObject g = (gnuServantObject) x;
IOR ior = g.orb.getLocalIor(x);
ior._write_no_endian(this);
IOR.write_null(this);
return;
}
else if (x instanceof ObjectImpl)
{
Delegate d = ((ObjectImpl) x)._get_delegate();
if (d instanceof Simple_delegate)
if (d instanceof IorProvider)
{
Simple_delegate ido = (Simple_delegate) d;
ido.getIor()._write_no_endian(this);
((IorProvider) d).getIor()._write_no_endian(this);
return;
}
else
{
ORB d_orb = d.orb(x);
if (d_orb != null)
w_orb = d_orb;
}
}
// Either this is not an ObjectImpl or it has the
// unexpected delegate. Try to convert via ORBs
// object_to_string().
if (orb != null)
if (w_orb != null)
{
IOR ior = IOR.parse(orb.object_to_string(x));
IOR ior = IOR.parse(w_orb.object_to_string(x));
ior._write_no_endian(this);
return;
}
else
throw new BAD_OPERATION("Please set the ORB for this stream.");
throw new BAD_OPERATION(
"Please set the ORB for this stream, cannot write "
+ x.getClass().getName());
}
/**
@ -399,7 +422,7 @@ public abstract class cdrOutput
}
else
{
primitiveTypeCode p = new primitiveTypeCode(TCKind.tk_null);
PrimitiveTypeCode p = new PrimitiveTypeCode(TCKind.tk_null);
write_TypeCode(p);
}
}
@ -726,6 +749,7 @@ public abstract class cdrOutput
catch (IOException ex)
{
MARSHAL t = new MARSHAL();
t.minor = Minor.CDR;
t.initCause(ex);
throw t;
}
@ -737,7 +761,7 @@ public abstract class cdrOutput
* representing the stream buffer length (the number of
* bytes being subsequently written).
*/
public void write_sequence(cdrBufOutput from)
public void write_sequence(BufferedCdrOutput from)
{
try
{
@ -747,6 +771,7 @@ public abstract class cdrOutput
catch (IOException ex)
{
MARSHAL t = new MARSHAL();
t.minor = Minor.CDR;
t.initCause(ex);
throw t;
}
@ -874,28 +899,41 @@ public abstract class cdrOutput
}
/**
* Writes the character as two byte short integer (Unicode value),
* high byte first. Writes in Big Endian, but never writes the
* endian indicator.
*
* The character is always written using the native UTF-16BE charset
* because its size under arbitrary encoding is not evident.
* Writes the character as two byte short integer (Unicode value), high byte
* first. Writes in Big Endian, but never writes the endian indicator.
*
* The character is always written using the native UTF-16BE charset because
* its size under arbitrary encoding is not evident.
*/
public void write_wchar(char x)
{
try
{
if (giop.until_inclusive(1, 1))
align(2);
{
align(2);
if (wide_native)
b.writeShort(x);
if (wide_native)
b.writeShort(x);
else
{
OutputStreamWriter ow = new OutputStreamWriter(
(OutputStream) b, wide_charset);
ow.write(x);
ow.flush();
}
}
else if (wide_native)
{
b.writeByte(2);
b.writeChar(x);
}
else
{
OutputStreamWriter ow =
new OutputStreamWriter((OutputStream) b, wide_charset);
ow.write(x);
ow.flush();
String encoded = new String(new char[] { x });
byte[] bytes = encoded.getBytes(wide_charset);
b.write(bytes.length + 2);
b.write(bytes);
}
}
catch (IOException ex)
@ -906,13 +944,13 @@ public abstract class cdrOutput
/**
* Write the array of wide chars.
*
*
* @param chars the array of wide chars
* @param offset offset
* @param length length
*
* The char array is always written using the native UTF-16BE charset
* because the character size under arbitrary encoding is not evident.
*
* The char array is always written using the native UTF-16BE charset because
* the character size under arbitrary encoding is not evident.
*/
public void write_wchar_array(char[] chars, int offset, int length)
{
@ -998,12 +1036,12 @@ public abstract class cdrOutput
/** {@inheritDoc} */
public void write_Abstract(java.lang.Object value)
{
write_Abstract(value);
write_abstract_interface(value);
}
/** {@inheritDoc} */
public void write_Value(Serializable value)
{
write_Value(value);
write_value(value);
}
}

View File

@ -1,4 +1,4 @@
/* abstractDataInputStream.java --
/* AbstractDataInput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -50,7 +50,7 @@ import java.io.IOException;
* @author Warren Levy (warrenl@cygnus.com)
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface abstractDataInputStream
public interface AbstractDataInput
{
/**
* This method reads bytes from the underlying stream into the specified

View File

@ -1,4 +1,4 @@
/* abstractDataOutputStream.java --
/* AbstractDataOutput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -50,7 +50,7 @@ import java.io.IOException;
* @author Warren Levy (warrenl@cygnus.com)
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface abstractDataOutputStream
public interface AbstractDataOutput
{
/**
* This method flushes any unwritten bytes to the underlying stream.

View File

@ -1,4 +1,4 @@
/* aligningInputStream.java --
/* AligningInput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -48,7 +48,7 @@ import org.omg.CORBA.BAD_PARAM;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class aligningInputStream
public class AligningInput
extends ByteArrayInputStream
{
/**
@ -61,23 +61,11 @@ public class aligningInputStream
*
* @param a_buffer a buffer to read from.
*/
public aligningInputStream(byte[] a_buffer)
public AligningInput(byte[] a_buffer)
{
super(a_buffer);
}
/**
* Create a stream, reading from the given buffer region.
*
* @param a_buffer a buffer to read from.
* @param offset the offset of the region.
* @param length thr length of the region.
*/
public aligningInputStream(byte[] a_buffer, int offset, int length)
{
super(a_buffer, offset, length);
}
/**
* Set the alignment offset, if the index of the first byte in the
* stream is different from 0.
@ -119,4 +107,25 @@ public class aligningInputStream
{
return buf;
}
/**
* Get the current position in the buffer.
*
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return pos + offset;
}
/**
* Jump to the given position, taking offset into consideration.
*/
public void seek(int position)
{
if (position < offset || position > (count+offset))
throw new ArrayIndexOutOfBoundsException(position
+ " is out of valid ["+offset+".." + (count+offset) + "[ range");
pos = position - offset;
}
}

View File

@ -1,4 +1,4 @@
/* aligningOutputStream.java --
/* AligningOutput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.CORBA.CDR;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import org.omg.CORBA.BAD_PARAM;
@ -49,7 +48,7 @@ import org.omg.CORBA.BAD_PARAM;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class aligningOutputStream
public class AligningOutput
extends ByteArrayOutputStream
{
/**
@ -60,14 +59,14 @@ public class aligningOutputStream
/**
* Create a stream with the default intial buffer size.
*/
public aligningOutputStream()
public AligningOutput()
{
}
/**
* Create a stream with the given intial buffer size.
*/
public aligningOutputStream(int initial_size)
public AligningOutput(int initial_size)
{
super(initial_size);
}
@ -118,4 +117,32 @@ public class aligningOutputStream
write(0);
}
}
/**
* Get the current position in the buffer.
*
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return size()+offset;
}
/**
* Seek to the given position (not in use).
*/
public void seek(int position)
{
count = position - offset;
}
/**
* Get the buffer without copying it. Use with care.
*/
public byte[] getBuffer()
{
return buf;
}
}

View File

@ -0,0 +1,254 @@
/* ArrayValueHelper.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.BooleanSeqHelper;
import org.omg.CORBA.CharSeqHelper;
import org.omg.CORBA.DoubleSeqHelper;
import org.omg.CORBA.FloatSeqHelper;
import org.omg.CORBA.LongLongSeqHelper;
import org.omg.CORBA.LongSeqHelper;
import org.omg.CORBA.OctetSeqHelper;
import org.omg.CORBA.ShortSeqHelper;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.rmi.Remote;
import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandler;
/**
* Writes arrays as a boxed value types. A single instance is used to write a
* single array. This class is only used with RMI/IIOP, to handle array boxed
* values.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
class ArrayValueHelper
implements BoxedValueHelper
{
/**
* The value handler (one for all instances).
*/
static ValueHandler handler = Util.createValueHandler();
/**
* A class of the array being written.
*/
Class arrayClass;
/**
* The array component class.
*/
Class component;
/**
* The array component repository Id.
*/
String componentId;
/**
* If true, the array members are written as objects rather than as values.
* True for Remotes and CORBA objects.
*/
boolean written_as_object()
{
return org.omg.CORBA.Object.class.isAssignableFrom(component)
|| Remote.class.isAssignableFrom(component);
}
/**
* Creates the instance of the helper to write this specific array class.
*/
ArrayValueHelper(Class an_arrayClass)
{
arrayClass = an_arrayClass;
}
/**
* Get the array repository Id that will be the RMI repository id.
*/
public String get_id()
{
return ObjectCreator.getRepositoryId(arrayClass);
}
/**
* Read the array from the input stream.
*/
public Serializable read_value(InputStream input)
{
if (input instanceof HeadlessInput)
{
((HeadlessInput) input).subsequentCalls = true;
}
component = arrayClass.getComponentType();
if (component.equals(byte.class))
return OctetSeqHelper.read(input);
else if (component.equals(String.class))
{
// String array is optimized because this may be frequent.
String[] s = new String[input.read_long()];
for (int i = 0; i < s.length; i++)
s[i] = (String) Vio.read(input, Vio.m_StringValueHelper);
return s;
}
else if (component.equals(int.class))
return LongSeqHelper.read(input);
else if (component.equals(long.class))
return LongLongSeqHelper.read(input);
else if (component.equals(double.class))
return DoubleSeqHelper.read(input);
else if (component.equals(float.class))
return FloatSeqHelper.read(input);
else if (component.equals(boolean.class))
return BooleanSeqHelper.read(input);
else if (component.equals(short.class))
return ShortSeqHelper.read(input);
else if (component.equals(char.class))
return CharSeqHelper.read(input);
else
{
// Read others, use reflection.
int n = input.read_long();
gnuValueStream s = null;
Serializable array = (Serializable) Array.newInstance(component, n);
if (written_as_object())
for (int i = 0; i < n; i++)
{
gnuRuntime g;
int position;
if (input instanceof gnuValueStream)
{
s = (gnuValueStream) input;
g = s.getRunTime();
position = s.getPosition();
}
else
{
g = null;
position = -1;
}
if (input instanceof HeadlessInput)
((HeadlessInput) input).subsequentCalls = true;
Object o = handler.readValue(input, position, component, null, g);
Array.set(array, i, o);
}
else
for (int i = 0; i < n; i++)
Array.set(array, i, Vio.read(input, component));
return array;
}
}
/**
* Write the array to the input stream.
*/
public void write_value(OutputStream output, Serializable value)
{
if (output instanceof gnuValueStream)
{
gnuRuntime r = ((gnuValueStream) output).getRunTime();
if (r != null)
r.target = null;
}
if (value instanceof byte[])
OctetSeqHelper.write(output, (byte[]) value);
else if (value instanceof String[])
{
String[] s = (String[]) value;
output.write_long(s.length);
for (int i = 0; i < s.length; i++)
Vio.write(output, s[i], Vio.m_StringValueHelper);
}
else if (value instanceof int[])
LongSeqHelper.write(output, (int[]) value);
else if (value instanceof long[])
LongLongSeqHelper.write(output, (long[]) value);
else if (value instanceof double[])
DoubleSeqHelper.write(output, (double[]) value);
else if (value instanceof float[])
FloatSeqHelper.write(output, (float[]) value);
else if (value instanceof boolean[])
BooleanSeqHelper.write(output, (boolean[]) value);
else if (value instanceof short[])
ShortSeqHelper.write(output, (short[]) value);
else if (value instanceof char[])
CharSeqHelper.write(output, (char[]) value);
else
{
// Write others, use reflection.
component = arrayClass.getComponentType();
int n = Array.getLength(value);
output.write_long(n);
if (written_as_object())
for (int i = 0; i < n; i++)
{
Object o = Array.get(value, i);
if (o == null)
output.write_Object(null);
else
// CORBA objects have another notation.
handler.writeValue(output, (Serializable) o);
}
else
{
for (int i = 0; i < n; i++)
Vio.write(output, (Serializable) Array.get(value, i),
component);
}
}
}
}

View File

@ -49,7 +49,7 @@ import java.io.InputStream;
*/
public class BigEndianInputStream
extends DataInputStream
implements abstractDataInputStream
implements AbstractDataInput
{
/**
* Delegates to the parent constructor.

View File

@ -50,7 +50,7 @@ import java.io.OutputStream;
*/
public class BigEndianOutputStream
extends DataOutputStream
implements abstractDataOutputStream
implements AbstractDataOutput
{
/**
* Delegate functionality to the parent constructor.

View File

@ -1,4 +1,4 @@
/* cdrBufOutput.java --
/* BufferedCdrOutput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -41,41 +41,47 @@ package gnu.CORBA.CDR;
import java.io.ByteArrayOutputStream;
/**
* A CORBA output stream, writing data into the internal
* buffer ({@link ByteArrayOutputStream}).
*
* A CORBA output stream, writing data into the internal buffer ({@link ByteArrayOutputStream}).
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class cdrBufOutput
extends cdrOutput
public class BufferedCdrOutput
extends AbstractCdrOutput
implements gnuValueStream
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* The byte buffer.
*/
public final aligningOutputStream buffer;
public final AligningOutput buffer;
/**
* Creates the instance with the given initial buffer size.
*
* @param bufSize the buffer size.
*/
public cdrBufOutput(int bufSize)
public BufferedCdrOutput(int bufSize)
{
buffer = new aligningOutputStream(bufSize);
buffer = new AligningOutput(bufSize);
setOutputStream(buffer);
}
/**
* Creates the instance with the default buffer size.
*/
public cdrBufOutput()
public BufferedCdrOutput()
{
buffer = new aligningOutputStream();
buffer = new AligningOutput();
setOutputStream(buffer);
}
/**
* Set the alignment offset, if the index of the first byte in the
* stream is different from 0.
* Set the alignment offset, if the index of the first byte in the stream is
* different from 0.
*/
public void setOffset(int an_offset)
{
@ -95,7 +101,7 @@ public class cdrBufOutput
*/
public org.omg.CORBA.portable.InputStream create_input_stream()
{
cdrBufInput in = new cdrBufInput(buffer.toByteArray());
BufferredCdrInput in = new BufferredCdrInput(buffer.toByteArray());
in.setOrb(orb);
in.setVersion(giop);
@ -112,4 +118,39 @@ public class cdrBufOutput
buffer.reset();
setOutputStream(buffer);
}
/**
* Get the current position in the buffer.
*
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return buffer.getPosition();
}
/**
* Get the associated RunTime.
*/
public gnuRuntime getRunTime()
{
return runtime;
}
/**
* Replace the instance of RunTime.
*/
public void setRunTime(gnuRuntime a_runtime)
{
runtime = a_runtime;
}
/**
* Seek to the given position.
*/
public void seek(int position)
{
buffer.seek(position);
}
}

View File

@ -1,4 +1,4 @@
/* cdrBufInput.java --
/* BufferredCdrInput.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -43,18 +43,20 @@ package gnu.CORBA.CDR;
* The CDR input stream that reads data from the byte buffer.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*
* TODO character encoding. Now the encoding can be set, but it is ignored.
* If you take this task, scan 'TODO character encoding' for
* relevant places.
*/
public class cdrBufInput
extends cdrInput
public class BufferredCdrInput
extends AbstractCdrInput
implements gnuValueStream
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* The byte array input stream to read data from.
*/
public final aligningInputStream buffer;
public final AligningInput buffer;
/**
* Creates the CDR input stream that reads from the given buffer
@ -62,9 +64,9 @@ public class cdrBufInput
*
* @param a_buffer an array to read from.
*/
public cdrBufInput(byte[] a_buffer)
public BufferredCdrInput(byte[] a_buffer)
{
buffer = new aligningInputStream(a_buffer);
buffer = new AligningInput(a_buffer);
setInputStream(buffer);
}
@ -112,4 +114,40 @@ public class cdrBufInput
buffer.reset();
setInputStream(buffer);
}
/**
* Get the current position in the buffer.
*
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition()
{
return buffer.getPosition();
}
/**
* Jump to the given position, taking offset into consideration.
*/
public void seek(int position)
{
buffer.seek(position);
setInputStream(buffer);
}
/**
* Get the associated RunTime.
*/
public gnuRuntime getRunTime()
{
return runtime;
}
/**
* Replace the instance of RunTime.
*/
public void setRunTime(gnuRuntime a_runtime)
{
runtime = a_runtime;
}
}

View File

@ -48,8 +48,8 @@ import java.io.IOException;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class encapsulatedOutput
extends cdrOutput
public class EncapsulationStream
extends AbstractCdrOutput
{
/**
* The Big Endian (most siginificant byte first flag).
@ -64,7 +64,7 @@ public class encapsulatedOutput
/**
* The byte buffer.
*/
public final aligningOutputStream buffer;
public final AligningOutput buffer;
/**
* The stream, where the data are being encapsulated.
@ -75,11 +75,11 @@ public class encapsulatedOutput
* Create the EncapsulationOutput with the given parent stream
* and the specified encoding.
*/
public encapsulatedOutput(org.omg.CORBA.portable.OutputStream _parent,
public EncapsulationStream(org.omg.CORBA.portable.OutputStream _parent,
boolean use_big_endian)
{
super();
buffer = new aligningOutputStream();
buffer = new AligningOutput();
setOutputStream(buffer);
parent = _parent;
write(use_big_endian?BIG_ENDIAN:LITTLE_ENDIAN);
@ -126,7 +126,7 @@ public class encapsulatedOutput
*/
public org.omg.CORBA.portable.InputStream create_input_stream()
{
cdrBufInput in = new cdrBufInput(buffer.toByteArray());
BufferredCdrInput in = new BufferredCdrInput(buffer.toByteArray());
in.setOrb(orb);
in.setVersion(giop);

View File

@ -0,0 +1,749 @@
/* HeadlessInput.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.Minor;
import org.omg.CORBA.Any;
import org.omg.CORBA.AnySeqHolder;
import org.omg.CORBA.BooleanSeqHolder;
import org.omg.CORBA.CharSeqHolder;
import org.omg.CORBA.Context;
import org.omg.CORBA.DataInputStream;
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.ORB;
import org.omg.CORBA.OctetSeqHolder;
import org.omg.CORBA.Principal;
import org.omg.CORBA.ShortSeqHolder;
import org.omg.CORBA.TypeCode;
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.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* Substitutes the main stream in factories when the header is already behind.
* Overrides methods that may be invoked from the factory, forcing not to read
* the header if called first time on this stream.
*
* This stream reverts to default behavior if one or more call are made (reading
* value types that are nested fields of the value type).
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class HeadlessInput
extends org.omg.CORBA_2_3.portable.InputStream
implements DataInputStream, gnuValueStream
{
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* Indicates that no positional information is available.
*/
static final int NONE = -1;
/**
* If true, this is not the first call.
*/
public boolean subsequentCalls;
/**
* The enclosed stream.
*/
final BufferredCdrInput stream;
/**
* Create an instance, reading from the given buffer.
*
* @param a_stram a stream from where the data will be read.
* @param inheritSettings a stream from that endian and other settings are
* inherited.
*/
public HeadlessInput(BufferredCdrInput a_stream, InputStream inheritSettings)
{
stream = a_stream;
if (inheritSettings instanceof AbstractCdrInput)
{
AbstractCdrInput t = (AbstractCdrInput) inheritSettings;
t.cloneSettings(stream);
}
else if (stream.orb() == null)
stream.setOrb(inheritSettings.orb());
if (inheritSettings instanceof gnuValueStream
&& stream.getRunTime() == null)
{
stream.setRunTime(((gnuValueStream) inheritSettings).getRunTime());
}
}
/**
* Tries to read using boxed value helper.
*/
public Serializable read_value(BoxedValueHelper helper)
{
if (subsequentCalls)
return stream.read_value(helper);
else
{
subsequentCalls = true;
return helper.read_value(this);
}
}
/**
* Tries to locate a factory using repository id.
*/
public Serializable read_value(String repository_id)
{
if (subsequentCalls)
return stream.read_value(repository_id);
else
{
subsequentCalls = true;
Serializable value = (Serializable) Vio.readValue(this, NONE, null,
null, repository_id, null, null);
return value;
}
}
/**
* Try to read when having an unitialised value.
*/
public Serializable read_value(Serializable value)
{
if (subsequentCalls)
return stream.read_value(value);
else
{
subsequentCalls = true;
value = (Serializable) Vio.readValue(this, NONE, value, null, null,
null, null);
return value;
}
}
/**
* Try to read when having an unitialised value.
*/
public Serializable read_value(Class clz)
{
if (subsequentCalls)
return stream.read_value(clz);
else
{
try
{
subsequentCalls = true;
Serializable value = (Serializable) Vio.instantiateAnyWay(clz);
value = (Serializable) Vio.readValue(this, NONE, value, null, null,
null, null);
return value;
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL("Can't read an instance of "
+ clz.getName());
m.minor = Minor.Value;
m.initCause(ex);
throw m;
}
}
}
/**
* Delegates functionality to the underlying stream.
*/
public int available()
throws IOException
{
return stream.available();
}
/**
* Delegates functionality to the underlying stream.
*/
public void close()
throws IOException
{
stream.close();
}
/**
* Delegates functionality to the underlying stream.
*/
public void mark(int readlimit)
{
stream.mark(readlimit);
}
/**
* Delegates functionality to the underlying stream.
*/
public boolean markSupported()
{
return stream.markSupported();
}
/**
* Delegates functionality to the underlying stream.
*/
public ORB orb()
{
return stream.orb();
}
/**
* Delegates functionality to the underlying stream.
*/
public Object read_abstract_interface()
{
return stream.read_abstract_interface();
}
/**
* Delegates functionality to the underlying stream.
*/
public Object read_abstract_interface(Class clz)
{
return stream.read_abstract_interface(clz);
}
/**
* Delegates functionality to the underlying stream.
*/
public Any read_any()
{
return stream.read_any();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_boolean_array(boolean[] value, int offset, int length)
{
stream.read_boolean_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public boolean read_boolean()
{
return stream.read_boolean();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_char_array(char[] value, int offset, int length)
{
stream.read_char_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public char read_char()
{
return stream.read_char();
}
/**
* Delegates functionality to the underlying stream.
*/
public Context read_Context()
{
return stream.read_Context();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_double_array(double[] value, int offset, int length)
{
stream.read_double_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public double read_double()
{
return stream.read_double();
}
/**
* Delegates functionality to the underlying stream.
*/
public BigDecimal read_fixed()
{
return stream.read_fixed();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_float_array(float[] value, int offset, int length)
{
stream.read_float_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public float read_float()
{
return stream.read_float();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_long_array(int[] value, int offset, int length)
{
stream.read_long_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public int read_long()
{
return stream.read_long();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_longlong_array(long[] value, int offset, int length)
{
stream.read_longlong_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public long read_longlong()
{
return stream.read_longlong();
}
/**
* Delegates functionality to the underlying stream.
*/
public org.omg.CORBA.Object read_Object()
{
return stream.read_Object();
}
/**
* Delegates functionality to the underlying stream.
*/
public org.omg.CORBA.Object read_Object(Class klass)
{
return stream.read_Object(klass);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_octet_array(byte[] value, int offset, int length)
{
stream.read_octet_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public byte read_octet()
{
return stream.read_octet();
}
/**
* Delegates functionality to the underlying stream.
*/
public Principal read_Principal()
{
return stream.read_Principal();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_short_array(short[] value, int offset, int length)
{
stream.read_short_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public short read_short()
{
return stream.read_short();
}
/**
* Delegates functionality to the underlying stream.
*/
public String read_string()
{
return stream.read_string();
}
/**
* Delegates functionality to the underlying stream.
*/
public TypeCode read_TypeCode()
{
return stream.read_TypeCode();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ulong_array(int[] value, int offset, int length)
{
stream.read_ulong_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public int read_ulong()
{
return stream.read_ulong();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ulonglong_array(long[] value, int offset, int length)
{
stream.read_ulonglong_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public long read_ulonglong()
{
return stream.read_ulonglong();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ushort_array(short[] value, int offset, int length)
{
stream.read_ushort_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public short read_ushort()
{
return stream.read_ushort();
}
/**
* Delegates functionality to the underlying stream.
*/
public Serializable read_value()
{
return read_value((Serializable) null);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_wchar_array(char[] value, int offset, int length)
{
stream.read_wchar_array(value, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public char read_wchar()
{
return stream.read_wchar();
}
/**
* Delegates functionality to the underlying stream.
*/
public String read_wstring()
{
return stream.read_wstring();
}
/**
* Delegates functionality to the underlying stream.
*/
public int read()
throws IOException
{
return stream.read();
}
/**
* Delegates functionality to the underlying stream.
*/
public int read(byte[] b, int off, int len)
throws IOException
{
return stream.read(b, off, len);
}
/**
* Delegates functionality to the underlying stream.
*/
public int read(byte[] b)
throws IOException
{
return stream.read(b);
}
/**
* Delegates functionality to the underlying stream.
*/
public void reset()
throws IOException
{
stream.reset();
}
/**
* Delegates functionality to the underlying stream.
*/
public long skip(long n)
throws IOException
{
return stream.skip(n);
}
/**
* Get a string representation.
*/
public String toString()
{
return "HeadlessInput+" + stream.toString();
}
/**
* Delegates functionality to the underlying stream.
*/
public String[] _truncatable_ids()
{
return stream._truncatable_ids();
}
/**
* Delegates functionality to the underlying stream.
*/
public Object read_Abstract()
{
return stream.read_Abstract();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_any_array(AnySeqHolder holder, int offset, int length)
{
stream.read_any_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_boolean_array(BooleanSeqHolder holder, int offset, int length)
{
stream.read_boolean_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_char_array(CharSeqHolder holder, int offset, int length)
{
stream.read_char_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_double_array(DoubleSeqHolder holder, int offset, int length)
{
stream.read_double_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_float_array(FloatSeqHolder holder, int offset, int length)
{
stream.read_float_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_long_array(LongSeqHolder holder, int offset, int length)
{
stream.read_long_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_longlong_array(LongLongSeqHolder holder, int offset,
int length)
{
stream.read_longlong_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_octet_array(OctetSeqHolder holder, int offset, int length)
{
stream.read_octet_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_short_array(ShortSeqHolder holder, int offset, int length)
{
stream.read_short_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ulong_array(ULongSeqHolder holder, int offset, int length)
{
stream.read_ulong_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ulonglong_array(ULongLongSeqHolder holder, int offset,
int length)
{
stream.read_ulonglong_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_ushort_array(UShortSeqHolder holder, int offset, int length)
{
stream.read_ushort_array(holder, offset, length);
}
/**
* Delegates functionality to read_value.
*/
public Serializable read_Value()
{
return read_value();
}
/**
* Delegates functionality to the underlying stream.
*/
public void read_wchar_array(WCharSeqHolder holder, int offset, int length)
{
stream.read_wchar_array(holder, offset, length);
}
/**
* Delegates functionality to the underlying stream.
*/
public int getPosition()
{
return stream.getPosition();
}
/**
* Delegates functionality to the underlying stream.
*/
public gnuRuntime getRunTime()
{
return stream.runtime;
}
/**
* Replace the instance of RunTime.
*/
public void setRunTime(gnuRuntime a_runtime)
{
stream.runtime = a_runtime;
}
/**
* Delegates functionality to the underlying stream.
*/
public void seek(int position)
{
stream.seek(position);
}
}

View File

@ -0,0 +1,169 @@
/* 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 gnu.CORBA.CDR;
import gnu.CORBA.Minor;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/**
* Handles case when the CORBA IDL type with the known helper is wrapped into
* Value type.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class IDLTypeHelper
implements BoxedValueHelper
{
/**
* A helper class.
*/
protected Class helper;
/**
* Argument values for Helper.id().
*/
static final Object[] ARGS_ID_V = new Object[0];
/**
* Argument types for Helper.id()).
*/
static final Class[] ARGS_ID = new Class[0];
/**
* Argument types for Helper.read.
*/
static final Class[] ARGS_READ = new Class[] { org.omg.CORBA.portable.InputStream.class };
/**
* Create an IDLTypeHelper that works via given helper class.
*/
public IDLTypeHelper(Class a_helperClass)
{
helper = a_helperClass;
}
/**
* Get the Id, returned by this helper (use reflection).
*/
public String get_id()
{
try
{
Method m = helper.getMethod("id", ARGS_ID);
return (String) m.invoke(null, ARGS_ID_V);
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL(msg() + " id()");
m.minor = Minor.Boxed;
m.initCause(ex);
throw m;
}
}
/**
* Read an instance from the stream.
*/
public Serializable read_value(InputStream input)
{
try
{
Method m = helper.getMethod("read", ARGS_READ);
return (Serializable) m.invoke(null, new Object[] { input });
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL(msg() + " read(..)");
m.minor = Minor.Boxed;
m.initCause(ex);
throw m;
}
}
/**
* Write the instance to the stream.
*/
public void write_value(OutputStream output, Serializable value)
{
try
{
Method[] m = helper.getMethods();
for (int i = 0; i < m.length; i++)
{
if (m[i].getName().equals("write")
&& ((m[i].getModifiers() & Modifier.STATIC) != 0))
{
Class[] p = m[i].getParameterTypes();
if (p.length == 2 && OutputStream.class.isAssignableFrom(p[0])
&& p[1].isAssignableFrom(value.getClass()))
{
m[i].invoke(null, new Object[] { output, value });
return;
}
}
}
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL(msg() + " write(..)");
m.minor = Minor.Boxed;
m.initCause(ex);
throw m;
}
}
/**
* Create the start of message for exceptions.
*/
String msg()
{
return "Failed calling " + helper.getName() + " method: ";
}
}

View File

@ -55,7 +55,7 @@ import java.io.PushbackInputStream;
*/
public class LittleEndianInputStream
extends FilterInputStream
implements abstractDataInputStream
implements AbstractDataInput
{
// Byte buffer, used to make primitive read calls more efficient.
byte[] buf = new byte[ 8 ];

View File

@ -55,7 +55,7 @@ import java.io.OutputStream;
*/
public class LittleEndianOutputStream
extends FilterOutputStream
implements abstractDataOutputStream
implements AbstractDataOutput
{
/**
* This method initializes an instance of <code>DataOutputStream</code> to

View File

@ -0,0 +1,292 @@
/* UnknownExceptionCtxHandler.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.Minor;
import gnu.CORBA.ObjectCreator;
import gnu.CORBA.GIOP.ServiceContext;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.StringValueHelper;
import org.omg.CORBA.portable.OutputStream;
import java.lang.reflect.Constructor;
import java.util.StringTokenizer;
import javax.rmi.CORBA.Util;
/**
* Reads the data about an unknown exception from the UnknownExceptionInfo.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class UnknownExceptionCtxHandler
extends Vio
{
/**
* Encode exception and add its recored to the message service contexts.
*/
public static ServiceContext[] addExceptionContext(ServiceContext[] current,
Throwable exception, Object details)
{
try
{
ServiceContext[] c = new ServiceContext[current.length + 1];
if (current.length > 0)
System.arraycopy(current, 0, c, 0, current.length);
BufferedCdrOutput output = new BufferedCdrOutput();
if (details instanceof OutputStream)
output.setOrb(((OutputStream) output).orb());
if (details instanceof AbstractCdrOutput)
((AbstractCdrOutput) details).cloneSettings(output);
write(output, exception);
ServiceContext xc = new ServiceContext();
xc.context_id = ServiceContext.UnknownExceptionInfo;
xc.context_data = output.buffer.toByteArray();
c[current.length] = xc;
return c;
}
catch (Exception ex)
{
ex.printStackTrace();
return current;
}
}
/**
* Write data about unknown exception.
*/
public static void write(BufferedCdrOutput output, Throwable t)
{
t.fillInStackTrace();
output.write_Value(t);
}
/**
* Read the data about an unknown exception from the UnknownExceptionInfo.
* Following the documentation, this must be just value type, but it seems
* that in Sun's implementation is is not, as starts from 0x0. For value type,
* this would be null.
*
* TODO Implement reading and writing in Sun format, making Classpath IIOP
* interoperable with Sun's implementation. Current inmplementation reads and
* reproduces the exception class type only.
*
* @param input the input stream to read the context (orb and other settings
* are inherited from the main stream that received the message).
*
* @param contexts all service contexts that were present in the message.
*
* @return the Throwable, extracted from context, on null, if this has failed.
*/
public static Throwable read(BufferredCdrInput input, ServiceContext[] contexts)
{
input.mark(Integer.MAX_VALUE);
int h = input.read_long();
if (h == 0)
{
// This block reads exception info in the Sun specific format.
// (currently we read the exception name only).
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;
// Check for the agreed null value.
if (value_tag == vt_NULL)
return null;
else if (value_tag == vt_INDIRECTION)
return (Throwable) readIndirection(input);
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 = read_string(input);
}
if ((value_tag & vf_MULTIPLE_IDS) != 0)
{
// Multiple supported repository ids are present.
ids = read_string_array(input);
}
else if ((value_tag & vf_ID) != 0)
{
// Single supported repository id is present.
id = read_string(input);
}
}
java.lang.Object ox = createInstance(id, ids, codebase);
return (Throwable) ox;
}
catch (Exception ex)
{
ex.printStackTrace();
return null;
}
}
else
{
input.reset();
// Read as defined in OMG documentation.
return (Throwable) input.read_Value();
}
}
/**
* Load exception by name and create the instance. The reason why this is
* different from Vio is because some exceptions have no parameterless
* constructor, but have a constructor with the string parameter instead.
*/
static Object createInstance(String id, String[] ids, String codebase)
{
Object o = _createInstance(id, codebase);
if (ids != null)
for (int i = 0; i < ids.length && o == null; i++)
o = _createInstance(ids[i], codebase);
return o;
}
static Object _createInstance(String id, String codebase)
{
if (id == null)
return null;
if (id.equals(StringValueHelper.id()))
return "";
StringTokenizer st = new StringTokenizer(id, ":");
String prefix = st.nextToken();
if (prefix.equalsIgnoreCase("IDL"))
return ObjectCreator.Idl2Object(id);
else if (prefix.equalsIgnoreCase("RMI"))
{
String className = st.nextToken();
String hashCode = st.nextToken();
String sid = null;
if (st.hasMoreElements())
sid = st.nextToken();
try
{
Class objectClass = Util.loadClass(className, codebase,
Vio.class.getClassLoader());
String rid = ObjectCreator.getRepositoryId(objectClass);
if (!rid.equals(id))
{
// If direct string comparison fails, compare by meaning.
StringTokenizer st2 = new StringTokenizer(rid, ":");
if (!st2.nextToken().equals("RMI"))
throw new InternalError("RMI format expected: '" + rid + "'");
if (!st2.nextToken().equals(className))
throwIt("Class name mismatch", id, rid, null);
try
{
long h1 = Long.parseLong(hashCode, 16);
long h2 = Long.parseLong(st2.nextToken(), 16);
if (h1 != h2)
throwIt("Hashcode mismatch", id, rid, null);
if (sid != null && st2.hasMoreTokens())
{
long s1 = Long.parseLong(hashCode, 16);
long s2 = Long.parseLong(st2.nextToken(), 16);
if (s1 != s2)
throwIt("serialVersionUID mismatch", id, rid, null);
}
}
catch (NumberFormatException e)
{
throwIt("Invalid hashcode or svuid format: ", id, rid, e);
}
}
// Some RemoteExceptions have no public parameterless constructor,
// but they have constructor taking string as parameter.
try
{
return objectClass.newInstance();
}
catch (Exception ex)
{
// Try instantiate passing string as parameter.
Constructor c = objectClass.getConstructor(new Class[] { String.class });
return c.newInstance(new Object[] { "<message unavailable>" });
}
}
catch (MARSHAL m)
{
m.minor = Minor.Instantiation;
throw m;
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL("Unable to instantiate " + id);
m.minor = Minor.Instantiation;
m.initCause(ex);
throw m;
}
}
else
throw new NO_IMPLEMENT("Unsupported prefix " + prefix + ":");
}
}

View File

@ -0,0 +1,101 @@
/* VMVio.java -- Native operations, required by value IO.
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. */
/**
* This is a temporary replacement for the native call that would allocate
* objects without public constructors. The replacement only allocates
* objects with public parameterless constructor and objects with public
* constructor taking string (like some Throwables).
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*
* TODO FIXME replace by native call like in VMObjectInputStream.
* Required modification of Classpath the build system.
*/
package gnu.CORBA.CDR;
import java.lang.reflect.Constructor;
public class VMVio
{
/**
* Allocates a new Object of type clazz but without running the default
* constructor on it. It then calls the given constructor on it. The given
* constructor method comes from the constr_clazz which is a super class of
* the given clazz.
*/
public static Object allocateObject(Class clazz, Class constr_clazz,
Constructor constructor)
throws InstantiationException
{
try
{
Constructor c = clazz.getConstructor(new Class[0]);
c.setAccessible(true);
return c.newInstance(new Object[0]);
}
catch (Exception ex)
{
try
{
Constructor c = clazz.getConstructor(new Class[] { String.class });
return c.newInstance(new Object[] { "" });
}
catch (Exception ex2)
{
Constructor c[] = clazz.getConstructors();
for (int i = 0; i < c.length; i++)
{
try
{
c[i].setAccessible(true);
Class[] args = c[i].getParameterTypes();
return c[i].newInstance(new Object[args.length]);
}
catch (Exception ex3)
{
// Try another one.
}
}
}
throw new InstantiationException(clazz.getName());
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,336 @@
/* gnuRuntime.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.Minor;
import org.omg.CORBA.LocalObject;
import org.omg.CORBA.MARSHAL;
import java.io.Serializable;
import java.util.Comparator;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
import java.util.TreeSet;
/**
* Our implementation of the sending context runtime.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuRuntime
extends LocalObject
implements org.omg.SendingContext.RunTime
{
/**
* The data entry about the object that was written.
*/
static class Entry
{
/**
* The stream position, where the object was written.
*/
int at;
/**
* The object that was written.
*/
Object object;
public String toString()
{
return object + "[" + at + "] "+object.getClass().getName();
}
}
/**
* The instruction that the actual object is stored at different location.
* Used when processing chunked data where positions shifts due removing the
* chunking tags.
*/
static class Redirection
extends Entry
{
public String toString()
{
return "->" + at;
}
}
/**
* Use serialVersionUID for interoperability.
*/
private static final long serialVersionUID = 1;
/**
* The history of the written objects, maps object to records. The different
* objects must be treated as different regardless that .equals returns.
*/
private Map sh_objects = new IdentityHashMap();
/**
* The written repository Ids that can be shared.
*/
private Map sh_ids = new TreeMap(new Comparator()
{
public int compare(Object a, Object b)
{
if (a instanceof String && b instanceof String)
// Comparing string with string.
return ((String) a).compareTo((String) b);
else if (a instanceof String[] && b instanceof String[])
{
// Comparing array with array.
String[] sa = (String[]) a;
String[] sb = (String[]) b;
if (sa.length != sb.length)
return sa.length - sb.length;
else
{
int c;
for (int i = 0; i < sa.length; i++)
{
c = sa[i].compareTo(sb[i]);
if (c != 0)
return c;
}
return 0;
}
}
else
// Comparing string with array.
return a instanceof String ? 1 : -1;
}
});
/**
* The history of the written objects, maps positions to records. The
* different objects must be treated as different regardless that .equals
* returns.
*/
private Map positions = new HashMap();
/**
* The Codebase.
*/
private String codebase;
/**
* The pre-created instance of the object being written (avoid
* re-instantiation).
*/
public Serializable target;
/**
* Create Runtime.
*
* @param a_id a repository Id, if only one Id was specified in the stream.
* @param a_ids a repository Ids, if the multiple Ids were specified in te
* stream.
* @param a_codabase a codebase, if it was specified in the stream.
*/
public gnuRuntime(String a_codebase, Object a_target)
{
if (a_target instanceof Serializable)
target = (Serializable) a_target;
codebase = a_codebase;
}
/**
* Mark the given object as written at the given position.
*/
public void objectWritten(Object object, int at)
{
if (object == null || at < 0)
return; // No positional information provided.
if (sh_objects.containsKey(object))
throw new AssertionError("Repetetive writing of the same object "
+ object + " at " + at + dump());
Entry e = new Entry();
e.at = at;
e.object = object;
sh_objects.put(object, e);
positions.put(new Integer(at), e);
}
/**
* Check if the object is already written.
*
* @return the position, at that the object is allready written or -1 if it is
* not yet written.
*/
public int isWrittenAt(Object x)
{
Entry e = (Entry) sh_objects.get(x);
return e == null ? -1 : e.at;
}
/**
* Set redirection, indicating that the object, searched at the p_searched
* position can be actually found at the p_present position.
*/
public void redirect(int p_searched, int p_present)
{
Redirection redirection = new Redirection();
redirection.at = p_present;
positions.put(new Integer(p_searched), redirection);
}
/**
* Get the object, written at the given position. This returs both shared
* objects and repository Ids.
*
* @return the position, at that the object is allready written.
*
* @throws MARSHAL if there is no object written at that position.
*/
public Object isObjectWrittenAt(int x, int offset)
{
Entry e = (Entry) positions.get(new Integer(x));
if (e instanceof Redirection)
return isObjectWrittenAt(e.at, offset);
else if (e != null)
return e.object;
else
{
MARSHAL m = new MARSHAL("No object was written at " + x +
" (offset " + offset + ") r " + this + dump());
m.minor = Minor.Graph;
throw m;
}
}
/**
* Mark the given object as written at the given position.
*/
public void singleIdWritten(String id, int at)
{
if (sh_ids.containsKey(id))
throw new InternalError("Repetetive writing of the same string " +
id + dump());
Entry e = new Entry();
e.at = at;
e.object = id;
sh_ids.put(id, e);
positions.put(new Integer(at), e);
}
/**
* Mark the given object as written at the given position.
*/
public void multipleIdsWritten(String[] ids, int at)
{
if (sh_ids.containsKey(ids))
throw new InternalError("Repetetive writing of the same string " +
ids + dump());
Entry e = new Entry();
e.at = at;
e.object = ids;
sh_ids.put(ids, e);
positions.put(new Integer(at), e);
}
/**
* Check if the object is already written.
*
* @return the position, at that the object is allready written or -1 if it is
* not yet written.
*/
public int idWrittenAt(Object x)
{
Entry e = (Entry) sh_ids.get(x);
return e == null ? -1 : e.at;
}
/**
* Get the codebase.
*/
public String getCodeBase()
{
return codebase;
}
/**
* Set the codebase, preserving the old value if the passed parameter is null
* and forming the space delimited list if both new and old values are not
* null.
*/
public void addCodeBase(String base)
{
if (base != null)
{
if (codebase == null)
codebase = base;
else
codebase = codebase + " " + base;
}
}
/**
* Dump all objects that are currently stored.
*/
public String dump()
{
StringBuffer b = new StringBuffer(" Stream content: \n");
// Sort by position.
TreeSet t = new TreeSet(positions.keySet());
Iterator p = t.iterator();
while (p.hasNext())
{
Object k = p.next();
b.append(" " + k + ": " + ((Entry) positions.get(k)).toString()
+ "\n");
}
return b.toString();
}
}

View File

@ -0,0 +1,71 @@
/* gnuValueStream.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;
/**
* A stream, implementing this interface, provides methods to get/set a position
* and get the RunTime.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface gnuValueStream
{
/**
* Get the current position in the buffer.
*
* @return The position in the buffer, taking offset into consideration.
*/
public int getPosition();
/**
* Jump to the given position, taking offset into consideration.
*/
public void seek(int position);
/**
* Get the RunTime information.
*/
public gnuRuntime getRunTime();
/**
* Replace the instance of RunTime.
*/
public void setRunTime(gnuRuntime a_runtime);
}

View File

@ -1,166 +0,0 @@
/* noHeaderInput.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 org.omg.CORBA.CustomMarshal;
import org.omg.CORBA.DataInputStream;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.portable.BoxedValueHelper;
import org.omg.CORBA.portable.Streamable;
import org.omg.CORBA.portable.ValueFactory;
import java.io.Serializable;
/**
* Substitutes the main stream in factories when the header is already
* behind. Overrides methods that may be invoked from the factory,
* forcing not to read the header if called first time on this stream.
*
* This stream reverts to default behavior if one or more call are
* made (reading value types that are nested fields of the value type).
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
class noHeaderInput
extends cdrBufInput
implements DataInputStream
{
/**
* If true, this is not the first call.
*/
boolean notFirst;
/**
* Create an instance, reading from the given buffer.
*/
public noHeaderInput(byte[] buffer)
{
super(buffer);
}
/**
* Read when knowning the class instance.
*/
public Serializable read_value(Class clz)
{
if (notFirst)
return super.read_value(clz);
else
{
try
{
notFirst = true;
return read_value((Serializable) clz.newInstance());
}
catch (Exception ex)
{
MARSHAL m = new MARSHAL("Unable to create an instance");
m.initCause(ex);
throw m;
}
}
}
/**
* Tries to read using boxed value helper.
*/
public Serializable read_value(BoxedValueHelper helper)
{
if (notFirst)
return super.read_value(helper);
else
{
notFirst = true;
return helper.read_value(this);
}
}
/**
* Tries to locate a factory using repository id.
*/
public Serializable read_value(String repository_id)
{
if (notFirst)
return super.read_value(repository_id);
else
{
notFirst = true;
ValueFactory factory =
((org.omg.CORBA_2_3.ORB) orb()).lookup_value_factory(repository_id);
if (factory == null)
throw new MARSHAL("No factory");
return factory.read_value(this);
}
}
/**
* Try to read when having an unitialised value.
*/
public Serializable read_value(Serializable value)
{
if (notFirst)
return super.read_value(value);
else
{
notFirst = true;
// The user-defines io operations are implemented.
if (value instanceof CustomMarshal)
{
CustomMarshal marsh = (CustomMarshal) value;
try
{
marsh.unmarshal((DataInputStream) this);
}
catch (ClassCastException ex)
{
Vio.incorrect_plug_in(ex);
}
}
else
// The IDL-generated io operations are implemented.
if (value instanceof Streamable)
{
((Streamable) value)._read(this);
}
return value;
}
}
}

View File

@ -1,4 +1,4 @@
/* cdrEncapsCodec.java --
/* CdrEncapsCodecImpl.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,9 +38,9 @@ exception statement from your version. */
package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput;
import gnu.CORBA.CDR.cdrOutput;
import gnu.CORBA.CDR.BufferredCdrInput;
import gnu.CORBA.CDR.BufferedCdrOutput;
import gnu.CORBA.CDR.AbstractCdrOutput;
import org.omg.CORBA.Any;
import org.omg.CORBA.LocalObject;
@ -57,19 +57,19 @@ 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.
* have its own Codec of this kind.
*
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class cdrEncapsCodec
public class CdrEncapsCodecImpl
extends LocalObject
implements Codec
{
/**
* The default version of encoding, used in parameterless constructor.
/**
* Use serialVersionUID for interoperability.
*/
private static final Version DEFAULT_VERSION = new Version(1, 2);
private static final long serialVersionUID = 1;
/**
* If set to true, no wide string or wide character is allowed (GIOP 1.0).
@ -99,7 +99,7 @@ public class cdrEncapsCodec
/**
* Create an instance of this Codec, encoding following the given version.
*/
public cdrEncapsCodec(ORB _orb, Version _version)
public CdrEncapsCodecImpl(ORB _orb, Version _version)
{
orb = _orb;
version = _version;
@ -125,8 +125,8 @@ public class cdrEncapsCodec
public Any decode(byte[] them)
throws FormatMismatch
{
cdrBufInput input = createInput(them);
cdrBufInput encapsulation = createEncapsulation(them, input);
BufferredCdrInput input = createInput(them);
BufferredCdrInput encapsulation = createEncapsulation(them, input);
TypeCode type = encapsulation.read_TypeCode();
@ -142,9 +142,9 @@ public class cdrEncapsCodec
return readAny(type, encapsulation);
}
private cdrBufInput createEncapsulation(byte[] them, cdrBufInput input)
private BufferredCdrInput createEncapsulation(byte[] them, BufferredCdrInput input)
{
cdrBufInput encapsulation;
BufferredCdrInput encapsulation;
if ((them [ 0 ] | them [ 1 ] | them [ 2 ] | them [ 3 ]) == 0)
{
@ -163,10 +163,10 @@ public class cdrEncapsCodec
{
checkTypePossibility("", that.type());
cdrBufOutput output = createOutput(that);
BufferedCdrOutput output = createOutput(that);
// cdrBufOutput has internal support for this encoding.
cdrOutput encapsulation = output.createEncapsulation();
// BufferedCdrOutput has internal support for this encoding.
AbstractCdrOutput encapsulation = output.createEncapsulation();
try
{
@ -179,6 +179,7 @@ public class cdrEncapsCodec
catch (Exception ex)
{
MARSHAL m = new MARSHAL();
m.minor = Minor.Encapsulation;
m.initCause(ex);
throw m;
}
@ -206,8 +207,8 @@ public class cdrEncapsCodec
throw new TypeMismatch(ex.getMessage());
}
cdrBufInput input = createInput(them);
cdrBufInput encapsulation = createEncapsulation(them, input);
BufferredCdrInput input = createInput(them);
BufferredCdrInput encapsulation = createEncapsulation(them, input);
return readAny(type, encapsulation);
}
@ -217,13 +218,13 @@ public class cdrEncapsCodec
* @param type a type of the Any to read.
* @param input the encapsulation stream.
*/
private Any readAny(TypeCode type, cdrBufInput encapsulation)
private Any readAny(TypeCode type, BufferredCdrInput encapsulation)
throws MARSHAL
{
gnuAny a = new gnuAny();
a.setOrb(orb);
// cdrBufInput has internal support for this encoding.
// BufferredCdrInput has internal support for this encoding.
a.read_value(encapsulation, type);
return a;
}
@ -234,9 +235,9 @@ public class cdrEncapsCodec
{
checkTypePossibility("", that.type());
cdrBufOutput output = createOutput(that);
BufferedCdrOutput output = createOutput(that);
cdrOutput encapsulation = output.createEncapsulation();
AbstractCdrOutput encapsulation = output.createEncapsulation();
try
{
@ -248,6 +249,7 @@ public class cdrEncapsCodec
catch (Exception ex)
{
MARSHAL m = new MARSHAL();
m.minor = Minor.Encapsulation;
m.initCause(ex);
throw m;
}
@ -256,7 +258,7 @@ public class cdrEncapsCodec
/**
* Create the CDR output stream for writing the given Any.
* The cdrBufOutput has internal support for encapsulation encodings.
* The BufferedCdrOutput has internal support for encapsulation encodings.
*
* @param that the Any that will be written.
*
@ -265,10 +267,10 @@ public class cdrEncapsCodec
* @throws InvalidTypeForEncoding if that Any cannot be written under the
* given version.
*/
private cdrBufOutput createOutput(Any that)
private BufferedCdrOutput createOutput(Any that)
throws InvalidTypeForEncoding
{
cdrBufOutput output = new cdrBufOutput();
BufferedCdrOutput output = new BufferedCdrOutput();
output.setOrb(orb);
output.setVersion(version);
return output;
@ -325,9 +327,9 @@ public class cdrEncapsCodec
*
* @return the stream.
*/
private cdrBufInput createInput(byte[] them)
private BufferredCdrInput createInput(byte[] them)
{
cdrBufInput input = new cdrBufInput(them);
BufferredCdrInput input = new BufferredCdrInput(them);
input.setOrb(orb);
input.setVersion(version);
return input;

View File

@ -90,17 +90,6 @@ public class Connected_objects
* applicable.
*/
public final java.lang.Object identity;
public boolean equals(java.lang.Object other)
{
if (other instanceof cObject)
{
cObject o = (cObject) other;
return o.object.equals(object) && o.port == port;
}
else
return false;
}
}
/**

View File

@ -1,4 +1,4 @@
/* corbaArrayList.java --
/* CorbaList.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -52,7 +52,7 @@ import org.omg.CORBA.Bounds;
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class corbaArrayList
public class CorbaList
extends ArrayList
implements Serializable
{
@ -64,7 +64,7 @@ public class corbaArrayList
/**
* Creates the list with the given initial size.
*/
public corbaArrayList(int initial_size)
public CorbaList(int initial_size)
{
super(initial_size);
}
@ -72,7 +72,7 @@ public class corbaArrayList
/**
* Creates the list with the default size.
*/
public corbaArrayList()
public CorbaList()
{
}

View File

@ -0,0 +1,79 @@
/* DefaultSocketFactory.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.interfaces.SocketFactory;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
/**
* The default socket factory that forges "plain" server and client sockets. The
* class can be replaced by setting the gnu.CORBA.SocketFactory property.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class DefaultSocketFactory
implements SocketFactory
{
/**
* It is enough to have one instance of this class for all ORBs.
*/
public static final DefaultSocketFactory Singleton = new DefaultSocketFactory();
/**
* Create a client socket.
*/
public Socket createClientSocket(String host, int port)
throws IOException
{
return new Socket(host, port);
}
/**
* Create a server socket.
*/
public ServerSocket createServerSocket(int port)
throws IOException
{
return new ServerSocket(port);
}
}

View File

@ -1,4 +1,4 @@
/* abstractDynAny.java --
/* AbstractAny.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.typeNamer;
import gnu.CORBA.TypeKindNamer;
import org.omg.CORBA.Any;
import org.omg.CORBA.LocalObject;
@ -54,7 +54,7 @@ import java.io.Serializable;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class abstractDynAny
public abstract class AbstractAny
extends LocalObject
implements Serializable
{
@ -108,12 +108,12 @@ public abstract class abstractDynAny
/**
* The change value listener.
*/
valueChangedListener listener;
ValueChangeListener listener;
/**
* Create the abstract dyn any.
*/
public abstractDynAny(TypeCode oType, TypeCode aType,
public AbstractAny(TypeCode oType, TypeCode aType,
gnuDynAnyFactory aFactory, ORB anOrb
)
{
@ -163,8 +163,8 @@ public abstract class abstractDynAny
*/
String typeMismatch(TypeCode expected, TypeCode actual)
{
return typeNamer.nameIt(expected) + " expected " +
typeNamer.nameIt(actual);
return TypeKindNamer.nameIt(expected) + " expected " +
TypeKindNamer.nameIt(actual);
}
/**

View File

@ -1,4 +1,4 @@
/* anyDivideable.java --
/* DivideableAny.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -38,7 +38,7 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.typeNamer;
import gnu.CORBA.TypeKindNamer;
import org.omg.CORBA.Any;
import org.omg.CORBA.CompletionStatus;
@ -58,8 +58,8 @@ import java.io.Serializable;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class anyDivideable
extends abstractDynAny
public abstract class DivideableAny
extends AbstractAny
implements Serializable
{
/**
@ -78,7 +78,7 @@ public abstract class anyDivideable
*/
protected int pos = 0;
public anyDivideable(TypeCode oType, TypeCode aType,
public DivideableAny(TypeCode oType, TypeCode aType,
gnuDynAnyFactory aFactory, ORB anOrb
)
{
@ -486,9 +486,9 @@ public abstract class anyDivideable
{
if (!official_type.equal(other.type()))
return false;
else if (other instanceof anyDivideable)
else if (other instanceof DivideableAny)
{
anyDivideable x = (anyDivideable) other;
DivideableAny x = (DivideableAny) other;
if (x.array.length != array.length)
return false;
@ -499,7 +499,7 @@ public abstract class anyDivideable
}
return true;
}
else if (other == null || other instanceof abstractDynAny)
else if (other == null || other instanceof AbstractAny)
return false;
else
return other.to_any().equal(to_any());

View File

@ -1,4 +1,4 @@
/* abstractRecord.java --
/* RecordAny.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -39,7 +39,7 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.Unexpected;
import gnu.CORBA.holderFactory;
import gnu.CORBA.HolderLocator;
import org.omg.CORBA.Any;
import org.omg.CORBA.ORB;
@ -65,8 +65,8 @@ import java.lang.reflect.Field;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class abstractRecord
extends anyDivideable
public abstract class RecordAny
extends DivideableAny
implements DynAny, Serializable
{
/**
@ -80,7 +80,7 @@ public abstract class abstractRecord
*
* @param fields The DynAny's, representing the fields of the structure.
*/
public abstractRecord(TypeCode oType, TypeCode aType,
public RecordAny(TypeCode oType, TypeCode aType,
gnuDynAnyFactory aFactory, ORB anOrb
)
{
@ -277,7 +277,7 @@ public abstract class abstractRecord
c [ i ] = array [ i ].copy();
}
abstractRecord d = newInstance(official_type, final_type, factory, orb);
RecordAny d = newInstance(official_type, final_type, factory, orb);
d.array = c;
return d;
}
@ -285,7 +285,7 @@ public abstract class abstractRecord
/**
* Create a new instance when copying.
*/
protected abstract abstractRecord newInstance(TypeCode oType, TypeCode aType,
protected abstract RecordAny newInstance(TypeCode oType, TypeCode aType,
gnuDynAnyFactory aFactory,
ORB anOrb
);
@ -297,7 +297,7 @@ public abstract class abstractRecord
{
try
{
Streamable sHolder = holderFactory.createHolder(official_type);
Streamable sHolder = HolderLocator.createHolder(official_type);
Class sHolderClass = sHolder.getClass();
Field sHolderValue = sHolderClass.getField("value");
@ -371,7 +371,7 @@ public abstract class abstractRecord
fField = structure.getClass().getField(fNames [ i ]);
field = fField.get(structure);
fType = array [ i ].type();
holder = holderFactory.createHolder(fType);
holder = HolderLocator.createHolder(fType);
member = createAny();
holder.getClass().getField("value").set(holder, field);

View File

@ -55,8 +55,8 @@ import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public abstract class anyUndivideable
extends abstractDynAny
public abstract class UndivideableAny
extends AbstractAny
implements Serializable
{
/**
@ -67,7 +67,7 @@ public abstract class anyUndivideable
/**
* Create a new instance with the given typecode.
*/
public anyUndivideable(TypeCode oType, TypeCode aType,
public UndivideableAny(TypeCode oType, TypeCode aType,
gnuDynAnyFactory aFactory, ORB anOrb)
{
super(oType, aType, aFactory, anOrb);

View File

@ -1,4 +1,4 @@
/* valueChangedListener.java --
/* ValueChangeListener.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -44,7 +44,7 @@ package gnu.CORBA.DynAn;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface valueChangedListener
public interface ValueChangeListener
{
void changed();
}

View File

@ -38,14 +38,14 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.CDR.cdrBufOutput;
import gnu.CORBA.CDR.BufferedCdrOutput;
import gnu.CORBA.OctetHolder;
import gnu.CORBA.Unexpected;
import gnu.CORBA.WCharHolder;
import gnu.CORBA.WStringHolder;
import gnu.CORBA.holderFactory;
import gnu.CORBA.typeNamer;
import gnu.CORBA.universalHolder;
import gnu.CORBA.HolderLocator;
import gnu.CORBA.TypeKindNamer;
import gnu.CORBA.GeneralHolder;
import org.omg.CORBA.Any;
import org.omg.CORBA.AnyHolder;
@ -84,7 +84,7 @@ import java.util.Arrays;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
public class gnuDynAny extends AbstractAny implements DynAny, Serializable
{
/**
* Use serialVersionUID for interoperability.
@ -132,7 +132,7 @@ public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
{
if (holder != null)
{
cdrBufOutput buffer = new cdrBufOutput();
BufferedCdrOutput buffer = new BufferedCdrOutput();
holder._write(buffer);
gnuDynAny other;
@ -165,7 +165,7 @@ public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
public DynAny current_component() throws TypeMismatch
{
throw new TypeMismatch("Not applicable for " +
typeNamer.nameIt(final_type)
TypeKindNamer.nameIt(final_type)
);
}
@ -193,14 +193,14 @@ public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
{
throw new InvalidValue(ISNULL);
}
else if (a_holder instanceof universalHolder)
else if (a_holder instanceof GeneralHolder)
{
holder = holderFactory.createHolder(official_type);
holder = HolderLocator.createHolder(official_type);
if (holder == null)
holder = holderFactory.createHolder(final_type);
holder = HolderLocator.createHolder(final_type);
if (holder == null)
holder = ((universalHolder) a_holder).Clone();
holder = ((GeneralHolder) a_holder).Clone();
else
{
InputStream in = an_any.create_input_stream();
@ -890,7 +890,7 @@ public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
*/
public boolean equal(DynAny other)
{
if (other instanceof abstractDynAny)
if (other instanceof AbstractAny)
{
if (other instanceof gnuDynAny)
{
@ -899,10 +899,10 @@ public class gnuDynAny extends abstractDynAny implements DynAny, Serializable
if (!x.holder.getClass().equals(holder.getClass()))
return false;
cdrBufOutput b1 = new cdrBufOutput();
BufferedCdrOutput b1 = new BufferedCdrOutput();
x.holder._write(b1);
cdrBufOutput b2 = new cdrBufOutput(b1.buffer.size() + 10);
BufferedCdrOutput b2 = new BufferedCdrOutput(b1.buffer.size() + 10);
holder._write(b2);
return Arrays.equals(b1.buffer.toByteArray(),

View File

@ -40,8 +40,8 @@ package gnu.CORBA.DynAn;
import gnu.CORBA.Poa.ORB_1_4;
import gnu.CORBA.Unexpected;
import gnu.CORBA.holderFactory;
import gnu.CORBA.typeNamer;
import gnu.CORBA.HolderLocator;
import gnu.CORBA.TypeKindNamer;
import org.omg.CORBA.Any;
import org.omg.CORBA.LocalObject;
@ -227,7 +227,7 @@ public class gnuDynAnyFactory
*/
public DynAny create_simple(TypeCode official, TypeCode type)
{
Streamable holder = holderFactory.createHolder(type);
Streamable holder = HolderLocator.createHolder(type);
return new gnuDynAny(holder, official, type, this, orb);
}
@ -314,7 +314,7 @@ public class gnuDynAnyFactory
case TCKind._tk_Principal :
case TCKind._tk_abstract_interface :
throw new InconsistentTypeCode("Following API, the " +
typeNamer.nameIt(type) +
TypeKindNamer.nameIt(type) +
" must not be supported."
);

View File

@ -39,7 +39,7 @@ exception statement from your version. */
package gnu.CORBA.DynAn;
import gnu.CORBA.Unexpected;
import gnu.CORBA.holderFactory;
import gnu.CORBA.HolderLocator;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_PARAM;
@ -66,7 +66,7 @@ import java.lang.reflect.Field;
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuDynArray
extends anyDivideable
extends DivideableAny
implements DynArray, Serializable
{
/**
@ -238,10 +238,10 @@ public class gnuDynArray
try
{
Streamable memberHolder =
holderFactory.createHolder(official_components);
HolderLocator.createHolder(official_components);
if (memberHolder == null)
memberHolder = holderFactory.createHolder(final_components);
memberHolder = HolderLocator.createHolder(final_components);
Class memberHolderClass = memberHolder.getClass();
Class memberClass = memberHolderClass.getField("value").getType();
@ -260,7 +260,7 @@ public class gnuDynArray
Array.set(members, i, member);
}
Streamable arrayHolder = holderFactory.createHolder(official_type);
Streamable arrayHolder = HolderLocator.createHolder(official_type);
arrayHolder.getClass().getField("value").set(arrayHolder, members);
Any g = createAny();
@ -296,9 +296,9 @@ public class gnuDynArray
{
if (holderClass == null)
{
holder = holderFactory.createHolder(official_components);
holder = HolderLocator.createHolder(official_components);
if (holder == null)
holder = holderFactory.createHolder(final_components);
holder = HolderLocator.createHolder(final_components);
holderClass = holder.getClass();
}
else

View File

@ -60,7 +60,7 @@ import java.util.Arrays;
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class gnuDynEnum extends anyUndivideable implements DynEnum
public class gnuDynEnum extends UndivideableAny implements DynEnum
{
/**
* Use serialVersionUID for interoperability.

Some files were not shown because too many files have changed in this diff Show More