summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2010-06-03 19:11:10 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2010-06-03 19:11:10 +0000
commita17284098845d59d84bbf76b33190a5a91c12a82 (patch)
treec634c40062604cd1cdefa535b838926c9ede1a38 /javax
parent43b6a8d2580b5c9549a58db41a0239f3929e4b91 (diff)
downloadclasspath-a17284098845d59d84bbf76b33190a5a91c12a82.tar.gz
Normalise whitespace.
2010-06-03 Andrew John Hughes <ahughes@redhat.com> * examples/gnu/classpath/examples/CORBA/NamingService/Demo.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java, * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java, * examples/gnu/classpath/examples/CORBA/swing/x5/CanvasWorld.java, * examples/gnu/classpath/examples/CORBA/swing/x5/ChatConstants.java, * examples/gnu/classpath/examples/CORBA/swing/x5/ClientFrame.java, * examples/gnu/classpath/examples/CORBA/swing/x5/Demo.java, * examples/gnu/classpath/examples/CORBA/swing/x5/GameManager.java, * examples/gnu/classpath/examples/CORBA/swing/x5/GameManagerImpl.java, * examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java, * examples/gnu/classpath/examples/CORBA/swing/x5/OrbStarter.java, * examples/gnu/classpath/examples/CORBA/swing/x5/Player.java, * examples/gnu/classpath/examples/CORBA/swing/x5/PlayerImpl.java, * examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java, * examples/gnu/classpath/examples/CORBA/swing/x5/State.java, * examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_GameManagerImpl_Tie.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_GameManager_Stub.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_PlayerImpl_Tie.java, * examples/gnu/classpath/examples/CORBA/swing/x5/_Player_Stub.java, * examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java, * examples/gnu/classpath/examples/awt/Demo.java, * examples/gnu/classpath/examples/awt/HintingDemo.java, * examples/gnu/classpath/examples/datatransfer/Demo.java, * examples/gnu/classpath/examples/html/Demo.java, * examples/gnu/classpath/examples/java2d/J2dBenchmark.java, * examples/gnu/classpath/examples/java2d/J2dBenchmarkGUI.java, * examples/gnu/classpath/examples/java2d/JNIOverhead.java, * examples/gnu/classpath/examples/jawt/DemoJAWT.java, * examples/gnu/classpath/examples/management/TestClassLoading.java, * examples/gnu/classpath/examples/management/TestCompilation.java, * examples/gnu/classpath/examples/management/TestGarbageCollector.java, * examples/gnu/classpath/examples/management/TestMemory.java, * examples/gnu/classpath/examples/management/TestMemoryManager.java, * examples/gnu/classpath/examples/management/TestMemoryPool.java, * examples/gnu/classpath/examples/management/TestThread.java, * examples/gnu/classpath/examples/midi/Demo.java, * examples/gnu/classpath/examples/print/Demo.java, * examples/gnu/classpath/examples/sound/AudioPlayerSample.java, * examples/gnu/classpath/examples/swing/BrowserEditorKit.java, * examples/gnu/classpath/examples/swing/ButtonDemo.java, * examples/gnu/classpath/examples/swing/ComboBoxDemo.java, * examples/gnu/classpath/examples/swing/Demo.java, * examples/gnu/classpath/examples/swing/DemoFactory.java, * examples/gnu/classpath/examples/swing/DocumentFilterDemo.java, * examples/gnu/classpath/examples/swing/FileChooserDemo.java, * examples/gnu/classpath/examples/swing/HtmlDemo.java, * examples/gnu/classpath/examples/swing/ListDemo.java, * examples/gnu/classpath/examples/swing/MetalThemeEditor.java, * examples/gnu/classpath/examples/swing/NavigationFilterDemo.java, * examples/gnu/classpath/examples/swing/ScrollBarDemo.java, * examples/gnu/classpath/examples/swing/SliderDemo.java, * examples/gnu/classpath/examples/swing/SpinnerDemo.java, * examples/gnu/classpath/examples/swing/TabbedPaneDemo.java, * examples/gnu/classpath/examples/swing/TableDemo.java, * examples/gnu/classpath/examples/swing/TextAreaDemo.java, * examples/gnu/classpath/examples/swing/TextFieldDemo.java, * examples/gnu/classpath/examples/swing/TreeDemo.java, * gnu/CORBA/BigDecimalHelper.java, * gnu/CORBA/CDR/AbstractCdrInput.java, * gnu/CORBA/CDR/AbstractCdrOutput.java, * gnu/CORBA/CDR/AbstractDataInput.java, * gnu/CORBA/CDR/AbstractDataOutput.java, * gnu/CORBA/CDR/AligningInput.java, * gnu/CORBA/CDR/AligningOutput.java, * gnu/CORBA/CDR/ArrayValueHelper.java, * gnu/CORBA/CDR/BigEndianInputStream.java, * gnu/CORBA/CDR/BigEndianOutputStream.java, * gnu/CORBA/CDR/BufferedCdrOutput.java, * gnu/CORBA/CDR/BufferredCdrInput.java, * gnu/CORBA/CDR/HeadlessInput.java, * gnu/CORBA/CDR/IDLTypeHelper.java, * gnu/CORBA/CDR/LittleEndianOutputStream.java, * gnu/CORBA/CDR/UnknownExceptionCtxHandler.java, * gnu/CORBA/CDR/VMVio.java, * gnu/CORBA/CDR/Vio.java, * gnu/CORBA/CDR/gnuRuntime.java, * gnu/CORBA/CDR/gnuValueStream.java, * gnu/CORBA/CdrEncapsCodecImpl.java, * gnu/CORBA/CollocatedOrbs.java, * gnu/CORBA/Connected_objects.java, * gnu/CORBA/DefaultSocketFactory.java, * gnu/CORBA/DuplicateNameHolder.java, * gnu/CORBA/DynAn/AbstractAny.java, * gnu/CORBA/DynAn/DivideableAny.java, * gnu/CORBA/DynAn/NameValuePairHolder.java, * gnu/CORBA/DynAn/RecordAny.java, * gnu/CORBA/DynAn/ValueChangeListener.java, * gnu/CORBA/DynAn/gnuDynAny.java, * gnu/CORBA/DynAn/gnuDynAnyFactory.java, * gnu/CORBA/DynAn/gnuDynArray.java, * gnu/CORBA/DynAn/gnuDynEnum.java, * gnu/CORBA/DynAn/gnuDynFixed.java, * gnu/CORBA/DynAn/gnuDynSequence.java, * gnu/CORBA/DynAn/gnuDynUnion.java, * gnu/CORBA/DynAn/gnuDynValue.java, * gnu/CORBA/DynAn/gnuDynValueBox.java, * gnu/CORBA/DynAnySeqHolder.java, * gnu/CORBA/EmptyExceptionHolder.java, * gnu/CORBA/ForwardRequestHelper.java, * gnu/CORBA/GIOP/CharSets_OSF.java, * gnu/CORBA/GIOP/CloseMessage.java, * gnu/CORBA/GIOP/ErrorMessage.java, * gnu/CORBA/GIOP/MessageHeader.java, * gnu/CORBA/GIOP/ServiceContext.java, * gnu/CORBA/GIOP/v1_2/RequestHeader.java, * gnu/CORBA/GeneralHolder.java, * gnu/CORBA/IOR.java, * gnu/CORBA/Interceptor/ClientRequestInterceptors.java, * gnu/CORBA/Interceptor/ForwardRequestHolder.java, * gnu/CORBA/Interceptor/IORInterceptors.java, * gnu/CORBA/Interceptor/Registrator.java, * gnu/CORBA/Interceptor/ServerRequestInterceptors.java, * gnu/CORBA/Interceptor/gnuClientRequestInfo.java, * gnu/CORBA/Interceptor/gnuIcCurrent.java, * gnu/CORBA/Interceptor/gnuIorInfo.java, * gnu/CORBA/Interceptor/gnuServerRequestInfo.java, * gnu/CORBA/IorDelegate.java, * gnu/CORBA/IorObject.java, * gnu/CORBA/Minor.java, * gnu/CORBA/NameDynAnyPairHolder.java, * gnu/CORBA/NameDynAnyPairSeqHolder.java, * gnu/CORBA/NameValuePairHolder.java, * gnu/CORBA/NameValuePairSeqHolder.java, * gnu/CORBA/NamingService/NameParser.java, * gnu/CORBA/NamingService/NamingMap.java, * gnu/CORBA/NamingService/NamingServiceTransient.java, * gnu/CORBA/NamingService/TransientContext.java, * gnu/CORBA/ObjectCreator.java, * gnu/CORBA/OrbFocused.java, * gnu/CORBA/OrbFunctional.java, * gnu/CORBA/OrbRestricted.java, * gnu/CORBA/Poa/AOM.java, * gnu/CORBA/Poa/AccessiblePolicy.java, * gnu/CORBA/Poa/DynamicImpHandler.java, * gnu/CORBA/Poa/ForwardRequestHolder.java, * gnu/CORBA/Poa/ForwardedServant.java, * gnu/CORBA/Poa/InvalidPolicyHolder.java, * gnu/CORBA/Poa/LocalDelegate.java, * gnu/CORBA/Poa/LocalRequest.java, * gnu/CORBA/Poa/LocalServerRequest.java, * gnu/CORBA/Poa/ORB_1_4.java, * gnu/CORBA/Poa/ServantDelegateImpl.java, * gnu/CORBA/Poa/StandardPolicies.java, * gnu/CORBA/Poa/gnuAdapterActivator.java, * gnu/CORBA/Poa/gnuForwardRequest.java, * gnu/CORBA/Poa/gnuIdAssignmentPolicy.java, * gnu/CORBA/Poa/gnuIdUniquenessPolicy.java, * gnu/CORBA/Poa/gnuImplicitActivationPolicy.java, * gnu/CORBA/Poa/gnuLifespanPolicy.java, * gnu/CORBA/Poa/gnuPOA.java, * gnu/CORBA/Poa/gnuPOAManager.java, * gnu/CORBA/Poa/gnuPoaCurrent.java, * gnu/CORBA/Poa/gnuRequestProcessingPolicy.java, * gnu/CORBA/Poa/gnuServantObject.java, * gnu/CORBA/Poa/gnuServantRetentionPolicy.java, * gnu/CORBA/Poa/gnuThreadPolicy.java, * gnu/CORBA/ServiceRequestAdapter.java, * gnu/CORBA/SetOverrideTypeHolder.java, * gnu/CORBA/SimpleDelegate.java, * gnu/CORBA/SocketRepository.java, * gnu/CORBA/StreamHolder.java, * gnu/CORBA/TypeCodeHelper.java, * gnu/CORBA/TypeKindNamer.java, * gnu/CORBA/Version.java, * gnu/CORBA/_PolicyImplBase.java, * gnu/CORBA/gnuAny.java, * gnu/CORBA/gnuCodecFactory.java, * gnu/CORBA/gnuEnvironment.java, * gnu/CORBA/gnuRequest.java, * gnu/CORBA/gnuValueHolder.java, * gnu/CORBA/interfaces/SocketFactory.java, * gnu/CORBA/typecodes/AliasTypeCode.java, * gnu/CORBA/typecodes/ArrayTypeCode.java, * gnu/CORBA/typecodes/FixedTypeCode.java, * gnu/CORBA/typecodes/GeneralTypeCode.java, * gnu/CORBA/typecodes/PrimitiveTypeCode.java, * gnu/CORBA/typecodes/RecordTypeCode.java, * gnu/CORBA/typecodes/RecursiveTypeCode.java, * gnu/CORBA/typecodes/StringTypeCode.java, * gnu/classpath/Pair.java, * gnu/classpath/Pointer.java, * gnu/classpath/Pointer32.java, * gnu/classpath/Pointer64.java, * gnu/classpath/ServiceFactory.java, * gnu/classpath/ServiceProviderLoadingAction.java, * gnu/classpath/SystemProperties.java, * gnu/classpath/debug/Component.java, * gnu/classpath/debug/PreciseFilter.java, * gnu/classpath/debug/SystemLogger.java, * gnu/classpath/debug/TeeInputStream.java, * gnu/classpath/debug/TeeReader.java, * gnu/classpath/jdwp/Jdwp.java, * gnu/classpath/jdwp/JdwpConstants.java, * gnu/classpath/jdwp/event/BreakpointEvent.java, * gnu/classpath/jdwp/event/ClassPrepareEvent.java, * gnu/classpath/jdwp/event/ClassUnloadEvent.java, * gnu/classpath/jdwp/event/Event.java, * gnu/classpath/jdwp/event/EventManager.java, * gnu/classpath/jdwp/event/EventRequest.java, * gnu/classpath/jdwp/event/ExceptionEvent.java, * gnu/classpath/jdwp/event/MethodEntryEvent.java, * gnu/classpath/jdwp/event/MethodExitEvent.java, * gnu/classpath/jdwp/event/SingleStepEvent.java, * gnu/classpath/jdwp/event/ThreadEndEvent.java, * gnu/classpath/jdwp/event/VmDeathEvent.java, * gnu/classpath/jdwp/event/VmInitEvent.java, * gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java, * gnu/classpath/jdwp/event/filters/ClassMatchFilter.java, * gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java, * gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java, * gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java, * gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java, * gnu/classpath/jdwp/event/filters/StepFilter.java, * gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java, * gnu/classpath/jdwp/exception/InvalidClassException.java, * gnu/classpath/jdwp/exception/InvalidClassLoaderException.java, * gnu/classpath/jdwp/exception/InvalidEventTypeException.java, * gnu/classpath/jdwp/exception/InvalidFieldException.java, * gnu/classpath/jdwp/exception/InvalidFrameException.java, * gnu/classpath/jdwp/exception/InvalidLocationException.java, * gnu/classpath/jdwp/exception/InvalidMethodException.java, * gnu/classpath/jdwp/exception/InvalidObjectException.java, * gnu/classpath/jdwp/exception/InvalidSlotException.java, * gnu/classpath/jdwp/exception/InvalidStringException.java, * gnu/classpath/jdwp/exception/InvalidThreadException.java, * gnu/classpath/jdwp/exception/InvalidThreadGroupException.java, * gnu/classpath/jdwp/exception/NativeMethodException.java, * gnu/classpath/jdwp/exception/NotImplementedException.java, * gnu/classpath/jdwp/id/JdwpId.java, * gnu/classpath/jdwp/id/NullObjectId.java, * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java, * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java, * gnu/classpath/jdwp/processor/CommandSet.java, * gnu/classpath/jdwp/processor/EventRequestCommandSet.java, * gnu/classpath/jdwp/processor/FieldCommandSet.java, * gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java, * gnu/classpath/jdwp/processor/MethodCommandSet.java, * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java, * gnu/classpath/jdwp/processor/PacketProcessor.java, * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java, * gnu/classpath/jdwp/processor/StackFrameCommandSet.java, * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java, * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java, * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java, * gnu/classpath/jdwp/transport/JdwpCommandPacket.java, * gnu/classpath/jdwp/transport/JdwpConnection.java, * gnu/classpath/jdwp/transport/JdwpPacket.java, * gnu/classpath/jdwp/transport/JdwpReplyPacket.java, * gnu/classpath/jdwp/transport/SocketTransport.java, * gnu/classpath/jdwp/transport/TransportFactory.java, * gnu/classpath/jdwp/util/JdwpString.java, * gnu/classpath/jdwp/util/LineTable.java, * gnu/classpath/jdwp/util/Location.java, * gnu/classpath/jdwp/util/MethodResult.java, * gnu/classpath/jdwp/util/MonitorInfo.java, * gnu/classpath/jdwp/util/Signature.java, * gnu/classpath/jdwp/util/VariableTable.java, * gnu/classpath/jdwp/value/ArrayValue.java, * gnu/classpath/jdwp/value/BooleanValue.java, * gnu/classpath/jdwp/value/ByteValue.java, * gnu/classpath/jdwp/value/CharValue.java, * gnu/classpath/jdwp/value/DoubleValue.java, * gnu/classpath/jdwp/value/FloatValue.java, * gnu/classpath/jdwp/value/IntValue.java, * gnu/classpath/jdwp/value/LongValue.java, * gnu/classpath/jdwp/value/ObjectValue.java, * gnu/classpath/jdwp/value/ShortValue.java, * gnu/classpath/jdwp/value/StringValue.java, * gnu/classpath/jdwp/value/Value.java, * gnu/classpath/jdwp/value/ValueFactory.java, * gnu/classpath/jdwp/value/VoidValue.java, * gnu/classpath/toolkit/DefaultDaemonThreadFactory.java, * gnu/java/awt/AWTUtilities.java, * gnu/java/awt/BitMaskExtent.java, * gnu/java/awt/BitwiseXORComposite.java, * gnu/java/awt/Buffers.java, * gnu/java/awt/ClasspathGraphicsEnvironment.java, * gnu/java/awt/ClasspathToolkit.java, * gnu/java/awt/ComponentDataBlitOp.java, * gnu/java/awt/EmbeddedWindow.java, * gnu/java/awt/GradientPaintContext.java, * gnu/java/awt/color/CieXyzConverter.java, * gnu/java/awt/color/ClutProfileConverter.java, * gnu/java/awt/color/ColorLookUpTable.java, * gnu/java/awt/color/GrayProfileConverter.java, * gnu/java/awt/color/GrayScaleConverter.java, * gnu/java/awt/color/LinearRGBConverter.java, * gnu/java/awt/color/ProfileHeader.java, * gnu/java/awt/color/RgbProfileConverter.java, * gnu/java/awt/color/SrgbConverter.java, * gnu/java/awt/color/ToneReproductionCurve.java, * gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java, * gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java, * gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java, * gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java, * gnu/java/awt/font/FontDelegate.java, * gnu/java/awt/font/FontFactory.java, * gnu/java/awt/font/GNUGlyphVector.java, * gnu/java/awt/font/OpenTypeFontPeer.java, * gnu/java/awt/font/autofit/GlyphHints.java, * gnu/java/awt/font/autofit/Latin.java, * gnu/java/awt/font/autofit/Utils.java, * gnu/java/awt/font/opentype/CharGlyphMap.java, * gnu/java/awt/font/opentype/GlyphNamer.java, * gnu/java/awt/font/opentype/MacResourceFork.java, * gnu/java/awt/font/opentype/NameDecoder.java, * gnu/java/awt/font/opentype/OpenTypeFont.java, * gnu/java/awt/font/opentype/OpenTypeFontFactory.java, * gnu/java/awt/font/opentype/truetype/GlyphLoader.java, * gnu/java/awt/font/opentype/truetype/GlyphLocator.java, * gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java, * gnu/java/awt/font/opentype/truetype/Point.java, * gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java, * gnu/java/awt/font/opentype/truetype/VirtualMachine.java, * gnu/java/awt/font/opentype/truetype/Zone.java, * gnu/java/awt/font/opentype/truetype/ZonePathIterator.java, * gnu/java/awt/image/AsyncImage.java, * gnu/java/awt/image/ImageConverter.java, * gnu/java/awt/image/ImageDecoder.java, * gnu/java/awt/image/XBMDecoder.java, * gnu/java/awt/java2d/AbstractGraphics2D.java, * gnu/java/awt/java2d/AlphaCompositeContext.java, * gnu/java/awt/java2d/CubicSegment.java, * gnu/java/awt/java2d/LineSegment.java, * gnu/java/awt/java2d/PixelCoverage.java, * gnu/java/awt/java2d/QuadSegment.java, * gnu/java/awt/java2d/RasterGraphics.java, * gnu/java/awt/java2d/ScanlineConverter.java, * gnu/java/awt/java2d/ScanlineCoverage.java, * gnu/java/awt/java2d/Segment.java, * gnu/java/awt/java2d/TexturePaintContext.java, * gnu/java/awt/peer/ClasspathDesktopPeer.java, * gnu/java/awt/peer/ClasspathFontPeer.java, * gnu/java/awt/peer/GLightweightPeer.java, * gnu/java/awt/peer/GnomeDesktopPeer.java, * gnu/java/awt/peer/KDEDesktopPeer.java, * gnu/java/awt/peer/gtk/AsyncImage.java, * gnu/java/awt/peer/gtk/BufferedImageGraphics.java, * gnu/java/awt/peer/gtk/CairoGraphics2D.java, * gnu/java/awt/peer/gtk/CairoSurface.java, * gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java, * gnu/java/awt/peer/gtk/ComponentGraphics.java, * gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java, * gnu/java/awt/peer/gtk/FreetypeGlyphVector.java, * gnu/java/awt/peer/gtk/GdkFontPeer.java, * gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java, * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java, * gnu/java/awt/peer/gtk/GdkPixbufDecoder.java, * gnu/java/awt/peer/gtk/GdkRobotPeer.java, * gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java, * gnu/java/awt/peer/gtk/GtkButtonPeer.java, * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java, * gnu/java/awt/peer/gtk/GtkChoicePeer.java, * gnu/java/awt/peer/gtk/GtkClipboard.java, * gnu/java/awt/peer/gtk/GtkComponentPeer.java, * gnu/java/awt/peer/gtk/GtkContainerPeer.java, * gnu/java/awt/peer/gtk/GtkCursor.java, * gnu/java/awt/peer/gtk/GtkDialogPeer.java, * gnu/java/awt/peer/gtk/GtkFileDialogPeer.java, * gnu/java/awt/peer/gtk/GtkFramePeer.java, * gnu/java/awt/peer/gtk/GtkGenericPeer.java, * gnu/java/awt/peer/gtk/GtkImage.java, * gnu/java/awt/peer/gtk/GtkImageConsumer.java, * gnu/java/awt/peer/gtk/GtkLabelPeer.java, * gnu/java/awt/peer/gtk/GtkListPeer.java, * gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java, * gnu/java/awt/peer/gtk/GtkMenuPeer.java, * gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java, * gnu/java/awt/peer/gtk/GtkPanelPeer.java, * gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java, * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java, * gnu/java/awt/peer/gtk/GtkSelection.java, * gnu/java/awt/peer/gtk/GtkToolkit.java, * gnu/java/awt/peer/gtk/GtkVolatileImage.java, * gnu/java/awt/peer/gtk/GtkWindowPeer.java, * gnu/java/awt/peer/gtk/VolatileImageGraphics.java, * gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java, * gnu/java/awt/peer/qt/MainQtThread.java, * gnu/java/awt/peer/qt/QMatrix.java, * gnu/java/awt/peer/qt/QPainterPath.java, * gnu/java/awt/peer/qt/QPen.java, * gnu/java/awt/peer/qt/QtAudioClip.java, * gnu/java/awt/peer/qt/QtButtonPeer.java, * gnu/java/awt/peer/qt/QtCheckboxPeer.java, * gnu/java/awt/peer/qt/QtChoicePeer.java, * gnu/java/awt/peer/qt/QtComponentGraphics.java, * gnu/java/awt/peer/qt/QtComponentPeer.java, * gnu/java/awt/peer/qt/QtContainerPeer.java, * gnu/java/awt/peer/qt/QtDialogPeer.java, * gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java, * gnu/java/awt/peer/qt/QtFileDialogPeer.java, * gnu/java/awt/peer/qt/QtFontMetrics.java, * gnu/java/awt/peer/qt/QtFontPeer.java, * gnu/java/awt/peer/qt/QtFramePeer.java, * gnu/java/awt/peer/qt/QtGraphics.java, * gnu/java/awt/peer/qt/QtGraphicsEnvironment.java, * gnu/java/awt/peer/qt/QtImage.java, * gnu/java/awt/peer/qt/QtImageConsumer.java, * gnu/java/awt/peer/qt/QtImageDirectGraphics.java, * gnu/java/awt/peer/qt/QtImageGraphics.java, * gnu/java/awt/peer/qt/QtLabelPeer.java, * gnu/java/awt/peer/qt/QtListPeer.java, * gnu/java/awt/peer/qt/QtMenuBarPeer.java, * gnu/java/awt/peer/qt/QtMenuComponentPeer.java, * gnu/java/awt/peer/qt/QtMenuItemPeer.java, * gnu/java/awt/peer/qt/QtMenuPeer.java, * gnu/java/awt/peer/qt/QtPanelPeer.java, * gnu/java/awt/peer/qt/QtPopupMenuPeer.java, * gnu/java/awt/peer/qt/QtRepaintThread.java, * gnu/java/awt/peer/qt/QtScreenDevice.java, * gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java, * gnu/java/awt/peer/qt/QtScrollPanePeer.java, * gnu/java/awt/peer/qt/QtScrollbarPeer.java, * gnu/java/awt/peer/qt/QtTextAreaPeer.java, * gnu/java/awt/peer/qt/QtTextFieldPeer.java, * gnu/java/awt/peer/qt/QtToolkit.java, * gnu/java/awt/peer/qt/QtVolatileImage.java, * gnu/java/awt/peer/qt/QtWindowPeer.java, * gnu/java/awt/peer/swing/SwingButtonPeer.java, * gnu/java/awt/peer/swing/SwingCheckboxPeer.java, * gnu/java/awt/peer/swing/SwingComponent.java, * gnu/java/awt/peer/swing/SwingComponentPeer.java, * gnu/java/awt/peer/swing/SwingContainerPeer.java, * gnu/java/awt/peer/swing/SwingLabelPeer.java, * gnu/java/awt/peer/swing/SwingListPeer.java, * gnu/java/awt/peer/swing/SwingMenuItemPeer.java, * gnu/java/awt/peer/swing/SwingMenuPeer.java, * gnu/java/awt/peer/swing/SwingTextAreaPeer.java, * gnu/java/awt/peer/swing/SwingTextFieldPeer.java, * gnu/java/awt/peer/x/GLGraphics.java, * gnu/java/awt/peer/x/KeyboardMapping.java, * gnu/java/awt/peer/x/XEventPump.java, * gnu/java/awt/peer/x/XFontPeer.java, * gnu/java/awt/peer/x/XFramePeer.java, * gnu/java/awt/peer/x/XGraphics2D.java, * gnu/java/awt/peer/x/XGraphicsConfiguration.java, * gnu/java/awt/peer/x/XGraphicsDevice.java, * gnu/java/awt/peer/x/XGraphicsEnvironment.java, * gnu/java/awt/peer/x/XImage.java, * gnu/java/awt/peer/x/XToolkit.java, * gnu/java/awt/peer/x/XWindowPeer.java, * gnu/java/awt/print/JavaPrinterGraphics.java, * gnu/java/awt/print/JavaPrinterJob.java, * gnu/java/awt/print/PostScriptGraphics2D.java, * gnu/java/awt/print/SpooledDocument.java, * gnu/java/beans/BeanInfoEmbryo.java, * gnu/java/beans/DefaultExceptionListener.java, * gnu/java/beans/ExplicitBeanInfo.java, * gnu/java/beans/IntrospectionIncubator.java, * gnu/java/beans/decoder/AbstractContext.java, * gnu/java/beans/decoder/AbstractCreatableObjectContext.java, * gnu/java/beans/decoder/AbstractElementHandler.java, * gnu/java/beans/decoder/AbstractObjectContext.java, * gnu/java/beans/decoder/ArrayContext.java, * gnu/java/beans/decoder/ArrayHandler.java, * gnu/java/beans/decoder/AssemblyException.java, * gnu/java/beans/decoder/BooleanHandler.java, * gnu/java/beans/decoder/ByteHandler.java, * gnu/java/beans/decoder/CharHandler.java, * gnu/java/beans/decoder/ClassHandler.java, * gnu/java/beans/decoder/ConstructorContext.java, * gnu/java/beans/decoder/Context.java, * gnu/java/beans/decoder/DecoderContext.java, * gnu/java/beans/decoder/DoubleHandler.java, * gnu/java/beans/decoder/DummyContext.java, * gnu/java/beans/decoder/DummyHandler.java, * gnu/java/beans/decoder/ElementHandler.java, * gnu/java/beans/decoder/FloatHandler.java, * gnu/java/beans/decoder/GrowableArrayContext.java, * gnu/java/beans/decoder/IndexContext.java, * gnu/java/beans/decoder/IntHandler.java, * gnu/java/beans/decoder/JavaHandler.java, * gnu/java/beans/decoder/LongHandler.java, * gnu/java/beans/decoder/MethodContext.java, * gnu/java/beans/decoder/MethodFinder.java, * gnu/java/beans/decoder/NullHandler.java, * gnu/java/beans/decoder/ObjectContext.java, * gnu/java/beans/decoder/ObjectHandler.java, * gnu/java/beans/decoder/PersistenceParser.java, * gnu/java/beans/decoder/PropertyContext.java, * gnu/java/beans/decoder/ShortHandler.java, * gnu/java/beans/decoder/SimpleHandler.java, * gnu/java/beans/decoder/StaticMethodContext.java, * gnu/java/beans/decoder/StringHandler.java, * gnu/java/beans/decoder/VoidHandler.java, * gnu/java/beans/editors/ColorEditor.java, * gnu/java/beans/editors/FontEditor.java, * gnu/java/beans/editors/NativeBooleanEditor.java, * gnu/java/beans/editors/NativeByteEditor.java, * gnu/java/beans/editors/NativeDoubleEditor.java, * gnu/java/beans/editors/NativeFloatEditor.java, * gnu/java/beans/editors/NativeIntEditor.java, * gnu/java/beans/editors/NativeLongEditor.java, * gnu/java/beans/editors/NativeShortEditor.java, * gnu/java/beans/editors/StringEditor.java, * gnu/java/beans/encoder/ArrayPersistenceDelegate.java, * gnu/java/beans/encoder/ClassPersistenceDelegate.java, * gnu/java/beans/encoder/CollectionPersistenceDelegate.java, * gnu/java/beans/encoder/Context.java, * gnu/java/beans/encoder/GenericScannerState.java, * gnu/java/beans/encoder/IgnoringScannerState.java, * gnu/java/beans/encoder/MapPersistenceDelegate.java, * gnu/java/beans/encoder/ObjectId.java, * gnu/java/beans/encoder/PrimitivePersistenceDelegate.java, * gnu/java/beans/encoder/ReportingScannerState.java, * gnu/java/beans/encoder/Root.java, * gnu/java/beans/encoder/ScanEngine.java, * gnu/java/beans/encoder/ScannerState.java, * gnu/java/beans/encoder/StAXWriter.java, * gnu/java/beans/encoder/Writer.java, * gnu/java/beans/encoder/elements/ArrayInstantiation.java, * gnu/java/beans/encoder/elements/Array_Get.java, * gnu/java/beans/encoder/elements/ClassResolution.java, * gnu/java/beans/encoder/elements/Element.java, * gnu/java/beans/encoder/elements/List_Get.java, * gnu/java/beans/encoder/elements/List_Set.java, * gnu/java/beans/encoder/elements/MethodInvocation.java, * gnu/java/beans/encoder/elements/NullObject.java, * gnu/java/beans/encoder/elements/ObjectInstantiation.java, * gnu/java/beans/encoder/elements/ObjectReference.java, * gnu/java/beans/encoder/elements/PrimitiveInstantiation.java, * gnu/java/beans/encoder/elements/StaticFieldAccess.java, * gnu/java/beans/encoder/elements/StaticMethodInvocation.java, * gnu/java/beans/encoder/elements/StringReference.java, * gnu/java/io/ASN1ParsingException.java, * gnu/java/io/Base64InputStream.java, * gnu/java/io/ClassLoaderObjectInputStream.java, * gnu/java/io/NullOutputStream.java, * gnu/java/io/ObjectIdentityMap2Int.java, * gnu/java/io/ObjectIdentityWrapper.java, * gnu/java/io/PlatformHelper.java, * gnu/java/lang/CPStringBuilder.java, * gnu/java/lang/CharData.java, * gnu/java/lang/InstrumentationImpl.java, * gnu/java/lang/MainThread.java, * gnu/java/lang/management/BeanImpl.java, * gnu/java/lang/management/ClassLoadingMXBeanImpl.java, * gnu/java/lang/management/CompilationMXBeanImpl.java, * gnu/java/lang/management/GarbageCollectorMXBeanImpl.java, * gnu/java/lang/management/MemoryMXBeanImpl.java, * gnu/java/lang/management/MemoryManagerMXBeanImpl.java, * gnu/java/lang/management/MemoryPoolMXBeanImpl.java, * gnu/java/lang/management/OperatingSystemMXBeanImpl.java, * gnu/java/lang/management/RuntimeMXBeanImpl.java, * gnu/java/lang/management/ThreadMXBeanImpl.java, * gnu/java/lang/reflect/TypeSignature.java, * gnu/java/locale/LocaleHelper.java, * gnu/java/math/Fixed.java, * gnu/java/math/GMP.java, * gnu/java/math/MPN.java, * gnu/java/net/CRLFInputStream.java, * gnu/java/net/CRLFOutputStream.java, * gnu/java/net/DefaultContentHandlerFactory.java, * gnu/java/net/DefaultProxySelector.java, * gnu/java/net/EmptyX509TrustManager.java, * gnu/java/net/GetLocalHostAction.java, * gnu/java/net/HeaderFieldHelper.java, * gnu/java/net/IndexListParser.java, * gnu/java/net/LineInputStream.java, * gnu/java/net/PlainDatagramSocketImpl.java, * gnu/java/net/PlainSocketImpl.java, * gnu/java/net/loader/FileResource.java, * gnu/java/net/loader/FileURLLoader.java, * gnu/java/net/loader/JarURLLoader.java, * gnu/java/net/loader/JarURLResource.java, * gnu/java/net/loader/RemoteResource.java, * gnu/java/net/loader/RemoteURLLoader.java, * gnu/java/net/loader/Resource.java, * gnu/java/net/loader/URLLoader.java, * gnu/java/net/protocol/file/Connection.java, * gnu/java/net/protocol/file/Handler.java, * gnu/java/net/protocol/ftp/ActiveModeDTP.java, * gnu/java/net/protocol/ftp/BlockInputStream.java, * gnu/java/net/protocol/ftp/BlockOutputStream.java, * gnu/java/net/protocol/ftp/CompressedInputStream.java, * gnu/java/net/protocol/ftp/CompressedOutputStream.java, * gnu/java/net/protocol/ftp/DTP.java, * gnu/java/net/protocol/ftp/DTPInputStream.java, * gnu/java/net/protocol/ftp/DTPOutputStream.java, * gnu/java/net/protocol/ftp/FTPConnection.java, * gnu/java/net/protocol/ftp/FTPException.java, * gnu/java/net/protocol/ftp/FTPResponse.java, * gnu/java/net/protocol/ftp/FTPURLConnection.java, * gnu/java/net/protocol/ftp/Handler.java, * gnu/java/net/protocol/ftp/PassiveModeDTP.java, * gnu/java/net/protocol/ftp/StreamInputStream.java, * gnu/java/net/protocol/ftp/StreamOutputStream.java, * gnu/java/net/protocol/http/Authenticator.java, * gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java, * gnu/java/net/protocol/http/ChunkedInputStream.java, * gnu/java/net/protocol/http/Cookie.java, * gnu/java/net/protocol/http/CookieManager.java, * gnu/java/net/protocol/http/Credentials.java, * gnu/java/net/protocol/http/HTTPConnection.java, * gnu/java/net/protocol/http/HTTPDateFormat.java, * gnu/java/net/protocol/http/HTTPURLConnection.java, * gnu/java/net/protocol/http/Handler.java, * gnu/java/net/protocol/http/Headers.java, * gnu/java/net/protocol/http/Request.java, * gnu/java/net/protocol/http/RequestBodyWriter.java, * gnu/java/net/protocol/http/Response.java, * gnu/java/net/protocol/http/ResponseHeaderHandler.java, * gnu/java/net/protocol/http/SimpleCookieManager.java, * gnu/java/net/protocol/https/Handler.java, * gnu/java/net/protocol/jar/Connection.java, * gnu/java/net/protocol/jar/Handler.java, * gnu/java/nio/ChannelInputStream.java, * gnu/java/nio/ChannelOutputStream.java, * gnu/java/nio/ChannelReader.java, * gnu/java/nio/ChannelWriter.java, * gnu/java/nio/DatagramChannelImpl.java, * gnu/java/nio/DatagramChannelSelectionKey.java, * gnu/java/nio/EpollSelectionKeyImpl.java, * gnu/java/nio/EpollSelectorImpl.java, * gnu/java/nio/FileChannelImpl.java, * gnu/java/nio/FileLockImpl.java, * gnu/java/nio/InputStreamChannel.java, * gnu/java/nio/KqueueSelectionKeyImpl.java, * gnu/java/nio/KqueueSelectorImpl.java, * gnu/java/nio/NIODatagramSocket.java, * gnu/java/nio/NIOServerSocket.java, * gnu/java/nio/NIOSocket.java, * gnu/java/nio/NIOSocketImpl.java, * gnu/java/nio/OutputStreamChannel.java, * gnu/java/nio/PipeImpl.java, * gnu/java/nio/SelectionKeyImpl.java, * gnu/java/nio/SelectorImpl.java, * gnu/java/nio/SelectorProviderImpl.java, * gnu/java/nio/ServerSocketChannelImpl.java, * gnu/java/nio/ServerSocketChannelSelectionKey.java, * gnu/java/nio/SocketChannelImpl.java, * gnu/java/nio/SocketChannelSelectionKey.java, * gnu/java/nio/SocketChannelSelectionKeyImpl.java, * gnu/java/nio/VMChannelOwner.java, * gnu/java/nio/charset/ByteCharset.java, * gnu/java/nio/charset/ByteDecodeLoopHelper.java, * gnu/java/nio/charset/ByteEncodeLoopHelper.java, * gnu/java/nio/charset/Cp424.java, * gnu/java/nio/charset/Cp437.java, * gnu/java/nio/charset/Cp737.java, * gnu/java/nio/charset/Cp775.java, * gnu/java/nio/charset/Cp850.java, * gnu/java/nio/charset/Cp852.java, * gnu/java/nio/charset/Cp855.java, * gnu/java/nio/charset/Cp857.java, * gnu/java/nio/charset/Cp860.java, * gnu/java/nio/charset/Cp861.java, * gnu/java/nio/charset/Cp862.java, * gnu/java/nio/charset/Cp863.java, * gnu/java/nio/charset/Cp864.java, * gnu/java/nio/charset/Cp865.java, * gnu/java/nio/charset/Cp866.java, * gnu/java/nio/charset/Cp869.java, * gnu/java/nio/charset/Cp874.java, * gnu/java/nio/charset/EncodingHelper.java, * gnu/java/nio/charset/ISO_8859_1.java, * gnu/java/nio/charset/ISO_8859_13.java, * gnu/java/nio/charset/ISO_8859_15.java, * gnu/java/nio/charset/ISO_8859_2.java, * gnu/java/nio/charset/ISO_8859_3.java, * gnu/java/nio/charset/ISO_8859_4.java, * gnu/java/nio/charset/ISO_8859_5.java, * gnu/java/nio/charset/ISO_8859_6.java, * gnu/java/nio/charset/ISO_8859_7.java, * gnu/java/nio/charset/ISO_8859_8.java, * gnu/java/nio/charset/ISO_8859_9.java, * gnu/java/nio/charset/KOI_8.java, * gnu/java/nio/charset/MS874.java, * gnu/java/nio/charset/MacCentralEurope.java, * gnu/java/nio/charset/MacCroatian.java, * gnu/java/nio/charset/MacCyrillic.java, * gnu/java/nio/charset/MacDingbat.java, * gnu/java/nio/charset/MacGreek.java, * gnu/java/nio/charset/MacIceland.java, * gnu/java/nio/charset/MacRoman.java, * gnu/java/nio/charset/MacRomania.java, * gnu/java/nio/charset/MacSymbol.java, * gnu/java/nio/charset/MacThai.java, * gnu/java/nio/charset/MacTurkish.java, * gnu/java/
Diffstat (limited to 'javax')
-rw-r--r--javax/accessibility/AccessibleExtendedText.java8
-rw-r--r--javax/accessibility/AccessibleRelation.java4
-rw-r--r--javax/accessibility/AccessibleRole.java2
-rw-r--r--javax/accessibility/AccessibleState.java2
-rw-r--r--javax/activation/ActivationDataFlavor.java2
-rw-r--r--javax/activation/CommandInfo.java11
-rw-r--r--javax/activation/CommandMap.java29
-rw-r--r--javax/activation/CommandObject.java3
-rw-r--r--javax/activation/DataContentHandler.java9
-rw-r--r--javax/activation/DataContentHandlerFactory.java3
-rw-r--r--javax/activation/DataHandler.java51
-rw-r--r--javax/activation/DataHandlerDataSource.java11
-rw-r--r--javax/activation/DataSource.java11
-rw-r--r--javax/activation/DataSourceDataContentHandler.java11
-rw-r--r--javax/activation/FileDataSource.java15
-rw-r--r--javax/activation/FileTypeMap.java11
-rw-r--r--javax/activation/MailcapCommandMap.java69
-rw-r--r--javax/activation/MimeType.java41
-rw-r--r--javax/activation/MimeTypeParameterList.java45
-rw-r--r--javax/activation/MimeTypeParseException.java5
-rw-r--r--javax/activation/MimetypesFileTypeMap.java39
-rw-r--r--javax/activation/ObjectDataContentHandler.java11
-rw-r--r--javax/activation/URLDataSource.java13
-rw-r--r--javax/activation/UnsupportedDataTypeException.java5
-rw-r--r--javax/crypto/Cipher.java6
-rw-r--r--javax/crypto/CipherOutputStream.java12
-rw-r--r--javax/crypto/ExemptionMechanism.java6
-rw-r--r--javax/crypto/KeyAgreement.java6
-rw-r--r--javax/crypto/KeyGenerator.java6
-rw-r--r--javax/crypto/Mac.java8
-rw-r--r--javax/crypto/MacSpi.java4
-rw-r--r--javax/crypto/SecretKeyFactory.java6
-rw-r--r--javax/crypto/spec/PBEKeySpec.java24
-rw-r--r--javax/imageio/IIOImage.java8
-rw-r--r--javax/imageio/IIOParam.java70
-rw-r--r--javax/imageio/IIOParamController.java2
-rw-r--r--javax/imageio/ImageIO.java182
-rw-r--r--javax/imageio/ImageReadParam.java8
-rw-r--r--javax/imageio/ImageReader.java353
-rw-r--r--javax/imageio/ImageTranscoder.java6
-rw-r--r--javax/imageio/ImageTypeSpecifier.java22
-rw-r--r--javax/imageio/ImageWriteParam.java118
-rw-r--r--javax/imageio/ImageWriter.java226
-rw-r--r--javax/imageio/event/IIOReadProgressListener.java18
-rw-r--r--javax/imageio/event/IIOReadUpdateListener.java10
-rw-r--r--javax/imageio/event/IIOWriteProgressListener.java14
-rw-r--r--javax/imageio/metadata/IIOInvalidTreeException.java2
-rw-r--r--javax/imageio/metadata/IIOMetadata.java48
-rw-r--r--javax/imageio/metadata/IIOMetadataFormatImpl.java110
-rw-r--r--javax/imageio/metadata/IIOMetadataNode.java76
-rw-r--r--javax/imageio/plugins/bmp/BMPImageWriteParam.java46
-rw-r--r--javax/imageio/plugins/jpeg/JPEGHuffmanTable.java12
-rw-r--r--javax/imageio/spi/IIORegistry.java18
-rw-r--r--javax/imageio/spi/ImageReaderSpi.java4
-rw-r--r--javax/imageio/spi/ImageWriterSpi.java4
-rw-r--r--javax/imageio/spi/RegisterableService.java1
-rw-r--r--javax/imageio/spi/ServiceRegistry.java17
-rw-r--r--javax/imageio/stream/FileCacheImageInputStream.java8
-rw-r--r--javax/imageio/stream/FileCacheImageOutputStream.java4
-rw-r--r--javax/imageio/stream/FileImageInputStream.java2
-rw-r--r--javax/imageio/stream/FileImageOutputStream.java10
-rw-r--r--javax/imageio/stream/ImageInputStream.java34
-rw-r--r--javax/imageio/stream/ImageInputStreamImpl.java58
-rw-r--r--javax/imageio/stream/ImageOutputStreamImpl.java26
-rw-r--r--javax/imageio/stream/MemoryCacheImageInputStream.java10
-rw-r--r--javax/imageio/stream/MemoryCacheImageOutputStream.java2
-rw-r--r--javax/management/Attribute.java20
-rw-r--r--javax/management/AttributeChangeNotification.java16
-rw-r--r--javax/management/AttributeChangeNotificationFilter.java8
-rw-r--r--javax/management/AttributeList.java18
-rw-r--r--javax/management/AttributeNotFoundException.java1
-rw-r--r--javax/management/AttributeValueExp.java14
-rw-r--r--javax/management/BadAttributeValueExpException.java3
-rw-r--r--javax/management/BadBinaryOpValueExpException.java3
-rw-r--r--javax/management/BadStringOperationException.java3
-rw-r--r--javax/management/DefaultLoaderRepository.java42
-rw-r--r--javax/management/Descriptor.java8
-rw-r--r--javax/management/DynamicMBean.java8
-rw-r--r--javax/management/InstanceAlreadyExistsException.java1
-rw-r--r--javax/management/InstanceNotFoundException.java1
-rw-r--r--javax/management/IntrospectionException.java1
-rw-r--r--javax/management/InvalidApplicationException.java3
-rw-r--r--javax/management/InvalidAttributeValueException.java1
-rw-r--r--javax/management/JMException.java1
-rw-r--r--javax/management/JMRuntimeException.java1
-rw-r--r--javax/management/JMX.java26
-rw-r--r--javax/management/ListenerNotFoundException.java1
-rw-r--r--javax/management/MBeanAttributeInfo.java76
-rw-r--r--javax/management/MBeanConstructorInfo.java50
-rw-r--r--javax/management/MBeanException.java1
-rw-r--r--javax/management/MBeanFeatureInfo.java22
-rw-r--r--javax/management/MBeanInfo.java62
-rw-r--r--javax/management/MBeanNotificationInfo.java46
-rw-r--r--javax/management/MBeanOperationInfo.java108
-rw-r--r--javax/management/MBeanParameterInfo.java20
-rw-r--r--javax/management/MBeanPermission.java201
-rw-r--r--javax/management/MBeanRegistrationException.java1
-rw-r--r--javax/management/MBeanServer.java104
-rw-r--r--javax/management/MBeanServerBuilder.java4
-rw-r--r--javax/management/MBeanServerConnection.java102
-rw-r--r--javax/management/MBeanServerDelegate.java50
-rw-r--r--javax/management/MBeanServerFactory.java110
-rw-r--r--javax/management/MBeanServerInvocationHandler.java193
-rw-r--r--javax/management/MBeanServerNotification.java2
-rw-r--r--javax/management/MBeanServerPermission.java218
-rw-r--r--javax/management/MBeanTrustPermission.java10
-rw-r--r--javax/management/MalformedObjectNameException.java1
-rw-r--r--javax/management/NotCompliantMBeanException.java1
-rw-r--r--javax/management/Notification.java19
-rw-r--r--javax/management/NotificationBroadcaster.java7
-rw-r--r--javax/management/NotificationBroadcasterSupport.java79
-rw-r--r--javax/management/NotificationEmitter.java7
-rw-r--r--javax/management/NotificationFilter.java3
-rw-r--r--javax/management/NotificationFilterSupport.java4
-rw-r--r--javax/management/NotificationListener.java3
-rw-r--r--javax/management/ObjectInstance.java2
-rw-r--r--javax/management/ObjectName.java314
-rw-r--r--javax/management/OperationsException.java1
-rw-r--r--javax/management/PersistentMBean.java4
-rw-r--r--javax/management/Query.java745
-rw-r--r--javax/management/QueryEval.java4
-rw-r--r--javax/management/QueryExp.java3
-rw-r--r--javax/management/ReflectionException.java1
-rw-r--r--javax/management/RuntimeErrorException.java1
-rw-r--r--javax/management/RuntimeMBeanException.java1
-rw-r--r--javax/management/RuntimeOperationsException.java7
-rw-r--r--javax/management/ServiceNotFoundException.java1
-rw-r--r--javax/management/StandardMBean.java648
-rw-r--r--javax/management/StringValueExp.java2
-rw-r--r--javax/management/ValueExp.java3
-rw-r--r--javax/management/loading/ClassLoaderRepository.java1
-rw-r--r--javax/management/openmbean/ArrayType.java138
-rw-r--r--javax/management/openmbean/CompositeData.java1
-rw-r--r--javax/management/openmbean/CompositeDataInvocationHandler.java46
-rw-r--r--javax/management/openmbean/CompositeDataSupport.java49
-rw-r--r--javax/management/openmbean/CompositeType.java80
-rw-r--r--javax/management/openmbean/InvalidKeyException.java1
-rw-r--r--javax/management/openmbean/InvalidOpenTypeException.java1
-rw-r--r--javax/management/openmbean/KeyAlreadyExistsException.java1
-rw-r--r--javax/management/openmbean/OpenDataException.java1
-rw-r--r--javax/management/openmbean/OpenMBeanAttributeInfo.java2
-rw-r--r--javax/management/openmbean/OpenMBeanAttributeInfoSupport.java156
-rw-r--r--javax/management/openmbean/OpenMBeanConstructorInfo.java2
-rw-r--r--javax/management/openmbean/OpenMBeanConstructorInfoSupport.java18
-rw-r--r--javax/management/openmbean/OpenMBeanInfo.java2
-rw-r--r--javax/management/openmbean/OpenMBeanInfoSupport.java44
-rw-r--r--javax/management/openmbean/OpenMBeanOperationInfo.java2
-rw-r--r--javax/management/openmbean/OpenMBeanOperationInfoSupport.java74
-rw-r--r--javax/management/openmbean/OpenMBeanParameterInfo.java2
-rw-r--r--javax/management/openmbean/OpenMBeanParameterInfoSupport.java124
-rw-r--r--javax/management/openmbean/OpenType.java24
-rw-r--r--javax/management/openmbean/SimpleType.java56
-rw-r--r--javax/management/openmbean/TabularData.java13
-rw-r--r--javax/management/openmbean/TabularDataSupport.java51
-rw-r--r--javax/management/openmbean/TabularType.java58
-rw-r--r--javax/management/remote/NotificationResult.java8
-rw-r--r--javax/management/remote/TargetedNotification.java1
-rw-r--r--javax/management/remote/rmi/RMIConnection.java124
-rw-r--r--javax/naming/AuthenticationException.java4
-rw-r--r--javax/naming/AuthenticationNotSupportedException.java4
-rw-r--r--javax/naming/BinaryRefAddr.java12
-rw-r--r--javax/naming/Binding.java22
-rw-r--r--javax/naming/CannotProceedException.java4
-rw-r--r--javax/naming/CommunicationException.java2
-rw-r--r--javax/naming/CompositeName.java164
-rw-r--r--javax/naming/CompoundName.java284
-rw-r--r--javax/naming/ConfigurationException.java2
-rw-r--r--javax/naming/Context.java72
-rw-r--r--javax/naming/ContextNotEmptyException.java4
-rw-r--r--javax/naming/InitialContext.java114
-rw-r--r--javax/naming/InsufficientResourcesException.java4
-rw-r--r--javax/naming/InterruptedNamingException.java2
-rw-r--r--javax/naming/InvalidNameException.java2
-rw-r--r--javax/naming/LimitExceededException.java4
-rw-r--r--javax/naming/LinkException.java4
-rw-r--r--javax/naming/LinkLoopException.java4
-rw-r--r--javax/naming/MalformedLinkException.java2
-rw-r--r--javax/naming/Name.java8
-rw-r--r--javax/naming/NameAlreadyBoundException.java2
-rw-r--r--javax/naming/NameClassPair.java44
-rw-r--r--javax/naming/NameNotFoundException.java4
-rw-r--r--javax/naming/NameParser.java6
-rw-r--r--javax/naming/NamingEnumeration.java14
-rw-r--r--javax/naming/NamingException.java35
-rw-r--r--javax/naming/NamingSecurityException.java4
-rw-r--r--javax/naming/NoInitialContextException.java2
-rw-r--r--javax/naming/NoPermissionException.java2
-rw-r--r--javax/naming/NotContextException.java2
-rw-r--r--javax/naming/PartialResultException.java2
-rw-r--r--javax/naming/RefAddr.java22
-rw-r--r--javax/naming/Reference.java94
-rw-r--r--javax/naming/Referenceable.java4
-rw-r--r--javax/naming/ReferralException.java4
-rw-r--r--javax/naming/ServiceUnavailableException.java2
-rw-r--r--javax/naming/SizeLimitExceededException.java2
-rw-r--r--javax/naming/StringRefAddr.java2
-rw-r--r--javax/naming/TimeLimitExceededException.java2
-rw-r--r--javax/naming/directory/AttributeInUseException.java2
-rw-r--r--javax/naming/directory/Attributes.java1
-rw-r--r--javax/naming/directory/BasicAttribute.java112
-rw-r--r--javax/naming/directory/BasicAttributes.java46
-rw-r--r--javax/naming/directory/InitialDirContext.java8
-rw-r--r--javax/naming/directory/ModificationItem.java6
-rw-r--r--javax/naming/directory/SearchControls.java4
-rw-r--r--javax/naming/directory/SearchResult.java8
-rw-r--r--javax/naming/event/EventContext.java8
-rw-r--r--javax/naming/event/NamespaceChangeListener.java2
-rw-r--r--javax/naming/event/NamingEvent.java20
-rw-r--r--javax/naming/event/NamingExceptionEvent.java2
-rw-r--r--javax/naming/event/NamingListener.java2
-rw-r--r--javax/naming/event/ObjectChangeListener.java2
-rw-r--r--javax/naming/ldap/Control.java2
-rw-r--r--javax/naming/ldap/ControlFactory.java56
-rw-r--r--javax/naming/ldap/ExtendedRequest.java8
-rw-r--r--javax/naming/ldap/ExtendedResponse.java2
-rw-r--r--javax/naming/ldap/HasControls.java2
-rw-r--r--javax/naming/ldap/InitialLdapContext.java12
-rw-r--r--javax/naming/ldap/LdapContext.java2
-rw-r--r--javax/naming/ldap/LdapReferralException.java2
-rw-r--r--javax/naming/ldap/StartTlsRequest.java2
-rw-r--r--javax/naming/ldap/UnsolicitedNotification.java2
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationEvent.java6
-rw-r--r--javax/naming/ldap/UnsolicitedNotificationListener.java2
-rw-r--r--javax/naming/spi/DirObjectFactory.java6
-rw-r--r--javax/naming/spi/DirStateFactory.java10
-rw-r--r--javax/naming/spi/DirectoryManager.java262
-rw-r--r--javax/naming/spi/InitialContextFactory.java2
-rw-r--r--javax/naming/spi/InitialContextFactoryBuilder.java4
-rw-r--r--javax/naming/spi/NamingManager.java378
-rw-r--r--javax/naming/spi/ObjectFactory.java6
-rw-r--r--javax/naming/spi/ObjectFactoryBuilder.java12
-rw-r--r--javax/naming/spi/ResolveResult.java38
-rw-r--r--javax/naming/spi/Resolver.java6
-rw-r--r--javax/naming/spi/StateFactory.java10
-rw-r--r--javax/net/ssl/CertPathTrustManagerParameters.java2
-rw-r--r--javax/net/ssl/KeyManagerFactory.java6
-rw-r--r--javax/net/ssl/KeyStoreBuilderParameters.java2
-rw-r--r--javax/net/ssl/SSLContext.java6
-rw-r--r--javax/net/ssl/SSLEngine.java8
-rw-r--r--javax/net/ssl/SSLEngineResult.java12
-rw-r--r--javax/net/ssl/SSLException.java6
-rw-r--r--javax/net/ssl/TrustManagerFactory.java6
-rw-r--r--javax/net/ssl/X509ExtendedKeyManager.java2
-rw-r--r--javax/print/AttributeException.java18
-rw-r--r--javax/print/CancelablePrintJob.java12
-rw-r--r--javax/print/Doc.java48
-rw-r--r--javax/print/DocFlavor.java230
-rw-r--r--javax/print/DocPrintJob.java62
-rw-r--r--javax/print/FlavorException.java10
-rw-r--r--javax/print/MultiDoc.java26
-rw-r--r--javax/print/MultiDocPrintJob.java25
-rw-r--r--javax/print/MultiDocPrintService.java12
-rw-r--r--javax/print/PrintException.java14
-rw-r--r--javax/print/PrintService.java158
-rw-r--r--javax/print/PrintServiceLookup.java148
-rw-r--r--javax/print/ServiceUI.java68
-rw-r--r--javax/print/ServiceUIFactory.java40
-rw-r--r--javax/print/SimpleDoc.java62
-rw-r--r--javax/print/StreamPrintService.java20
-rw-r--r--javax/print/StreamPrintServiceFactory.java58
-rw-r--r--javax/print/URIException.java24
-rw-r--r--javax/print/attribute/Attribute.java10
-rw-r--r--javax/print/attribute/AttributeSet.java78
-rw-r--r--javax/print/attribute/AttributeSetUtilities.java46
-rw-r--r--javax/print/attribute/DateTimeSyntax.java20
-rw-r--r--javax/print/attribute/DocAttribute.java18
-rw-r--r--javax/print/attribute/DocAttributeSet.java26
-rw-r--r--javax/print/attribute/EnumSyntax.java50
-rw-r--r--javax/print/attribute/HashAttributeSet.java86
-rw-r--r--javax/print/attribute/HashDocAttributeSet.java6
-rw-r--r--javax/print/attribute/HashPrintJobAttributeSet.java12
-rw-r--r--javax/print/attribute/HashPrintRequestAttributeSet.java12
-rw-r--r--javax/print/attribute/HashPrintServiceAttributeSet.java12
-rw-r--r--javax/print/attribute/IntegerSyntax.java8
-rw-r--r--javax/print/attribute/PrintJobAttribute.java16
-rw-r--r--javax/print/attribute/PrintJobAttributeSet.java26
-rw-r--r--javax/print/attribute/PrintRequestAttribute.java10
-rw-r--r--javax/print/attribute/PrintRequestAttributeSet.java26
-rw-r--r--javax/print/attribute/PrintServiceAttribute.java14
-rw-r--r--javax/print/attribute/PrintServiceAttributeSet.java26
-rw-r--r--javax/print/attribute/ResolutionSyntax.java34
-rw-r--r--javax/print/attribute/SetOfIntegerSyntax.java60
-rw-r--r--javax/print/attribute/Size2DSyntax.java28
-rw-r--r--javax/print/attribute/SupportedValuesAttribute.java8
-rw-r--r--javax/print/attribute/TextSyntax.java12
-rw-r--r--javax/print/attribute/URISyntax.java8
-rw-r--r--javax/print/attribute/UnmodifiableSetException.java4
-rw-r--r--javax/print/attribute/standard/Chromaticity.java14
-rw-r--r--javax/print/attribute/standard/ColorSupported.java12
-rw-r--r--javax/print/attribute/standard/Compression.java18
-rw-r--r--javax/print/attribute/standard/Copies.java14
-rw-r--r--javax/print/attribute/standard/CopiesSupported.java22
-rw-r--r--javax/print/attribute/standard/DateTimeAtCompleted.java8
-rw-r--r--javax/print/attribute/standard/DateTimeAtCreation.java8
-rw-r--r--javax/print/attribute/standard/DateTimeAtProcessing.java6
-rw-r--r--javax/print/attribute/standard/Destination.java16
-rw-r--r--javax/print/attribute/standard/DocumentName.java10
-rw-r--r--javax/print/attribute/standard/Fidelity.java32
-rw-r--r--javax/print/attribute/standard/Finishings.java134
-rw-r--r--javax/print/attribute/standard/JobHoldUntil.java10
-rw-r--r--javax/print/attribute/standard/JobImpressions.java18
-rw-r--r--javax/print/attribute/standard/JobImpressionsCompleted.java16
-rw-r--r--javax/print/attribute/standard/JobImpressionsSupported.java16
-rw-r--r--javax/print/attribute/standard/JobKOctets.java18
-rw-r--r--javax/print/attribute/standard/JobKOctetsProcessed.java16
-rw-r--r--javax/print/attribute/standard/JobKOctetsSupported.java14
-rw-r--r--javax/print/attribute/standard/JobMediaSheets.java12
-rw-r--r--javax/print/attribute/standard/JobMediaSheetsCompleted.java14
-rw-r--r--javax/print/attribute/standard/JobMediaSheetsSupported.java16
-rw-r--r--javax/print/attribute/standard/JobMessageFromOperator.java10
-rw-r--r--javax/print/attribute/standard/JobName.java8
-rw-r--r--javax/print/attribute/standard/JobOriginatingUserName.java8
-rw-r--r--javax/print/attribute/standard/JobPriority.java8
-rw-r--r--javax/print/attribute/standard/JobPrioritySupported.java8
-rw-r--r--javax/print/attribute/standard/JobSheets.java18
-rw-r--r--javax/print/attribute/standard/JobState.java32
-rw-r--r--javax/print/attribute/standard/JobStateReason.java106
-rw-r--r--javax/print/attribute/standard/JobStateReasons.java34
-rw-r--r--javax/print/attribute/standard/Media.java14
-rw-r--r--javax/print/attribute/standard/MediaName.java39
-rw-r--r--javax/print/attribute/standard/MediaPrintableArea.java66
-rw-r--r--javax/print/attribute/standard/MediaSize.java255
-rw-r--r--javax/print/attribute/standard/MediaSizeName.java216
-rw-r--r--javax/print/attribute/standard/MediaTray.java37
-rw-r--r--javax/print/attribute/standard/MultipleDocumentHandling.java36
-rw-r--r--javax/print/attribute/standard/NumberOfDocuments.java10
-rw-r--r--javax/print/attribute/standard/NumberOfInterveningJobs.java12
-rw-r--r--javax/print/attribute/standard/NumberUp.java16
-rw-r--r--javax/print/attribute/standard/NumberUpSupported.java20
-rw-r--r--javax/print/attribute/standard/OrientationRequested.java40
-rw-r--r--javax/print/attribute/standard/OutputDeviceAssigned.java10
-rw-r--r--javax/print/attribute/standard/PDLOverrideSupported.java12
-rw-r--r--javax/print/attribute/standard/PageRanges.java28
-rw-r--r--javax/print/attribute/standard/PagesPerMinute.java14
-rw-r--r--javax/print/attribute/standard/PagesPerMinuteColor.java14
-rw-r--r--javax/print/attribute/standard/PresentationDirection.java50
-rw-r--r--javax/print/attribute/standard/PrintQuality.java28
-rw-r--r--javax/print/attribute/standard/PrinterInfo.java8
-rw-r--r--javax/print/attribute/standard/PrinterIsAcceptingJobs.java24
-rw-r--r--javax/print/attribute/standard/PrinterLocation.java8
-rw-r--r--javax/print/attribute/standard/PrinterMakeAndModel.java6
-rw-r--r--javax/print/attribute/standard/PrinterMessageFromOperator.java12
-rw-r--r--javax/print/attribute/standard/PrinterMoreInfo.java10
-rw-r--r--javax/print/attribute/standard/PrinterMoreInfoManufacturer.java20
-rw-r--r--javax/print/attribute/standard/PrinterName.java8
-rw-r--r--javax/print/attribute/standard/PrinterResolution.java12
-rw-r--r--javax/print/attribute/standard/PrinterState.java26
-rw-r--r--javax/print/attribute/standard/PrinterStateReason.java98
-rw-r--r--javax/print/attribute/standard/PrinterStateReasons.java60
-rw-r--r--javax/print/attribute/standard/PrinterURI.java16
-rw-r--r--javax/print/attribute/standard/QueuedJobCount.java14
-rw-r--r--javax/print/attribute/standard/ReferenceUriSchemesSupported.java30
-rw-r--r--javax/print/attribute/standard/RequestingUserName.java8
-rw-r--r--javax/print/attribute/standard/Severity.java18
-rw-r--r--javax/print/attribute/standard/SheetCollate.java16
-rw-r--r--javax/print/attribute/standard/Sides.java46
-rw-r--r--javax/print/event/PrintEvent.java8
-rw-r--r--javax/print/event/PrintJobAdapter.java34
-rw-r--r--javax/print/event/PrintJobAttributeEvent.java16
-rw-r--r--javax/print/event/PrintJobAttributeListener.java8
-rw-r--r--javax/print/event/PrintJobEvent.java30
-rw-r--r--javax/print/event/PrintJobListener.java34
-rw-r--r--javax/print/event/PrintServiceAttributeEvent.java14
-rw-r--r--javax/print/event/PrintServiceAttributeListener.java8
-rw-r--r--javax/rmi/CORBA/ClassDesc.java6
-rw-r--r--javax/rmi/CORBA/PortableRemoteObjectDelegate.java26
-rw-r--r--javax/rmi/CORBA/Stub.java14
-rw-r--r--javax/rmi/CORBA/StubDelegate.java8
-rw-r--r--javax/rmi/CORBA/Tie.java18
-rw-r--r--javax/rmi/CORBA/Util.java38
-rw-r--r--javax/rmi/CORBA/UtilDelegate.java26
-rw-r--r--javax/rmi/CORBA/ValueHandler.java26
-rw-r--r--javax/rmi/CORBA/ValueHandlerMultiFormat.java12
-rw-r--r--javax/rmi/PortableRemoteObject.java38
-rw-r--r--javax/rmi/ssl/SslRMIClientSocketFactory.java26
-rw-r--r--javax/rmi/ssl/SslRMIServerSocketFactory.java50
-rw-r--r--javax/security/auth/Subject.java2
-rw-r--r--javax/security/auth/callback/ChoiceCallback.java18
-rw-r--r--javax/security/auth/callback/ConfirmationCallback.java76
-rw-r--r--javax/security/auth/callback/NameCallback.java4
-rw-r--r--javax/security/auth/callback/PasswordCallback.java12
-rw-r--r--javax/security/auth/callback/TextInputCallback.java4
-rw-r--r--javax/security/auth/callback/TextOutputCallback.java2
-rw-r--r--javax/security/auth/kerberos/DelegationPermission.java4
-rw-r--r--javax/security/auth/kerberos/KerberosKey.java2
-rw-r--r--javax/security/auth/kerberos/KerberosPrincipal.java4
-rw-r--r--javax/security/auth/kerberos/ServicePermission.java8
-rw-r--r--javax/security/auth/login/AccountNotFoundException.java2
-rw-r--r--javax/security/auth/login/AppConfigurationEntry.java2
-rw-r--r--javax/security/auth/login/LoginContext.java6
-rw-r--r--javax/security/sasl/Sasl.java2
-rw-r--r--javax/sound/midi/ControllerEventListener.java4
-rw-r--r--javax/sound/midi/Instrument.java16
-rw-r--r--javax/sound/midi/InvalidMidiDataException.java6
-rw-r--r--javax/sound/midi/MetaEventListener.java4
-rw-r--r--javax/sound/midi/MetaMessage.java40
-rw-r--r--javax/sound/midi/MidiChannel.java100
-rw-r--r--javax/sound/midi/MidiDevice.java68
-rw-r--r--javax/sound/midi/MidiEvent.java18
-rw-r--r--javax/sound/midi/MidiFileFormat.java48
-rw-r--r--javax/sound/midi/MidiMessage.java34
-rw-r--r--javax/sound/midi/MidiSystem.java125
-rw-r--r--javax/sound/midi/MidiUnavailableException.java6
-rw-r--r--javax/sound/midi/Patch.java14
-rw-r--r--javax/sound/midi/Receiver.java6
-rw-r--r--javax/sound/midi/Sequence.java80
-rw-r--r--javax/sound/midi/Sequencer.java168
-rw-r--r--javax/sound/midi/ShortMessage.java144
-rw-r--r--javax/sound/midi/Soundbank.java30
-rw-r--r--javax/sound/midi/SoundbankResource.java24
-rw-r--r--javax/sound/midi/Synthesizer.java62
-rw-r--r--javax/sound/midi/SysexMessage.java27
-rw-r--r--javax/sound/midi/Track.java35
-rw-r--r--javax/sound/midi/Transmitter.java10
-rw-r--r--javax/sound/midi/VoiceStatus.java12
-rw-r--r--javax/sound/midi/spi/MidiDeviceProvider.java18
-rw-r--r--javax/sound/midi/spi/MidiFileReader.java28
-rw-r--r--javax/sound/midi/spi/MidiFileWriter.java28
-rw-r--r--javax/sound/midi/spi/SoundbankReader.java24
-rw-r--r--javax/sound/sampled/AudioFileFormat.java8
-rw-r--r--javax/sound/sampled/AudioFormat.java30
-rw-r--r--javax/sound/sampled/AudioInputStream.java60
-rw-r--r--javax/sound/sampled/AudioPermission.java2
-rw-r--r--javax/sound/sampled/AudioSystem.java44
-rw-r--r--javax/sound/sampled/BooleanControl.java4
-rw-r--r--javax/sound/sampled/Clip.java2
-rw-r--r--javax/sound/sampled/CompoundControl.java6
-rw-r--r--javax/sound/sampled/DataLine.java14
-rw-r--r--javax/sound/sampled/EnumControl.java8
-rw-r--r--javax/sound/sampled/FloatControl.java12
-rw-r--r--javax/sound/sampled/Line.java2
-rw-r--r--javax/sound/sampled/LineEvent.java8
-rw-r--r--javax/sound/sampled/LineUnavailableException.java2
-rw-r--r--javax/sound/sampled/Mixer.java6
-rw-r--r--javax/sound/sampled/Port.java18
-rw-r--r--javax/sound/sampled/ReverbType.java12
-rw-r--r--javax/sound/sampled/UnsupportedAudioFileException.java2
-rw-r--r--javax/sound/sampled/spi/AudioFileReader.java14
-rw-r--r--javax/sound/sampled/spi/AudioFileWriter.java6
-rw-r--r--javax/sound/sampled/spi/FormatConversionProvider.java24
-rw-r--r--javax/sql/ConnectionEvent.java6
-rw-r--r--javax/sql/ConnectionEventListener.java6
-rw-r--r--javax/sql/ConnectionPoolDataSource.java6
-rw-r--r--javax/sql/DataSource.java6
-rw-r--r--javax/sql/PooledConnection.java6
-rw-r--r--javax/sql/RowSet.java6
-rw-r--r--javax/sql/RowSetEvent.java6
-rw-r--r--javax/sql/RowSetInternal.java6
-rw-r--r--javax/sql/RowSetListener.java6
-rw-r--r--javax/sql/RowSetMetaData.java6
-rw-r--r--javax/sql/RowSetReader.java6
-rw-r--r--javax/sql/RowSetWriter.java6
-rw-r--r--javax/sql/XAConnection.java4
-rw-r--r--javax/sql/XADataSource.java6
-rw-r--r--javax/swing/AbstractAction.java60
-rw-r--r--javax/swing/AbstractButton.java166
-rw-r--r--javax/swing/AbstractCellEditor.java16
-rw-r--r--javax/swing/AbstractListModel.java4
-rw-r--r--javax/swing/AbstractSpinnerModel.java4
-rw-r--r--javax/swing/Action.java38
-rw-r--r--javax/swing/BorderFactory.java2
-rw-r--r--javax/swing/BoundedRangeModel.java42
-rw-r--r--javax/swing/Box.java56
-rw-r--r--javax/swing/BoxLayout.java12
-rw-r--r--javax/swing/ButtonGroup.java16
-rw-r--r--javax/swing/ButtonModel.java14
-rw-r--r--javax/swing/CellEditor.java20
-rw-r--r--javax/swing/CellRendererPane.java2
-rw-r--r--javax/swing/ComboBoxModel.java8
-rw-r--r--javax/swing/ComponentInputMap.java10
-rw-r--r--javax/swing/DebugGraphics.java74
-rw-r--r--javax/swing/DefaultBoundedRangeModel.java10
-rw-r--r--javax/swing/DefaultButtonModel.java10
-rw-r--r--javax/swing/DefaultCellEditor.java134
-rw-r--r--javax/swing/DefaultComboBoxModel.java34
-rw-r--r--javax/swing/DefaultDesktopManager.java48
-rw-r--r--javax/swing/DefaultFocusManager.java20
-rw-r--r--javax/swing/DefaultListModel.java10
-rw-r--r--javax/swing/DefaultListSelectionModel.java126
-rw-r--r--javax/swing/DefaultSingleSelectionModel.java16
-rw-r--r--javax/swing/FocusManager.java6
-rw-r--r--javax/swing/GrayFilter.java6
-rw-r--r--javax/swing/Icon.java12
-rw-r--r--javax/swing/ImageIcon.java30
-rw-r--r--javax/swing/InputMap.java26
-rw-r--r--javax/swing/InternalFrameFocusTraversalPolicy.java2
-rw-r--r--javax/swing/JApplet.java4
-rw-r--r--javax/swing/JButton.java20
-rw-r--r--javax/swing/JCheckBox.java26
-rw-r--r--javax/swing/JCheckBoxMenuItem.java30
-rw-r--r--javax/swing/JComboBox.java54
-rw-r--r--javax/swing/JComponent.java280
-rw-r--r--javax/swing/JDesktopPane.java12
-rw-r--r--javax/swing/JDialog.java38
-rw-r--r--javax/swing/JEditorPane.java68
-rw-r--r--javax/swing/JFileChooser.java404
-rw-r--r--javax/swing/JFormattedTextField.java182
-rw-r--r--javax/swing/JFrame.java62
-rw-r--r--javax/swing/JInternalFrame.java244
-rw-r--r--javax/swing/JLabel.java152
-rw-r--r--javax/swing/JLayeredPane.java64
-rw-r--r--javax/swing/JList.java250
-rw-r--r--javax/swing/JMenu.java26
-rw-r--r--javax/swing/JMenuBar.java60
-rw-r--r--javax/swing/JMenuItem.java76
-rw-r--r--javax/swing/JOptionPane.java106
-rw-r--r--javax/swing/JPanel.java36
-rw-r--r--javax/swing/JPasswordField.java60
-rw-r--r--javax/swing/JPopupMenu.java38
-rw-r--r--javax/swing/JProgressBar.java278
-rw-r--r--javax/swing/JRadioButton.java41
-rw-r--r--javax/swing/JRadioButtonMenuItem.java16
-rw-r--r--javax/swing/JRootPane.java26
-rw-r--r--javax/swing/JScrollBar.java76
-rw-r--r--javax/swing/JScrollPane.java72
-rw-r--r--javax/swing/JSeparator.java28
-rw-r--r--javax/swing/JSlider.java228
-rw-r--r--javax/swing/JSpinner.java96
-rw-r--r--javax/swing/JSplitPane.java56
-rw-r--r--javax/swing/JTabbedPane.java120
-rw-r--r--javax/swing/JTable.java578
-rw-r--r--javax/swing/JTextArea.java60
-rw-r--r--javax/swing/JTextField.java34
-rw-r--r--javax/swing/JTextPane.java4
-rw-r--r--javax/swing/JToggleButton.java61
-rw-r--r--javax/swing/JToolBar.java168
-rw-r--r--javax/swing/JToolTip.java18
-rw-r--r--javax/swing/JTree.java572
-rw-r--r--javax/swing/JViewport.java32
-rw-r--r--javax/swing/JWindow.java2
-rw-r--r--javax/swing/KeyStroke.java28
-rw-r--r--javax/swing/KeyboardManager.java88
-rw-r--r--javax/swing/LayoutFocusTraversalPolicy.java16
-rw-r--r--javax/swing/ListCellRenderer.java2
-rw-r--r--javax/swing/ListSelectionModel.java156
-rw-r--r--javax/swing/LookAndFeel.java114
-rw-r--r--javax/swing/MenuSelectionManager.java112
-rw-r--r--javax/swing/OverlayLayout.java4
-rw-r--r--javax/swing/Popup.java16
-rw-r--r--javax/swing/PopupFactory.java2
-rw-r--r--javax/swing/ProgressMonitor.java38
-rw-r--r--javax/swing/ProgressMonitorInputStream.java46
-rw-r--r--javax/swing/Renderer.java2
-rw-r--r--javax/swing/RepaintManager.java42
-rw-r--r--javax/swing/ScrollPaneLayout.java64
-rw-r--r--javax/swing/Scrollable.java24
-rw-r--r--javax/swing/SingleSelectionModel.java16
-rw-r--r--javax/swing/SizeRequirements.java2
-rw-r--r--javax/swing/SizeSequence.java48
-rw-r--r--javax/swing/SortingFocusTraversalPolicy.java48
-rw-r--r--javax/swing/SpinnerDateModel.java114
-rw-r--r--javax/swing/SpinnerListModel.java18
-rw-r--r--javax/swing/SpinnerModel.java4
-rw-r--r--javax/swing/SpinnerNumberModel.java60
-rw-r--r--javax/swing/Spring.java14
-rw-r--r--javax/swing/SpringLayout.java64
-rw-r--r--javax/swing/SwingConstants.java11
-rw-r--r--javax/swing/SwingUtilities.java158
-rw-r--r--javax/swing/Timer.java32
-rw-r--r--javax/swing/ToolTipManager.java32
-rw-r--r--javax/swing/TransferHandler.java62
-rw-r--r--javax/swing/UIDefaults.java74
-rw-r--r--javax/swing/UIManager.java294
-rw-r--r--javax/swing/UnsupportedLookAndFeelException.java6
-rw-r--r--javax/swing/ViewportLayout.java32
-rw-r--r--javax/swing/WindowConstants.java10
-rw-r--r--javax/swing/border/AbstractBorder.java44
-rw-r--r--javax/swing/border/BevelBorder.java35
-rw-r--r--javax/swing/border/Border.java6
-rw-r--r--javax/swing/border/CompoundBorder.java10
-rw-r--r--javax/swing/border/EmptyBorder.java6
-rw-r--r--javax/swing/border/EtchedBorder.java42
-rw-r--r--javax/swing/border/LineBorder.java56
-rw-r--r--javax/swing/border/MatteBorder.java54
-rw-r--r--javax/swing/border/SoftBevelBorder.java6
-rw-r--r--javax/swing/border/TitledBorder.java38
-rw-r--r--javax/swing/colorchooser/AbstractColorChooserPanel.java14
-rw-r--r--javax/swing/colorchooser/ColorChooserComponentFactory.java2
-rw-r--r--javax/swing/colorchooser/ColorSelectionModel.java14
-rw-r--r--javax/swing/colorchooser/DefaultColorSelectionModel.java4
-rw-r--r--javax/swing/colorchooser/DefaultHSBChooserPanel.java234
-rw-r--r--javax/swing/colorchooser/DefaultRGBChooserPanel.java28
-rw-r--r--javax/swing/colorchooser/DefaultSwatchChooserPanel.java116
-rw-r--r--javax/swing/event/AncestorEvent.java4
-rw-r--r--javax/swing/event/AncestorListener.java30
-rw-r--r--javax/swing/event/CaretEvent.java6
-rw-r--r--javax/swing/event/CaretListener.java10
-rw-r--r--javax/swing/event/CellEditorListener.java22
-rw-r--r--javax/swing/event/ChangeEvent.java12
-rw-r--r--javax/swing/event/ChangeListener.java12
-rw-r--r--javax/swing/event/DocumentEvent.java2
-rw-r--r--javax/swing/event/DocumentListener.java30
-rw-r--r--javax/swing/event/EventListenerList.java10
-rw-r--r--javax/swing/event/HyperlinkEvent.java20
-rw-r--r--javax/swing/event/HyperlinkListener.java10
-rw-r--r--javax/swing/event/InternalFrameAdapter.java2
-rw-r--r--javax/swing/event/InternalFrameEvent.java20
-rw-r--r--javax/swing/event/InternalFrameListener.java82
-rw-r--r--javax/swing/event/ListDataEvent.java42
-rw-r--r--javax/swing/event/ListDataListener.java12
-rw-r--r--javax/swing/event/ListSelectionEvent.java50
-rw-r--r--javax/swing/event/ListSelectionListener.java8
-rw-r--r--javax/swing/event/MenuDragMouseEvent.java16
-rw-r--r--javax/swing/event/MenuDragMouseListener.java40
-rw-r--r--javax/swing/event/MenuEvent.java4
-rw-r--r--javax/swing/event/MenuKeyEvent.java14
-rw-r--r--javax/swing/event/MenuKeyListener.java30
-rw-r--r--javax/swing/event/MenuListener.java30
-rw-r--r--javax/swing/event/MouseInputListener.java2
-rw-r--r--javax/swing/event/PopupMenuEvent.java14
-rw-r--r--javax/swing/event/PopupMenuListener.java30
-rw-r--r--javax/swing/event/SwingPropertyChangeSupport.java8
-rw-r--r--javax/swing/event/TableColumnModelEvent.java14
-rw-r--r--javax/swing/event/TableColumnModelListener.java20
-rw-r--r--javax/swing/event/TableModelEvent.java86
-rw-r--r--javax/swing/event/TableModelListener.java12
-rw-r--r--javax/swing/event/TreeExpansionEvent.java10
-rw-r--r--javax/swing/event/TreeExpansionListener.java2
-rw-r--r--javax/swing/event/TreeModelEvent.java48
-rw-r--r--javax/swing/event/TreeModelListener.java40
-rw-r--r--javax/swing/event/TreeSelectionEvent.java112
-rw-r--r--javax/swing/event/TreeSelectionListener.java8
-rw-r--r--javax/swing/event/TreeWillExpandListener.java6
-rw-r--r--javax/swing/event/UndoableEditEvent.java10
-rw-r--r--javax/swing/filechooser/FileFilter.java18
-rw-r--r--javax/swing/filechooser/FileSystemView.java46
-rw-r--r--javax/swing/filechooser/FileView.java56
-rw-r--r--javax/swing/filechooser/UnixFileSystemView.java42
-rw-r--r--javax/swing/plaf/BorderUIResource.java145
-rw-r--r--javax/swing/plaf/ColorChooserUI.java1
-rw-r--r--javax/swing/plaf/ColorUIResource.java4
-rw-r--r--javax/swing/plaf/ComboBoxUI.java6
-rw-r--r--javax/swing/plaf/ComponentInputMapUIResource.java1
-rw-r--r--javax/swing/plaf/ComponentUI.java28
-rw-r--r--javax/swing/plaf/FileChooserUI.java2
-rw-r--r--javax/swing/plaf/IconUIResource.java2
-rw-r--r--javax/swing/plaf/SplitPaneUI.java4
-rw-r--r--javax/swing/plaf/TabbedPaneUI.java7
-rw-r--r--javax/swing/plaf/TextUI.java10
-rw-r--r--javax/swing/plaf/UIResource.java12
-rw-r--r--javax/swing/plaf/basic/BasicArrowButton.java72
-rw-r--r--javax/swing/plaf/basic/BasicBorders.java102
-rw-r--r--javax/swing/plaf/basic/BasicButtonListener.java50
-rw-r--r--javax/swing/plaf/basic/BasicButtonUI.java64
-rw-r--r--javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicCheckBoxUI.java16
-rw-r--r--javax/swing/plaf/basic/BasicColorChooserUI.java58
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxEditor.java6
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxRenderer.java8
-rw-r--r--javax/swing/plaf/basic/BasicComboBoxUI.java86
-rw-r--r--javax/swing/plaf/basic/BasicComboPopup.java28
-rw-r--r--javax/swing/plaf/basic/BasicDesktopIconUI.java72
-rw-r--r--javax/swing/plaf/basic/BasicDesktopPaneUI.java28
-rw-r--r--javax/swing/plaf/basic/BasicDirectoryModel.java25
-rw-r--r--javax/swing/plaf/basic/BasicEditorPaneUI.java2
-rw-r--r--javax/swing/plaf/basic/BasicFileChooserUI.java152
-rw-r--r--javax/swing/plaf/basic/BasicFormattedTextFieldUI.java2
-rw-r--r--javax/swing/plaf/basic/BasicGraphicsUtils.java32
-rw-r--r--javax/swing/plaf/basic/BasicHTML.java2
-rw-r--r--javax/swing/plaf/basic/BasicIconFactory.java64
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameTitlePane.java34
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameUI.java74
-rw-r--r--javax/swing/plaf/basic/BasicLabelUI.java28
-rw-r--r--javax/swing/plaf/basic/BasicListUI.java74
-rw-r--r--javax/swing/plaf/basic/BasicLookAndFeel.java164
-rw-r--r--javax/swing/plaf/basic/BasicMenuBarUI.java22
-rw-r--r--javax/swing/plaf/basic/BasicMenuItemUI.java102
-rw-r--r--javax/swing/plaf/basic/BasicMenuUI.java8
-rw-r--r--javax/swing/plaf/basic/BasicOptionPaneUI.java370
-rw-r--r--javax/swing/plaf/basic/BasicPanelUI.java22
-rw-r--r--javax/swing/plaf/basic/BasicPasswordFieldUI.java2
-rw-r--r--javax/swing/plaf/basic/BasicPopupMenuUI.java34
-rw-r--r--javax/swing/plaf/basic/BasicProgressBarUI.java84
-rw-r--r--javax/swing/plaf/basic/BasicRadioButtonUI.java26
-rw-r--r--javax/swing/plaf/basic/BasicRootPaneUI.java2
-rw-r--r--javax/swing/plaf/basic/BasicScrollBarUI.java168
-rw-r--r--javax/swing/plaf/basic/BasicScrollPaneUI.java132
-rw-r--r--javax/swing/plaf/basic/BasicSeparatorUI.java38
-rw-r--r--javax/swing/plaf/basic/BasicSliderUI.java136
-rw-r--r--javax/swing/plaf/basic/BasicSpinnerUI.java124
-rw-r--r--javax/swing/plaf/basic/BasicSplitPaneDivider.java320
-rw-r--r--javax/swing/plaf/basic/BasicSplitPaneUI.java50
-rw-r--r--javax/swing/plaf/basic/BasicTabbedPaneUI.java358
-rw-r--r--javax/swing/plaf/basic/BasicTableHeaderUI.java66
-rw-r--r--javax/swing/plaf/basic/BasicTableUI.java286
-rw-r--r--javax/swing/plaf/basic/BasicTextAreaUI.java10
-rw-r--r--javax/swing/plaf/basic/BasicTextFieldUI.java4
-rw-r--r--javax/swing/plaf/basic/BasicTextPaneUI.java2
-rw-r--r--javax/swing/plaf/basic/BasicTextUI.java34
-rw-r--r--javax/swing/plaf/basic/BasicToggleButtonUI.java26
-rw-r--r--javax/swing/plaf/basic/BasicToolBarUI.java198
-rw-r--r--javax/swing/plaf/basic/BasicToolTipUI.java8
-rw-r--r--javax/swing/plaf/basic/BasicTreeUI.java436
-rw-r--r--javax/swing/plaf/basic/BasicViewportUI.java6
-rw-r--r--javax/swing/plaf/metal/DefaultMetalTheme.java60
-rw-r--r--javax/swing/plaf/metal/MetalBorders.java334
-rw-r--r--javax/swing/plaf/metal/MetalButtonListener.java12
-rw-r--r--javax/swing/plaf/metal/MetalButtonUI.java36
-rw-r--r--javax/swing/plaf/metal/MetalCheckBoxIcon.java2
-rw-r--r--javax/swing/plaf/metal/MetalCheckBoxUI.java5
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxButton.java58
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxEditor.java16
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxIcon.java14
-rw-r--r--javax/swing/plaf/metal/MetalComboBoxUI.java80
-rw-r--r--javax/swing/plaf/metal/MetalFileChooserUI.java598
-rw-r--r--javax/swing/plaf/metal/MetalIconFactory.java1018
-rw-r--r--javax/swing/plaf/metal/MetalInternalFrameTitlePane.java109
-rw-r--r--javax/swing/plaf/metal/MetalInternalFrameUI.java36
-rw-r--r--javax/swing/plaf/metal/MetalLabelUI.java6
-rw-r--r--javax/swing/plaf/metal/MetalLookAndFeel.java186
-rw-r--r--javax/swing/plaf/metal/MetalMenuBarUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalProgressBarUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalRadioButtonUI.java50
-rw-r--r--javax/swing/plaf/metal/MetalRootPaneUI.java56
-rw-r--r--javax/swing/plaf/metal/MetalScrollBarUI.java153
-rw-r--r--javax/swing/plaf/metal/MetalScrollButton.java134
-rw-r--r--javax/swing/plaf/metal/MetalScrollPaneUI.java36
-rw-r--r--javax/swing/plaf/metal/MetalSeparatorUI.java12
-rw-r--r--javax/swing/plaf/metal/MetalSliderUI.java136
-rw-r--r--javax/swing/plaf/metal/MetalSplitPaneDivider.java6
-rw-r--r--javax/swing/plaf/metal/MetalSplitPaneUI.java2
-rw-r--r--javax/swing/plaf/metal/MetalTabbedPaneUI.java146
-rw-r--r--javax/swing/plaf/metal/MetalTextFieldUI.java4
-rw-r--r--javax/swing/plaf/metal/MetalTheme.java158
-rw-r--r--javax/swing/plaf/metal/MetalToggleButtonUI.java28
-rw-r--r--javax/swing/plaf/metal/MetalToolBarUI.java62
-rw-r--r--javax/swing/plaf/metal/MetalToolTipUI.java76
-rw-r--r--javax/swing/plaf/metal/MetalTreeUI.java68
-rw-r--r--javax/swing/plaf/metal/MetalUtils.java8
-rw-r--r--javax/swing/plaf/metal/OceanTheme.java10
-rw-r--r--javax/swing/plaf/multi/MultiButtonUI.java158
-rw-r--r--javax/swing/plaf/multi/MultiColorChooserUI.java162
-rw-r--r--javax/swing/plaf/multi/MultiComboBoxUI.java208
-rw-r--r--javax/swing/plaf/multi/MultiDesktopIconUI.java162
-rw-r--r--javax/swing/plaf/multi/MultiDesktopPaneUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiFileChooserUI.java248
-rw-r--r--javax/swing/plaf/multi/MultiInternalFrameUI.java164
-rw-r--r--javax/swing/plaf/multi/MultiLabelUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiListUI.java214
-rw-r--r--javax/swing/plaf/multi/MultiLookAndFeel.java76
-rw-r--r--javax/swing/plaf/multi/MultiMenuBarUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiMenuItemUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiOptionPaneUI.java182
-rw-r--r--javax/swing/plaf/multi/MultiPanelUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiPopupMenuUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiProgressBarUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiRootPaneUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiScrollBarUI.java158
-rw-r--r--javax/swing/plaf/multi/MultiScrollPaneUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiSeparatorUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiSliderUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiSpinnerUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiSplitPaneUI.java236
-rw-r--r--javax/swing/plaf/multi/MultiTabbedPaneUI.java218
-rw-r--r--javax/swing/plaf/multi/MultiTableHeaderUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiTableUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiTextUI.java310
-rw-r--r--javax/swing/plaf/multi/MultiToolBarUI.java160
-rw-r--r--javax/swing/plaf/multi/MultiToolTipUI.java158
-rw-r--r--javax/swing/plaf/multi/MultiTreeUI.java324
-rw-r--r--javax/swing/plaf/multi/MultiViewportUI.java160
-rw-r--r--javax/swing/plaf/synth/SynthGraphicsUtils.java6
-rw-r--r--javax/swing/plaf/synth/SynthLookAndFeel.java2
-rw-r--r--javax/swing/plaf/synth/SynthPainter.java226
-rw-r--r--javax/swing/table/AbstractTableModel.java52
-rw-r--r--javax/swing/table/DefaultTableCellRenderer.java10
-rw-r--r--javax/swing/table/DefaultTableColumnModel.java210
-rw-r--r--javax/swing/table/DefaultTableModel.java232
-rw-r--r--javax/swing/table/JTableHeader.java206
-rw-r--r--javax/swing/table/TableCellEditor.java4
-rw-r--r--javax/swing/table/TableCellRenderer.java4
-rw-r--r--javax/swing/table/TableColumn.java192
-rw-r--r--javax/swing/table/TableColumnModel.java64
-rw-r--r--javax/swing/table/TableModel.java38
-rw-r--r--javax/swing/text/AbstractDocument.java106
-rw-r--r--javax/swing/text/AbstractWriter.java84
-rw-r--r--javax/swing/text/AsyncBoxView.java20
-rw-r--r--javax/swing/text/AttributeSet.java6
-rw-r--r--javax/swing/text/BoxView.java18
-rw-r--r--javax/swing/text/Caret.java16
-rw-r--r--javax/swing/text/ComponentView.java4
-rw-r--r--javax/swing/text/CompositeView.java22
-rw-r--r--javax/swing/text/DefaultCaret.java202
-rw-r--r--javax/swing/text/DefaultEditorKit.java128
-rw-r--r--javax/swing/text/DefaultFormatter.java16
-rw-r--r--javax/swing/text/DefaultFormatterFactory.java62
-rw-r--r--javax/swing/text/DefaultHighlighter.java168
-rw-r--r--javax/swing/text/DefaultStyledDocument.java136
-rw-r--r--javax/swing/text/DocumentFilter.java16
-rw-r--r--javax/swing/text/EditorKit.java2
-rw-r--r--javax/swing/text/Element.java2
-rw-r--r--javax/swing/text/ElementIterator.java10
-rw-r--r--javax/swing/text/EmptyAttributeSet.java2
-rw-r--r--javax/swing/text/FieldView.java68
-rw-r--r--javax/swing/text/FlowView.java6
-rw-r--r--javax/swing/text/GapContent.java76
-rw-r--r--javax/swing/text/GlyphView.java18
-rw-r--r--javax/swing/text/Highlighter.java3
-rw-r--r--javax/swing/text/InternationalFormatter.java2
-rw-r--r--javax/swing/text/JTextComponent.java126
-rw-r--r--javax/swing/text/Keymap.java28
-rw-r--r--javax/swing/text/LayeredHighlighter.java6
-rw-r--r--javax/swing/text/LayoutQueue.java32
-rw-r--r--javax/swing/text/MaskFormatter.java114
-rw-r--r--javax/swing/text/MutableAttributeSet.java42
-rw-r--r--javax/swing/text/NavigationFilter.java6
-rw-r--r--javax/swing/text/NumberFormatter.java16
-rw-r--r--javax/swing/text/ParagraphView.java2
-rw-r--r--javax/swing/text/PasswordView.java18
-rw-r--r--javax/swing/text/PlainDocument.java16
-rw-r--r--javax/swing/text/PlainView.java77
-rw-r--r--javax/swing/text/Position.java6
-rw-r--r--javax/swing/text/Segment.java108
-rw-r--r--javax/swing/text/SimpleAttributeSet.java114
-rw-r--r--javax/swing/text/StringContent.java79
-rw-r--r--javax/swing/text/Style.java2
-rw-r--r--javax/swing/text/StyleConstants.java602
-rw-r--r--javax/swing/text/StyleContext.java88
-rw-r--r--javax/swing/text/StyledDocument.java4
-rw-r--r--javax/swing/text/StyledEditorKit.java82
-rw-r--r--javax/swing/text/TabExpander.java2
-rw-r--r--javax/swing/text/TabSet.java60
-rw-r--r--javax/swing/text/TabStop.java60
-rw-r--r--javax/swing/text/TabableView.java2
-rw-r--r--javax/swing/text/TableView.java4
-rw-r--r--javax/swing/text/TextAction.java52
-rw-r--r--javax/swing/text/Utilities.java116
-rw-r--r--javax/swing/text/View.java36
-rw-r--r--javax/swing/text/ViewFactory.java2
-rw-r--r--javax/swing/text/WrappedPlainView.java202
-rw-r--r--javax/swing/text/html/BRView.java4
-rw-r--r--javax/swing/text/html/BlockView.java70
-rw-r--r--javax/swing/text/html/CSS.java4
-rw-r--r--javax/swing/text/html/CSSBorder.java2
-rw-r--r--javax/swing/text/html/CSSParser.java106
-rw-r--r--javax/swing/text/html/FormView.java8
-rw-r--r--javax/swing/text/html/HRuleView.java28
-rw-r--r--javax/swing/text/html/HTMLDocument.java378
-rw-r--r--javax/swing/text/html/HTMLEditorKit.java264
-rw-r--r--javax/swing/text/html/HTMLWriter.java48
-rw-r--r--javax/swing/text/html/ImageView.java64
-rw-r--r--javax/swing/text/html/InlineView.java2
-rw-r--r--javax/swing/text/html/ListView.java2
-rw-r--r--javax/swing/text/html/MinimalHTMLWriter.java164
-rw-r--r--javax/swing/text/html/MultiAttributeSet.java2
-rw-r--r--javax/swing/text/html/MultiStyle.java2
-rw-r--r--javax/swing/text/html/ParagraphView.java2
-rw-r--r--javax/swing/text/html/StyleSheet.java232
-rw-r--r--javax/swing/text/html/TableView.java2
-rw-r--r--javax/swing/text/html/ViewAttributeSet.java2
-rw-r--r--javax/swing/text/html/parser/Entity.java8
-rw-r--r--javax/swing/text/html/parser/Parser.java2
-rw-r--r--javax/swing/text/rtf/RTFParser.java2
-rw-r--r--javax/swing/text/rtf/RTFScanner.java2
-rw-r--r--javax/swing/tree/AbstractLayoutCache.java90
-rw-r--r--javax/swing/tree/DefaultMutableTreeNode.java138
-rw-r--r--javax/swing/tree/DefaultTreeCellEditor.java148
-rw-r--r--javax/swing/tree/DefaultTreeCellRenderer.java190
-rw-r--r--javax/swing/tree/DefaultTreeModel.java128
-rw-r--r--javax/swing/tree/DefaultTreeSelectionModel.java112
-rw-r--r--javax/swing/tree/ExpandVetoException.java12
-rw-r--r--javax/swing/tree/FixedHeightLayoutCache.java150
-rw-r--r--javax/swing/tree/MutableTreeNode.java4
-rw-r--r--javax/swing/tree/RowMapper.java4
-rw-r--r--javax/swing/tree/TreeCellEditor.java12
-rw-r--r--javax/swing/tree/TreeCellRenderer.java8
-rw-r--r--javax/swing/tree/TreeNode.java35
-rw-r--r--javax/swing/tree/TreePath.java62
-rw-r--r--javax/swing/tree/TreeSelectionModel.java2
-rw-r--r--javax/swing/tree/VariableHeightLayoutCache.java122
-rw-r--r--javax/swing/undo/AbstractUndoableEdit.java24
-rw-r--r--javax/swing/undo/CompoundEdit.java14
-rw-r--r--javax/swing/undo/StateEdit.java18
-rw-r--r--javax/swing/undo/UndoManager.java6
-rw-r--r--javax/swing/undo/UndoableEdit.java16
-rw-r--r--javax/tools/FileObject.java2
-rw-r--r--javax/transaction/HeuristicCommitException.java4
-rw-r--r--javax/transaction/HeuristicMixedException.java4
-rw-r--r--javax/transaction/HeuristicRollbackException.java4
-rw-r--r--javax/transaction/InvalidTransactionException.java4
-rw-r--r--javax/transaction/NotSupportedException.java4
-rw-r--r--javax/transaction/RollbackException.java4
-rw-r--r--javax/transaction/Status.java4
-rw-r--r--javax/transaction/Synchronization.java4
-rw-r--r--javax/transaction/SystemException.java4
-rw-r--r--javax/transaction/Transaction.java4
-rw-r--r--javax/transaction/TransactionManager.java4
-rw-r--r--javax/transaction/TransactionRequiredException.java4
-rw-r--r--javax/transaction/TransactionRolledbackException.java4
-rw-r--r--javax/transaction/UserTransaction.java4
-rw-r--r--javax/transaction/xa/XAException.java4
-rw-r--r--javax/transaction/xa/XAResource.java6
-rw-r--r--javax/transaction/xa/Xid.java4
-rw-r--r--javax/xml/XMLConstants.java20
-rw-r--r--javax/xml/datatype/DatatypeConfigurationException.java6
-rw-r--r--javax/xml/datatype/DatatypeConstants.java74
-rw-r--r--javax/xml/datatype/DatatypeFactory.java6
-rw-r--r--javax/xml/datatype/Duration.java20
-rw-r--r--javax/xml/datatype/XMLGregorianCalendar.java4
-rw-r--r--javax/xml/namespace/NamespaceContext.java4
-rw-r--r--javax/xml/namespace/QName.java34
-rw-r--r--javax/xml/parsers/DocumentBuilder.java16
-rw-r--r--javax/xml/parsers/DocumentBuilderFactory.java14
-rw-r--r--javax/xml/parsers/FactoryConfigurationError.java4
-rw-r--r--javax/xml/parsers/ParserConfigurationException.java4
-rw-r--r--javax/xml/parsers/SAXParser.java26
-rw-r--r--javax/xml/parsers/SAXParserFactory.java10
-rw-r--r--javax/xml/stream/EventFilter.java5
-rw-r--r--javax/xml/stream/FactoryConfigurationError.java5
-rw-r--r--javax/xml/stream/Location.java5
-rw-r--r--javax/xml/stream/StreamFilter.java5
-rw-r--r--javax/xml/stream/XMLEventFactory.java9
-rw-r--r--javax/xml/stream/XMLEventReader.java5
-rw-r--r--javax/xml/stream/XMLEventWriter.java5
-rw-r--r--javax/xml/stream/XMLInputFactory.java7
-rw-r--r--javax/xml/stream/XMLOutputFactory.java7
-rw-r--r--javax/xml/stream/XMLReporter.java5
-rw-r--r--javax/xml/stream/XMLResolver.java3
-rw-r--r--javax/xml/stream/XMLStreamConstants.java5
-rw-r--r--javax/xml/stream/XMLStreamException.java5
-rw-r--r--javax/xml/stream/XMLStreamReader.java7
-rw-r--r--javax/xml/stream/XMLStreamWriter.java9
-rw-r--r--javax/xml/stream/events/Attribute.java5
-rw-r--r--javax/xml/stream/events/Characters.java7
-rw-r--r--javax/xml/stream/events/Comment.java5
-rw-r--r--javax/xml/stream/events/DTD.java5
-rw-r--r--javax/xml/stream/events/EndDocument.java3
-rw-r--r--javax/xml/stream/events/EndElement.java5
-rw-r--r--javax/xml/stream/events/EntityDeclaration.java3
-rw-r--r--javax/xml/stream/events/EntityReference.java3
-rw-r--r--javax/xml/stream/events/Namespace.java5
-rw-r--r--javax/xml/stream/events/NotationDeclaration.java5
-rw-r--r--javax/xml/stream/events/ProcessingInstruction.java5
-rw-r--r--javax/xml/stream/events/StartDocument.java5
-rw-r--r--javax/xml/stream/events/StartElement.java5
-rw-r--r--javax/xml/stream/events/XMLEvent.java7
-rw-r--r--javax/xml/stream/util/EventReaderDelegate.java3
-rw-r--r--javax/xml/stream/util/StreamReaderDelegate.java5
-rw-r--r--javax/xml/stream/util/XMLEventAllocator.java7
-rw-r--r--javax/xml/stream/util/XMLEventConsumer.java5
-rw-r--r--javax/xml/transform/ErrorListener.java2
-rw-r--r--javax/xml/transform/OutputKeys.java24
-rw-r--r--javax/xml/transform/Result.java4
-rw-r--r--javax/xml/transform/Source.java2
-rw-r--r--javax/xml/transform/SourceLocator.java4
-rw-r--r--javax/xml/transform/Templates.java4
-rw-r--r--javax/xml/transform/Transformer.java14
-rw-r--r--javax/xml/transform/TransformerConfigurationException.java4
-rw-r--r--javax/xml/transform/TransformerException.java4
-rw-r--r--javax/xml/transform/TransformerFactory.java28
-rw-r--r--javax/xml/transform/TransformerFactoryConfigurationError.java6
-rw-r--r--javax/xml/transform/URIResolver.java4
-rw-r--r--javax/xml/transform/dom/DOMLocator.java2
-rw-r--r--javax/xml/transform/dom/DOMResult.java6
-rw-r--r--javax/xml/transform/dom/DOMSource.java4
-rw-r--r--javax/xml/transform/sax/SAXResult.java6
-rw-r--r--javax/xml/transform/sax/SAXSource.java2
-rw-r--r--javax/xml/transform/sax/SAXTransformerFactory.java2
-rw-r--r--javax/xml/transform/sax/TemplatesHandler.java2
-rw-r--r--javax/xml/transform/sax/TransformerHandler.java6
-rw-r--r--javax/xml/transform/stream/StreamResult.java2
-rw-r--r--javax/xml/transform/stream/StreamSource.java2
-rw-r--r--javax/xml/validation/Schema.java4
-rw-r--r--javax/xml/validation/SchemaFactory.java22
-rw-r--r--javax/xml/validation/SchemaFactoryLoader.java4
-rw-r--r--javax/xml/validation/TypeInfoProvider.java4
-rw-r--r--javax/xml/validation/Validator.java12
-rw-r--r--javax/xml/validation/ValidatorHandler.java12
-rw-r--r--javax/xml/xpath/XPath.java4
-rw-r--r--javax/xml/xpath/XPathConstants.java12
-rw-r--r--javax/xml/xpath/XPathException.java4
-rw-r--r--javax/xml/xpath/XPathExpression.java2
-rw-r--r--javax/xml/xpath/XPathExpressionException.java2
-rw-r--r--javax/xml/xpath/XPathFactory.java6
-rw-r--r--javax/xml/xpath/XPathFactoryConfigurationException.java2
-rw-r--r--javax/xml/xpath/XPathFunction.java4
-rw-r--r--javax/xml/xpath/XPathFunctionException.java2
-rw-r--r--javax/xml/xpath/XPathFunctionResolver.java4
-rw-r--r--javax/xml/xpath/XPathVariableResolver.java4
979 files changed, 22809 insertions, 22964 deletions
diff --git a/javax/accessibility/AccessibleExtendedText.java b/javax/accessibility/AccessibleExtendedText.java
index f40fa0fd2..026cd3a7d 100644
--- a/javax/accessibility/AccessibleExtendedText.java
+++ b/javax/accessibility/AccessibleExtendedText.java
@@ -56,7 +56,7 @@ public interface AccessibleExtendedText
/**
* This constant indicates that the retrieved text should consist
- * of a run with identical attributes.
+ * of a run with identical attributes.
*/
int ATTRIBUTE_RUN = 5;
@@ -81,7 +81,7 @@ public interface AccessibleExtendedText
* parameter describes the type of sequence to return; it is one
* of the constants from {@link AccessibleText} or from this
* class.
- * @param part the type of the sequence to return
+ * @param part the type of the sequence to return
* @param index start of the sequence
*/
AccessibleTextSequence getTextSequenceAfter(int part, int index);
@@ -91,7 +91,7 @@ public interface AccessibleExtendedText
* parameter describes the type of sequence to return; it is one
* of the constants from {@link AccessibleText} or from this
* class.
- * @param part the type of the sequence to return
+ * @param part the type of the sequence to return
* @param index start of the sequence
*/
AccessibleTextSequence getTextSequenceAt(int part, int index);
@@ -101,7 +101,7 @@ public interface AccessibleExtendedText
* parameter describes the type of sequence to return; it is one
* of the constants from {@link AccessibleText} or from this
* class.
- * @param part the type of the sequence to return
+ * @param part the type of the sequence to return
* @param index end of the sequence
*/
AccessibleTextSequence getTextSequenceBefore(int part, int index);
diff --git a/javax/accessibility/AccessibleRelation.java b/javax/accessibility/AccessibleRelation.java
index 3d515fd57..9e1b0da37 100644
--- a/javax/accessibility/AccessibleRelation.java
+++ b/javax/accessibility/AccessibleRelation.java
@@ -45,7 +45,7 @@ import java.util.Locale;
* summarizes all relations of the object. This strongly typed "enumeration"
* supports localized strings. If the constants of this class are not
* adequate, new ones may be added in a similar matter.
- *
+ *
* @author Eric Blake (ebb9@email.byu.edu)
* @since 1.2
* @status updated to 1.4
@@ -210,7 +210,7 @@ public class AccessibleRelation extends AccessibleBundle
/** An empty set of targets. */
private static final Object[] EMPTY_TARGETS = { };
-
+
static
{
// not constants in JDK
diff --git a/javax/accessibility/AccessibleRole.java b/javax/accessibility/AccessibleRole.java
index c568b4fe9..ff51dd449 100644
--- a/javax/accessibility/AccessibleRole.java
+++ b/javax/accessibility/AccessibleRole.java
@@ -44,7 +44,7 @@ import java.util.Locale;
* "table". This strongly typed "enumeration" supports localized strings. If
* the constants of this class are not adequate, new ones may be added in a
* similar matter, while avoiding a public constructor.
- *
+ *
* @author Eric Blake (ebb9@email.byu.edu)
* @since 1.2
* @status updated to 1.4
diff --git a/javax/accessibility/AccessibleState.java b/javax/accessibility/AccessibleState.java
index e4d00bd70..2d5106f36 100644
--- a/javax/accessibility/AccessibleState.java
+++ b/javax/accessibility/AccessibleState.java
@@ -46,7 +46,7 @@ import java.util.Locale;
* be "active" or "selected". This strongly typed "enumeration" supports
* localized strings. If the constants of this class are not adequate, new
* ones may be added in a similar matter, while avoiding a public constructor.
- *
+ *
* @author Eric Blake (ebb9@email.byu.edu)
* @since 1.2
* @status updated to 1.4
diff --git a/javax/activation/ActivationDataFlavor.java b/javax/activation/ActivationDataFlavor.java
index 07ba1a383..91812092e 100644
--- a/javax/activation/ActivationDataFlavor.java
+++ b/javax/activation/ActivationDataFlavor.java
@@ -125,7 +125,7 @@ public class ActivationDataFlavor extends DataFlavor
{
this.humanPresentableName = humanPresentableName;
}
-
+
public boolean equals(DataFlavor dataFlavor)
{
return (isMimeTypeEqual(dataFlavor) &&
diff --git a/javax/activation/CommandInfo.java b/javax/activation/CommandInfo.java
index d420c6ee1..c0b81e62c 100644
--- a/javax/activation/CommandInfo.java
+++ b/javax/activation/CommandInfo.java
@@ -54,7 +54,7 @@ public class CommandInfo
private final String verb;
private final String className;
-
+
/**
* Constructor.
* @param verb the command verb
@@ -65,7 +65,7 @@ public class CommandInfo
this.verb = verb;
this.className = className;
}
-
+
/**
* Returns the command verb.
*/
@@ -73,7 +73,7 @@ public class CommandInfo
{
return verb;
}
-
+
/**
* Returns the command class name.
*/
@@ -81,7 +81,7 @@ public class CommandInfo
{
return className;
}
-
+
/**
* Returns the instantiated bean.
* If the bean implements <code>CommandObject</code>, its
@@ -112,6 +112,5 @@ public class CommandInfo
}
return object;
}
-
-}
+}
diff --git a/javax/activation/CommandMap.java b/javax/activation/CommandMap.java
index fd749612a..dbe80a952 100644
--- a/javax/activation/CommandMap.java
+++ b/javax/activation/CommandMap.java
@@ -39,7 +39,7 @@ package javax.activation;
/**
* Registry of command objects available to the system.
- *
+ *
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
* @version 1.1
*/
@@ -47,9 +47,9 @@ public abstract class CommandMap
{
/* Class scope */
-
+
private static CommandMap defaultCommandMap;
-
+
/**
* Returns the default command map.
* This returns a MailcapCommandMap if no value has been set using
@@ -63,7 +63,7 @@ public abstract class CommandMap
}
return defaultCommandMap;
}
-
+
/**
* Sets the default command map.
* @param commandMap the new default command map
@@ -90,19 +90,19 @@ public abstract class CommandMap
}
/* Instance scope */
-
+
/**
* Returns the list of preferred commands for a MIME type.
* @param mimeType the MIME type
*/
public abstract CommandInfo[] getPreferredCommands(String mimeType);
-
+
/**
* Returns the complete list of commands for a MIME type.
* @param mimeType the MIME type
*/
public abstract CommandInfo[] getAllCommands(String mimeType);
-
+
/**
* Returns the command corresponding to the specified MIME type and
* command name.
@@ -110,13 +110,13 @@ public abstract class CommandMap
* @param cmdName the command name
*/
public abstract CommandInfo getCommand(String mimeType, String cmdName);
-
+
/**
* Returns a DataContentHandler corresponding to the MIME type.
* @param mimeType the MIME type
*/
public abstract DataContentHandler createDataContentHandler(String mimeType);
-
+
/**
* Get all the MIME types known to this command map.
* If the command map doesn't support this operation, null is returned.
@@ -127,7 +127,7 @@ public abstract class CommandMap
{
return null;
}
-
+
/**
* Get the preferred command list from a MIME Type. The actual semantics
* are determined by the implementation of the CommandMap.
@@ -147,7 +147,7 @@ public abstract class CommandMap
{
return getPreferredCommands(mimeType);
}
-
+
/**
* Get all the available commands for this type. This method
* should return all the possible commands for this MIME type.
@@ -166,7 +166,7 @@ public abstract class CommandMap
{
return getAllCommands(mimeType);
}
-
+
/**
* Get the default command corresponding to the MIME type.
* <p>
@@ -186,7 +186,7 @@ public abstract class CommandMap
{
return getCommand(mimeType, cmdName);
}
-
+
/**
* Locate a DataContentHandler that corresponds to the MIME type.
* The mechanism and semantics for determining this are determined
@@ -206,7 +206,6 @@ public abstract class CommandMap
DataSource ds)
{
return createDataContentHandler(mimeType);
- }
+ }
}
-
diff --git a/javax/activation/CommandObject.java b/javax/activation/CommandObject.java
index 594622dae..f89a976c7 100644
--- a/javax/activation/CommandObject.java
+++ b/javax/activation/CommandObject.java
@@ -57,6 +57,5 @@ public interface CommandObject
*/
void setCommandContext(String verb, DataHandler dh)
throws IOException;
-
-}
+}
diff --git a/javax/activation/DataContentHandler.java b/javax/activation/DataContentHandler.java
index f9507398b..be919c231 100644
--- a/javax/activation/DataContentHandler.java
+++ b/javax/activation/DataContentHandler.java
@@ -56,7 +56,7 @@ public interface DataContentHandler
* by preference.
*/
DataFlavor[] getTransferDataFlavors();
-
+
/**
* Returns an object representing the data to be transferred.
* @param df the flavor representing the requested type
@@ -64,14 +64,14 @@ public interface DataContentHandler
*/
Object getTransferData(DataFlavor df, DataSource ds)
throws UnsupportedFlavorException, IOException;
-
+
/**
* Returns an object representing the data in its most preferred form.
* @param ds the data source of the data to be converted
*/
Object getContent(DataSource ds)
throws IOException;
-
+
/**
* Writes the object as a stream of bytes.
* @param obj the object to convert
@@ -80,6 +80,5 @@ public interface DataContentHandler
*/
void writeTo(Object obj, String mimeType, OutputStream os)
throws IOException;
-
-}
+}
diff --git a/javax/activation/DataContentHandlerFactory.java b/javax/activation/DataContentHandlerFactory.java
index c1f2b78dd..815c1a9a4 100644
--- a/javax/activation/DataContentHandlerFactory.java
+++ b/javax/activation/DataContentHandlerFactory.java
@@ -51,6 +51,5 @@ public interface DataContentHandlerFactory
* @param mimeType the MIME type
*/
DataContentHandler createDataContentHandler(String mimeType);
-
-}
+}
diff --git a/javax/activation/DataHandler.java b/javax/activation/DataHandler.java
index de786f968..63ad0c418 100644
--- a/javax/activation/DataHandler.java
+++ b/javax/activation/DataHandler.java
@@ -59,7 +59,7 @@ public class DataHandler
private static final DataFlavor[] NO_FLAVORS = new DataFlavor[0];
private static DataContentHandlerFactory factory = null;
-
+
private final DataSource dataSource;
private DataSource objDataSource;
private Object object;
@@ -70,7 +70,7 @@ public class DataHandler
private DataContentHandler factoryDCH;
private DataContentHandlerFactory oldFactory;
private String shortType;
-
+
/**
* Constructor in which the data is read from a data source.
* @param ds the data source
@@ -80,7 +80,7 @@ public class DataHandler
dataSource = ds;
oldFactory = factory;
}
-
+
/**
* Constructor using a reified object representation.
* @param obj the object representation of the data
@@ -93,7 +93,7 @@ public class DataHandler
objectMimeType = mimeType;
oldFactory = factory;
}
-
+
/**
* Constructor in which the data is read from a URL.
* @param url the URL
@@ -103,7 +103,7 @@ public class DataHandler
dataSource = new URLDataSource(url);
oldFactory = factory;
}
-
+
/**
* Returns the data source from which data is read.
*/
@@ -119,7 +119,7 @@ public class DataHandler
}
return objDataSource;
}
-
+
/**
* Returns the name of the data object if created with a DataSource.
*/
@@ -131,7 +131,7 @@ public class DataHandler
}
return null;
}
-
+
/**
* Returns the MIME type of the data (with parameters).
*/
@@ -143,7 +143,7 @@ public class DataHandler
}
return objectMimeType;
}
-
+
/**
* Returns an input stream from which the data can be read.
*/
@@ -174,16 +174,16 @@ public class DataHandler
thread.start();
return new PipedInputStream(pos);
}
-
+
static class DataContentHandlerWriter
implements Runnable
{
-
+
DataContentHandler dch;
Object object;
String mimeType;
OutputStream out;
-
+
DataContentHandlerWriter(DataContentHandler dch, Object object,
String mimeType, OutputStream out)
{
@@ -192,7 +192,7 @@ public class DataHandler
this.mimeType = mimeType;
this.out = out;
}
-
+
public void run()
{
try
@@ -214,7 +214,7 @@ public class DataHandler
}
}
}
-
+
/**
* Writes the data as a byte stream.
* @param os the stream to write to
@@ -238,7 +238,7 @@ public class DataHandler
dch.writeTo(object, objectMimeType, os);
}
}
-
+
/**
* Returns an output stream that can be used to overwrite the underlying
* data, if the DataSource constructor was used.
@@ -252,7 +252,7 @@ public class DataHandler
}
return null;
}
-
+
/**
* Returns the data flavors in which this data is available.
*/
@@ -265,7 +265,7 @@ public class DataHandler
}
return transferFlavors;
}
-
+
/**
* Indicates whether the specified data flavor is supported for this
* data.
@@ -282,7 +282,7 @@ public class DataHandler
}
return false;
}
-
+
/**
* Returns an object representing the data to be transferred.
* @param flavor the requested data flavor
@@ -293,7 +293,7 @@ public class DataHandler
DataContentHandler dch = getDataContentHandler();
return dch.getTransferData(flavor, dataSource);
}
-
+
/**
* Sets the command map to be used by this data handler.
* Setting to null uses the default command map.
@@ -308,7 +308,7 @@ public class DataHandler
currentCommandMap = commandMap;
}
}
-
+
/**
* Returns the preferred commands for this type of data.
*/
@@ -336,7 +336,7 @@ public class DataHandler
CommandMap commandMap = getCommandMap();
return commandMap.getCommand(getShortType(), cmdName);
}
-
+
/**
* Returns the data as a reified object.
*/
@@ -346,7 +346,7 @@ public class DataHandler
DataContentHandler dch = getDataContentHandler();
return dch.getContent(getDataSource());
}
-
+
/**
* Returns the instantiated bean using the specified command.
* @param cmdInfo the command to instantiate the bean with
@@ -399,7 +399,7 @@ public class DataHandler
}
factory = newFactory;
}
-
+
/*
* Returns just the base part of the data's content-type, with no
* parameters.
@@ -421,7 +421,7 @@ public class DataHandler
}
return shortType;
}
-
+
/*
* Returns the command map for this handler.
*/
@@ -433,7 +433,7 @@ public class DataHandler
}
return CommandMap.getDefaultCommandMap();
}
-
+
/*
* Returns the DCH for this handler.
*/
@@ -477,6 +477,5 @@ public class DataHandler
}
return dataContentHandler;
}
-
-}
+}
diff --git a/javax/activation/DataHandlerDataSource.java b/javax/activation/DataHandlerDataSource.java
index 8dcd1a7a0..9781b3950 100644
--- a/javax/activation/DataHandlerDataSource.java
+++ b/javax/activation/DataHandlerDataSource.java
@@ -52,28 +52,28 @@ final class DataHandlerDataSource
{
final DataHandler dh;
-
+
DataHandlerDataSource(DataHandler dh)
{
this.dh = dh;
}
-
+
public String getContentType()
{
return dh.getContentType();
}
-
+
public InputStream getInputStream()
throws IOException
{
return dh.getInputStream();
}
-
+
public String getName()
{
return dh.getName();
}
-
+
public OutputStream getOutputStream()
throws IOException
{
@@ -81,4 +81,3 @@ final class DataHandlerDataSource
}
}
-
diff --git a/javax/activation/DataSource.java b/javax/activation/DataSource.java
index 0d7084367..c4da9d3af 100644
--- a/javax/activation/DataSource.java
+++ b/javax/activation/DataSource.java
@@ -49,28 +49,27 @@ import java.io.OutputStream;
*/
public interface DataSource
{
-
+
/**
* Returns an input stream from which the data can be read.
*/
InputStream getInputStream()
throws IOException;
-
+
/**
* Returns an output stream to which the data can be written.
*/
OutputStream getOutputStream()
throws IOException;
-
+
/**
* Returns the MIME content type of the data.
*/
String getContentType();
-
+
/**
* Returns the underlying name of this object.
*/
String getName();
-
-}
+}
diff --git a/javax/activation/DataSourceDataContentHandler.java b/javax/activation/DataSourceDataContentHandler.java
index 9706ac19a..8b16fd150 100644
--- a/javax/activation/DataSourceDataContentHandler.java
+++ b/javax/activation/DataSourceDataContentHandler.java
@@ -55,13 +55,13 @@ class DataSourceDataContentHandler
private DataSource ds;
private DataFlavor[] flavors;
private DataContentHandler dch;
-
+
public DataSourceDataContentHandler(DataContentHandler dch, DataSource ds)
{
this.ds = ds;
this.dch = dch;
}
-
+
public Object getContent(DataSource ds)
throws IOException
{
@@ -74,7 +74,7 @@ class DataSourceDataContentHandler
return ds.getInputStream();
}
}
-
+
public Object getTransferData(DataFlavor flavor, DataSource ds)
throws UnsupportedFlavorException, IOException
{
@@ -92,7 +92,7 @@ class DataSourceDataContentHandler
throw new UnsupportedFlavorException(flavor);
}
}
-
+
public DataFlavor[] getTransferDataFlavors()
{
if (flavors == null)
@@ -121,6 +121,5 @@ class DataSourceDataContentHandler
}
dch.writeTo(obj, mimeType, out);
}
-
-}
+}
diff --git a/javax/activation/FileDataSource.java b/javax/activation/FileDataSource.java
index 6e9035f13..72ef066d9 100644
--- a/javax/activation/FileDataSource.java
+++ b/javax/activation/FileDataSource.java
@@ -56,7 +56,7 @@ public class FileDataSource
private final File file;
private FileTypeMap typeMap;
-
+
/**
* Constructor.
* @param file the underlying file to use
@@ -65,7 +65,7 @@ public class FileDataSource
{
this.file = file;
}
-
+
/**
* Constructor.
* @param name the path to the underlying file to use
@@ -74,7 +74,7 @@ public class FileDataSource
{
this(new File(name));
}
-
+
public InputStream getInputStream()
throws IOException
{
@@ -86,7 +86,7 @@ public class FileDataSource
{
return new FileOutputStream(file);
}
-
+
public String getContentType()
{
if (typeMap == null)
@@ -96,12 +96,12 @@ public class FileDataSource
}
return typeMap.getContentType(file);
}
-
+
public String getName()
{
return file.getName();
}
-
+
/**
* Returns the underlying file.
*/
@@ -118,6 +118,5 @@ public class FileDataSource
{
typeMap = map;
}
-
-}
+}
diff --git a/javax/activation/FileTypeMap.java b/javax/activation/FileTypeMap.java
index 2ef7805bf..bbd088c1c 100644
--- a/javax/activation/FileTypeMap.java
+++ b/javax/activation/FileTypeMap.java
@@ -49,9 +49,9 @@ public abstract class FileTypeMap
{
/* Class scope */
-
+
private static FileTypeMap defaultMap;
-
+
/**
* Returns the system default file type map.
* If one has not been set, this returns a MimetypesFileTypeMap.
@@ -64,7 +64,7 @@ public abstract class FileTypeMap
}
return defaultMap;
}
-
+
/**
* Sets the default file type map.
* @param map the new file type map
@@ -91,13 +91,13 @@ public abstract class FileTypeMap
}
/* Instance scope */
-
+
/**
* Returns the content type of the specified file.
* @param file the file to classify
*/
public abstract String getContentType(File file);
-
+
/**
* Returns the content type of the specified file path.
* @param filename the path of the file to classify
@@ -105,4 +105,3 @@ public abstract class FileTypeMap
public abstract String getContentType(String filename);
}
-
diff --git a/javax/activation/MailcapCommandMap.java b/javax/activation/MailcapCommandMap.java
index cca5f04aa..48b1bbb08 100644
--- a/javax/activation/MailcapCommandMap.java
+++ b/javax/activation/MailcapCommandMap.java
@@ -82,8 +82,8 @@ public class MailcapCommandMap
private static boolean debug = false;
private static final int NORMAL = 0;
private static final int FALLBACK = 1;
-
- static
+
+ static
{
try
{
@@ -94,9 +94,9 @@ public class MailcapCommandMap
{
}
}
-
+
private Map<String,Map<String,List<String>>>[][] mailcaps;
-
+
/**
* Default constructor.
*/
@@ -104,7 +104,7 @@ public class MailcapCommandMap
{
init(null);
}
-
+
/**
* Constructor specifying a filename.
* @param fileName the name of the file to read mailcap entries from
@@ -132,7 +132,7 @@ public class MailcapCommandMap
}
}
}
-
+
/**
* Constructor specifying an input stream.
* @param is the input stream to read mailcap entries from
@@ -150,7 +150,7 @@ public class MailcapCommandMap
for (int j = 0; j < 2; j++)
{
mailcaps[i][j] =
- new LinkedHashMap<String,Map<String,List<String>>>();
+ new LinkedHashMap<String,Map<String,List<String>>>();
}
}
if (in != null)
@@ -167,7 +167,7 @@ public class MailcapCommandMap
{
}
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load HOME");
@@ -186,17 +186,17 @@ public class MailcapCommandMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load SYS");
}
try
{
- parseFile(SYS,
+ parseFile(SYS,
new CPStringBuilder(System.getProperty("java.home"))
- .append(File.separatorChar)
- .append("lib")
+ .append(File.separatorChar)
+ .append("lib")
.append(File.separatorChar)
.append("mailcap")
.toString());
@@ -204,7 +204,7 @@ public class MailcapCommandMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load JAR");
@@ -253,14 +253,14 @@ public class MailcapCommandMap
{
parseResource(JAR, "/META-INF/mailcap");
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load DEF");
}
parseResource(DEF, "/META-INF/mailcap.default");
}
-
+
/**
* Returns the list of preferred commands for a given MIME type.
* @param mimeType the MIME type
@@ -295,7 +295,7 @@ public class MailcapCommandMap
cmdList.toArray(cmds);
return cmds;
}
-
+
/**
* Returns all commands for the given MIME type.
* @param mimeType the MIME type
@@ -343,7 +343,7 @@ public class MailcapCommandMap
for (int j = 0; j < 5; j++)
{
Map<String,List<String>> map =
- getCommands(mailcaps[j][i], mimeType);
+ getCommands(mailcaps[j][i], mimeType);
if (map != null)
{
List<String> classNames = map.get(cmdName);
@@ -449,7 +449,7 @@ public class MailcapCommandMap
}
return null;
}
-
+
/**
* Get the native commands for the given MIME type.
* Returns an array of strings where each string is
@@ -479,8 +479,8 @@ public class MailcapCommandMap
}
private void addNativeCommands(List<String> acc,
- Map<String,Map<String,List<String>>> mailcap,
- String mimeType)
+ Map<String,Map<String,List<String>>> mailcap,
+ String mimeType)
{
for (Map.Entry<String,Map<String,List<String>>> mEntry : mailcap.entrySet())
{
@@ -522,7 +522,7 @@ public class MailcapCommandMap
}
}
}
-
+
private static String nameOf(int mailcap)
{
switch (mailcap)
@@ -539,7 +539,7 @@ public class MailcapCommandMap
return "DEF";
default:
return "ERR";
- }
+ }
}
private void parseFile(int index, String filename)
@@ -576,7 +576,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parseResource(int index, String name)
{
Reader in = null;
@@ -615,7 +615,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parse(int index, Reader in)
throws IOException
{
@@ -649,7 +649,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parseEntry(int index, String line)
{
// Tokenize entry into fields
@@ -691,7 +691,7 @@ public class MailcapCommandMap
fallback = true;
}
fields.add(field);
-
+
len = fields.size();
if (len < 2)
{
@@ -701,7 +701,7 @@ public class MailcapCommandMap
}
return;
}
-
+
Map<String,Map<String,List<String>>> mailcap =
fallback ? mailcaps[index][FALLBACK] : mailcaps[index][NORMAL];
String mimeType = fields.get(0);
@@ -711,9 +711,9 @@ public class MailcapCommandMap
addField(mailcap, mimeType, null, (String) fields.get(i));
}
}
-
+
private void addField(Map<String,Map<String,List<String>>> mailcap,
- String mimeType, String verb, String command)
+ String mimeType, String verb, String command)
{
if (verb == null)
{
@@ -728,7 +728,7 @@ public class MailcapCommandMap
{
return; // Invalid field or flag
}
-
+
Map<String,List<String>> commands = mailcap.get(mimeType);
if (commands == null)
{
@@ -743,10 +743,10 @@ public class MailcapCommandMap
}
classNames.add(command);
}
-
+
private Map<String,List<String>>
getCommands(Map<String,Map<String,List<String>>> mailcap,
- String mimeType)
+ String mimeType)
{
int si = mimeType.indexOf('/');
String genericMimeType = new CPStringBuilder(mimeType.substring(0, si))
@@ -782,7 +782,7 @@ public class MailcapCommandMap
}
// -- Utility methods --
-
+
private List<URL> getSystemResources(String name)
{
List<URL> acc = new ArrayList<URL>();
@@ -799,6 +799,5 @@ public class MailcapCommandMap
}
return acc;
}
-
-}
+}
diff --git a/javax/activation/MimeType.java b/javax/activation/MimeType.java
index 70045d668..bc3afc18e 100644
--- a/javax/activation/MimeType.java
+++ b/javax/activation/MimeType.java
@@ -53,13 +53,13 @@ import java.io.ObjectOutput;
public class MimeType
implements Externalizable
{
-
+
static final String TSPECIALS = "()<>@,;:/[]?=\\\"";
-
+
private String primaryType;
private String subType;
private MimeTypeParameterList parameters;
-
+
/**
* Constructor for an <code>application/*</code> content type.
*/
@@ -69,7 +69,7 @@ public class MimeType
subType = "*";
parameters = new MimeTypeParameterList();
}
-
+
/**
* Constructor that parses a raw String.
* @param rawdata the MIME type string
@@ -79,7 +79,7 @@ public class MimeType
{
parse(rawdata);
}
-
+
/**
* Constructor for a new MIME type with the given primary and sub types
* and an empty parameter list.
@@ -103,7 +103,7 @@ public class MimeType
{
return primaryType;
}
-
+
/**
* Sets the primary type.
* @param primary the new primary type
@@ -114,7 +114,7 @@ public class MimeType
checkValidity(primary, "Primary type is invalid");
primaryType = primary.toLowerCase();
}
-
+
/**
* Returns the subtype.
*/
@@ -122,7 +122,7 @@ public class MimeType
{
return subType;
}
-
+
/**
* Sets the subtype.
* @param sub the new subtype
@@ -133,7 +133,7 @@ public class MimeType
checkValidity(sub, "Sub type is invalid");
subType = sub.toLowerCase();
}
-
+
/**
* Returns the MIME parameters.
*/
@@ -141,7 +141,7 @@ public class MimeType
{
return parameters;
}
-
+
/**
* Returns the parameter value for the specified name.
* @param name the parameter name
@@ -150,7 +150,7 @@ public class MimeType
{
return parameters.get(name);
}
-
+
/**
* Sets the parameter value for the specified name.
* @param name the parameter name
@@ -160,7 +160,7 @@ public class MimeType
{
parameters.set(name, value);
}
-
+
/**
* Removes the parameter value for the specified name.
* @param name the parameter name
@@ -169,7 +169,7 @@ public class MimeType
{
parameters.remove(name);
}
-
+
/**
* Returns the complete string representation of this MIME type.
*/
@@ -181,7 +181,7 @@ public class MimeType
.append(parameters.toString())
.toString();
}
-
+
/**
* Returns the string representation of this MIME type without
* parameters.
@@ -193,7 +193,7 @@ public class MimeType
.append(subType)
.toString();
}
-
+
/**
* Returns true if the primary and subtype of this MIME type are the
* same as in the given MIME type.
@@ -206,7 +206,7 @@ public class MimeType
"*".equals(subType) ||
"*".equals(sub2));
}
-
+
/**
* Returns true if the primary and subtype of this MIME type are the
* same as in the given MIME type string.
@@ -216,14 +216,14 @@ public class MimeType
{
return match(new MimeType(rawdata));
}
-
+
public void writeExternal(ObjectOutput out)
throws IOException
{
out.writeUTF(toString());
out.flush();
}
-
+
public void readExternal(ObjectInput in)
throws IOException, ClassNotFoundException
{
@@ -236,7 +236,7 @@ public class MimeType
throw new IOException(e.getMessage());
}
}
-
+
private void parse(String rawdata)
throws MimeTypeParseException
{
@@ -283,11 +283,10 @@ public class MimeType
}
}
}
-
+
static boolean isValidChar(char c)
{
return c > ' ' && c <= '~' && TSPECIALS.indexOf(c) == -1;
}
}
-
diff --git a/javax/activation/MimeTypeParameterList.java b/javax/activation/MimeTypeParameterList.java
index e15469da8..3d36ede94 100644
--- a/javax/activation/MimeTypeParameterList.java
+++ b/javax/activation/MimeTypeParameterList.java
@@ -57,7 +57,7 @@ public class MimeTypeParameterList
private final List<String> parameterNames;
private final Map<String,String> parameterValues;
-
+
/**
* Constructor for an empty parameter list.
*/
@@ -122,11 +122,11 @@ public class MimeTypeParameterList
{
params.add(param);
}
-
+
// Tokenize each parameter into name + value
for (Iterator<String> i = params.iterator(); i.hasNext();)
{
- param = i.next();
+ param = i.next();
int ei = param.indexOf('=');
if (ei == -1)
{
@@ -147,12 +147,12 @@ public class MimeTypeParameterList
{
MimeType.checkValidity(name, "Parameter value is invalid");
}
-
+
parameterNames.add(name);
parameterValues.put(name.toLowerCase(), value);
}
}
-
+
/**
* Returns the number of parameters.
*/
@@ -160,7 +160,7 @@ public class MimeTypeParameterList
{
return parameterNames.size();
}
-
+
/**
* Indicates if there are no parameters.
*/
@@ -178,7 +178,7 @@ public class MimeTypeParameterList
name = name.trim();
return parameterValues.get(name.toLowerCase());
}
-
+
/**
* Sets the value for the specified parameter name.
* @param name the parameter name
@@ -201,7 +201,7 @@ public class MimeTypeParameterList
}
parameterValues.put(name.toLowerCase(), value);
}
-
+
/**
* Removes the parameter identified by the specified name.
* @param name the parameter name
@@ -211,7 +211,7 @@ public class MimeTypeParameterList
name = name.trim();
for (Iterator<String> i = parameterNames.iterator();i.hasNext();)
{
- String pname = i.next();
+ String pname = i.next();
if (name.equalsIgnoreCase(pname))
{
i.remove();
@@ -219,7 +219,7 @@ public class MimeTypeParameterList
}
parameterValues.remove(name.toLowerCase());
}
-
+
/**
* Returns an enumeration of all the parameter names.
*/
@@ -229,7 +229,7 @@ public class MimeTypeParameterList
{
return new IteratorEnumeration(parameterNames.iterator());
}
-
+
/**
* Returns an RFC 2045-compliant string representation of this parameter
* list.
@@ -240,7 +240,7 @@ public class MimeTypeParameterList
for (String name : parameterNames)
{
String value = parameterValues.get(name.toLowerCase());
-
+
buffer.append(';');
buffer.append(' ');
buffer.append(name);
@@ -249,7 +249,7 @@ public class MimeTypeParameterList
}
return buffer.toString();
}
-
+
private static String quote(String value)
{
boolean needsQuoting = false;
@@ -262,7 +262,7 @@ public class MimeTypeParameterList
break;
}
}
-
+
if (needsQuoting)
{
CPStringBuilder buffer = new CPStringBuilder();
@@ -281,7 +281,7 @@ public class MimeTypeParameterList
}
return value;
}
-
+
private static String unquote(String value)
{
int len = value.length();
@@ -305,32 +305,31 @@ public class MimeTypeParameterList
}
return buffer.toString();
}
-
+
/**
* Enumeration proxy for an Iterator.
*/
static class IteratorEnumeration
implements Enumeration<String>
{
-
+
final Iterator<String> iterator;
-
+
IteratorEnumeration(Iterator<String> iterator)
{
this.iterator = iterator;
}
-
+
public boolean hasMoreElements()
{
return iterator.hasNext();
}
-
+
public String nextElement()
{
return iterator.next();
}
-
+
}
-
-}
+}
diff --git a/javax/activation/MimeTypeParseException.java b/javax/activation/MimeTypeParseException.java
index b46e244fd..18e8a62e2 100644
--- a/javax/activation/MimeTypeParseException.java
+++ b/javax/activation/MimeTypeParseException.java
@@ -55,7 +55,7 @@ public class MimeTypeParseException
public MimeTypeParseException()
{
}
-
+
/**
* MimeTypeParseException with the specified detail message.
* @param message the exception message
@@ -79,6 +79,5 @@ public class MimeTypeParseException
.append(token)
.toString());
}
-
-}
+}
diff --git a/javax/activation/MimetypesFileTypeMap.java b/javax/activation/MimetypesFileTypeMap.java
index d1566fd96..0c381d8e4 100644
--- a/javax/activation/MimetypesFileTypeMap.java
+++ b/javax/activation/MimetypesFileTypeMap.java
@@ -92,9 +92,9 @@ public class MimetypesFileTypeMap
{
}
}
-
+
private Map<String,String>[] mimetypes;
-
+
/**
* Default constructor.
*/
@@ -102,7 +102,7 @@ public class MimetypesFileTypeMap
{
init(null);
}
-
+
/**
* Constructor specifying a filename.
* @param mimeTypeFileName the name of the file to read mime.types
@@ -125,7 +125,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
/**
* Constructor specifying an input stream.
* @param is the input stream to read mime.types entries from
@@ -156,7 +156,7 @@ public class MimetypesFileTypeMap
{
}
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load HOME");
@@ -175,7 +175,7 @@ public class MimetypesFileTypeMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load SYS");
@@ -184,8 +184,8 @@ public class MimetypesFileTypeMap
{
parseFile(mimetypes[SYS],
new CPStringBuilder(System.getProperty("java.home"))
- .append(File.separatorChar)
- .append("lib")
+ .append(File.separatorChar)
+ .append("lib")
.append(File.separatorChar)
.append("mime.types")
.toString());
@@ -232,14 +232,14 @@ public class MimetypesFileTypeMap
{
parseResource(mimetypes[JAR], "/META-INF/mime.types");
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load DEF");
}
parseResource(mimetypes[DEF], "/META-INF/mimetypes.default");
}
-
+
/**
* Adds entries prorammatically to the registry.
* @param mime_types a mime.types formatted entries string
@@ -268,7 +268,7 @@ public class MimetypesFileTypeMap
{
return getContentType(f.getName());
}
-
+
/**
* Returns the MIME type based on the given filename.
* If no entry is found, returns "application/octet-stream".
@@ -296,7 +296,7 @@ public class MimetypesFileTypeMap
}
return DEFAULT_MIME_TYPE;
}
-
+
private void parseFile(Map<String,String> mimetypes, String filename)
{
Reader in = null;
@@ -322,7 +322,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parseResource(Map<String,String> mimetypes, String name)
{
Reader in = null;
@@ -352,7 +352,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parse(Map<String,String> mimetypes, Reader in)
throws IOException
{
@@ -386,9 +386,9 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parseEntry(Map<String,String> mimetypes,
- String line)
+ String line)
{
// Tokenize
String mimeType = null;
@@ -418,9 +418,9 @@ public class MimetypesFileTypeMap
mimetypes.put(buffer.toString(), mimeType);
}
}
-
+
// -- Utility methods --
-
+
private List<URL> getSystemResources(String name)
{
List<URL> acc = new ArrayList<URL>();
@@ -435,6 +435,5 @@ public class MimetypesFileTypeMap
}
return acc;
}
-
-}
+}
diff --git a/javax/activation/ObjectDataContentHandler.java b/javax/activation/ObjectDataContentHandler.java
index 5105cb45b..3f5e2967a 100644
--- a/javax/activation/ObjectDataContentHandler.java
+++ b/javax/activation/ObjectDataContentHandler.java
@@ -56,7 +56,7 @@ class ObjectDataContentHandler
private Object object;
private String mimeType;
private DataFlavor[] flavors;
-
+
public ObjectDataContentHandler(DataContentHandler dch, Object object,
String mimeType)
{
@@ -64,12 +64,12 @@ class ObjectDataContentHandler
this.object = object;
this.mimeType = mimeType;
}
-
+
public Object getContent(DataSource ds)
{
return object;
}
-
+
public DataContentHandler getDCH()
{
return dch;
@@ -92,7 +92,7 @@ class ObjectDataContentHandler
}
throw new UnsupportedFlavorException(flavor);
}
-
+
public DataFlavor[] getTransferDataFlavors()
{
if (flavors == null)
@@ -123,6 +123,5 @@ class ObjectDataContentHandler
throw new UnsupportedDataTypeException("no object DCH for MIME type " + mimeType);
}
}
-
-}
+}
diff --git a/javax/activation/URLDataSource.java b/javax/activation/URLDataSource.java
index 8b77567ae..66472ada9 100644
--- a/javax/activation/URLDataSource.java
+++ b/javax/activation/URLDataSource.java
@@ -55,7 +55,7 @@ public class URLDataSource
private final URL url;
private URLConnection connection;
-
+
/**
* Constructor.
* This will not open the connection to the URL.
@@ -64,7 +64,7 @@ public class URLDataSource
{
this.url = url;
}
-
+
/**
* Returns the Content-Type header for the URL.
* In the case of failure or lack of such a header,
@@ -93,7 +93,7 @@ public class URLDataSource
}
return contentType;
}
-
+
/**
* Returns the result of <code>getFile</code> of the underlying URL.
*/
@@ -101,7 +101,7 @@ public class URLDataSource
{
return url.getFile();
}
-
+
public InputStream getInputStream()
throws IOException
{
@@ -125,7 +125,7 @@ public class URLDataSource
}
return null;
}
-
+
/**
* Returns the underlying URL.
*/
@@ -133,6 +133,5 @@ public class URLDataSource
{
return url;
}
-
-}
+}
diff --git a/javax/activation/UnsupportedDataTypeException.java b/javax/activation/UnsupportedDataTypeException.java
index 09460b069..d0c4b9d8a 100644
--- a/javax/activation/UnsupportedDataTypeException.java
+++ b/javax/activation/UnsupportedDataTypeException.java
@@ -55,7 +55,7 @@ public class UnsupportedDataTypeException extends IOException
public UnsupportedDataTypeException()
{
}
-
+
/**
* Constructs an UnsupportedDataTypeException with the specified detail
* message.
@@ -65,6 +65,5 @@ public class UnsupportedDataTypeException extends IOException
{
super(message);
}
-
-}
+}
diff --git a/javax/crypto/Cipher.java b/javax/crypto/Cipher.java
index 7c18e6f6a..9b7d8f9fe 100644
--- a/javax/crypto/Cipher.java
+++ b/javax/crypto/Cipher.java
@@ -163,7 +163,7 @@ public class Cipher
* The installed providers are tried in order for an implementation, and the
* first appropriate instance is returned. If no installed provider can
* provide the implementation, an appropriate exception is thrown.
- *
+ *
* @param transformation The transformation to create.
* @return An appropriate cipher for this transformation.
* @throws NoSuchAlgorithmException If no installed provider can supply the
@@ -201,7 +201,7 @@ public class Cipher
/**
* Creates a new cipher instance for the given transformation and the named
* provider.
- *
+ *
* @param transformation The transformation to create.
* @param provider The name of the provider to use.
* @return An appropriate cipher for this transformation.
@@ -228,7 +228,7 @@ public class Cipher
/**
* Creates a new cipher instance for a given transformation from a given
* provider.
- *
+ *
* @param transformation The transformation to create.
* @param provider The provider to use.
* @return An appropriate cipher for this transformation.
diff --git a/javax/crypto/CipherOutputStream.java b/javax/crypto/CipherOutputStream.java
index 960f6fb60..170feed47 100644
--- a/javax/crypto/CipherOutputStream.java
+++ b/javax/crypto/CipherOutputStream.java
@@ -45,7 +45,7 @@ import java.io.OutputStream;
/**
* A filtered output stream that transforms data written to it with a
* {@link Cipher} before sending it to the underlying output stream.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class CipherOutputStream extends FilterOutputStream
@@ -56,7 +56,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Create a new cipher output stream. The cipher argument must have already
* been initialized.
- *
+ *
* @param out The sink for transformed data.
* @param cipher The cipher to transform data with.
*/
@@ -82,7 +82,7 @@ public class CipherOutputStream extends FilterOutputStream
* This method will first invoke the {@link Cipher#doFinal()} method of the
* underlying {@link Cipher}, and writes the output of that method to the
* sink output stream.
- *
+ *
* @throws IOException If an I/O error occurs, or if an error is caused by
* finalizing the transformation.
*/
@@ -114,7 +114,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a single byte to the output stream.
- *
+ *
* @param b The next byte.
* @throws IOException If an I/O error occurs, or if the underlying cipher is
* not in the correct state to transform data.
@@ -126,7 +126,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a byte array to the output stream.
- *
+ *
* @param buf The next bytes.
* @throws IOException If an I/O error occurs, or if the underlying cipher is
* not in the correct state to transform data.
@@ -138,7 +138,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a portion of a byte array to the output stream.
- *
+ *
* @param buf The next bytes.
* @param off The offset in the byte array to start.
* @param len The number of bytes to write.
diff --git a/javax/crypto/ExemptionMechanism.java b/javax/crypto/ExemptionMechanism.java
index baf6bad99..b8b17c4af 100644
--- a/javax/crypto/ExemptionMechanism.java
+++ b/javax/crypto/ExemptionMechanism.java
@@ -90,7 +90,7 @@ public class ExemptionMechanism
/**
* Create an instance of <code>ExemptionMechanism</code> for a designated
* <code>mechanism</code> from the first Security Provider offering it.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @return a newly created instance of <code>ExemptionMechanism</code>.
* @throws IllegalArgumentException if the provider is null.
@@ -121,7 +121,7 @@ public class ExemptionMechanism
/**
* Create an instance of <code>ExemptionMechanism</code> for a designated
* <code>mechanism</code> from a named <code>provider</code>.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @param provider the security provider to provide the exemption
* <code>mechanism</code>.
@@ -149,7 +149,7 @@ public class ExemptionMechanism
/**
* Create an instance of <code>ExemptionMechanism</code> for a designated
* <code>mechanism</code> from a designated <code>provider</code>.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @param provider the security provider to provide the exemption
* <code>mechanism</code>.
diff --git a/javax/crypto/KeyAgreement.java b/javax/crypto/KeyAgreement.java
index 490031091..fe3e226fa 100644
--- a/javax/crypto/KeyAgreement.java
+++ b/javax/crypto/KeyAgreement.java
@@ -104,7 +104,7 @@ public class KeyAgreement
/**
* Get an implementation of an algorithm from the first provider that
* implements it.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @return The proper KeyAgreement instacne, if found.
* @throws NoSuchAlgorithmException If the specified algorithm is not
@@ -133,7 +133,7 @@ public class KeyAgreement
/**
* Return an implementation of an algorithm from a named provider.
- *
+ *
* @param algorithm The name of the algorithm to create.
* @param provider The name of the provider from which to get the
* implementation.
@@ -158,7 +158,7 @@ public class KeyAgreement
/**
* Return an implementation of an algorithm from a specific provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The provider from which to get the implementation.
* @return The proper KeyAgreement instance, if found.
diff --git a/javax/crypto/KeyGenerator.java b/javax/crypto/KeyGenerator.java
index 79334e9e0..f0c80e1db 100644
--- a/javax/crypto/KeyGenerator.java
+++ b/javax/crypto/KeyGenerator.java
@@ -96,7 +96,7 @@ public class KeyGenerator
/**
* Create a new key generator, returning the first available implementation.
- *
+ *
* @param algorithm The generator algorithm name.
* @throws NoSuchAlgorithmException If the specified algorithm does not exist.
* @throws IllegalArgumentException if <code>algorithm</code> is
@@ -123,7 +123,7 @@ public class KeyGenerator
/**
* Create a new key generator from the named provider.
- *
+ *
* @param algorithm The generator algorithm name.
* @param provider The name of the provider to use.
* @return An appropriate key generator, if found.
@@ -147,7 +147,7 @@ public class KeyGenerator
/**
* Create a new key generator from the supplied provider.
- *
+ *
* @param algorithm The generator algorithm name.
* @param provider The provider to use.
* @return An appropriate key generator, if found.
diff --git a/javax/crypto/Mac.java b/javax/crypto/Mac.java
index 2a269ab80..9175e5800 100644
--- a/javax/crypto/Mac.java
+++ b/javax/crypto/Mac.java
@@ -111,7 +111,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from the first provider with an
* appropriate implementation.
- *
+ *
* @param algorithm The name of the algorithm.
* @return An appropriate Mac instance, if the specified algorithm is
* implemented by a provider.
@@ -141,7 +141,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from the named provider.
- *
+ *
* @param algorithm The name of the algorithm.
* @param provider The name of the provider.
* @return An appropriate Mac instance, if the specified algorithm is
@@ -166,7 +166,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from a provider.
- *
+ *
* @param algorithm The name of the algorithm.
* @param provider The provider.
* @return An appropriate Mac instance, if the specified algorithm is
@@ -417,7 +417,7 @@ public class Mac implements Cloneable
throw new IllegalStateException ("not initialized");
macSpi.engineUpdate(buffer);
}
-
+
/**
* Clone this instance, if the underlying implementation supports it.
*
diff --git a/javax/crypto/MacSpi.java b/javax/crypto/MacSpi.java
index 853bd66aa..a03aa6983 100644
--- a/javax/crypto/MacSpi.java
+++ b/javax/crypto/MacSpi.java
@@ -143,10 +143,10 @@ public abstract class MacSpi
* @param length The number of bytes to update.
*/
protected abstract void engineUpdate(byte[] input, int offset, int length);
-
+
/**
* Update this MAC with the remaining bytes of a buffer.
- *
+ *
* @param buffer The input buffer.
* @since 1.5
*/
diff --git a/javax/crypto/SecretKeyFactory.java b/javax/crypto/SecretKeyFactory.java
index 1c857d274..9749a8285 100644
--- a/javax/crypto/SecretKeyFactory.java
+++ b/javax/crypto/SecretKeyFactory.java
@@ -96,7 +96,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the first appropriate instance.
- *
+ *
* @param algorithm The algorithm name.
* @return The appropriate key factory, if found.
* @throws NoSuchAlgorithmException If no provider implements the specified
@@ -125,7 +125,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the named provider.
- *
+ *
* @param algorithm The algorithm name.
* @param provider The provider name.
* @return The appropriate key factory, if found.
@@ -150,7 +150,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the specified provider.
- *
+ *
* @param algorithm The algorithm name.
* @param provider The provider.
* @return The appropriate key factory, if found.
diff --git a/javax/crypto/spec/PBEKeySpec.java b/javax/crypto/spec/PBEKeySpec.java
index 54b821a79..f0ffa379a 100644
--- a/javax/crypto/spec/PBEKeySpec.java
+++ b/javax/crypto/spec/PBEKeySpec.java
@@ -78,7 +78,7 @@ public class PBEKeySpec implements KeySpec
/** The password state */
private boolean passwordValid = true;
-
+
// Constructors.
// ------------------------------------------------------------------------
@@ -86,13 +86,13 @@ public class PBEKeySpec implements KeySpec
* Create a new PBE key spec with just a password.
* <p>
* A copy of the password argument is stored instead of the argument itself.
- *
+ *
* @param password The password char array.
*/
public PBEKeySpec(char[] password)
{
setPassword(password);
-
+
// load the default values for unspecified variables.
salt = null;
iterationCount = 0;
@@ -104,7 +104,7 @@ public class PBEKeySpec implements KeySpec
* <p>
* A copy of the password and salt arguments are stored instead of the
* arguments themselves.
- *
+ *
* @param password The password char array.
* @param salt The salt bytes.
* @param iterationCount The iteration count.
@@ -128,7 +128,7 @@ public class PBEKeySpec implements KeySpec
* <p>
* A copy of the password and salt arguments are stored instead of the
* arguments themselves.
- *
+ *
* @param password The password char array.
* @param salt The salt bytes.
* @param iterationCount The iteration count.
@@ -161,7 +161,7 @@ public class PBEKeySpec implements KeySpec
return;
for (int i = 0; i < password.length; i++)
password[i] = '\u0000';
-
+
// since the password is cleared, it is no longer valid
passwordValid = false;
}
@@ -190,7 +190,7 @@ public class PBEKeySpec implements KeySpec
* Get the password character array copy.
* <p>
* This returns a copy of the password, not the password itself.
- *
+ *
* @return a clone of the password.
* @throws IllegalStateException If {@link #clearPassword()} has already been
* called.
@@ -207,7 +207,7 @@ public class PBEKeySpec implements KeySpec
* Get the salt bytes array copy.
* <p>
* This returns a copy of the salt, not the salt itself.
- *
+ *
* @return The salt.
*/
public final byte[] getSalt()
@@ -221,7 +221,7 @@ public class PBEKeySpec implements KeySpec
* Set the password char array.
* <p>
* A copy of the password argument is stored instead of the argument itself.
- *
+ *
* @param password The password to be set
*/
private void setPassword(char[] password)
@@ -238,7 +238,7 @@ public class PBEKeySpec implements KeySpec
* Set the salt byte array.
* <p>
* A copy of the salt arguments is stored instead of the argument itself.
- *
+ *
* @param salt The salt to be set.
* @throws NullPointerException If the salt is null.
* @throws IllegalArgumentException If the salt is an empty array.
@@ -253,7 +253,7 @@ public class PBEKeySpec implements KeySpec
/**
* Set the iterationCount.
- *
+ *
* @param iterationCount The iteration count to be set.
* @throws IllegalArgumentException If the iterationCount is negative.
*/
@@ -267,7 +267,7 @@ public class PBEKeySpec implements KeySpec
/**
* Set the keyLength.
- *
+ *
* @param keyLength The keyLength to be set.
* @throws IllegalArgumentException if the keyLength is negative.
*/
diff --git a/javax/imageio/IIOImage.java b/javax/imageio/IIOImage.java
index bd69bae5f..a368e5a84 100644
--- a/javax/imageio/IIOImage.java
+++ b/javax/imageio/IIOImage.java
@@ -96,12 +96,12 @@ public class IIOImage
{
if (raster == null)
throw new IllegalArgumentException ("raster may not be null");
-
+
this.raster = raster;
this.thumbnails = thumbnails;
this.metadata = metadata;
}
-
+
/**
* Construct an IIOImage containing rendered image data, thumbnails
* and metadata.
@@ -117,7 +117,7 @@ public class IIOImage
{
if (image == null)
throw new IllegalArgumentException ("image may not be null");
-
+
this.image = image;
this.thumbnails = thumbnails;
this.metadata = metadata;
@@ -232,7 +232,7 @@ public class IIOImage
{
if (raster == null)
throw new IllegalArgumentException ("raster may not be null");
-
+
this.image = null;
this.raster = raster;
}
diff --git a/javax/imageio/IIOParam.java b/javax/imageio/IIOParam.java
index f6460b4e7..3e7854747 100644
--- a/javax/imageio/IIOParam.java
+++ b/javax/imageio/IIOParam.java
@@ -158,10 +158,10 @@ public abstract class IIOParam
{
if (controller == null)
{
- if (defaultController == null || no_controller)
- return false;
- else
- return defaultController.activate (this);
+ if (defaultController == null || no_controller)
+ return false;
+ else
+ return defaultController.activate (this);
}
else
return controller.activate(this);
@@ -173,7 +173,7 @@ public abstract class IIOParam
* set to null.
*
* @return the currently used controller or null
- */
+ */
public IIOParamController getController()
{
return controller == null ?
@@ -254,7 +254,7 @@ public abstract class IIOParam
{
return sourceXSubsampling;
}
-
+
/**
* Retrieve the number of pixel rows to advance before taking a
* pixel sample.
@@ -313,13 +313,13 @@ public abstract class IIOParam
{
if (controller == defaultController)
{
- this.controller = null;
- no_controller = false;
+ this.controller = null;
+ no_controller = false;
}
else
{
- no_controller = (controller == null);
- this.controller = controller;
+ no_controller = (controller == null);
+ this.controller = controller;
}
}
@@ -401,24 +401,24 @@ public abstract class IIOParam
public void setSourceRegion(Rectangle sourceRegion)
{
if (sourceRegion != null
- && (sourceRegion.x < 0
- || sourceRegion.y < 0
- || sourceRegion.width <= 0
- || sourceRegion.height <= 0))
+ && (sourceRegion.x < 0
+ || sourceRegion.y < 0
+ || sourceRegion.width <= 0
+ || sourceRegion.height <= 0))
throw new IllegalArgumentException("illegal source region");
if (sourceRegion != null)
{
- int num_rows =
- (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
- / sourceYSubsampling;
+ int num_rows =
+ (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
+ / sourceYSubsampling;
- int num_columns =
- (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
- / sourceXSubsampling;
+ int num_columns =
+ (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
+ / sourceXSubsampling;
- if (num_rows <= 0 || num_columns <= 0)
- throw new IllegalStateException("zero pixels in source region");
+ if (num_rows <= 0 || num_columns <= 0)
+ throw new IllegalStateException("zero pixels in source region");
}
this.sourceRegion = sourceRegion;
@@ -462,25 +462,25 @@ public abstract class IIOParam
* zero pixel samples
*/
public void setSourceSubsampling(int sourceXSubsampling, int sourceYSubsampling,
- int subsamplingXOffset, int subsamplingYOffset)
+ int subsamplingXOffset, int subsamplingYOffset)
{
if (subsamplingXOffset < 0 || subsamplingYOffset < 0)
throw new IllegalArgumentException("subsampling offset < 0");
if (sourceRegion != null)
{
- int num_rows =
- (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
- / sourceYSubsampling;
-
- int num_columns =
- (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
- / sourceXSubsampling;
-
- if (num_rows <= 0 || num_columns <= 0)
- throw new IllegalStateException("subsampling parameters would"
- + " produce zero pixel samples"
- + " in source region");
+ int num_rows =
+ (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
+ / sourceYSubsampling;
+
+ int num_columns =
+ (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
+ / sourceXSubsampling;
+
+ if (num_rows <= 0 || num_columns <= 0)
+ throw new IllegalStateException("subsampling parameters would"
+ + " produce zero pixel samples"
+ + " in source region");
}
this.sourceXSubsampling = sourceXSubsampling;
diff --git a/javax/imageio/IIOParamController.java b/javax/imageio/IIOParamController.java
index 0ee54df40..e77f8542f 100644
--- a/javax/imageio/IIOParamController.java
+++ b/javax/imageio/IIOParamController.java
@@ -61,7 +61,7 @@ public interface IIOParamController
*
* @return true if the <code>IIOParam</code> has been modified,
* false otherwise
- *
+ *
* @exception IllegalArgumentException if param is null or is not an instance
* of the correct class
*/
diff --git a/javax/imageio/ImageIO.java b/javax/imageio/ImageIO.java
index 5f0d71d60..9abb1c818 100644
--- a/javax/imageio/ImageIO.java
+++ b/javax/imageio/ImageIO.java
@@ -125,7 +125,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class ReaderObjectFilter implements ServiceRegistry.Filter
{
private Object object;
@@ -179,7 +179,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class WriterFormatFilter implements ServiceRegistry.Filter
{
private String formatName;
@@ -192,14 +192,14 @@ public final class ImageIO
public boolean filter(Object provider)
{
if (provider instanceof ImageWriterSpi)
- {
- ImageWriterSpi spi = (ImageWriterSpi) provider;
- String[] formatNames = spi.getFormatNames();
-
- for (int i = formatNames.length - 1; i >= 0; --i)
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) provider;
+ String[] formatNames = spi.getFormatNames();
+
+ for (int i = formatNames.length - 1; i >= 0; --i)
if (formatName.equals(formatNames[i]))
return true;
- }
+ }
return false;
}
@@ -229,7 +229,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class WriterSuffixFilter implements ServiceRegistry.Filter
{
private String fileSuffix;
@@ -261,7 +261,7 @@ public final class ImageIO
private String formatName;
public WriterObjectFilter(ImageTypeSpecifier type,
- String formatName)
+ String formatName)
{
this.type = type;
this.formatName = formatName;
@@ -273,13 +273,13 @@ public final class ImageIO
{
ImageWriterSpi spi = (ImageWriterSpi) provider;
- if (spi.canEncodeImage(type))
- {
- String[] formatNames = spi.getFormatNames();
- for (int i = formatNames.length - 1; i >= 0; --i)
- if (formatName.equals(formatNames[i]))
- return true;
- }
+ if (spi.canEncodeImage(type))
+ {
+ String[] formatNames = spi.getFormatNames();
+ for (int i = formatNames.length - 1; i >= 0; --i)
+ if (formatName.equals(formatNames[i]))
+ return true;
+ }
}
return false;
@@ -304,11 +304,11 @@ public final class ImageIO
{
ImageTranscoderSpi spi = (ImageTranscoderSpi) provider;
- if (spi.getReaderServiceProviderName().equals
- (reader.getOriginatingProvider().getClass().getName())
- && spi.getWriterServiceProviderName().equals
- (writer.getOriginatingProvider().getClass().getName()))
- return true;
+ if (spi.getReaderServiceProviderName().equals
+ (reader.getOriginatingProvider().getClass().getName())
+ && spi.getWriterServiceProviderName().equals
+ (writer.getOriginatingProvider().getClass().getName()))
+ return true;
}
return false;
@@ -320,14 +320,14 @@ public final class ImageIO
{
Iterator<ImageReaderSpi> it;
Object readerExtension;
-
+
public ImageReaderIterator(Iterator<ImageReaderSpi> it,
Object readerExtension)
{
this.it = it;
this.readerExtension = readerExtension;
}
-
+
public ImageReaderIterator(Iterator<ImageReaderSpi> it)
{
this.it = it;
@@ -364,14 +364,14 @@ public final class ImageIO
{
Iterator<ImageWriterSpi> it;
Object writerExtension;
-
+
public ImageWriterIterator(Iterator<ImageWriterSpi> it,
Object writerExtension)
{
this.it = it;
this.writerExtension = writerExtension;
}
-
+
public ImageWriterIterator(Iterator<ImageWriterSpi> it)
{
this.it = it;
@@ -402,7 +402,7 @@ public final class ImageIO
throw new UnsupportedOperationException();
}
}
-
+
private static File cacheDirectory;
private static boolean useCache = true;
@@ -421,7 +421,7 @@ public final class ImageIO
return Collections.EMPTY_SET.iterator();
}
}
-
+
private static Iterator<ImageWriter> getWritersByFilter(Class<ImageWriterSpi> type,
ServiceRegistry.Filter filter,
Object writerExtension)
@@ -503,7 +503,7 @@ public final class ImageIO
{
if (fileSuffix == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
return getReadersByFilter(ImageReaderSpi.class,
new ReaderSuffixFilter(fileSuffix),
fileSuffix);
@@ -523,7 +523,7 @@ public final class ImageIO
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterFormatFilter(formatName),
formatName);
@@ -544,7 +544,7 @@ public final class ImageIO
{
if (MIMEType == null)
throw new IllegalArgumentException("MIMEType may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterMIMETypeFilter(MIMEType),
MIMEType);
@@ -564,7 +564,7 @@ public final class ImageIO
{
if (fileSuffix == null)
throw new IllegalArgumentException("fileSuffix may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterSuffixFilter(fileSuffix),
fileSuffix);
@@ -581,19 +581,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageReaderSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageReaderSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageReaderSpi spi = (ImageReaderSpi) it.next();
- String[] names = spi.getFormatNames();
+ while (it.hasNext())
+ {
+ ImageReaderSpi spi = (ImageReaderSpi) it.next();
+ String[] names = spi.getFormatNames();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -612,19 +612,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageReaderSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageReaderSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageReaderSpi spi = (ImageReaderSpi) it.next();
- String[] names = spi.getMIMETypes();
+ while (it.hasNext())
+ {
+ ImageReaderSpi spi = (ImageReaderSpi) it.next();
+ String[] names = spi.getMIMETypes();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -659,19 +659,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageWriterSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageWriterSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageWriterSpi spi = (ImageWriterSpi) it.next();
- String[] names = spi.getFormatNames();
+ while (it.hasNext())
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) it.next();
+ String[] names = spi.getFormatNames();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -690,26 +690,26 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageWriterSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageWriterSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageWriterSpi spi = (ImageWriterSpi) it.next();
- String[] names = spi.getMIMETypes();
+ while (it.hasNext())
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) it.next();
+ String[] names = spi.getMIMETypes();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
return new String[0];
}
}
-
+
/**
* Rescans the application classpath for ImageIO service providers
* and registers them.
@@ -740,7 +740,7 @@ public final class ImageIO
cacheDirectory.canWrite();
}
-
+
ImageIO.cacheDirectory = cacheDirectory;
}
@@ -841,7 +841,7 @@ public final class ImageIO
while (writers.hasNext())
{
ImageWriter w = (ImageWriter) writers.next();
- try
+ try
{
w.setOutput(output);
}
@@ -849,7 +849,7 @@ public final class ImageIO
{
continue;
}
-
+
w.write(null, img, null);
w.dispose();
output.close();
@@ -1014,13 +1014,13 @@ public final class ImageIO
while(spis.hasNext())
{
- ImageInputStreamSpi spi = (ImageInputStreamSpi) spis.next();
+ ImageInputStreamSpi spi = (ImageInputStreamSpi) spis.next();
- if (input.getClass().equals(spi.getInputClass()))
- {
- foundSpi = spi;
- break;
- }
+ if (input.getClass().equals(spi.getInputClass()))
+ {
+ foundSpi = spi;
+ break;
+ }
}
return foundSpi == null ? null :
@@ -1060,13 +1060,13 @@ public final class ImageIO
while(spis.hasNext())
{
- ImageOutputStreamSpi spi = (ImageOutputStreamSpi) spis.next();
+ ImageOutputStreamSpi spi = (ImageOutputStreamSpi) spis.next();
- if (output.getClass().equals(spi.getOutputClass()))
- {
- foundSpi = spi;
- break;
- }
+ if (output.getClass().equals(spi.getOutputClass()))
+ {
+ foundSpi = spi;
+ break;
+ }
}
return foundSpi == null ? null :
@@ -1143,7 +1143,7 @@ public final class ImageIO
* @return an iterator over a collection of image writers
*/
public static Iterator<ImageWriter> getImageWriters (ImageTypeSpecifier type,
- String formatName)
+ String formatName)
{
if (type == null || formatName == null)
throw new IllegalArgumentException ("null argument");
@@ -1226,12 +1226,12 @@ public final class ImageIO
{
return spiIterator.hasNext();
}
-
+
public ImageTranscoder next()
{
return spiIterator.next().createTranscoderInstance();
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
diff --git a/javax/imageio/ImageReadParam.java b/javax/imageio/ImageReadParam.java
index b2680f6b1..8a31253e8 100644
--- a/javax/imageio/ImageReadParam.java
+++ b/javax/imageio/ImageReadParam.java
@@ -112,17 +112,17 @@ public class ImageReadParam extends IIOParam
this.minProgressivePass = minPass;
this.numProgressivePasses = numPasses;
}
-
+
public void setSourceRenderSize(Dimension size)
throws UnsupportedOperationException
{
if (! canSetSourceRenderSize())
throw new UnsupportedOperationException
- ("setting source render size not supported");
-
+ ("setting source render size not supported");
+
if (size.width <= 0 || size.height <= 0)
throw new IllegalArgumentException("negative dimension not allowed");
-
+
sourceRenderSize = size;
}
}
diff --git a/javax/imageio/ImageReader.java b/javax/imageio/ImageReader.java
index 269493f23..14e935994 100644
--- a/javax/imageio/ImageReader.java
+++ b/javax/imageio/ImageReader.java
@@ -290,7 +290,7 @@ public abstract class ImageReader
{
if (availableLocales == null)
return null;
-
+
return (Locale[]) availableLocales.clone();
}
@@ -770,14 +770,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageComplete (this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageComplete (this);
+ }
}
}
@@ -793,14 +793,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageProgress(this, percentageDone);
+ }
}
}
/**
@@ -815,14 +815,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageStarted(this, imageIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageStarted(this, imageIndex);
+ }
}
}
@@ -842,19 +842,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processImageUpdate(BufferedImage image, int minX, int minY,
- int width, int height, int periodX,
- int periodY, int[] bands)
+ int width, int height, int periodX,
+ int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.imageUpdate(this, image, minX, minY, width, height,
- periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.imageUpdate(this, image, minX, minY, width, height,
+ periodX, periodY, bands);
+ }
}
}
@@ -869,13 +869,13 @@ public abstract class ImageReader
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
+ Iterator it = updateListeners.iterator();
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.passComplete(this, image);
- }
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.passComplete(this, image);
+ }
}
}
@@ -898,19 +898,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processPassStarted(BufferedImage image, int pass, int minPass,
- int maxPass, int minX, int minY,
- int periodX, int periodY, int[] bands)
+ int maxPass, int minX, int minY,
+ int periodX, int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.passStarted(this, image, pass, minPass, maxPass, minX,
- minY, periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.passStarted(this, image, pass, minPass, maxPass, minX,
+ minY, periodX, periodY, bands);
+ }
}
}
@@ -922,14 +922,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.readAborted(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.readAborted(this);
+ }
}
}
/**
@@ -941,14 +941,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.sequenceComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.sequenceComplete(this);
+ }
}
}
@@ -964,14 +964,14 @@ public abstract class ImageReader
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.sequenceStarted(this, minIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.sequenceStarted(this, minIndex);
+ }
}
}
@@ -984,14 +984,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailComplete(this);
+ }
}
}
@@ -1006,13 +1006,13 @@ public abstract class ImageReader
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
+ Iterator it = updateListeners.iterator();
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailPassComplete(this, thumbnail);
- }
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailPassComplete(this, thumbnail);
+ }
}
}
@@ -1035,21 +1035,21 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processThumbnailPassStarted(BufferedImage thumbnail, int pass,
- int minPass, int maxPass, int minX,
- int minY, int periodX, int periodY,
- int[] bands)
+ int minPass, int maxPass, int minX,
+ int minY, int periodX, int periodY,
+ int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailPassStarted(this, thumbnail, pass, minPass,
- maxPass, minX, minY, periodX,
- periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailPassStarted(this, thumbnail, pass, minPass,
+ maxPass, minX, minY, periodX,
+ periodY, bands);
+ }
}
}
@@ -1065,14 +1065,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailProgress(this, percentageDone);
+ }
}
}
@@ -1090,14 +1090,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
+ }
}
}
@@ -1117,19 +1117,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processThumbnailUpdate(BufferedImage image, int minX, int minY,
- int width, int height, int periodX,
- int periodY, int[] bands)
+ int width, int height, int periodX,
+ int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailUpdate(this, image, minX, minY, width, height,
- periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailUpdate(this, image, minX, minY, width, height,
+ periodX, periodY, bands);
+ }
}
}
@@ -1147,14 +1147,14 @@ public abstract class ImageReader
throw new IllegalArgumentException ("null argument");
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadWarningListener listener =
- (IIOReadWarningListener) it.next();
- listener.warningOccurred(this, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadWarningListener listener =
+ (IIOReadWarningListener) it.next();
+ listener.warningOccurred(this, warning);
+ }
}
}
@@ -1179,7 +1179,7 @@ public abstract class ImageReader
* not a String
*/
protected void processWarningOccurred(String baseName,
- String keyword)
+ String keyword)
{
if (baseName == null || keyword == null)
throw new IllegalArgumentException ("null argument");
@@ -1188,22 +1188,22 @@ public abstract class ImageReader
try
{
- b = ResourceBundle.getBundle(baseName, getLocale());
+ b = ResourceBundle.getBundle(baseName, getLocale());
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no resource bundle found");
+ throw new IllegalArgumentException ("no resource bundle found");
}
Object str = null;
try
{
- str = b.getObject(keyword);
+ str = b.getObject(keyword);
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no results found for keyword");
+ throw new IllegalArgumentException ("no results found for keyword");
}
if (! (str instanceof String))
@@ -1213,14 +1213,14 @@ public abstract class ImageReader
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadWarningListener listener =
- (IIOReadWarningListener) it.next();
- listener.warningOccurred(this, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadWarningListener listener =
+ (IIOReadWarningListener) it.next();
+ listener.warningOccurred(this, warning);
+ }
}
}
@@ -1292,7 +1292,7 @@ public abstract class ImageReader
* @exception IndexOutOfBoundsException if either the frame index or
* the thumbnail index is out-of-bounds
* @exception IOException if a read error occurs
- *
+ *
*/
public BufferedImage readThumbnail(int imageIndex, int thumbnailIndex)
throws IOException
@@ -1329,13 +1329,13 @@ public abstract class ImageReader
*
* @param listener the listener to remove
*/
- public void removeIIOReadProgressListener(IIOReadProgressListener listener)
+ public void removeIIOReadProgressListener(IIOReadProgressListener listener)
{
if (listener == null)
return;
if (progressListeners != null)
{
- progressListeners.remove(listener);
+ progressListeners.remove(listener);
}
}
@@ -1344,14 +1344,14 @@ public abstract class ImageReader
*
* @param listener the listener to remove
*/
- public void removeIIOReadUpdateListener(IIOReadUpdateListener listener)
+ public void removeIIOReadUpdateListener(IIOReadUpdateListener listener)
{
if (listener == null)
return;
if (updateListeners != null)
{
- updateListeners.remove(listener);
+ updateListeners.remove(listener);
}
}
@@ -1366,7 +1366,7 @@ public abstract class ImageReader
return;
if (warningListeners != null)
{
- warningListeners.remove(listener);
+ warningListeners.remove(listener);
}
}
@@ -1379,16 +1379,16 @@ public abstract class ImageReader
{
if (locale != null)
{
- // Check if its a valid locale.
- boolean found = false;
+ // Check if its a valid locale.
+ boolean found = false;
- if (availableLocales != null)
- for (int i = availableLocales.length - 1; i >= 0; --i)
- if (availableLocales[i].equals(locale))
- found = true;
+ if (availableLocales != null)
+ for (int i = availableLocales.length - 1; i >= 0; --i)
+ if (availableLocales[i].equals(locale))
+ found = true;
- if (! found)
- throw new IllegalArgumentException("looale not available");
+ if (! found)
+ throw new IllegalArgumentException("looale not available");
}
this.locale = locale;
@@ -1411,8 +1411,8 @@ public abstract class ImageReader
* destination band indices are invalid
*/
protected static void checkReadParamBandSettings(ImageReadParam param,
- int numSrcBands,
- int numDstBands)
+ int numSrcBands,
+ int numDstBands)
{
int[] srcBands = param.getSourceBands();
int[] dstBands = param.getDestinationBands();
@@ -1513,11 +1513,11 @@ public abstract class ImageReader
* regions is empty
*/
protected static void computeRegions (ImageReadParam param,
- int srcWidth,
- int srcHeight,
- BufferedImage image,
- Rectangle srcRegion,
- Rectangle destRegion)
+ int srcWidth,
+ int srcHeight,
+ BufferedImage image,
+ Rectangle srcRegion,
+ Rectangle destRegion)
{
if (srcRegion == null || destRegion == null)
throw new IllegalArgumentException ("null region");
@@ -1594,9 +1594,9 @@ public abstract class ImageReader
* height is greater than Integer.MAX_VALUE
*/
protected static BufferedImage getDestination (ImageReadParam param,
- Iterator<ImageTypeSpecifier> imageTypes,
- int width,
- int height)
+ Iterator<ImageTypeSpecifier> imageTypes,
+ int width,
+ int height)
throws IIOException
{
if (imageTypes == null || !imageTypes.hasNext())
@@ -1751,8 +1751,8 @@ public abstract class ImageReader
* @return a clipped rectangle
*/
protected static Rectangle getSourceRegion (ImageReadParam param,
- int srcWidth,
- int srcHeight)
+ int srcWidth,
+ int srcHeight)
{
Rectangle clippedRegion = new Rectangle (0, 0, srcWidth, srcHeight);
@@ -1870,7 +1870,7 @@ public abstract class ImageReader
* @exception IOException if a read error occurs
*/
public IIOImage readAll (int imageIndex,
- ImageReadParam param)
+ ImageReadParam param)
throws IOException
{
checkReadParamBandSettings (param,
@@ -1953,7 +1953,7 @@ public abstract class ImageReader
* @exception IOException if a read error occurs
*/
public RenderedImage readAsRenderedImage (int imageIndex,
- ImageReadParam param)
+ ImageReadParam param)
throws IOException
{
return read (imageIndex, param);
@@ -2033,4 +2033,3 @@ public abstract class ImageReader
clearAbortRequest ();
}
}
-
diff --git a/javax/imageio/ImageTranscoder.java b/javax/imageio/ImageTranscoder.java
index 1f9195f58..352bb18b7 100644
--- a/javax/imageio/ImageTranscoder.java
+++ b/javax/imageio/ImageTranscoder.java
@@ -78,8 +78,8 @@ public interface ImageTranscoder
* is null
*/
IIOMetadata convertImageMetadata(IIOMetadata inData,
- ImageTypeSpecifier imageType,
- ImageWriteParam param);
+ ImageTypeSpecifier imageType,
+ ImageWriteParam param);
/**
* Converts IIOMetadata from an input stream format, returning an
@@ -98,5 +98,5 @@ public interface ImageTranscoder
* @exception IllegalArgumentException if inData is null
*/
IIOMetadata convertStreamMetadata(IIOMetadata inData,
- ImageWriteParam param);
+ ImageWriteParam param);
}
diff --git a/javax/imageio/ImageTypeSpecifier.java b/javax/imageio/ImageTypeSpecifier.java
index 3faa3c937..da229610a 100644
--- a/javax/imageio/ImageTypeSpecifier.java
+++ b/javax/imageio/ImageTypeSpecifier.java
@@ -90,7 +90,7 @@ public class ImageTypeSpecifier
if (!colorModel.isCompatibleSampleModel(sampleModel))
throw new IllegalArgumentException
("sample Model not compatible with colorModel");
-
+
this.colorModel = colorModel;
this.sampleModel = sampleModel;
}
@@ -107,7 +107,7 @@ public class ImageTypeSpecifier
{
if (image == null)
throw new IllegalArgumentException("image may not be null");
-
+
this.colorModel = image.getColorModel();
this.sampleModel = image.getSampleModel();
}
@@ -324,11 +324,11 @@ public class ImageTypeSpecifier
* data type
*/
public static ImageTypeSpecifier createIndexed (byte[] redLUT,
- byte[] greenLUT,
- byte[] blueLUT,
- byte[] alphaLUT,
- int bits,
- int dataType)
+ byte[] greenLUT,
+ byte[] blueLUT,
+ byte[] alphaLUT,
+ int bits,
+ int dataType)
{
if (redLUT == null || greenLUT == null || blueLUT == null)
throw new IllegalArgumentException ("null colour table");
@@ -402,10 +402,10 @@ public class ImageTypeSpecifier
* one value of the given data type.
*
* @param colorSpace the color space to use in the color model
- * @param redMask the bitmask for the red bits
- * @param greenMask the bitmask for the green bits
- * @param blueMask the bitmask for the blue bits
- * @param alphaMask the bitmask for the alpha bits
+ * @param redMask the bitmask for the red bits
+ * @param greenMask the bitmask for the green bits
+ * @param blueMask the bitmask for the blue bits
+ * @param alphaMask the bitmask for the alpha bits
* @param transferType the data type used to store pixel values
* @param isAlphaPremultiplied true if other colour channels should
* be premultiplied by the alpha value, false otherwise
diff --git a/javax/imageio/ImageWriteParam.java b/javax/imageio/ImageWriteParam.java
index f4794a375..1c400e1ea 100644
--- a/javax/imageio/ImageWriteParam.java
+++ b/javax/imageio/ImageWriteParam.java
@@ -46,118 +46,118 @@ import java.util.Locale;
*/
public class ImageWriteParam extends IIOParam
{
-
- /**
+
+ /**
* Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to disable feature.
*/
public static final int MODE_DISABLED = 0;
-
- /**
- * Can be passed to setTilingMode, setProgressiveMode and
+
+ /**
+ * Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to enable feature.
*/
public static final int MODE_DEFAULT = 1;
-
- /**
+
+ /**
* Can be passed to setTilingMode, setCompressionMode to disable feature.
*/
public static final int MODE_EXPLICIT = 2;
-
- /**
- * Can be passed to setTilingMode, setProgressiveMode and
+
+ /**
+ * Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to enable feature.
*/
public static final int MODE_COPY_FROM_METADATA = 3;
-
+
/**
* True if tiling grid offset parameters can be set.
*/
protected boolean canOffsetTiles;
-
+
/**
* True if this writer can write images using compression.
*/
protected boolean canWriteCompressed;
-
+
/**
* True if images can be written as a progressive sequence
* of increasing quality.
*/
protected boolean canWriteProgressive;
-
+
/**
* True if tile width and height parameters can be set.
*/
protected boolean canWriteTiles;
-
+
/**
* Controls compression settings, which must be set to one of the four
* MODE_* values.
*/
protected int compressionMode = MODE_COPY_FROM_METADATA;
-
+
/**
* Contains the current compression quality setting.
*/
protected float compressionQuality;
-
+
/**
* Contains the name of the current compression type.
*/
protected String compressionType;
-
+
/**
* Array of the names of the available compression types.
*/
protected String[] compressionTypes;
-
+
/**
* Localizes compression type names and quality descriptions,
* or null to use default Locale.
*/
protected Locale locale;
-
+
/**
* Preferred tile size range pairs.
*/
protected Dimension[] preferredTileSizes;
-
+
/**
* The mode controlling progressive encoding, which must
* be set to one of the four MODE_* values, except
* MODE_EXPLICIT.
*/
protected int progressiveMode = MODE_COPY_FROM_METADATA;
-
+
/**
* The amount by which the tile grid origin should be offset
* horizontally from the image origin if tiling has been set.
*/
protected int tileGridXOffset;
-
+
/**
* The amount by which the tile grid origin should be offset
* vertically from the image origin if tiling has been set.
*/
protected int tileGridYOffset;
-
+
/**
* The height of each tile if tiling has been set.
*/
protected int tileHeight;
-
+
/**
* The width of each tile if tiling has been set.
*/
protected int tileWidth;
-
+
/**
* The mode controlling tiling settings, which must be
* set to one of the four MODE_* values.
*/
protected int tilingMode;
-
+
/**
* True if the tiling parameters have been specified.
*/
@@ -201,11 +201,11 @@ public class ImageWriteParam extends IIOParam
if (getCompressionMode() != MODE_EXPLICIT)
throw new IllegalStateException("compression mode is not MODE_EXPLICIT");
}
-
+
private void checkCompressionTypesSet()
{
if (getCompressionType() == null
- && getCompressionTypes() != null)
+ && getCompressionTypes() != null)
throw new IllegalStateException("no compression type set");
}
@@ -213,9 +213,9 @@ public class ImageWriteParam extends IIOParam
{
if (! canWriteProgressive())
throw new UnsupportedOperationException
- ("progressive output not supported");
+ ("progressive output not supported");
}
-
+
private void checkSupportsTiling()
{
if (! canWriteTiles())
@@ -279,7 +279,7 @@ public class ImageWriteParam extends IIOParam
{
checkNotExplicitCompression();
checkCompressionTypesSet();
-
+
return null;
}
@@ -287,7 +287,7 @@ public class ImageWriteParam extends IIOParam
{
checkNotExplicitCompression();
checkCompressionTypesSet();
-
+
return null;
}
@@ -383,9 +383,9 @@ public class ImageWriteParam extends IIOParam
{
checkSupportsCompression();
checkMode(mode);
-
+
compressionMode = mode;
-
+
if (mode == MODE_EXPLICIT)
unsetCompression();
}
@@ -409,17 +409,17 @@ public class ImageWriteParam extends IIOParam
if (types == null)
throw new UnsupportedOperationException("no settable compression types");
-
+
if (compressionType == null)
this.compressionType = null;
for (int i = types.length - 1; i >= 0; --i)
if (types[i].equals(compressionType))
- {
- this.compressionType = compressionType;
- return;
- }
-
+ {
+ this.compressionType = compressionType;
+ return;
+ }
+
throw new IllegalArgumentException("unknown compression type");
}
@@ -427,18 +427,18 @@ public class ImageWriteParam extends IIOParam
{
checkSupportsProgressiveEncoding();
checkMode(mode);
-
+
progressiveMode = mode;
}
public void setTiling(int tileWidth, int tileHeight,
- int tileGridXOffset, int tileGridYOffset)
+ int tileGridXOffset, int tileGridYOffset)
{
checkNotExplicitTiling();
if (! canOffsetTiles
- && tileGridXOffset != 0
- && tileGridYOffset != 0)
+ && tileGridXOffset != 0
+ && tileGridYOffset != 0)
throw new UnsupportedOperationException("tile offsets not supported");
if (tileWidth < 0 || tileHeight < 0)
@@ -446,18 +446,18 @@ public class ImageWriteParam extends IIOParam
if (preferredTileSizes != null)
{
- boolean found = false;
-
- for (int i = 0; i < preferredTileSizes.length; i += 2)
- {
- if (tileWidth >= preferredTileSizes[i].width
- && tileWidth <= preferredTileSizes[i + 1].width
- && tileHeight >= preferredTileSizes[i].height
- && tileHeight <= preferredTileSizes[i + 1].height)
- found = true;
- }
-
- if (! found)
+ boolean found = false;
+
+ for (int i = 0; i < preferredTileSizes.length; i += 2)
+ {
+ if (tileWidth >= preferredTileSizes[i].width
+ && tileWidth <= preferredTileSizes[i + 1].width
+ && tileHeight >= preferredTileSizes[i].height
+ && tileHeight <= preferredTileSizes[i + 1].height)
+ found = true;
+ }
+
+ if (! found)
throw new IllegalArgumentException("illegal tile size");
}
@@ -478,7 +478,7 @@ public class ImageWriteParam extends IIOParam
public void unsetCompression()
{
checkNotExplicitCompression();
-
+
compressionType = null;
compressionQuality = 1.0F;
}
@@ -486,7 +486,7 @@ public class ImageWriteParam extends IIOParam
public void unsetTiling()
{
checkNotExplicitTiling();
-
+
tileWidth = 0;
tileHeight = 0;
tileGridXOffset = 0;
diff --git a/javax/imageio/ImageWriter.java b/javax/imageio/ImageWriter.java
index 78d792c72..7a7f45e6f 100644
--- a/javax/imageio/ImageWriter.java
+++ b/javax/imageio/ImageWriter.java
@@ -76,7 +76,7 @@ public abstract class ImageWriter
implements ImageTranscoder
{
private boolean aborted;
-
+
/**
* All locales available for localization of warning messages, or
* null if localization is not supported.
@@ -138,7 +138,7 @@ public abstract class ImageWriter
if (output == null)
throw new IllegalStateException("no output set");
}
-
+
/**
* Request that writing be aborted. The unwritten portions of the
* destination image will be undefined.
@@ -392,8 +392,8 @@ public abstract class ImageWriter
* is null
*/
public abstract IIOMetadata convertImageMetadata (IIOMetadata inData,
- ImageTypeSpecifier imageType,
- ImageWriteParam param);
+ ImageTypeSpecifier imageType,
+ ImageWriteParam param);
/**
* Convert IIOMetadata from an input stream format, returning an
@@ -412,7 +412,7 @@ public abstract class ImageWriter
* @exception IllegalArgumentException if inData is null
*/
public abstract IIOMetadata convertStreamMetadata (IIOMetadata inData,
- ImageWriteParam param);
+ ImageWriteParam param);
/**
* Releases any resources allocated to this object. Subsequent
@@ -425,7 +425,7 @@ public abstract class ImageWriter
{
// The default implementation is empty. Subclasses have to overwrite it.
}
-
+
/**
* Retrieve the available locales. Return null if no locales are
* available or a clone of availableLocales.
@@ -504,7 +504,7 @@ public abstract class ImageWriter
*/
public int getNumThumbnailsSupported (ImageTypeSpecifier imageType,
ImageWriteParam param,
- IIOMetadata streamMetadata,
+ IIOMetadata streamMetadata,
IIOMetadata imageMetadata)
{
return 0;
@@ -553,9 +553,9 @@ public abstract class ImageWriter
* if the size is unknown (insufficient information was provided)
*/
public Dimension[] getPreferredThumbnailSizes (ImageTypeSpecifier imageType,
- ImageWriteParam param,
- IIOMetadata streamMetadata,
- IIOMetadata imageMetadata)
+ ImageWriteParam param,
+ IIOMetadata streamMetadata,
+ IIOMetadata imageMetadata)
{
return null;
}
@@ -568,14 +568,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageComplete(this);
+ }
}
}
@@ -591,14 +591,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageProgress(this, percentageDone);
+ }
}
}
@@ -614,14 +614,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageStarted(this, imageIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageStarted(this, imageIndex);
+ }
}
}
@@ -634,14 +634,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailComplete(this);
+ }
}
}
@@ -657,14 +657,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailProgress(this, percentageDone);
+ }
}
}
@@ -682,14 +682,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
+ }
}
}
@@ -707,14 +707,14 @@ public abstract class ImageWriter
{
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteWarningListener listener =
- (IIOWriteWarningListener) it.next();
- listener.warningOccurred(this, imageIndex, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteWarningListener listener =
+ (IIOWriteWarningListener) it.next();
+ listener.warningOccurred(this, imageIndex, warning);
+ }
}
}
@@ -741,8 +741,8 @@ public abstract class ImageWriter
* not a String
*/
protected void processWarningOccurred(int imageIndex,
- String baseName,
- String keyword)
+ String baseName,
+ String keyword)
{
if (baseName == null || keyword == null)
throw new IllegalArgumentException ("null argument");
@@ -751,22 +751,22 @@ public abstract class ImageWriter
try
{
- b = ResourceBundle.getBundle(baseName, getLocale());
+ b = ResourceBundle.getBundle(baseName, getLocale());
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no resource bundle found");
+ throw new IllegalArgumentException ("no resource bundle found");
}
Object str = null;
try
{
- str = b.getObject(keyword);
+ str = b.getObject(keyword);
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no results found for keyword");
+ throw new IllegalArgumentException ("no results found for keyword");
}
if (! (str instanceof String))
@@ -776,14 +776,14 @@ public abstract class ImageWriter
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteWarningListener listener =
- (IIOWriteWarningListener) it.next();
- listener.warningOccurred(this, imageIndex, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteWarningListener listener =
+ (IIOWriteWarningListener) it.next();
+ listener.warningOccurred(this, imageIndex, warning);
+ }
}
}
@@ -791,18 +791,18 @@ public abstract class ImageWriter
* Notifies all installed write progress listeners that image
* loading has been aborted by calling their writeAborted methods.
*/
- protected void processWriteAborted()
+ protected void processWriteAborted()
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.writeAborted(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.writeAborted(this);
+ }
}
}
@@ -813,7 +813,7 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- progressListeners.clear();
+ progressListeners.clear();
}
}
@@ -824,7 +824,7 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- progressListeners.clear();
+ progressListeners.clear();
}
}
@@ -839,7 +839,7 @@ public abstract class ImageWriter
return;
if (progressListeners != null)
{
- progressListeners.remove(listener);
+ progressListeners.remove(listener);
}
}
/**
@@ -853,7 +853,7 @@ public abstract class ImageWriter
return;
if (warningListeners != null)
{
- warningListeners.remove(listener);
+ warningListeners.remove(listener);
}
}
/**
@@ -867,7 +867,7 @@ public abstract class ImageWriter
removeAllIIOWriteProgressListeners();
clearAbortRequest();
}
-
+
/**
* Set the current locale or use the default locale.
*
@@ -877,16 +877,16 @@ public abstract class ImageWriter
{
if (locale != null)
{
- // Check if its a valid locale.
- boolean found = false;
+ // Check if its a valid locale.
+ boolean found = false;
- if (availableLocales != null)
- for (int i = availableLocales.length - 1; i >= 0; --i)
- if (availableLocales[i].equals(locale))
- found = true;
+ if (availableLocales != null)
+ for (int i = availableLocales.length - 1; i >= 0; --i)
+ if (availableLocales[i].equals(locale))
+ found = true;
- if (! found)
- throw new IllegalArgumentException("looale not available");
+ if (! found)
+ throw new IllegalArgumentException("looale not available");
}
this.locale = locale;
@@ -908,20 +908,20 @@ public abstract class ImageWriter
{
if (output != null)
{
- // Check if its a valid output object.
- boolean found = false;
- Class[] types = null;
-
- if (originatingProvider != null)
- types = originatingProvider.getOutputTypes();
-
- if (types != null)
- for (int i = types.length - 1; i >= 0; --i)
+ // Check if its a valid output object.
+ boolean found = false;
+ Class[] types = null;
+
+ if (originatingProvider != null)
+ types = originatingProvider.getOutputTypes();
+
+ if (types != null)
+ for (int i = types.length - 1; i >= 0; --i)
if (types[i].isInstance(output))
found = true;
- if (! found)
- throw new IllegalArgumentException("output type not available");
+ if (! found)
+ throw new IllegalArgumentException("output type not available");
}
this.output = output;
diff --git a/javax/imageio/event/IIOReadProgressListener.java b/javax/imageio/event/IIOReadProgressListener.java
index 404336c24..0eea61017 100644
--- a/javax/imageio/event/IIOReadProgressListener.java
+++ b/javax/imageio/event/IIOReadProgressListener.java
@@ -46,7 +46,7 @@ public interface IIOReadProgressListener extends EventListener
{
/**
* Reports that the current image read operation has completed.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
*/
void imageComplete(ImageReader source);
@@ -54,7 +54,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports the approximate percentage of completions of this image read
* operation.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param percentageDone the approximate percentage of encoding completed
*/
@@ -62,7 +62,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that the current image read operation has started.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param imageIndex the index of the image to read
*/
@@ -70,21 +70,21 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a read operation has been aborted.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
*/
void readAborted(ImageReader source);
/**
* Reports that a sequence of read operationshas completed.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
*/
void sequenceComplete(ImageReader source);
/**
* Reports that a sequence of read operations is beginning.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param minIndex the index of the first image to be read
*/
@@ -92,7 +92,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a thumbnail read operation has completed.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
*/
void thumbnailComplete(ImageReader source);
@@ -100,7 +100,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of a thumbnail read
* operation.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param percentageDone the approximate percentage of encoding completed
*/
@@ -108,7 +108,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a thumbnail read operation is beginning.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param imageIndex the index of the image being read
* @param thumbnailIndex the index of the thumbnail being read
diff --git a/javax/imageio/event/IIOReadUpdateListener.java b/javax/imageio/event/IIOReadUpdateListener.java
index 77b1a4e07..a20a99ebc 100644
--- a/javax/imageio/event/IIOReadUpdateListener.java
+++ b/javax/imageio/event/IIOReadUpdateListener.java
@@ -47,7 +47,7 @@ public interface IIOReadUpdateListener extends EventListener
{
/**
* Reports that a given region of the image has been updated.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param image the BufferedImage being updated
* @param minX the X coordinate of the leftmost updated column of pixels
@@ -64,7 +64,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current read operation has completed a progressive pass.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param image the BufferedImage being updated
*/
@@ -72,7 +72,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current read operation is about to begin a progressive pass.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param image the BufferedImage being updated
* @param pass the numer of the pass that is about to begin, starting with 0
@@ -90,7 +90,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current thumbnail read operation has completed a progressive pass.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param image the BufferedImage being updated
*/
@@ -98,7 +98,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current thumbnail read operation is about to begin a progressive pass.
- *
+ *
* @param source the <code>ImageReader</code> object calling this method
* @param image the BufferedImage being updated
* @param pass the numer of the pass that is about to begin, starting with 0
diff --git a/javax/imageio/event/IIOWriteProgressListener.java b/javax/imageio/event/IIOWriteProgressListener.java
index 16b8891f0..d75976205 100644
--- a/javax/imageio/event/IIOWriteProgressListener.java
+++ b/javax/imageio/event/IIOWriteProgressListener.java
@@ -46,7 +46,7 @@ public interface IIOWriteProgressListener extends EventListener
{
/**
* Reports that an image write operation has completed.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
*/
void imageComplete(ImageWriter source);
@@ -54,7 +54,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of an image write
* operation.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
* @param percentageDone the approximate percentage of decoding completed
*/
@@ -62,7 +62,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation has started.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
* @param imageIndex the index of the image being written
*/
@@ -70,7 +70,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation has completed.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
*/
void thumbnailComplete(ImageWriter source);
@@ -78,7 +78,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of a thumbnail write
* operation.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
* @param percentageDone the approximate percentage of decoding completed
*/
@@ -86,7 +86,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation is beginning.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
* @param imageIndex the index of the image being written
* @param thumnailIndex the index of the thumbnail being written
@@ -95,7 +95,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that an image write operation is aborted.
- *
+ *
* @param source the <code>ImageWriter</code> object calling this method
*/
void writeAborted(ImageWriter source);
diff --git a/javax/imageio/metadata/IIOInvalidTreeException.java b/javax/imageio/metadata/IIOInvalidTreeException.java
index 18d5bf617..b79b8cf96 100644
--- a/javax/imageio/metadata/IIOInvalidTreeException.java
+++ b/javax/imageio/metadata/IIOInvalidTreeException.java
@@ -55,7 +55,7 @@ public class IIOInvalidTreeException extends IIOException
}
public IIOInvalidTreeException(String message, Throwable cause,
- Node offendingNode)
+ Node offendingNode)
{
super(message, cause);
this.offendingNode = offendingNode;
diff --git a/javax/imageio/metadata/IIOMetadata.java b/javax/imageio/metadata/IIOMetadata.java
index e5105de2c..b898b9942 100644
--- a/javax/imageio/metadata/IIOMetadata.java
+++ b/javax/imageio/metadata/IIOMetadata.java
@@ -162,39 +162,39 @@ public abstract class IIOMetadata
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
String formatClassName = null;
if (isStandardMetadataFormatSupported()
- && formatName.equals(nativeMetadataFormatName))
+ && formatName.equals(nativeMetadataFormatName))
formatClassName = nativeMetadataFormatClassName;
else
{
- String[] extraFormatNames = getExtraMetadataFormatNames();
-
- for (int i = extraFormatNames.length - 1; i >= 0; --i)
- if (extraFormatNames[i].equals(formatName))
- {
- formatClassName = extraFormatNames[i];
- break;
- }
+ String[] extraFormatNames = getExtraMetadataFormatNames();
+
+ for (int i = extraFormatNames.length - 1; i >= 0; --i)
+ if (extraFormatNames[i].equals(formatName))
+ {
+ formatClassName = extraFormatNames[i];
+ break;
+ }
}
if (formatClassName == null)
throw new IllegalArgumentException("unknown format");
IIOMetadataFormat format;
-
+
try
{
- format = (IIOMetadataFormat) Class.forName(formatClassName)
- .newInstance();
+ format = (IIOMetadataFormat) Class.forName(formatClassName)
+ .newInstance();
}
catch (Exception e)
{
- IllegalStateException ise = new IllegalStateException();
- ise.initCause(e);
- throw ise;
+ IllegalStateException ise = new IllegalStateException();
+ ise.initCause(e);
+ throw ise;
}
return format;
@@ -203,18 +203,18 @@ public abstract class IIOMetadata
public String[] getMetadataFormatNames()
{
String[] formatNames = getExtraMetadataFormatNames();
-
+
if (isStandardMetadataFormatSupported())
{
// Combine native metadata format name and extra metadata format names
- // into one String array.
- String[] tmp = new String[formatNames.length + 1];
- tmp[0] = getNativeMetadataFormatName();
+ // into one String array.
+ String[] tmp = new String[formatNames.length + 1];
+ tmp[0] = getNativeMetadataFormatName();
- for (int i = 1; i < tmp.length; ++i)
- tmp[i] = formatNames[i - 1];
+ for (int i = 1; i < tmp.length; ++i)
+ tmp[i] = formatNames[i - 1];
- formatNames = tmp;
+ formatNames = tmp;
}
return formatNames;
@@ -287,7 +287,7 @@ public abstract class IIOMetadata
}
private void appendChild (IIOMetadataNode node,
- IIOMetadataNode child)
+ IIOMetadataNode child)
{
if (child != null)
node.appendChild(child);
diff --git a/javax/imageio/metadata/IIOMetadataFormatImpl.java b/javax/imageio/metadata/IIOMetadataFormatImpl.java
index 444497d7d..efea723f9 100644
--- a/javax/imageio/metadata/IIOMetadataFormatImpl.java
+++ b/javax/imageio/metadata/IIOMetadataFormatImpl.java
@@ -88,18 +88,18 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected String defaultValue;
public IIOMetadataNodeAttr (Element owner,
- String name,
- String defaultValue)
+ String name,
+ String defaultValue)
{
this (owner, name, IIOMetadataFormat.DATATYPE_STRING,
true, defaultValue);
}
public IIOMetadataNodeAttr (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue)
{
this.owner = owner;
this.name = name;
@@ -160,11 +160,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected List enumeratedValues;
public IIOMetadataNodeAttrEnumerated (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue,
- List enumeratedValues)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue,
+ List enumeratedValues)
{
super (owner, name, dataType, required, defaultValue);
this.enumeratedValues = new ArrayList (enumeratedValues);
@@ -184,14 +184,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected boolean maxInclusive;
public IIOMetadataNodeAttrBounded (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue,
- String minValue,
- String maxValue,
- boolean minInclusive,
- boolean maxInclusive)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue,
+ String minValue,
+ String maxValue,
+ boolean minInclusive,
+ boolean maxInclusive)
{
super (owner, name, dataType, required, defaultValue);
this.minValue = minValue;
@@ -217,11 +217,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected int listMaxLength;
public IIOMetadataNodeAttrList (Element owner,
- String name,
- int dataType,
- boolean required,
- int listMinLength,
- int listMaxLength)
+ String name,
+ int dataType,
+ boolean required,
+ int listMinLength,
+ int listMaxLength)
{
super (owner, name, dataType, required, null);
this.listMinLength = listMinLength;
@@ -398,8 +398,8 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
throw new IllegalArgumentException ("null argument");
if (childPolicy < IIOMetadataFormat.CHILD_POLICY_ALL
- || childPolicy > IIOMetadataFormat.CHILD_POLICY_SOME
- || childPolicy == IIOMetadataFormat.CHILD_POLICY_REPEAT)
+ || childPolicy > IIOMetadataFormat.CHILD_POLICY_SOME
+ || childPolicy == IIOMetadataFormat.CHILD_POLICY_REPEAT)
throw new IllegalArgumentException ("wrong child policy");
nodes.put (rootName, new IIOMetadataNode (rootName));
@@ -423,8 +423,8 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
* zero or greater than maxChildren
*/
public IIOMetadataFormatImpl (String rootName,
- int minChildren,
- int maxChildren)
+ int minChildren,
+ int maxChildren)
{
if (rootName == null)
throw new IllegalArgumentException ("null argument");
@@ -446,10 +446,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttr (node,
- attrName,
- dataType,
- required,
- defaultValue));
+ attrName,
+ dataType,
+ required,
+ defaultValue));
}
protected void addAttribute (String elementName,
@@ -461,11 +461,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node,
- attrName,
- dataType,
- required,
- defaultValue,
- enumeratedValues));
+ attrName,
+ dataType,
+ required,
+ defaultValue,
+ enumeratedValues));
}
protected void addAttribute (String elementName,
@@ -480,14 +480,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrBounded (node,
- attrName,
- dataType,
- required,
- defaultValue,
- minValue,
- maxValue,
- minInclusive,
- maxInclusive));
+ attrName,
+ dataType,
+ required,
+ defaultValue,
+ minValue,
+ maxValue,
+ minInclusive,
+ maxInclusive));
}
protected void addAttribute (String elementName,
@@ -499,11 +499,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrList (node,
- attrName,
- dataType,
- required,
- listMinLength,
- listMaxLength));
+ attrName,
+ dataType,
+ required,
+ listMinLength,
+ listMaxLength));
}
protected void addBooleanAttribute (String elementName,
@@ -518,11 +518,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
enumeratedValues.add ("FALSE");
node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node,
- attrName,
- IIOMetadataFormat.DATATYPE_BOOLEAN,
- hasDefaultValue,
- defaultValue ? "TRUE" : "FALSE",
- enumeratedValues));
+ attrName,
+ IIOMetadataFormat.DATATYPE_BOOLEAN,
+ hasDefaultValue,
+ defaultValue ? "TRUE" : "FALSE",
+ enumeratedValues));
}
protected void addChildElement (String elementName, String parentName)
diff --git a/javax/imageio/metadata/IIOMetadataNode.java b/javax/imageio/metadata/IIOMetadataNode.java
index 37269f539..db3de2347 100644
--- a/javax/imageio/metadata/IIOMetadataNode.java
+++ b/javax/imageio/metadata/IIOMetadataNode.java
@@ -165,7 +165,7 @@ public class IIOMetadataNode
private class IIONodeList implements NodeList
{
List children = new ArrayList();
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#item(int)
*/
@@ -187,7 +187,7 @@ public class IIOMetadataNode
{
// Do nothing here.
}
-
+
public IIOMetadataNode(String nodename)
{
name = nodename;
@@ -202,7 +202,7 @@ public class IIOMetadataNode
{
obj = o;
}
-
+
public short compareDocumentPosition(Node other)
throws DOMException
{
@@ -260,7 +260,7 @@ public class IIOMetadataNode
getElementsRecurse(list, name);
}
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#getElementsByTagName(java.lang.String)
*/
@@ -280,7 +280,7 @@ public class IIOMetadataNode
getElementsRecurse(list, name);
return list;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#getTagName()
*/
@@ -288,7 +288,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#hasAttribute(java.lang.String)
*/
@@ -296,7 +296,7 @@ public class IIOMetadataNode
{
return attrs.containsKey(name);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#hasAttributeNS(java.lang.String, java.lang.String)
*/
@@ -304,7 +304,7 @@ public class IIOMetadataNode
{
return attrs.containsKey(localName);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#removeAttribute(java.lang.String)
*/
@@ -320,7 +320,7 @@ public class IIOMetadataNode
{
return (Attr)attrs.remove(oldAttr.getName());
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#removeAttributeNS(java.lang.String, java.lang.String)
*/
@@ -328,7 +328,7 @@ public class IIOMetadataNode
{
removeAttribute(localName);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttribute(java.lang.String, java.lang.String)
*/
@@ -340,7 +340,7 @@ public class IIOMetadataNode
else
attrs.put(name, new IIOMetadataNodeAttr(this, name, value));
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNode(org.w3c.dom.Attr)
*/
@@ -348,7 +348,7 @@ public class IIOMetadataNode
{
return (Attr)attrs.put(newAttr.getName(), newAttr);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNodeNS(org.w3c.dom.Attr)
*/
@@ -356,15 +356,15 @@ public class IIOMetadataNode
{
return (Attr)attrs.put(newAttr.getName(), newAttr);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
*/
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)
{
- setAttribute(qualifiedName, value);
+ setAttribute(qualifiedName, value);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#getLength()
*/
@@ -372,7 +372,7 @@ public class IIOMetadataNode
{
return children.size();
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#item(int)
*/
@@ -383,7 +383,7 @@ public class IIOMetadataNode
else
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node)
*/
@@ -391,9 +391,9 @@ public class IIOMetadataNode
{
if (newChild == null)
throw new IllegalArgumentException("Child node is null");
-
+
IIOMetadataNode child = (IIOMetadataNode) newChild;
-
+
children.add(child);
child.parent = this;
return this;
@@ -412,7 +412,7 @@ public class IIOMetadataNode
for (int i=0; i < children.size(); i++)
newnode.children.add(((Node)children.get(i)).cloneNode(deep));
}
-
+
// clone attrs
for (Iterator it = attrs.values().iterator(); it.hasNext();)
{
@@ -452,7 +452,7 @@ public class IIOMetadataNode
{
return (children.size() > 0) ? (Node)children.get(0) : null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getLastChild()
*/
@@ -469,7 +469,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNamespaceURI()
*/
@@ -477,7 +477,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNextSibling()
*/
@@ -497,7 +497,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNodeType()
*/
@@ -530,7 +530,7 @@ public class IIOMetadataNode
{
return parent;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getPrefix()
*/
@@ -538,7 +538,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getPreviousSibling()
*/
@@ -566,7 +566,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#hasAttributes()
*/
@@ -574,7 +574,7 @@ public class IIOMetadataNode
{
return !attrs.isEmpty();
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#hasChildNodes()
*/
@@ -590,14 +590,14 @@ public class IIOMetadataNode
{
if (newChild == null)
throw new IllegalArgumentException();
-
+
int idx = children.indexOf(refChild);
if (idx == -1)
children.add(newChild);
else
children.add(idx, newChild);
((IIOMetadataNode)newChild).parent = this;
-
+
return newChild;
}
@@ -610,12 +610,12 @@ public class IIOMetadataNode
{
return true;
}
-
+
public boolean isSameNode(Node other)
{
return this == other;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#isSupported(java.lang.String, java.lang.String)
*/
@@ -624,12 +624,12 @@ public class IIOMetadataNode
// No DOM features are supported
return false;
}
-
+
public String lookupNamespaceURI(String prefix)
{
return null;
}
-
+
public String lookupPrefix(String namespaceURI)
{
return null;
@@ -667,7 +667,7 @@ public class IIOMetadataNode
((IIOMetadataNode)oldChild).parent = null;
return oldChild;
}
-
+
public void setIdAttribute(String name, boolean isId)
throws DOMException
{
@@ -682,14 +682,14 @@ public class IIOMetadataNode
throws DOMException
{
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#setNodeValue(java.lang.String)
*/
public void setNodeValue(String nodeValue) throws DOMException
{
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#setPrefix(java.lang.String)
*/
@@ -701,7 +701,7 @@ public class IIOMetadataNode
throws DOMException
{
}
-
+
public Object setUserData(String key, Object data, UserDataHandler handler)
{
return null;
diff --git a/javax/imageio/plugins/bmp/BMPImageWriteParam.java b/javax/imageio/plugins/bmp/BMPImageWriteParam.java
index de59efba4..cc0e0d34c 100644
--- a/javax/imageio/plugins/bmp/BMPImageWriteParam.java
+++ b/javax/imageio/plugins/bmp/BMPImageWriteParam.java
@@ -1,4 +1,4 @@
-/* BMPImageWriteParam.java --
+/* BMPImageWriteParam.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,25 +43,25 @@ import java.util.Locale;
import javax.imageio.ImageWriteParam;
/**
- * A class to encode images in the BMP format.
+ * A class to encode images in the BMP format.
* By default, the data layout is bottom-up, such that the pixels are stored in
- * bottom-up order.
- *
- * The compression scheme can be specified by using setCompressionType()
+ * bottom-up order.
+ *
+ * The compression scheme can be specified by using setCompressionType()
* appropriate type string. The compression scheme specified will be honored
- * if it is compatible with the type of image being written. If the
+ * if it is compatible with the type of image being written. If the
* compression scheme is not compatible with the type of image being written,
- * then an IOException will be thrown by the BMP image writer. If the
+ * then an IOException will be thrown by the BMP image writer. If the
* compression type is not set, then getCompressionType() will return null.
- * In this case the BMP image writer will select a compression type that
- * supports encoding of the given image without loss of the color resolution.
- *
- * The compression type strings and the image type each supports are:
- * Uncompressed RLE: BI_RGB, image type: <= 8-bits/sample.
- * 8-bit Run Length Encoding: BI_RLE8, image type: <= 8-bits/sample
- * 4-bit Run Length Encoding: BI_RLE4, image type: <= 4-bits/sample
+ * In this case the BMP image writer will select a compression type that
+ * supports encoding of the given image without loss of the color resolution.
+ *
+ * The compression type strings and the image type each supports are:
+ * Uncompressed RLE: BI_RGB, image type: <= 8-bits/sample.
+ * 8-bit Run Length Encoding: BI_RLE8, image type: <= 8-bits/sample
+ * 4-bit Run Length Encoding: BI_RLE4, image type: <= 4-bits/sample
* Packed data: BI_BITFIELDS, image type: 16 or 32 bits/sample
- *
+ *
* @author Lillian Angel (langel at redhat dot com)
*/
public class BMPImageWriteParam
@@ -72,7 +72,7 @@ public class BMPImageWriteParam
* This boolean is true if the data will be written in a topdown manner.
*/
private boolean topDown;
-
+
/**
* Compression type strings.
*/
@@ -80,7 +80,7 @@ public class BMPImageWriteParam
String rle8 = "BI_RLE8";
String rle4 = "BI_RLE4";
String bitfields = "BI_BITFIELDS";
-
+
/**
* Constants to represent image types.
*/
@@ -88,7 +88,7 @@ public class BMPImageWriteParam
static final int BI_RLE8 = 1;
static final int BI_RLE4 = 2;
static final int BI_BITFIELDS = 3;
-
+
/**
* Constructs an <code>BMPImageWriteParam</code> object with default values
* and a <code>null Locale</code>.
@@ -101,7 +101,7 @@ public class BMPImageWriteParam
/**
* Constructs a <code>BMPImageWriteParam</code> set to use a given
* <code>Locale</code> and with default values for all parameters.
- *
+ *
* @param locale - a <code>Locale</code> to be used to localize compression
* type names and quality descriptions, or <code>null</code>.
*/
@@ -110,20 +110,20 @@ public class BMPImageWriteParam
super(locale);
topDown = false;
canWriteCompressed = true;
-
+
compressionTypes = new String[4];
compressionTypes[BI_RGB] = rgb;
compressionTypes[BI_RLE8] = rle8;
compressionTypes[BI_RLE4] = rle4;
compressionTypes[BI_BITFIELDS] = bitfields;
-
+
compressionType = compressionTypes[BI_RGB];
}
/**
* If set, the data will be written out in a top-down manner, the first
* scanline being written first.
- *
+ *
* @param topDown - whether the data are written in top-down order.
*/
public void setTopDown(boolean topDown)
@@ -134,7 +134,7 @@ public class BMPImageWriteParam
/**
* Returns the value of the <code>topDown</code> parameter. The default is
* false.
- *
+ *
* @return whether the data are written in top-down order.
*/
public boolean isTopDown()
diff --git a/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java b/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
index 378e11fa6..be718d4fc 100644
--- a/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
+++ b/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
@@ -162,7 +162,7 @@ public class JPEGHuffmanTable
* the array arguments. lengths[index] stores the number of Huffman
* values with Huffman codes of length index + 1. The values array
* stores the Huffman values in order of increasing code length.
- *
+ *
* @param lengths an array of Huffman code lengths
* @param values a sorted array of Huffman values
* @throws IllegalArgumentException if either parameter is null, if
@@ -266,17 +266,17 @@ public class JPEGHuffmanTable
public String toString()
{
CPStringBuilder buffer = new CPStringBuilder();
-
+
buffer.append("JPEGHuffmanTable:\nlengths:");
-
+
for (int i = 0; i < lengths.length; i++)
buffer.append(" " + lengths[i]);
-
+
buffer.append("\nvalues:");
-
+
for (int i = 0; i < values.length; i++)
buffer.append(" " + values[i]);
-
+
return buffer.toString();
}
}
diff --git a/javax/imageio/spi/IIORegistry.java b/javax/imageio/spi/IIORegistry.java
index 101cead4e..faa571d60 100644
--- a/javax/imageio/spi/IIORegistry.java
+++ b/javax/imageio/spi/IIORegistry.java
@@ -54,7 +54,7 @@ import gnu.javax.imageio.png.PNGImageReaderSpi;
public final class IIORegistry extends ServiceRegistry
{
private static final HashSet defaultCategories = new HashSet();
-
+
private static HashMap instances = new HashMap();
static
@@ -65,19 +65,19 @@ public final class IIORegistry extends ServiceRegistry
defaultCategories.add(ImageInputStreamSpi.class);
defaultCategories.add(ImageOutputStreamSpi.class);
}
-
+
public static synchronized IIORegistry getDefaultInstance()
{
// XXX: This leaks memory if a ThreadGroup isn't available anymore.
ThreadGroup group = Thread.currentThread().getThreadGroup();
IIORegistry registry = (IIORegistry) instances.get(group);
-
+
if (registry == null)
{
registry = new IIORegistry();
instances.put(group, registry);
}
-
+
return registry;
}
@@ -94,7 +94,7 @@ public final class IIORegistry extends ServiceRegistry
Toolkit toolkit = Toolkit.getDefaultToolkit();
if (toolkit instanceof ClasspathToolkit)
((ClasspathToolkit)toolkit).registerImageIOSpis(this);
-
+
registerApplicationClasspathSpis();
}
@@ -109,11 +109,11 @@ public final class IIORegistry extends ServiceRegistry
while (categories.hasNext())
{
- Class category = (Class) categories.next();
- Iterator providers = ServiceFactory.lookupProviders(category, loader);
+ Class category = (Class) categories.next();
+ Iterator providers = ServiceFactory.lookupProviders(category, loader);
- while (providers.hasNext())
- registerServiceProvider((IIOServiceProvider) providers.next());
+ while (providers.hasNext())
+ registerServiceProvider((IIOServiceProvider) providers.next());
}
}
}
diff --git a/javax/imageio/spi/ImageReaderSpi.java b/javax/imageio/spi/ImageReaderSpi.java
index e97d23940..3ffa93a0b 100644
--- a/javax/imageio/spi/ImageReaderSpi.java
+++ b/javax/imageio/spi/ImageReaderSpi.java
@@ -84,7 +84,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi
if (inputTypes == null
|| inputTypes.length == 0)
throw new IllegalArgumentException("inputTypes may not be null or empty");
-
+
this.inputTypes = inputTypes;
this.writerSpiNames = writerSpiNames;
}
@@ -115,7 +115,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi
{
if (reader == null)
throw new IllegalArgumentException("reader may not be null");
-
+
return pluginClassName.equals(reader.getClass().getName());
}
}
diff --git a/javax/imageio/spi/ImageWriterSpi.java b/javax/imageio/spi/ImageWriterSpi.java
index 3ec52c51c..6a07348cf 100644
--- a/javax/imageio/spi/ImageWriterSpi.java
+++ b/javax/imageio/spi/ImageWriterSpi.java
@@ -89,9 +89,9 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi
if (outputTypes == null
|| outputTypes.length == 0)
throw new IllegalArgumentException("outputTypes may not be null or empty");
-
+
this.outputTypes = outputTypes;
- this.readerSpiNames = readerSpiNames;
+ this.readerSpiNames = readerSpiNames;
}
public abstract boolean canEncodeImage(ImageTypeSpecifier type);
diff --git a/javax/imageio/spi/RegisterableService.java b/javax/imageio/spi/RegisterableService.java
index 7be5a1bea..b424e04a3 100644
--- a/javax/imageio/spi/RegisterableService.java
+++ b/javax/imageio/spi/RegisterableService.java
@@ -80,4 +80,3 @@ public interface RegisterableService
*/
void onDeregistration(ServiceRegistry registry, Class<?> category);
}
-
diff --git a/javax/imageio/spi/ServiceRegistry.java b/javax/imageio/spi/ServiceRegistry.java
index 170ea009a..d92359688 100644
--- a/javax/imageio/spi/ServiceRegistry.java
+++ b/javax/imageio/spi/ServiceRegistry.java
@@ -107,11 +107,11 @@ public class ServiceRegistry
*/
private IdentityHashMap[] constraints;
-
+
/**
* Constructs a <code>ServiceRegistry</code> for the specified
* service categories.
- *
+ *
* @param categories the categories to support
*
* @throws IllegalArgumentException if <code>categories</code> is
@@ -475,8 +475,8 @@ public class ServiceRegistry
return deregisterServiceProvider(provider, i);
throw new IllegalArgumentException();
}
-
-
+
+
/**
* De-registers a provider from all service categories it
* implements.
@@ -704,7 +704,7 @@ public class ServiceRegistry
provs = providers[catid];
if (provs == null)
return Collections.EMPTY_LIST.iterator();
-
+
result = new ArrayList(provs.size());
for (Iterator iter = provs.iterator(); iter.hasNext();)
{
@@ -728,7 +728,7 @@ public class ServiceRegistry
if (o1 == o2)
return 0;
-
+
s = (Set) cons.get(o1);
if (s != null && s.contains(o2))
return -1; // o1 < o2
@@ -749,7 +749,7 @@ public class ServiceRegistry
/**
* Returns one of the service providers that is a subclass of the
* specified class.
- *
+ *
* @param providerClass a class to search for.
*/
public synchronized <T> T getServiceProviderByClass(Class<T> providerClass)
@@ -764,7 +764,7 @@ public class ServiceRegistry
{
if (!categories[cat].isAssignableFrom(providerClass))
continue;
-
+
LinkedList provs = providers[cat];
if (provs == null)
continue;
@@ -959,4 +959,3 @@ public class ServiceRegistry
boolean filter(Object provider);
}
}
-
diff --git a/javax/imageio/stream/FileCacheImageInputStream.java b/javax/imageio/stream/FileCacheImageInputStream.java
index 40fed63af..2717e079d 100644
--- a/javax/imageio/stream/FileCacheImageInputStream.java
+++ b/javax/imageio/stream/FileCacheImageInputStream.java
@@ -49,7 +49,7 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
private InputStream stream;
private File cacheDir;
-
+
public FileCacheImageInputStream(InputStream stream, File cacheDir)
throws IOException
{
@@ -64,8 +64,8 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
if (stream != null)
{
- stream.close();
- stream = null;
+ stream.close();
+ stream = null;
}
}
@@ -85,7 +85,7 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
return true;
}
-
+
public boolean isCachedMemory()
{
return false;
diff --git a/javax/imageio/stream/FileCacheImageOutputStream.java b/javax/imageio/stream/FileCacheImageOutputStream.java
index 47b7bb85a..1d73a05e5 100644
--- a/javax/imageio/stream/FileCacheImageOutputStream.java
+++ b/javax/imageio/stream/FileCacheImageOutputStream.java
@@ -84,12 +84,12 @@ public class FileCacheImageOutputStream extends ImageOutputStreamImpl
{
return true;
}
-
+
public boolean isCachedMemory()
{
return false;
}
-
+
public int read()
throws IOException
{
diff --git a/javax/imageio/stream/FileImageInputStream.java b/javax/imageio/stream/FileImageInputStream.java
index 4fa1ac8a3..abdd997ba 100644
--- a/javax/imageio/stream/FileImageInputStream.java
+++ b/javax/imageio/stream/FileImageInputStream.java
@@ -49,7 +49,7 @@ import java.io.RandomAccessFile;
public class FileImageInputStream extends ImageInputStreamImpl
{
private RandomAccessFile file;
-
+
public FileImageInputStream(File file)
throws FileNotFoundException, IOException
{
diff --git a/javax/imageio/stream/FileImageOutputStream.java b/javax/imageio/stream/FileImageOutputStream.java
index e1ce5c25e..7d5d8fbe0 100644
--- a/javax/imageio/stream/FileImageOutputStream.java
+++ b/javax/imageio/stream/FileImageOutputStream.java
@@ -49,7 +49,7 @@ import java.io.RandomAccessFile;
public class FileImageOutputStream extends ImageOutputStreamImpl
{
private RandomAccessFile file;
-
+
public FileImageOutputStream(File file)
throws FileNotFoundException, IOException
{
@@ -92,7 +92,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
setBitOffset(0);
return file.read();
}
@@ -101,7 +101,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
setBitOffset(0);
return file.read(data, offset, len);
}
@@ -117,7 +117,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
flushBits();
file.write(data, offset, len);
}
@@ -126,7 +126,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
// FIXME: Flush pending bits.
file.write(value);
}
diff --git a/javax/imageio/stream/ImageInputStream.java b/javax/imageio/stream/ImageInputStream.java
index 4d1b5d57a..dd57ca611 100644
--- a/javax/imageio/stream/ImageInputStream.java
+++ b/javax/imageio/stream/ImageInputStream.java
@@ -58,7 +58,7 @@ public interface ImageInputStream
void setByteOrder(ByteOrder order);
ByteOrder getByteOrder();
-
+
int read()
throws IOException;
@@ -156,7 +156,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all two
* bytes were read.
*
@@ -178,7 +178,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* <p>This method does the same as {@link #readChar()}.
*
* @throws EOFException if the input stream ends before all two
@@ -202,7 +202,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* <p>This method does the same as {@link #readUnsignedShort()}.
*
* @throws EOFException if the input stream ends before all two
@@ -224,7 +224,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -245,7 +245,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -266,7 +266,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all eight
* bytes were read.
*
@@ -286,7 +286,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -306,7 +306,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all eight
* bytes were read.
*
@@ -331,7 +331,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param b an array for storing the read values.
*
* @param offset the index of the first element in <code>b</code>
@@ -364,7 +364,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param b an array for storing the read values.
*
* @throws NullPointerException if <code>b</code> is
@@ -391,7 +391,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param s an array for storing the read values.
*
* @param offset the index of the first element in <code>s</code>
@@ -427,7 +427,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param c an array for storing the read values.
*
* @param offset the index of the first element in <code>c</code>
@@ -463,7 +463,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param i an array for storing the read values.
*
* @param offset the index of the first element in <code>i</code>
@@ -499,7 +499,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param l an array for storing the read values.
*
* @param offset the index of the first element in <code>l</code>
@@ -535,7 +535,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param d an array for storing the read values.
*
* @param offset the index of the first element in <code>d</code>
@@ -572,7 +572,7 @@ public interface ImageInputStream
*
* <p>The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param d an array for storing the read values.
*
* @param offset the index of the first element in <code>d</code>
diff --git a/javax/imageio/stream/ImageInputStreamImpl.java b/javax/imageio/stream/ImageInputStreamImpl.java
index e338f1dbe..72fd6de48 100644
--- a/javax/imageio/stream/ImageInputStreamImpl.java
+++ b/javax/imageio/stream/ImageInputStreamImpl.java
@@ -53,9 +53,9 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
{
private boolean closed;
private Stack markStack = new Stack();
-
+
byte[] buffer = new byte[8];
-
+
protected int bitOffset;
protected ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
protected long flushedPos;
@@ -79,7 +79,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
checkClosed();
closed = true;
}
-
+
protected void finalize()
throws Throwable
{
@@ -153,7 +153,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
{
try
{
- markStack.push(new Long(getStreamPosition()));
+ markStack.push(new Long(getStreamPosition()));
}
catch (IOException e)
{
@@ -193,7 +193,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
seek(getStreamPosition() - 1);
data = (byte) (data >> (8 - newOffset));
}
-
+
bitOffset = newOffset;
return data & 0x1;
}
@@ -210,8 +210,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
for (int i = 0; i < numBits; i++)
{
- bits <<= 1;
- bits |= readBit();
+ bits <<= 1;
+ bits |= readBit();
}
return bits;
}
@@ -351,9 +351,9 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
while (!eol)
{
- switch(c)
- {
- case '\r':
+ switch(c)
+ {
+ case '\r':
// Check for following '\n'.
long oldPosition = getStreamPosition();
c = read();
@@ -366,14 +366,14 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
}
continue;
- case '\n':
- eol = true;
+ case '\n':
+ eol = true;
continue;
- default:
- buffer.append((char) c);
- break;
- }
+ default:
+ buffer.append((char) c);
+ break;
+ }
c = read();
if (c == -1)
eol = true;
@@ -454,13 +454,13 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
try
{
- data = DataInputStream.readUTF(this);
+ data = DataInputStream.readUTF(this);
}
finally
{
- setByteOrder(old);
+ setByteOrder(old);
}
-
+
return data;
}
@@ -468,7 +468,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
long mark = ((Long) markStack.pop()).longValue();
seek(mark);
}
@@ -489,7 +489,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
if (bitOffset < 0 || bitOffset > 7)
throw new IllegalArgumentException("bitOffset not between 0 and 7 inclusive");
@@ -505,7 +505,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
seek(getStreamPosition() + num);
bitOffset = 0;
return num;
@@ -515,7 +515,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
seek(getStreamPosition() + num);
bitOffset = 0;
return num;
@@ -530,12 +530,12 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
while (len > 0)
{
- // read will block until some data is available.
- int numread = read (buf, offset, len);
- if (numread < 0)
- throw new EOFException ();
- len -= numread;
- offset += numread;
+ // read will block until some data is available.
+ int numread = read (buf, offset, len);
+ if (numread < 0)
+ throw new EOFException ();
+ len -= numread;
+ offset += numread;
}
bitOffset = 0;
}
diff --git a/javax/imageio/stream/ImageOutputStreamImpl.java b/javax/imageio/stream/ImageOutputStreamImpl.java
index f23e695d0..5bf7e4402 100644
--- a/javax/imageio/stream/ImageOutputStreamImpl.java
+++ b/javax/imageio/stream/ImageOutputStreamImpl.java
@@ -221,20 +221,20 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
for(int i = 0; i < len; ++len)
writeDouble(data[offset + i]);
}
-
+
public void writeFloat(float value)
throws IOException
{
writeInt(Float.floatToIntBits(value));
}
-
+
public void writeFloats(float[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeFloat(data[offset + i]);
}
-
+
public void writeInt(int value)
throws IOException
{
@@ -252,17 +252,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[2] = ((byte) (value >> 8));
buffer[3] = ((byte) value);
}
-
+
write(buffer, 0, 4);
}
-
+
public void writeInts(int[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeInt(data[offset + i]);
}
-
+
public void writeLong(long value)
throws IOException
{
@@ -288,17 +288,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[6] = ((byte) (value >> 8));
buffer[7] = ((byte) value);
}
-
+
write(buffer, 0, 8);
}
-
+
public void writeLongs(long[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeLong(data[offset + i]);
}
-
+
public void writeShort(int value)
throws IOException
{
@@ -312,17 +312,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[0] = ((byte) (value >> 8));
buffer[1] = ((byte) value);
}
-
+
write(buffer, 0, 2);
}
-
+
public void writeShorts(short[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeShort(data[offset + i]);
}
-
+
public void writeUTF(String value)
throws IOException
{
@@ -367,7 +367,7 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buf[pos++] = (byte) (0x80 | (0x3f & c));
}
}
-
+
writeShort (sum);
write(buf, 0, sum);
}
diff --git a/javax/imageio/stream/MemoryCacheImageInputStream.java b/javax/imageio/stream/MemoryCacheImageInputStream.java
index 72aa5e8d5..e1ad71f58 100644
--- a/javax/imageio/stream/MemoryCacheImageInputStream.java
+++ b/javax/imageio/stream/MemoryCacheImageInputStream.java
@@ -51,7 +51,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
private BufferedInputStream buffer;
private int READLIMIT = 2048;
-
+
public MemoryCacheImageInputStream(InputStream stream)
{
this.stream = stream;
@@ -85,7 +85,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
{
return false;
}
-
+
public boolean isCachedMemory()
{
return true;
@@ -96,7 +96,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
{
setBitOffset(0);
int retval = buffer.read();
-
+
if (retval != -1)
streamPos++;
@@ -114,9 +114,9 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
streamPos += retval;
}
- return retval;
+ return retval;
}
-
+
public void seek(long position)
throws IOException
{
diff --git a/javax/imageio/stream/MemoryCacheImageOutputStream.java b/javax/imageio/stream/MemoryCacheImageOutputStream.java
index 17039f544..84e836090 100644
--- a/javax/imageio/stream/MemoryCacheImageOutputStream.java
+++ b/javax/imageio/stream/MemoryCacheImageOutputStream.java
@@ -78,7 +78,7 @@ public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl
{
return false;
}
-
+
public boolean isCachedMemory()
{
return true;
diff --git a/javax/management/Attribute.java b/javax/management/Attribute.java
index ece949532..48f5db99d 100644
--- a/javax/management/Attribute.java
+++ b/javax/management/Attribute.java
@@ -42,9 +42,9 @@ import java.io.Serializable;
/**
* Represents an MBean attribute, having the name and the assigned value. The
* MBean objects use this class to get and set attributes values.
- *
+ *
* @since 1.5
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class Attribute
@@ -67,7 +67,7 @@ public class Attribute
/**
* Create the attribute with the given name and value.
- *
+ *
* @param name the attribute name
* @param value the attribute value
*/
@@ -79,9 +79,9 @@ public class Attribute
/**
* Compares the attribute with another attribute.
- *
+ *
* @param other the other object to compare with
- *
+ *
* @return true if both value and object are equal, false otherwise.
*/
public boolean equals(Object other)
@@ -99,7 +99,7 @@ public class Attribute
v = oa.m_value == m_value;
else
v = oa.m_value.equals(m_value);
-
+
return n && v;
}
@@ -109,7 +109,7 @@ public class Attribute
/**
* Returns the attribute name.
- *
+ *
* @return the attribute name
*/
public String getName()
@@ -119,7 +119,7 @@ public class Attribute
/**
* Returns the attribute value.
- *
+ *
* @return the attribute value.
*/
public Object getValue()
@@ -129,14 +129,14 @@ public class Attribute
/**
* Need to override as {@link #equals} is overridden.
- *
+ *
* @return the expression, dependent of the object and name hashcodes.
*/
public int hashCode()
{
int n = m_name == null ? 0 : m_name.hashCode();
int v = m_value == null ? 0 : m_value.hashCode();
-
+
return n ^ v;
}
diff --git a/javax/management/AttributeChangeNotification.java b/javax/management/AttributeChangeNotification.java
index e63671dd0..16dbf8647 100644
--- a/javax/management/AttributeChangeNotification.java
+++ b/javax/management/AttributeChangeNotification.java
@@ -67,7 +67,7 @@ public class AttributeChangeNotification
* notifications.
*/
public static final String ATTRIBUTE_CHANGE = "jmx.attribute.change";
-
+
/**
* The name of the attribute that changed.
*/
@@ -107,14 +107,14 @@ public class AttributeChangeNotification
* @param newVal the new value of the attribute.
*/
public AttributeChangeNotification(Object source,
- long sequenceNumber,
- long timeStamp,
- String msg, String name,
- String type, Object oldVal,
- Object newVal)
+ long sequenceNumber,
+ long timeStamp,
+ String msg, String name,
+ String type, Object oldVal,
+ Object newVal)
{
super(ATTRIBUTE_CHANGE, source, sequenceNumber,
- timeStamp, msg);
+ timeStamp, msg);
attributeName = name;
attributeType = type;
oldValue = oldVal;
@@ -162,5 +162,3 @@ public class AttributeChangeNotification
}
}
-
-
diff --git a/javax/management/AttributeChangeNotificationFilter.java b/javax/management/AttributeChangeNotificationFilter.java
index 90d19a36a..ef3af0d5a 100644
--- a/javax/management/AttributeChangeNotificationFilter.java
+++ b/javax/management/AttributeChangeNotificationFilter.java
@@ -100,7 +100,7 @@ public class AttributeChangeNotificationFilter
if (!enabledAttributes.contains(name))
enabledAttributes.add(name);
}
-
+
/**
* Returns the list of enabled attributes for this
* filter.
@@ -127,9 +127,9 @@ public class AttributeChangeNotificationFilter
{
if (notif instanceof AttributeChangeNotification)
{
- AttributeChangeNotification n =
- (AttributeChangeNotification) notif;
- return enabledAttributes.contains(n.getAttributeName());
+ AttributeChangeNotification n =
+ (AttributeChangeNotification) notif;
+ return enabledAttributes.contains(n.getAttributeName());
}
return false;
}
diff --git a/javax/management/AttributeList.java b/javax/management/AttributeList.java
index 09db9b621..3d240b73b 100644
--- a/javax/management/AttributeList.java
+++ b/javax/management/AttributeList.java
@@ -119,7 +119,7 @@ public class AttributeList
* the @link{IndexOutOfBoundsException} from the underlying
* array list.
* </p>
- *
+ *
* @param index the index at which to place the new attribute.
* @param attribute the new attribute to add.
* @throws RuntimeOperationsException if <code>index < 0</code>
@@ -130,11 +130,11 @@ public class AttributeList
{
try
{
- super.add(index, attribute);
+ super.add(index, attribute);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
@@ -171,7 +171,7 @@ public class AttributeList
* the @link{IndexOutOfBoundsException} from the underlying
* array list.
* </p>
- *
+ *
* @param index the index at which to place the new attribute.
* @param list the list of attributes to add.
* @return true if the list changed.
@@ -183,11 +183,11 @@ public class AttributeList
{
try
{
- return super.addAll(index, list);
+ return super.addAll(index, list);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
@@ -209,12 +209,12 @@ public class AttributeList
{
try
{
- super.set(index, attribute);
+ super.set(index, attribute);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
-
+
}
diff --git a/javax/management/AttributeNotFoundException.java b/javax/management/AttributeNotFoundException.java
index 2c6c698eb..4b1f4e690 100644
--- a/javax/management/AttributeNotFoundException.java
+++ b/javax/management/AttributeNotFoundException.java
@@ -68,4 +68,3 @@ public class AttributeNotFoundException
}
}
-
diff --git a/javax/management/AttributeValueExp.java b/javax/management/AttributeValueExp.java
index 42e7161f8..6e8f5fbd2 100644
--- a/javax/management/AttributeValueExp.java
+++ b/javax/management/AttributeValueExp.java
@@ -101,7 +101,7 @@ public class AttributeValueExp
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
Object val = getAttribute(name);
if (val == null || !(val instanceof String))
@@ -123,27 +123,27 @@ public class AttributeValueExp
{
try
{
- return QueryEval.getMBeanServer().getAttribute(name, attr);
+ return QueryEval.getMBeanServer().getAttribute(name, attr);
}
catch (NullPointerException e)
{
- return null;
+ return null;
}
catch (MBeanException e)
{
- return null;
+ return null;
}
catch (AttributeNotFoundException e)
{
- return null;
+ return null;
}
catch (InstanceNotFoundException e)
{
- return null;
+ return null;
}
catch (ReflectionException e)
{
- return null;
+ return null;
}
}
diff --git a/javax/management/BadAttributeValueExpException.java b/javax/management/BadAttributeValueExpException.java
index fbdf1deca..207a786de 100644
--- a/javax/management/BadAttributeValueExpException.java
+++ b/javax/management/BadAttributeValueExpException.java
@@ -83,9 +83,8 @@ public class BadAttributeValueExpException
public String toString()
{
return getClass().getName()
- + "[val=" + val
+ + "[val=" + val
+ "]";
}
}
-
diff --git a/javax/management/BadBinaryOpValueExpException.java b/javax/management/BadBinaryOpValueExpException.java
index 5e1f5dbbe..082b4a7db 100644
--- a/javax/management/BadBinaryOpValueExpException.java
+++ b/javax/management/BadBinaryOpValueExpException.java
@@ -94,9 +94,8 @@ public class BadBinaryOpValueExpException
public String toString()
{
return getClass().getName()
- + "[exp=" + exp
+ + "[exp=" + exp
+ "]";
}
}
-
diff --git a/javax/management/BadStringOperationException.java b/javax/management/BadStringOperationException.java
index 8e5949ef7..261b352cb 100644
--- a/javax/management/BadStringOperationException.java
+++ b/javax/management/BadStringOperationException.java
@@ -84,9 +84,8 @@ public class BadStringOperationException
public String toString()
{
return getClass().getName()
- + "[op=" + op
+ + "[op=" + op
+ "]";
}
}
-
diff --git a/javax/management/DefaultLoaderRepository.java b/javax/management/DefaultLoaderRepository.java
index 38f7d0206..d331552a0 100644
--- a/javax/management/DefaultLoaderRepository.java
+++ b/javax/management/DefaultLoaderRepository.java
@@ -85,18 +85,18 @@ import java.util.List;
List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers)
{
- try
- {
- return server.getClassLoaderRepository().loadClass(name);
- }
- catch (ClassNotFoundException e)
- {
- /* Ignored; try the next server. */
- }
+ try
+ {
+ return server.getClassLoaderRepository().loadClass(name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ /* Ignored; try the next server. */
+ }
}
throw new ClassNotFoundException("The class loaders of all registered " +
- "servers failed to load the class, " +
- name);
+ "servers failed to load the class, " +
+ name);
}
/**
@@ -134,19 +134,19 @@ import java.util.List;
List<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers)
{
- try
- {
- return server.getClassLoaderRepository().loadClassWithout(exclude,
- name);
- }
- catch (ClassNotFoundException e)
- {
- /* Ignored; try the next server. */
- }
+ try
+ {
+ return server.getClassLoaderRepository().loadClassWithout(exclude,
+ name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ /* Ignored; try the next server. */
+ }
}
throw new ClassNotFoundException("The class loaders of all registered " +
- "servers failed to load the class, " +
- name);
+ "servers failed to load the class, " +
+ name);
}
}
diff --git a/javax/management/Descriptor.java b/javax/management/Descriptor.java
index 07b8f1dc7..9a50b9e4e 100644
--- a/javax/management/Descriptor.java
+++ b/javax/management/Descriptor.java
@@ -197,7 +197,7 @@ public interface Descriptor
* Returns a clone of this descriptor, which can then be modified
* independently of this descriptor. If the descriptor is
* immutable, it is sufficient to return this instance.
- *
+ *
* @return a clone of this descriptor.
* @throws RuntimeOperationsException if creation of the new
* descriptor fails for any
@@ -224,7 +224,7 @@ public interface Descriptor
* must return true.</li>
* <li>Otherwise, {@link Object#equals(Object)} must return true.</li>
* </ul>
- *
+ *
* @param obj the object to compare according to the above.
* @return true if the above holds.
* @see Object#equals(Object)
@@ -265,7 +265,7 @@ public interface Descriptor
/**
* Returns the value of the specified field, or <code>null</code>
* if no value is present for the given field name.
- *
+ *
* @param name the field name.
* @return the value of the field, or <code>null</code> if there
* is no value present.
@@ -283,7 +283,7 @@ public interface Descriptor
* being returned if the field is not present. This applies
* even if the given field name is <code>null</code> or
* the empty string.
- *
+ *
* @param names an array of field names whose values should
* be returned.
* @return the values of the specified fields.
diff --git a/javax/management/DynamicMBean.java b/javax/management/DynamicMBean.java
index 80ea72cf4..ceb47dcdc 100644
--- a/javax/management/DynamicMBean.java
+++ b/javax/management/DynamicMBean.java
@@ -49,7 +49,7 @@ package javax.management;
*/
public interface DynamicMBean
{
-
+
/**
* Obtains the value of the specified attribute of the
* management bean. The management bean should perform
@@ -73,7 +73,7 @@ public interface DynamicMBean
*/
Object getAttribute(String name)
throws AttributeNotFoundException, MBeanException,
- ReflectionException;
+ ReflectionException;
/**
* Obtains the values of each of the specified attributes
@@ -103,7 +103,7 @@ public interface DynamicMBean
* corresponding to each parameter. The class loader used to
* load these classes is the same as that used for loading the
* management bean itself.
- *
+ *
* @param name the name of the action to invoke.
* @param params the parameters used to call the action.
* @param signature the signature of the action.
@@ -145,7 +145,7 @@ public interface DynamicMBean
*/
void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException;
+ MBeanException, ReflectionException;
/**
* Sets the value of each of the specified attributes
diff --git a/javax/management/InstanceAlreadyExistsException.java b/javax/management/InstanceAlreadyExistsException.java
index c783208cb..954df52c6 100644
--- a/javax/management/InstanceAlreadyExistsException.java
+++ b/javax/management/InstanceAlreadyExistsException.java
@@ -73,4 +73,3 @@ public class InstanceAlreadyExistsException
}
}
-
diff --git a/javax/management/InstanceNotFoundException.java b/javax/management/InstanceNotFoundException.java
index 4d209fc47..22eee35fa 100644
--- a/javax/management/InstanceNotFoundException.java
+++ b/javax/management/InstanceNotFoundException.java
@@ -73,4 +73,3 @@ public class InstanceNotFoundException
}
}
-
diff --git a/javax/management/IntrospectionException.java b/javax/management/IntrospectionException.java
index 3b9d4b1ef..dfca93b08 100644
--- a/javax/management/IntrospectionException.java
+++ b/javax/management/IntrospectionException.java
@@ -75,4 +75,3 @@ public class IntrospectionException
}
}
-
diff --git a/javax/management/InvalidApplicationException.java b/javax/management/InvalidApplicationException.java
index 0bcf2d6cb..b7a7e3cc6 100644
--- a/javax/management/InvalidApplicationException.java
+++ b/javax/management/InvalidApplicationException.java
@@ -84,9 +84,8 @@ public class InvalidApplicationException
public String toString()
{
return getClass().getName()
- + "[val=" + val
+ + "[val=" + val
+ "]";
}
}
-
diff --git a/javax/management/InvalidAttributeValueException.java b/javax/management/InvalidAttributeValueException.java
index f766eda7f..1ec9fad60 100644
--- a/javax/management/InvalidAttributeValueException.java
+++ b/javax/management/InvalidAttributeValueException.java
@@ -68,4 +68,3 @@ public class InvalidAttributeValueException
}
}
-
diff --git a/javax/management/JMException.java b/javax/management/JMException.java
index d05702575..a46ac54c9 100644
--- a/javax/management/JMException.java
+++ b/javax/management/JMException.java
@@ -68,4 +68,3 @@ public class JMException
}
}
-
diff --git a/javax/management/JMRuntimeException.java b/javax/management/JMRuntimeException.java
index ba14a19c4..d8eda330e 100644
--- a/javax/management/JMRuntimeException.java
+++ b/javax/management/JMRuntimeException.java
@@ -68,4 +68,3 @@ public class JMRuntimeException
}
}
-
diff --git a/javax/management/JMX.java b/javax/management/JMX.java
index e5fb2586f..4a4958ace 100644
--- a/javax/management/JMX.java
+++ b/javax/management/JMX.java
@@ -112,7 +112,7 @@ public class JMX
* <li>Its name ends in {@code "MXBean"} and it does not
* have an {@link MXBean} annotation.</li>
* </ul>
- *
+ *
* @param iface the interface class that is to be checked
* for {@link MXBean} status.
* @return true if the interface represents an {@link MXBean}.
@@ -181,7 +181,7 @@ public class JMX
* boolean)
*/
public static <T> T newMBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class<T> iface)
+ ObjectName name, Class<T> iface)
{
return newMBeanProxy(conn, name, iface, false);
}
@@ -210,11 +210,11 @@ public class JMX
* @see #newMBeanProxy(MBeanServerConnection, ObjectName, Class)
*/
public static <T> T newMBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class<T> iface,
- boolean bcast)
+ ObjectName name, Class<T> iface,
+ boolean bcast)
{
return MBeanServerInvocationHandler.newProxyInstance(conn, name,
- iface, bcast);
+ iface, bcast);
}
/**
@@ -296,7 +296,7 @@ public class JMX
* boolean)
*/
public static <T> T newMXBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class<T> iface)
+ ObjectName name, Class<T> iface)
{
return newMXBeanProxy(conn, name, iface, false);
}
@@ -327,18 +327,18 @@ public class JMX
// Suppress warnings as we know an instance of T will be returned.
@SuppressWarnings("unchecked")
public static <T> T newMXBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class<T> iface,
- boolean bcast)
+ ObjectName name, Class<T> iface,
+ boolean bcast)
{
if (bcast)
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface,
- NotificationEmitter.class },
- new MBeanServerInvocationHandler(conn,name,true));
+ new Class[] { iface,
+ NotificationEmitter.class },
+ new MBeanServerInvocationHandler(conn,name,true));
else
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface },
- new MBeanServerInvocationHandler(conn,name,true));
+ new Class[] { iface },
+ new MBeanServerInvocationHandler(conn,name,true));
}
}
diff --git a/javax/management/ListenerNotFoundException.java b/javax/management/ListenerNotFoundException.java
index ea3cb7416..6fd6a1609 100644
--- a/javax/management/ListenerNotFoundException.java
+++ b/javax/management/ListenerNotFoundException.java
@@ -72,4 +72,3 @@ public class ListenerNotFoundException
}
}
-
diff --git a/javax/management/MBeanAttributeInfo.java b/javax/management/MBeanAttributeInfo.java
index 85e4e453b..950e06303 100644
--- a/javax/management/MBeanAttributeInfo.java
+++ b/javax/management/MBeanAttributeInfo.java
@@ -105,33 +105,33 @@ public class MBeanAttributeInfo
* @throws IntrospectionException if both the accessor and mutator method
* are <code>null</code>.
*/
- public MBeanAttributeInfo(String name, String desc,
- Method getter, Method setter)
+ public MBeanAttributeInfo(String name, String desc,
+ Method getter, Method setter)
throws IntrospectionException
{
super(name, desc);
if (getter == null && setter == null)
throw new IntrospectionException("Both the getter and setter methods can " +
- "not be null.");
+ "not be null.");
if (getter == null)
{
- Type t = setter.getGenericParameterTypes()[0];
- if (t instanceof Class)
- attributeType = ((Class<?>) t).getName();
- else
- attributeType = t.toString();
- isRead = false;
- is = false;
+ Type t = setter.getGenericParameterTypes()[0];
+ if (t instanceof Class)
+ attributeType = ((Class<?>) t).getName();
+ else
+ attributeType = t.toString();
+ isRead = false;
+ is = false;
}
else
{
- Type t = getter.getGenericReturnType();
- if (t instanceof Class)
- attributeType = ((Class<?>) t).getName();
- else
- attributeType = t.toString();
- isRead = true;
- is = getter.getName().startsWith("is");
+ Type t = getter.getGenericReturnType();
+ if (t instanceof Class)
+ attributeType = ((Class<?>) t).getName();
+ else
+ attributeType = t.toString();
+ isRead = true;
+ is = getter.getName().startsWith("is");
}
if (setter != null)
isWrite = true;
@@ -140,7 +140,7 @@ public class MBeanAttributeInfo
/**
* Constructs a new {@link MBeanAttributeInfo} using the specified
* name, description and type with the given settings for the accessor
- * and mutator methods.
+ * and mutator methods.
*
* @param name the name of the attribute.
* @param type the type of the attribute, in the form of its class name.
@@ -152,13 +152,13 @@ public class MBeanAttributeInfo
* and unwritable.
*/
public MBeanAttributeInfo(String name, String type, String desc,
- boolean isReadable, boolean isWritable,
- boolean isIs)
+ boolean isReadable, boolean isWritable,
+ boolean isIs)
{
super(name, desc);
if (!isReadable && !isWritable)
throw new IllegalArgumentException("The attribute can not be both " +
- "unreadable and unwritable.");
+ "unreadable and unwritable.");
attributeType = type;
isRead = isReadable;
isWrite = isWritable;
@@ -179,13 +179,13 @@ public class MBeanAttributeInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -200,7 +200,7 @@ public class MBeanAttributeInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanAttributeInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>description.equals(object.getDescription())</code>,
* <code>attributeType.equals(object.getType())</code>,
@@ -216,9 +216,9 @@ public class MBeanAttributeInfo
return false;
MBeanAttributeInfo o = (MBeanAttributeInfo) obj;
return (attributeType.equals(o.getType()) &&
- isRead == o.isReadable() &&
- isWrite == o.isWritable() &&
- is == o.isIs());
+ isRead == o.isReadable() &&
+ isWrite == o.isWritable() &&
+ is == o.isIs());
}
/**
@@ -284,8 +284,8 @@ public class MBeanAttributeInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (<code>javax.management.MBeanAttributeInfo</code>),
- * the name, description and type of the attribute and the
- * current settings of the {@link #isReadable()},
+ * the name, description and type of the attribute and the
+ * current settings of the {@link #isReadable()},
* {@link #isWritable()} and {@link #isIs()} properties.
* </p>
* <p>
@@ -301,13 +301,13 @@ public class MBeanAttributeInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",type=" + attributeType
- + ",isReadable=" + (isRead ? "yes" : "no")
- + ",isWritable=" + (isWrite ? "yes" : "no")
- + ",isIs=" + (is ? "yes" : "no")
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",type=" + attributeType
+ + ",isReadable=" + (isRead ? "yes" : "no")
+ + ",isWritable=" + (isWrite ? "yes" : "no")
+ + ",isIs=" + (is ? "yes" : "no")
+ + "]";
}
return string;
}
diff --git a/javax/management/MBeanConstructorInfo.java b/javax/management/MBeanConstructorInfo.java
index 041f3e904..509483f25 100644
--- a/javax/management/MBeanConstructorInfo.java
+++ b/javax/management/MBeanConstructorInfo.java
@@ -84,13 +84,13 @@ public class MBeanConstructorInfo
signature = new MBeanParameterInfo[paramTypes.length];
for (int a = 0; a < paramTypes.length; ++a)
{
- Type t = paramTypes[a];
- if (t instanceof Class)
- signature[a] = new MBeanParameterInfo(null,
- ((Class<?>) t).getName(),
- null);
- else
- signature[a] = new MBeanParameterInfo(null, t.toString(), null);
+ Type t = paramTypes[a];
+ if (t instanceof Class)
+ signature[a] = new MBeanParameterInfo(null,
+ ((Class<?>) t).getName(),
+ null);
+ else
+ signature[a] = new MBeanParameterInfo(null, t.toString(), null);
}
}
@@ -108,15 +108,15 @@ public class MBeanConstructorInfo
* each parameter.
*/
public MBeanConstructorInfo(String name, String desc,
- MBeanParameterInfo[] sig)
+ MBeanParameterInfo[] sig)
{
super(name, desc);
if (sig == null)
signature = new MBeanParameterInfo[0];
else
{
- signature = new MBeanParameterInfo[sig.length];
- System.arraycopy(sig, 0, signature, 0, sig.length);
+ signature = new MBeanParameterInfo[sig.length];
+ System.arraycopy(sig, 0, signature, 0, sig.length);
}
}
@@ -134,13 +134,13 @@ public class MBeanConstructorInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -155,7 +155,7 @@ public class MBeanConstructorInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanConstructorInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>description.equals(object.getDescription())</code>
* and the corresponding elements of the signature arrays are
@@ -171,14 +171,14 @@ public class MBeanConstructorInfo
MBeanParameterInfo[] sig = o.getSignature();
for (int a = 0; a < signature.length; ++a)
{
- if (a == sig.length)
- return true;
- if (!(signature[a].equals(sig[a])))
- return false;
+ if (a == sig.length)
+ return true;
+ if (!(signature[a].equals(sig[a])))
+ return false;
}
return true;
}
-
+
/**
* Returns the constructor's signature, in the form of
* information on each parameter. Each parameter is
@@ -214,7 +214,7 @@ public class MBeanConstructorInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (<code>javax.management.MBeanConstructorInfo</code>),
- * the name and description of the constructor and the
+ * the name and description of the constructor and the
* contents of the array of parameters.
* </p>
* <p>
@@ -230,10 +230,10 @@ public class MBeanConstructorInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",signature=" + Arrays.toString(signature)
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",signature=" + Arrays.toString(signature)
+ + "]";
}
return string;
}
diff --git a/javax/management/MBeanException.java b/javax/management/MBeanException.java
index f082275e6..7ce81dedb 100644
--- a/javax/management/MBeanException.java
+++ b/javax/management/MBeanException.java
@@ -115,4 +115,3 @@ public class MBeanException
}
}
-
diff --git a/javax/management/MBeanFeatureInfo.java b/javax/management/MBeanFeatureInfo.java
index b3d60d25d..a459ae946 100644
--- a/javax/management/MBeanFeatureInfo.java
+++ b/javax/management/MBeanFeatureInfo.java
@@ -106,7 +106,7 @@ public class MBeanFeatureInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanFeatureInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code> and
* <code>description.equals(object.getDescription</code>.
*/
@@ -114,13 +114,13 @@ public class MBeanFeatureInfo
{
if (obj instanceof MBeanFeatureInfo)
{
- MBeanFeatureInfo o = (MBeanFeatureInfo) obj;
- return ((name == null ?
- o.getName() == null :
- name.equals(o.getName())) &&
- (description == null ?
- o.getDescription() == null :
- description.equals(o.getDescription())));
+ MBeanFeatureInfo o = (MBeanFeatureInfo) obj;
+ return ((name == null ?
+ o.getName() == null :
+ name.equals(o.getName())) &&
+ (description == null ?
+ o.getDescription() == null :
+ description.equals(o.getDescription())));
}
else
return false;
@@ -179,9 +179,9 @@ public class MBeanFeatureInfo
{
if (string == null)
string = getClass().getName()
- + "[name=" + name
- + ",desc=" + description
- + "]";
+ + "[name=" + name
+ + ",desc=" + description
+ + "]";
return string;
}
diff --git a/javax/management/MBeanInfo.java b/javax/management/MBeanInfo.java
index 64e627f1b..bf07f9ad0 100644
--- a/javax/management/MBeanInfo.java
+++ b/javax/management/MBeanInfo.java
@@ -78,7 +78,7 @@ import java.util.Arrays;
* instance of this class, as part of implementing the
* {@link DynamicMBean#getMBeanInfo()} method of {@link DynamicMBean}.
* </p>
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -93,7 +93,7 @@ public class MBeanInfo
/**
* A description of the bean.
- *
+ *
* @serial The bean's description.
*/
private String description;
@@ -155,8 +155,8 @@ public class MBeanInfo
* or <code>null</code>.
*/
public MBeanInfo(String name, String desc, MBeanAttributeInfo[] attribs,
- MBeanConstructorInfo[] cons, MBeanOperationInfo[] ops,
- MBeanNotificationInfo[] notifs)
+ MBeanConstructorInfo[] cons, MBeanOperationInfo[] ops,
+ MBeanNotificationInfo[] notifs)
{
className = name;
description = desc;
@@ -199,11 +199,11 @@ public class MBeanInfo
MBeanInfo clone = null;
try
{
- clone = (MBeanInfo) super.clone();
+ clone = (MBeanInfo) super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This won't happen as we implement Cloneable */
+ /* This won't happen as we implement Cloneable */
}
return clone;
}
@@ -218,7 +218,7 @@ public class MBeanInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanInfo}
- * instance,
+ * instance,
* <code>className.equals(object.getClassName())</code>,
* <code>description.equals(object.getDescription())</code>
* and the corresponding elements of the arrays are
@@ -234,37 +234,37 @@ public class MBeanInfo
MBeanAttributeInfo[] attr = o.getAttributes();
for (int a = 0; a < attributes.length; ++a)
{
- if (a == attr.length)
- return true;
- if (!(attributes[a].equals(attr[a])))
- return false;
+ if (a == attr.length)
+ return true;
+ if (!(attributes[a].equals(attr[a])))
+ return false;
}
MBeanConstructorInfo[] cons = o.getConstructors();
for (int a = 0; a < constructors.length; ++a)
{
- if (a == cons.length)
- return true;
- if (!(constructors[a].equals(cons[a])))
- return false;
+ if (a == cons.length)
+ return true;
+ if (!(constructors[a].equals(cons[a])))
+ return false;
}
MBeanOperationInfo[] ops = o.getOperations();
for (int a = 0; a < operations.length; ++a)
{
- if (a == ops.length)
- return true;
- if (!(operations[a].equals(ops[a])))
- return false;
+ if (a == ops.length)
+ return true;
+ if (!(operations[a].equals(ops[a])))
+ return false;
}
MBeanNotificationInfo[] notifs = o.getNotifications();
for (int a = 0; a < notifications.length; ++a)
{
- if (a == notifs.length)
- return true;
- if (!(notifications[a].equals(notifs[a])))
- return false;
+ if (a == notifs.length)
+ return true;
+ if (!(notifications[a].equals(notifs[a])))
+ return false;
}
return (className.equals(o.getClassName()) &&
- description.equals(o.getDescription()));
+ description.equals(o.getDescription()));
}
/**
@@ -389,13 +389,13 @@ public class MBeanInfo
{
if (string == null)
string = getClass().getName()
- + "[name=" + className
- + ",desc=" + description
- + ",attributes=" + Arrays.toString(attributes)
- + ",constructors=" + Arrays.toString(constructors)
- + ",operations=" + Arrays.toString(operations)
- + ",notifications=" + Arrays.toString(notifications)
- + "]";
+ + "[name=" + className
+ + ",desc=" + description
+ + ",attributes=" + Arrays.toString(attributes)
+ + ",constructors=" + Arrays.toString(constructors)
+ + ",operations=" + Arrays.toString(operations)
+ + ",notifications=" + Arrays.toString(notifications)
+ + "]";
return string;
}
diff --git a/javax/management/MBeanNotificationInfo.java b/javax/management/MBeanNotificationInfo.java
index ba4077e8f..10dd956b0 100644
--- a/javax/management/MBeanNotificationInfo.java
+++ b/javax/management/MBeanNotificationInfo.java
@@ -101,7 +101,7 @@ public class MBeanNotificationInfo
* @throws IllegalArgumentException for some reason...
*/
public MBeanNotificationInfo(String[] types, String name,
- String description)
+ String description)
{
super(name, description);
this.types = types;
@@ -121,13 +121,13 @@ public class MBeanNotificationInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -142,7 +142,7 @@ public class MBeanNotificationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanNotificationInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>description.equals(object.getDescription())</code>
* and the corresponding elements of the type arrays are
@@ -152,18 +152,18 @@ public class MBeanNotificationInfo
{
if (obj instanceof MBeanNotificationInfo)
{
- if (!(super.equals(obj)))
- return false;
- MBeanNotificationInfo o = (MBeanNotificationInfo) obj;
- String[] oTypes = o.getNotifTypes();
- for (int a = 0; a < types.length; ++a)
- {
- if (a == oTypes.length)
- return true;
- if (!(types[a].equals(oTypes[a])))
- return false;
- }
- return true;
+ if (!(super.equals(obj)))
+ return false;
+ MBeanNotificationInfo o = (MBeanNotificationInfo) obj;
+ String[] oTypes = o.getNotifTypes();
+ for (int a = 0; a < types.length; ++a)
+ {
+ if (a == oTypes.length)
+ return true;
+ if (!(types[a].equals(oTypes[a])))
+ return false;
+ }
+ return true;
}
else
return false;
@@ -200,7 +200,7 @@ public class MBeanNotificationInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (<code>javax.management.MBeanNotificationInfo</code>),
- * the name and description of the notification and the
+ * the name and description of the notification and the
* contents of the array of types.
* </p>
* <p>
@@ -216,10 +216,10 @@ public class MBeanNotificationInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",types=" + Arrays.toString(types)
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",types=" + Arrays.toString(types)
+ + "]";
}
return string;
}
diff --git a/javax/management/MBeanOperationInfo.java b/javax/management/MBeanOperationInfo.java
index 03220c15e..0adc0e6bc 100644
--- a/javax/management/MBeanOperationInfo.java
+++ b/javax/management/MBeanOperationInfo.java
@@ -118,13 +118,13 @@ public class MBeanOperationInfo
signature = new MBeanParameterInfo[paramTypes.length];
for (int a = 0; a < paramTypes.length; ++a)
{
- Type t = paramTypes[a];
- if (t instanceof Class)
- signature[a] = new MBeanParameterInfo(null,
- ((Class<?>) t).getName(),
- null);
- else
- signature[a] = new MBeanParameterInfo(null, t.toString(), null);
+ Type t = paramTypes[a];
+ if (t instanceof Class)
+ signature[a] = new MBeanParameterInfo(null,
+ ((Class<?>) t).getName(),
+ null);
+ else
+ signature[a] = new MBeanParameterInfo(null, t.toString(), null);
}
Type retType = method.getGenericReturnType();
if (retType instanceof Class)
@@ -133,17 +133,17 @@ public class MBeanOperationInfo
type = retType.toString();
if (method.getReturnType() == Void.TYPE)
{
- if (paramTypes.length == 0)
- impact = UNKNOWN;
- else
- impact = ACTION;
+ if (paramTypes.length == 0)
+ impact = UNKNOWN;
+ else
+ impact = ACTION;
}
else
{
- if (paramTypes.length == 0)
- impact = INFO;
- else
- impact = ACTION_INFO;
+ if (paramTypes.length == 0)
+ impact = INFO;
+ else
+ impact = ACTION_INFO;
}
}
@@ -163,16 +163,16 @@ public class MBeanOperationInfo
* @param impact the impact of performing the operation.
*/
public MBeanOperationInfo(String name, String desc,
- MBeanParameterInfo[] sig, String type,
- int impact)
+ MBeanParameterInfo[] sig, String type,
+ int impact)
{
super(name, desc);
if (sig == null)
signature = new MBeanParameterInfo[0];
else
{
- signature = new MBeanParameterInfo[sig.length];
- System.arraycopy(sig, 0, signature, 0, sig.length);
+ signature = new MBeanParameterInfo[sig.length];
+ System.arraycopy(sig, 0, signature, 0, sig.length);
}
this.type = type;
this.impact = impact;
@@ -192,13 +192,13 @@ public class MBeanOperationInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -214,7 +214,7 @@ public class MBeanOperationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanOperationInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>description.equals(object.getDescription())</code>,
* <code>type.equals(object.getReturnType())</code>,
@@ -232,15 +232,15 @@ public class MBeanOperationInfo
MBeanParameterInfo[] sig = o.getSignature();
for (int a = 0; a < signature.length; ++a)
{
- if (a == sig.length)
- return true;
- if (!(signature[a].equals(sig[a])))
- return false;
+ if (a == sig.length)
+ return true;
+ if (!(signature[a].equals(sig[a])))
+ return false;
}
return (type.equals(o.getReturnType()) &&
- impact == o.getImpact());
+ impact == o.getImpact());
}
-
+
/**
* <p>
* Returns the impact of performing this operation.
@@ -328,30 +328,30 @@ public class MBeanOperationInfo
{
if (string == null)
{
- String impactString;
- switch (impact)
- {
- case INFO:
- impactString = "INFO";
- break;
- case ACTION:
- impactString = "ACTION";
- break;
- case ACTION_INFO:
- impactString = "ACTION_INFO";
- break;
- case UNKNOWN:
- impactString = "UNKNOWN";
- break;
- default:
- impactString = "ERRONEOUS VALUE";
- }
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",returnType=" + type
- + ",impact=" + impactString
- + ",signature=" + Arrays.toString(signature)
- + "]";
+ String impactString;
+ switch (impact)
+ {
+ case INFO:
+ impactString = "INFO";
+ break;
+ case ACTION:
+ impactString = "ACTION";
+ break;
+ case ACTION_INFO:
+ impactString = "ACTION_INFO";
+ break;
+ case UNKNOWN:
+ impactString = "UNKNOWN";
+ break;
+ default:
+ impactString = "ERRONEOUS VALUE";
+ }
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",returnType=" + type
+ + ",impact=" + impactString
+ + ",signature=" + Arrays.toString(signature)
+ + "]";
}
return string;
}
diff --git a/javax/management/MBeanParameterInfo.java b/javax/management/MBeanParameterInfo.java
index ee6ef99b8..9307de46d 100644
--- a/javax/management/MBeanParameterInfo.java
+++ b/javax/management/MBeanParameterInfo.java
@@ -63,7 +63,7 @@ public class MBeanParameterInfo
/**
* Constructs a new {@link MBeanParameterInfo} using the specified
- * name, description and type.
+ * name, description and type.
*
* @param name the name of the attribute.
* @param type the type of the attribute, in the form of its class name.
@@ -89,13 +89,13 @@ public class MBeanParameterInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -109,7 +109,7 @@ public class MBeanParameterInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>description.equals(object.getDescription())</code>,
* and <code>type.equals(object.getType())</code>.
@@ -165,10 +165,10 @@ public class MBeanParameterInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",type=" + type
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",type=" + type
+ + "]";
}
return string;
}
diff --git a/javax/management/MBeanPermission.java b/javax/management/MBeanPermission.java
index 076ac86f1..10813e4e6 100644
--- a/javax/management/MBeanPermission.java
+++ b/javax/management/MBeanPermission.java
@@ -113,7 +113,7 @@ import java.util.TreeSet;
* represent <code>null</code>. When this occurs in a
* required permission, anything may match it. When this
* forms part of a permission held by the user, it only
- * matches another <code>null</code> value.
+ * matches another <code>null</code> value.
* </p>
* <p>The list of valid actions is as follows:</p>
* <ul>
@@ -152,7 +152,7 @@ public class MBeanPermission
* The list of actions associated with this permission.
*/
private String actions;
-
+
/**
* The list of actions as an ordered set.
*/
@@ -166,7 +166,7 @@ public class MBeanPermission
/**
* Initialise the set of valid actions.
*/
- static
+ static
{
validSet = new HashSet<String>();
validSet.add("addNotificationListener");
@@ -232,11 +232,11 @@ public class MBeanPermission
* @param actions the actions associated with this permission.
*/
public MBeanPermission(String className, String member,
- ObjectName name, String actions)
+ ObjectName name, String actions)
{
- this((className == null ? "-" : className) + "#"
- + (member == null ? "-" : member) + "["
- + (name == null ? "-" : name.toString()) + "]", actions);
+ this((className == null ? "-" : className) + "#"
+ + (member == null ? "-" : member) + "["
+ + (name == null ? "-" : name.toString()) + "]", actions);
}
/**
@@ -251,9 +251,9 @@ public class MBeanPermission
{
if (obj instanceof MBeanPermission)
{
- MBeanPermission p = (MBeanPermission) obj;
- return (p.getName().equals(getName()) &&
- p.getActions().equals(actions));
+ MBeanPermission p = (MBeanPermission) obj;
+ return (p.getName().equals(getName()) &&
+ p.getActions().equals(actions));
}
return false;
}
@@ -269,9 +269,9 @@ public class MBeanPermission
CPStringBuilder builder = new CPStringBuilder();
while (it.hasNext())
{
- builder.append(it.next());
- if (it.hasNext())
- builder.append(",");
+ builder.append(it.next());
+ if (it.hasNext())
+ builder.append(",");
}
return builder.toString();
}
@@ -312,7 +312,7 @@ public class MBeanPermission
* of this permission. If the <code>queryMBeans</code> action is presented,
* the <code>queryNames</code> action is implied.</li>
* </ul>
- *
+ *
* @param p the permission to check that this permission implies.
* @return true if this permission implies <code>p</code>.
*/
@@ -320,21 +320,21 @@ public class MBeanPermission
{
if (p instanceof MBeanPermission)
{
- MBeanPermission mp = (MBeanPermission) p;
- NameHolder pName = new NameHolder(mp.getName());
- NameHolder name = new NameHolder(getName());
- if (!(name.equals(pName)))
- return false;
- for (String nextAction : mp.actionSet)
- {
- boolean found = actions.contains(nextAction);
- if (!found)
- if (nextAction.equals("queryNames"))
- found = actions.contains("queryMBeans");
- if (!found)
- return false;
- }
- return true;
+ MBeanPermission mp = (MBeanPermission) p;
+ NameHolder pName = new NameHolder(mp.getName());
+ NameHolder name = new NameHolder(getName());
+ if (!(name.equals(pName)))
+ return false;
+ for (String nextAction : mp.actionSet)
+ {
+ boolean found = actions.contains(nextAction);
+ if (!found)
+ if (nextAction.equals("queryNames"))
+ found = actions.contains("queryMBeans");
+ if (!found)
+ return false;
+ }
+ return true;
}
return false;
}
@@ -373,47 +373,47 @@ public class MBeanPermission
int memberIndex = name.indexOf("#");
int onIndex = name.indexOf("[");
if (onIndex == -1)
- {
- if (memberIndex == -1)
- className = name;
- else
- {
- className = name.substring(0, memberIndex);
- member = name.substring(memberIndex + 1);
- }
- }
+ {
+ if (memberIndex == -1)
+ className = name;
+ else
+ {
+ className = name.substring(0, memberIndex);
+ member = name.substring(memberIndex + 1);
+ }
+ }
else
- {
- if (memberIndex == -1)
- {
- className = name.substring(0, onIndex);
- objectName = name.substring(onIndex + 1,
- name.length() - 1);
- }
- else
- {
- className = name.substring(0, memberIndex);
- member = name.substring(memberIndex + 1, onIndex);
- objectName = name.substring(onIndex + 1,
- name.length() - 1);
- }
- }
+ {
+ if (memberIndex == -1)
+ {
+ className = name.substring(0, onIndex);
+ objectName = name.substring(onIndex + 1,
+ name.length() - 1);
+ }
+ else
+ {
+ className = name.substring(0, memberIndex);
+ member = name.substring(memberIndex + 1, onIndex);
+ objectName = name.substring(onIndex + 1,
+ name.length() - 1);
+ }
+ }
if (className.equals("-"))
- className = null;
+ className = null;
if (member.equals("-"))
- member = null;
+ member = null;
if (objectName == null || objectName.equals("-"))
- this.objectName = null;
+ this.objectName = null;
else
- try
- {
- this.objectName = new ObjectName(objectName);
- }
- catch (MalformedObjectNameException e)
- {
- throw (Error)
- (new InternalError("Invalid object name.").initCause(e));
- }
+ try
+ {
+ this.objectName = new ObjectName(objectName);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw (Error)
+ (new InternalError("Invalid object name.").initCause(e));
+ }
}
/**
@@ -436,46 +436,46 @@ public class MBeanPermission
* object name of this name holder is a pattern,
* {@link ObjectName#apply(ObjectName)} may be used as well.</li>
* </ul>
- *
+ *
* @param obj the object to compare with this.
* @return true if the above holds.
*/
public boolean equals(Object obj)
{
if (obj instanceof NameHolder)
- {
- NameHolder nh = (NameHolder) obj;
- boolean cn = false;
- String ocn = nh.getClassName();
- if (ocn == null || className.equals("*"))
- cn = true;
- else
- {
- int wcIndex = className.indexOf("*");
- if (wcIndex != -1)
- cn = ocn.startsWith(className.substring(0, wcIndex));
- else
- cn = ocn.equals(className);
- }
- boolean m = false;
- String om = nh.getMember();
- if (om == null || member.equals("*"))
- m = true;
- else
- m = om.equals(member);
- boolean on = false;
- ObjectName oon = nh.getObjectName();
- if (oon == null)
- on = true;
- else if (objectName.isPattern())
- on = objectName.apply(oon);
- else
- on = oon.equals(objectName);
- return (cn && m && on);
- }
+ {
+ NameHolder nh = (NameHolder) obj;
+ boolean cn = false;
+ String ocn = nh.getClassName();
+ if (ocn == null || className.equals("*"))
+ cn = true;
+ else
+ {
+ int wcIndex = className.indexOf("*");
+ if (wcIndex != -1)
+ cn = ocn.startsWith(className.substring(0, wcIndex));
+ else
+ cn = ocn.equals(className);
+ }
+ boolean m = false;
+ String om = nh.getMember();
+ if (om == null || member.equals("*"))
+ m = true;
+ else
+ m = om.equals(member);
+ boolean on = false;
+ ObjectName oon = nh.getObjectName();
+ if (oon == null)
+ on = true;
+ else if (objectName.isPattern())
+ on = objectName.apply(oon);
+ else
+ on = oon.equals(objectName);
+ return (cn && m && on);
+ }
return false;
}
-
+
/**
* Returns the class name.
*/
@@ -540,11 +540,10 @@ public class MBeanPermission
{
for (String action : actionSet)
{
- if (!(validSet.contains(action)))
- throw new IllegalArgumentException("Invalid action "
- + action + " found.");
+ if (!(validSet.contains(action)))
+ throw new IllegalArgumentException("Invalid action "
+ + action + " found.");
}
}
}
-
diff --git a/javax/management/MBeanRegistrationException.java b/javax/management/MBeanRegistrationException.java
index 9f62b9aa0..18ed44a36 100644
--- a/javax/management/MBeanRegistrationException.java
+++ b/javax/management/MBeanRegistrationException.java
@@ -81,4 +81,3 @@ public class MBeanRegistrationException
}
-
diff --git a/javax/management/MBeanServer.java b/javax/management/MBeanServer.java
index 0be5d71ad..4b5721570 100644
--- a/javax/management/MBeanServer.java
+++ b/javax/management/MBeanServer.java
@@ -72,7 +72,7 @@ import javax.management.loading.ClassLoaderRepository;
* is thrown. Note than the class name used in the exception
* is that of the bean, and thus, as a result, an
* {@link InstanceNotFoundException}
- * precludes these security checks, due to the class name
+ * precludes these security checks, due to the class name
* that would be used in the exception being unavailable.
* </p>
*
@@ -113,7 +113,7 @@ public interface MBeanServer
* Object)
*/
void addNotificationListener(ObjectName name, NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException;
/**
@@ -122,7 +122,7 @@ public interface MBeanServer
* bean. Notifications emitted by the management bean are forwarded
* to the listener via the server, which will convert any MBean
* references in the source to portable {@link ObjectName}
- * instances. The notification is otherwise unchanged.
+ * instances. The notification is otherwise unchanged.
* </p>
* <p>
* The listener that receives notifications will be the one that is
@@ -159,7 +159,7 @@ public interface MBeanServer
* Object)
*/
void addNotificationListener(ObjectName name, ObjectName listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException;
/**
@@ -168,7 +168,7 @@ public interface MBeanServer
* using the default constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -177,7 +177,7 @@ public interface MBeanServer
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* <code>createMBean(className, name, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -211,8 +211,8 @@ public interface MBeanServer
*/
ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException;
/**
* <p>
@@ -220,7 +220,7 @@ public interface MBeanServer
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -228,7 +228,7 @@ public interface MBeanServer
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -256,10 +256,10 @@ public interface MBeanServer
* and <code>registerMBean</code> methods.
*/
ObjectInstance createMBean(String className, ObjectName name,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException;
/**
* <p>
@@ -277,7 +277,7 @@ public interface MBeanServer
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, ObjectName, Object[], String)
* <code>createMBean(className, name, loaderName, (Object[]) null,
* (String) null)</code>} with <code>null</code> parameters
@@ -312,11 +312,11 @@ public interface MBeanServer
* and <code>registerMBean</code> methods.
* @see #createMBean(String, ObjectName, ObjectName, Object[], String[])
*/
- ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName)
+ ObjectInstance createMBean(String className, ObjectName name,
+ ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException;
/**
* <p>
@@ -325,7 +325,7 @@ public interface MBeanServer
* under the supplied name. The class is loaded using the
* given class loader. If this argument is <code>null</code>,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -333,7 +333,7 @@ public interface MBeanServer
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -364,11 +364,11 @@ public interface MBeanServer
* and <code>registerMBean</code> methods.
*/
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Object[] params,
- String[] sig)
+ ObjectName loaderName, Object[] params,
+ String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException;
/**
* Deserializes a byte array using the class loader of the specified
@@ -449,7 +449,7 @@ public interface MBeanServer
*/
ObjectInputStream deserialize(String name, ObjectName loader, byte[] data)
throws InstanceNotFoundException, ReflectionException,
- OperationsException;
+ OperationsException;
/**
* Returns the value of the supplied attribute from the specified
@@ -478,7 +478,7 @@ public interface MBeanServer
*/
Object getAttribute(ObjectName bean, String name)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException;
+ InstanceNotFoundException, ReflectionException;
/**
* Returns the values of the named attributes from the specified
@@ -505,7 +505,7 @@ public interface MBeanServer
* <code>MBeanPermission(className, n, bean,
* "getAttribute")</code>} or that attribute will
* not be included.
- *
+ *
* @see DynamicMBean#getAttributes(String[])
*/
AttributeList getAttributes(ObjectName bean, String[] names)
@@ -534,7 +534,7 @@ public interface MBeanServer
*/
ClassLoader getClassLoader(ObjectName name)
throws InstanceNotFoundException;
-
+
/**
* Returns the class loader of the specified management bean. If
* <code>l</code> is the requested class loader, and <code>r</code>
@@ -630,7 +630,7 @@ public interface MBeanServer
*/
MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException;
+ ReflectionException;
/**
* Returns the {@link ObjectInstance} created for the specified
@@ -659,7 +659,7 @@ public interface MBeanServer
* but the instance is not yet registered with the server.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, Object[], String[])
* <code>instantiate(name, (Object[]) null, (String[]) null)</code>}
* with <code>null</code> parameters and signature.
@@ -723,7 +723,7 @@ public interface MBeanServer
* registered with the server.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, ObjectName, Object[], String[])
* <code>instantiate(name, loaderName, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -751,7 +751,7 @@ public interface MBeanServer
*/
Object instantiate(String name, ObjectName loaderName)
throws InstanceNotFoundException, ReflectionException,
- MBeanException;
+ MBeanException;
/**
* Creates an instance of the specified class using the supplied
@@ -782,9 +782,9 @@ public interface MBeanServer
* "instantiate")</code>}.
*/
Object instantiate(String name, ObjectName loaderName,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws InstanceNotFoundException, ReflectionException,
- MBeanException;
+ MBeanException;
/**
* Invokes the supplied operation on the specified management
@@ -809,7 +809,7 @@ public interface MBeanServer
*/
Object invoke(ObjectName bean, String name, Object[] params, String[] sig)
throws InstanceNotFoundException, MBeanException,
- ReflectionException;
+ ReflectionException;
/**
* <p>
@@ -826,7 +826,7 @@ public interface MBeanServer
* <li>Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.</li>
* </ul>
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if <code>name</code> is
* an instance of.
@@ -869,7 +869,7 @@ public interface MBeanServer
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -891,7 +891,7 @@ public interface MBeanServer
* case that particular bean will again be excluded.
*/
Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query);
-
+
/**
* <p>
* Returns a set of {@link ObjectName}s matching the specified
@@ -906,7 +906,7 @@ public interface MBeanServer
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -935,7 +935,7 @@ public interface MBeanServer
* Registers the supplied instance with the server, using the specified
* {@link ObjectName}. If the name given is <code>null</code>, then
* the bean supplied is expected to implement the {@link MBeanRegistration}
- * interface and provide the name via the
+ * interface and provide the name via the
* {@link MBeanRegistration#preRegister preRegister} method
* of this interface.
*
@@ -971,7 +971,7 @@ public interface MBeanServer
*/
ObjectInstance registerMBean(Object obj, ObjectName name)
throws InstanceAlreadyExistsException, MBeanRegistrationException,
- NotCompliantMBeanException;
+ NotCompliantMBeanException;
/**
* Removes the specified listener from the list of recipients
@@ -997,7 +997,7 @@ public interface MBeanServer
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
@@ -1029,9 +1029,9 @@ public interface MBeanServer
* Object)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
@@ -1091,14 +1091,14 @@ public interface MBeanServer
* Object)
*/
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- NotificationFilter filter,
- Object passback)
+ ObjectName listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
* Sets the value of the specified attribute of the supplied
- * management bean.
+ * management bean.
*
* @param name the name of the management bean.
* @param attribute the attribute to set.
@@ -1131,8 +1131,8 @@ public interface MBeanServer
*/
void setAttribute(ObjectName name, Attribute attribute)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException;
/**
* Sets the value of each of the specified attributes
@@ -1192,7 +1192,7 @@ public interface MBeanServer
* MBeanPermission(String,String,ObjectName,String)
* <code>MBeanPermission(className, null, name,
* "unregisterMBean")</code>}.
- */
+ */
void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException;
diff --git a/javax/management/MBeanServerBuilder.java b/javax/management/MBeanServerBuilder.java
index 4e2806829..ce45915d7 100644
--- a/javax/management/MBeanServerBuilder.java
+++ b/javax/management/MBeanServerBuilder.java
@@ -73,7 +73,7 @@ public class MBeanServerBuilder
* same as that returned by {@link #newMBeanServerDelegate()} as the factory
* can optionally wrap the delegate before calling this method.
* </p>
- *
+ *
* @param defaultDomain the default domain used by the new server.
* @param outer the {@link MBeanServer} passed to the {@link MBeanRegistration}
* interface of management beans.
@@ -82,7 +82,7 @@ public class MBeanServerBuilder
* @return a new instance of a server implementation.
*/
public MBeanServer newMBeanServer(String defaultDomain, MBeanServer outer,
- MBeanServerDelegate delegate)
+ MBeanServerDelegate delegate)
{
return new Server(defaultDomain, outer, delegate);
}
diff --git a/javax/management/MBeanServerConnection.java b/javax/management/MBeanServerConnection.java
index cba6dacc6..9e44b8fce 100644
--- a/javax/management/MBeanServerConnection.java
+++ b/javax/management/MBeanServerConnection.java
@@ -80,7 +80,7 @@ public interface MBeanServerConnection
* Object)
*/
void addNotificationListener(ObjectName name, NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException, IOException;
/**
@@ -89,7 +89,7 @@ public interface MBeanServerConnection
* bean. Notifications emitted by the management bean are forwarded
* to the listener via the server, which will convert any MBean
* references in the source to portable {@link ObjectName}
- * instances. The notification is otherwise unchanged.
+ * instances. The notification is otherwise unchanged.
* </p>
* <p>
* The listener that receives notifications will be the one that is
@@ -123,7 +123,7 @@ public interface MBeanServerConnection
* Object)
*/
void addNotificationListener(ObjectName name, ObjectName listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException, RuntimeOperationsException, IOException;
/**
@@ -132,7 +132,7 @@ public interface MBeanServerConnection
* using the default constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -141,7 +141,7 @@ public interface MBeanServerConnection
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* <code>createMBean(className, name, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -173,8 +173,8 @@ public interface MBeanServerConnection
*/
ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
* <p>
@@ -182,7 +182,7 @@ public interface MBeanServerConnection
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -190,7 +190,7 @@ public interface MBeanServerConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -216,10 +216,10 @@ public interface MBeanServerConnection
* the bean server.
*/
ObjectInstance createMBean(String className, ObjectName name,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
* <p>
@@ -237,7 +237,7 @@ public interface MBeanServerConnection
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, ObjectName, Object[], String)
* <code>createMBean(className, name, loaderName, (Object[]) null,
* (String) null)</code>} with <code>null</code> parameters
@@ -270,12 +270,12 @@ public interface MBeanServerConnection
* the bean server.
* @see #createMBean(String, ObjectName, ObjectName, Object[], String[])
*/
- ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName)
+ ObjectInstance createMBean(String className, ObjectName name,
+ ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
* <p>
@@ -284,7 +284,7 @@ public interface MBeanServerConnection
* under the supplied name. The class is loaded using the
* given class loader. If this argument is <code>null</code>,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -292,7 +292,7 @@ public interface MBeanServerConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -321,12 +321,12 @@ public interface MBeanServerConnection
* the bean server.
*/
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Object[] params,
- String[] sig)
+ ObjectName loaderName, Object[] params,
+ String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
* Returns the value of the supplied attribute from the specified
@@ -352,8 +352,8 @@ public interface MBeanServerConnection
*/
Object getAttribute(ObjectName bean, String name)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException,
- IOException;
+ InstanceNotFoundException, ReflectionException,
+ IOException;
/**
* Returns the values of the named attributes from the specified
@@ -375,7 +375,7 @@ public interface MBeanServerConnection
*/
AttributeList getAttributes(ObjectName bean, String[] names)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Returns the default domain this server applies to beans that have
@@ -427,7 +427,7 @@ public interface MBeanServerConnection
*/
MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* Returns the {@link ObjectInstance} created for the specified
@@ -463,7 +463,7 @@ public interface MBeanServerConnection
*/
Object invoke(ObjectName bean, String name, Object[] params, String[] sig)
throws InstanceNotFoundException, MBeanException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* <p>
@@ -480,7 +480,7 @@ public interface MBeanServerConnection
* <li>Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.</li>
* </ul>
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if <code>name</code> is
* an instance of.
@@ -523,7 +523,7 @@ public interface MBeanServerConnection
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -535,7 +535,7 @@ public interface MBeanServerConnection
*/
Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query)
throws IOException;
-
+
/**
* <p>
* Returns a set of {@link ObjectName}s matching the specified
@@ -550,7 +550,7 @@ public interface MBeanServerConnection
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -584,9 +584,9 @@ public interface MBeanServerConnection
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -614,11 +614,11 @@ public interface MBeanServerConnection
* Object)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -643,7 +643,7 @@ public interface MBeanServerConnection
*/
void removeNotificationListener(ObjectName name, ObjectName listener)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -672,15 +672,15 @@ public interface MBeanServerConnection
* Object)
*/
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- NotificationFilter filter,
- Object passback)
+ ObjectName listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Sets the value of the specified attribute of the supplied
- * management bean.
+ * management bean.
*
* @param name the name of the management bean.
* @param attribute the attribute to set.
@@ -710,8 +710,8 @@ public interface MBeanServerConnection
*/
void setAttribute(ObjectName name, Attribute attribute)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException, IOException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException, IOException;
/**
* Sets the value of each of the specified attributes
@@ -739,7 +739,7 @@ public interface MBeanServerConnection
*/
AttributeList setAttributes(ObjectName name, AttributeList attributes)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Unregisters the specified management bean. Following this operation,
@@ -760,9 +760,9 @@ public interface MBeanServerConnection
* {@link MBeanServerDelegate} bean.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException,
- IOException;
+ IOException;
}
diff --git a/javax/management/MBeanServerDelegate.java b/javax/management/MBeanServerDelegate.java
index c55faa3d0..5addb9932 100644
--- a/javax/management/MBeanServerDelegate.java
+++ b/javax/management/MBeanServerDelegate.java
@@ -115,8 +115,8 @@ public class MBeanServerDelegate
* @see #removeNotificationListener(NotificationListener)
*/
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException
{
if (listener == null)
@@ -175,15 +175,15 @@ public class MBeanServerDelegate
*/
public MBeanNotificationInfo[] getNotificationInfo()
{
- return new MBeanNotificationInfo[]
+ return new MBeanNotificationInfo[]
{
- new MBeanNotificationInfo(new String[]
- {
- MBeanServerNotification.REGISTRATION_NOTIFICATION,
- MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
- },
- MBeanServerNotification.class.getName(),
- "Server registration notifications")
+ new MBeanNotificationInfo(new String[]
+ {
+ MBeanServerNotification.REGISTRATION_NOTIFICATION,
+ MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
+ },
+ MBeanServerNotification.class.getName(),
+ "Server registration notifications")
};
}
@@ -239,15 +239,15 @@ public class MBeanServerDelegate
boolean foundOne = false;
while (it.hasNext())
{
- if (it.next().getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ if (it.next().getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
/**
@@ -269,16 +269,16 @@ public class MBeanServerDelegate
* @see #removeNotificationListener(NotificationListener)
*/
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
@@ -295,9 +295,9 @@ public class MBeanServerDelegate
notification.setSequenceNumber(++seqNo);
for (ListenerData ldata : listeners)
{
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notification))
- ldata.getListener().handleNotification(notification, ldata.getPassback());
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notification))
+ ldata.getListener().handleNotification(notification, ldata.getPassback());
}
}
diff --git a/javax/management/MBeanServerFactory.java b/javax/management/MBeanServerFactory.java
index d798b0c45..f9bd4566f 100644
--- a/javax/management/MBeanServerFactory.java
+++ b/javax/management/MBeanServerFactory.java
@@ -134,7 +134,7 @@ public class MBeanServerFactory
* The default domain name is used when the domain name specified by
* the user is <code>null</code. A reference to the created server is
* retained, so that it can be retrieved at a later date using
- * {@link #findMBeanServer}.
+ * {@link #findMBeanServer}.
*
* @param domain the default domain name of the server.
* @return a new {@link MBeanServer} instance.
@@ -161,34 +161,34 @@ public class MBeanServerFactory
MBeanServer server = createServer(domain);
try
{
- ObjectName dn = new
- ObjectName("JMImplementation:type=MBeanServerDelegate");
- servers.put(server.getAttribute(dn, "MBeanServerId"), server);
+ ObjectName dn = new
+ ObjectName("JMImplementation:type=MBeanServerDelegate");
+ servers.put(server.getAttribute(dn, "MBeanServerId"), server);
}
catch (MalformedObjectNameException e)
{
- throw (Error)
- (new InternalError("Malformed delegate bean name.").initCause(e));
+ throw (Error)
+ (new InternalError("Malformed delegate bean name.").initCause(e));
}
catch (MBeanException e)
{
- throw (Error)
- (new InternalError("Exception in getMBeanServerId().").initCause(e));
+ throw (Error)
+ (new InternalError("Exception in getMBeanServerId().").initCause(e));
}
catch (AttributeNotFoundException e)
{
- throw (Error)
- (new InternalError("Could not find MBeanServerId attribute.").initCause(e));
+ throw (Error)
+ (new InternalError("Could not find MBeanServerId attribute.").initCause(e));
}
catch (InstanceNotFoundException e)
{
- throw (Error)
- (new InternalError("Could not find the delegate bean.").initCause(e));
+ throw (Error)
+ (new InternalError("Could not find the delegate bean.").initCause(e));
}
catch (ReflectionException e)
{
- throw (Error)
- (new InternalError("Could not call getMBeanServerId().").initCause(e));
+ throw (Error)
+ (new InternalError("Could not call getMBeanServerId().").initCause(e));
}
return server;
}
@@ -225,7 +225,7 @@ public class MBeanServerFactory
* Returns the class loader repository used by the specified server.
* This is equivalent to calling {@link MBeanServer#getClassLoaderRepository()}
* on the given server.
- *
+ *
* @param server the server whose class loader repository should be
* retrieved.
* @throws NullPointerException if <code>server</code> is <code>null</code>.
@@ -246,7 +246,7 @@ public class MBeanServerFactory
* used when the domain name specified by the user is <code>null</code.
* No reference to the created server is retained, so the server is
* garbage collected when it is no longer used, but it can not be
- * retrieved at a later date using {@link #findMBeanServer}.
+ * retrieved at a later date using {@link #findMBeanServer}.
* Calling this method is equivalent to calling
* {@link newMBeanServer(String)} with a <code>null</code> value.
*
@@ -331,42 +331,42 @@ public class MBeanServerFactory
SystemProperties.getProperty("javax.management.builder.initial");
if (builderClass == null)
{
- if (builder == null ||
- builder.getClass() != MBeanServerBuilder.class)
- builder = new MBeanServerBuilder();
+ if (builder == null ||
+ builder.getClass() != MBeanServerBuilder.class)
+ builder = new MBeanServerBuilder();
}
else if (!(builder != null &&
- builderClass.equals(builder.getClass().getName())))
+ builderClass.equals(builder.getClass().getName())))
{
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null)
- cl = MBeanServerFactory.class.getClassLoader();
- try
- {
- Class<?> bClass = Class.forName(builderClass, true, cl);
- builder = (MBeanServerBuilder) bClass.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be found."))
- .initCause(e);
- }
- catch (InstantiationException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be instantiated."))
- .initCause(e);
- }
- catch (IllegalAccessException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be accessed."))
- .initCause(e);
- }
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ if (cl == null)
+ cl = MBeanServerFactory.class.getClassLoader();
+ try
+ {
+ Class<?> bClass = Class.forName(builderClass, true, cl);
+ builder = (MBeanServerBuilder) bClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be found."))
+ .initCause(e);
+ }
+ catch (InstantiationException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be instantiated."))
+ .initCause(e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be accessed."))
+ .initCause(e);
+ }
}
MBeanServerDelegate delegate = builder.newMBeanServerDelegate();
if (delegate == null)
@@ -399,12 +399,12 @@ public class MBeanServerFactory
Iterator<MBeanServer> i = servers.values().iterator();
while (i.hasNext())
{
- MBeanServer s = i.next();
- if (server == s)
- {
- i.remove();
- return;
- }
+ MBeanServer s = i.next();
+ if (server == s)
+ {
+ i.remove();
+ return;
+ }
}
throw new IllegalArgumentException("The server given is not referenced.");
}
diff --git a/javax/management/MBeanServerInvocationHandler.java b/javax/management/MBeanServerInvocationHandler.java
index acc8543f1..093e88278 100644
--- a/javax/management/MBeanServerInvocationHandler.java
+++ b/javax/management/MBeanServerInvocationHandler.java
@@ -81,7 +81,7 @@ import java.lang.reflect.Proxy;
* <li><code>toString()</code> returns a textual representation
* of the proxy.</li>
* </ul>
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -129,7 +129,7 @@ public class MBeanServerInvocationHandler
* actual calls.
*/
public MBeanServerInvocationHandler(MBeanServerConnection conn,
- ObjectName name)
+ ObjectName name)
{
this(conn, name, false);
}
@@ -143,7 +143,7 @@ public class MBeanServerInvocationHandler
* Class<T>)} if you wish to make your own call to
* {@link java.lang.reflect.Proxy#newInstance(ClassLoader,
* Class[], java.lang.reflect.InvocationHandler)} with
- * a different {@link ClassLoader}.
+ * a different {@link ClassLoader}.
*
* @param conn the connection through which methods will
* be forwarded to the bean.
@@ -154,7 +154,7 @@ public class MBeanServerInvocationHandler
* @since 1.6
*/
public MBeanServerInvocationHandler(MBeanServerConnection conn,
- ObjectName name, boolean mxBean)
+ ObjectName name, boolean mxBean)
{
this.conn = conn;
this.name = name;
@@ -164,7 +164,7 @@ public class MBeanServerInvocationHandler
/**
* Returns the connection through which the calls to the bean
* will be made.
- *
+ *
* @return the connection being used to forward the calls to
* the bean.
* @since 1.6
@@ -207,77 +207,77 @@ public class MBeanServerInvocationHandler
Class<?> proxyClass = proxy.getClass();
if (mName.equals("toString"))
{
- if (inInterface(mName, proxyClass))
- return conn.invoke(name,mName,null,null);
- else
- return proxyClass.getName() + "[name=" + name
- + ", conn=" + conn + "]";
+ if (inInterface(mName, proxyClass))
+ return conn.invoke(name,mName,null,null);
+ else
+ return proxyClass.getName() + "[name=" + name
+ + ", conn=" + conn + "]";
}
if (mName.equals("hashCode"))
{
- if (inInterface(mName, proxyClass))
- return conn.invoke(name,mName,null,null);
- else
- return conn.hashCode() + name.hashCode()
- + (iface == null ? 0 : iface.hashCode());
+ if (inInterface(mName, proxyClass))
+ return conn.invoke(name,mName,null,null);
+ else
+ return conn.hashCode() + name.hashCode()
+ + (iface == null ? 0 : iface.hashCode());
}
if (mName.equals("equals"))
{
- if (inInterface(mName, proxyClass, Object.class))
- return conn.invoke(name,mName,new Object[]{args[0]},
- new String[]{"java.lang.Object"});
- else
- {
- if (args[0].getClass() != proxy.getClass())
- return false;
- InvocationHandler ih = Proxy.getInvocationHandler(args[0]);
- if (ih instanceof MBeanServerInvocationHandler)
- {
- MBeanServerInvocationHandler h =
- (MBeanServerInvocationHandler) ih;
- return conn.equals(h.getMBeanServerConnection())
- && name.equals(h.getObjectName())
- && (iface == null ? h.iface == null
- : iface.equals(h.iface));
- }
- return false;
- }
+ if (inInterface(mName, proxyClass, Object.class))
+ return conn.invoke(name,mName,new Object[]{args[0]},
+ new String[]{"java.lang.Object"});
+ else
+ {
+ if (args[0].getClass() != proxy.getClass())
+ return false;
+ InvocationHandler ih = Proxy.getInvocationHandler(args[0]);
+ if (ih instanceof MBeanServerInvocationHandler)
+ {
+ MBeanServerInvocationHandler h =
+ (MBeanServerInvocationHandler) ih;
+ return conn.equals(h.getMBeanServerConnection())
+ && name.equals(h.getObjectName())
+ && (iface == null ? h.iface == null
+ : iface.equals(h.iface));
+ }
+ return false;
+ }
}
if (NotificationEmitter.class.isAssignableFrom(proxyClass))
{
- if (mName.equals("addNotificationListener"))
- {
- conn.addNotificationListener(name,
- (NotificationListener) args[0],
- (NotificationFilter) args[1],
- args[2]);
- return null;
- }
- if (mName.equals("getNotificationInfo"))
- return conn.getMBeanInfo(name).getNotifications();
- if (mName.equals("removeNotificationListener"))
- {
- if (args.length == 1)
- conn.removeNotificationListener(name,
- (NotificationListener)
- args[0]);
- else
- conn.removeNotificationListener(name,
- (NotificationListener)
- args[0],
- (NotificationFilter)
- args[1], args[2]);
- return null;
- }
+ if (mName.equals("addNotificationListener"))
+ {
+ conn.addNotificationListener(name,
+ (NotificationListener) args[0],
+ (NotificationFilter) args[1],
+ args[2]);
+ return null;
+ }
+ if (mName.equals("getNotificationInfo"))
+ return conn.getMBeanInfo(name).getNotifications();
+ if (mName.equals("removeNotificationListener"))
+ {
+ if (args.length == 1)
+ conn.removeNotificationListener(name,
+ (NotificationListener)
+ args[0]);
+ else
+ conn.removeNotificationListener(name,
+ (NotificationListener)
+ args[0],
+ (NotificationFilter)
+ args[1], args[2]);
+ return null;
+ }
}
String[] sigs;
if (args == null)
sigs = null;
else
{
- sigs = new String[args.length];
- for (int a = 0; a < args.length; ++a)
- sigs[a] = args[a].getClass().getName();
+ sigs = new String[args.length];
+ for (int a = 0; a < args.length; ++a)
+ sigs[a] = args[a].getClass().getName();
}
String attrib = null;
if (mName.startsWith("get"))
@@ -286,26 +286,26 @@ public class MBeanServerInvocationHandler
attrib = mName.substring(2);
if (attrib != null)
{
- Object val = conn.getAttribute(name, attrib);
- if (mxBean)
- return Translator.toJava(val, method);
- else
- return val;
+ Object val = conn.getAttribute(name, attrib);
+ if (mxBean)
+ return Translator.toJava(val, method);
+ else
+ return val;
}
else if (mName.startsWith("set"))
{
- Object arg;
- if (mxBean)
- arg = Translator.fromJava(args, method)[0];
- else
- arg = args[0];
- conn.setAttribute(name, new Attribute(mName.substring(3), arg));
- return null;
+ Object arg;
+ if (mxBean)
+ arg = Translator.fromJava(args, method)[0];
+ else
+ arg = args[0];
+ conn.setAttribute(name, new Attribute(mName.substring(3), arg));
+ return null;
}
if (mxBean)
- return Translator.toJava(conn.invoke(name, mName,
- Translator.fromJava(args,method),
- sigs), method);
+ return Translator.toJava(conn.invoke(name, mName,
+ Translator.fromJava(args,method),
+ sigs), method);
else
return conn.invoke(name, mName, args, sigs);
}
@@ -332,7 +332,7 @@ public class MBeanServerInvocationHandler
* second element of the array if <code>broadcaster</code> is true.
* <code>handler</code> refers to the invocation handler which forwards
* calls to the connection, which is created by a call to
- * <code>new MBeanServerInvocationHandler(conn, name)</code>.
+ * <code>new MBeanServerInvocationHandler(conn, name)</code>.
* </p>
* <p>
* <strong>Note</strong>: use of the proxy may result in
@@ -355,18 +355,18 @@ public class MBeanServerInvocationHandler
// Suppress warnings as we know an instance of T will be returned.
@SuppressWarnings("unchecked")
public static <T> T newProxyInstance(MBeanServerConnection conn,
- ObjectName name, Class<T> iface,
- boolean broadcaster)
+ ObjectName name, Class<T> iface,
+ boolean broadcaster)
{
if (broadcaster)
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface,
- NotificationEmitter.class },
- new MBeanServerInvocationHandler(conn,name));
+ new Class[] { iface,
+ NotificationEmitter.class },
+ new MBeanServerInvocationHandler(conn,name));
else
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface },
- new MBeanServerInvocationHandler(conn,name));
+ new Class[] { iface },
+ new MBeanServerInvocationHandler(conn,name));
}
/**
@@ -380,23 +380,22 @@ public class MBeanServerInvocationHandler
* given method.
*/
private boolean inInterface(String name, Class<?> proxyClass,
- Class<?>... args)
+ Class<?>... args)
{
for (Class<?> iface : proxyClass.getInterfaces())
{
- try
- {
- iface.getMethod(name, args);
- return true;
- }
- catch (NoSuchMethodException e)
- {
- /* Ignored; this interface doesn't specify
- the method. */
- }
+ try
+ {
+ iface.getMethod(name, args);
+ return true;
+ }
+ catch (NoSuchMethodException e)
+ {
+ /* Ignored; this interface doesn't specify
+ the method. */
+ }
}
return false;
}
-
-}
+}
diff --git a/javax/management/MBeanServerNotification.java b/javax/management/MBeanServerNotification.java
index 820fd61b3..e225a2939 100644
--- a/javax/management/MBeanServerNotification.java
+++ b/javax/management/MBeanServerNotification.java
@@ -84,7 +84,7 @@ public class MBeanServerNotification
* @param name the name of the bean concerned by this event.
*/
public MBeanServerNotification(String type, Object source, long seqNo,
- ObjectName name)
+ ObjectName name)
{
super(type, source, seqNo);
objectName = name;
diff --git a/javax/management/MBeanServerPermission.java b/javax/management/MBeanServerPermission.java
index 045573aba..fea4ea210 100644
--- a/javax/management/MBeanServerPermission.java
+++ b/javax/management/MBeanServerPermission.java
@@ -161,10 +161,10 @@ public class MBeanServerPermission
super(checkName(name), actions);
if (actions != null && actions.length() > 0)
throw new IllegalArgumentException("The supplied action list " +
- "was not equal to null or the " +
- "empty string.");
+ "was not equal to null or the " +
+ "empty string.");
}
-
+
/**
* Returns true if the given object is also an {@link MBeanServerPermission}
* with the same name.
@@ -177,8 +177,8 @@ public class MBeanServerPermission
{
if (obj instanceof MBeanServerPermission)
{
- MBeanServerPermission o = (MBeanServerPermission) obj;
- return o.getName().equals(getName());
+ MBeanServerPermission o = (MBeanServerPermission) obj;
+ return o.getName().equals(getName());
}
return false;
}
@@ -209,28 +209,28 @@ public class MBeanServerPermission
{
if (p instanceof MBeanServerPermission)
{
- if (getName().equals("*"))
- return true;
- MBeanServerPermission msp = (MBeanServerPermission) p;
- String[] thisCaps = getName().split(",");
- String[] mspCaps = msp.getName().split(",");
- for (int a = 0; a < mspCaps.length; ++a)
- {
- boolean found = false;
- String mc = mspCaps[a].trim();
- for (int b = 0; b < thisCaps.length; ++b)
- {
- String tc = thisCaps[b].trim();
- if (tc.equals(mc))
- found = true;
- if (tc.equals("createMBeanServer") &&
- mc.equals("newMBeanServer"))
- found = true;
- }
- if (!found)
- return false;
- }
- return true;
+ if (getName().equals("*"))
+ return true;
+ MBeanServerPermission msp = (MBeanServerPermission) p;
+ String[] thisCaps = getName().split(",");
+ String[] mspCaps = msp.getName().split(",");
+ for (int a = 0; a < mspCaps.length; ++a)
+ {
+ boolean found = false;
+ String mc = mspCaps[a].trim();
+ for (int b = 0; b < thisCaps.length; ++b)
+ {
+ String tc = thisCaps[b].trim();
+ if (tc.equals(mc))
+ found = true;
+ if (tc.equals("createMBeanServer") &&
+ mc.equals("newMBeanServer"))
+ found = true;
+ }
+ if (!found)
+ return false;
+ }
+ return true;
}
return false;
}
@@ -246,7 +246,7 @@ public class MBeanServerPermission
{
return new MBeanServerPermissionCollection();
}
-
+
/**
* A collection of {@link MBeanServerPermission}s, stored
* as a single permission with the union of the capabilities
@@ -284,46 +284,46 @@ public class MBeanServerPermission
public void add(Permission p)
{
if (isReadOnly())
- throw new SecurityException("This collection is read only.");
+ throw new SecurityException("This collection is read only.");
if (p instanceof MBeanServerPermission)
- {
- MBeanServerPermission msp = (MBeanServerPermission) p;
- if (collectionPermission == null)
- collectionPermission = msp;
- else
- {
- String finalString = collectionPermission.getName();
- String[] cp = finalString.split(",");
- String[] np = msp.getName().split(",");
- int createms = finalString.indexOf("createMBeanServer");
- int newms = finalString.indexOf("newMBeanServer");
- for (int a = 0; a < np.length; ++a)
- {
- boolean found = false;
- String nps = np[a].trim();
- for (int b = 0; b < cp.length; ++b)
- {
- String cps = cp[b].trim();
- if (cps.equals(nps))
- found = true;
- if (nps.equals("newMBeanServer")
- && createms != -1)
- found = true;
- if (nps.equals("createMBeanServer")
- && newms != -1)
- finalString =
- finalString.replace("newMBeanServer",
- "createMBeanServer");
- }
- if (!found)
- finalString += "," + nps;
- }
- collectionPermission =
- new MBeanServerPermission(finalString);
- }
- }
+ {
+ MBeanServerPermission msp = (MBeanServerPermission) p;
+ if (collectionPermission == null)
+ collectionPermission = msp;
+ else
+ {
+ String finalString = collectionPermission.getName();
+ String[] cp = finalString.split(",");
+ String[] np = msp.getName().split(",");
+ int createms = finalString.indexOf("createMBeanServer");
+ int newms = finalString.indexOf("newMBeanServer");
+ for (int a = 0; a < np.length; ++a)
+ {
+ boolean found = false;
+ String nps = np[a].trim();
+ for (int b = 0; b < cp.length; ++b)
+ {
+ String cps = cp[b].trim();
+ if (cps.equals(nps))
+ found = true;
+ if (nps.equals("newMBeanServer")
+ && createms != -1)
+ found = true;
+ if (nps.equals("createMBeanServer")
+ && newms != -1)
+ finalString =
+ finalString.replace("newMBeanServer",
+ "createMBeanServer");
+ }
+ if (!found)
+ finalString += "," + nps;
+ }
+ collectionPermission =
+ new MBeanServerPermission(finalString);
+ }
+ }
}
-
+
/**
* Returns an enumeration over the single permission.
*
@@ -333,7 +333,7 @@ public class MBeanServerPermission
public Enumeration<Permission> elements()
{
return new
- MBeanServerPermissionEnumeration(collectionPermission);
+ MBeanServerPermissionEnumeration(collectionPermission);
}
/**
@@ -365,8 +365,8 @@ public class MBeanServerPermission
*/
public MBeanServerPermissionEnumeration(MBeanServerPermission p)
{
- this.p = p;
- done = false;
+ this.p = p;
+ done = false;
}
/**
@@ -376,7 +376,7 @@ public class MBeanServerPermission
*/
public boolean hasMoreElements()
{
- return !done;
+ return !done;
}
/**
@@ -386,13 +386,13 @@ public class MBeanServerPermission
*/
public Permission nextElement()
{
- if (hasMoreElements())
- {
- done = true;
- return p;
- }
- else
- throw new NoSuchElementException("No more elements are available.");
+ if (hasMoreElements())
+ {
+ done = true;
+ return p;
+ }
+ else
+ throw new NoSuchElementException("No more elements are available.");
}
}
@@ -433,42 +433,38 @@ public class MBeanServerPermission
{
if (!(name.equals("*")))
{
- String[] constraints = name.split(",");
- name = "";
- boolean seenCreate = false;
- boolean seenNew = false;
- boolean start = true;
- for (int a = 0; a < constraints.length; ++a)
- {
- String next = constraints[a].trim();
- if (!(next.equals("createMBeanServer") ||
- next.equals("findMBeanServer") ||
- next.equals("newMBeanServer") ||
- next.equals("releaseMBeanServer")))
- throw new IllegalArgumentException("An invalid constraint, " +
- next + ", was specified.");
- if (next.equals("newMBeanServer"))
- seenNew = true;
- else if (next.equals("createMBeanServer"))
- seenCreate = true;
- else
- {
- if (!start)
- name += ",";
- name += next;
- start = false;
- }
- }
- if (seenNew && !seenCreate)
- name += (start ? "" : ",") + "newMBeanServer";
- else if (seenCreate)
- name += (start ? "" : ",") + "createMBeanServer";
+ String[] constraints = name.split(",");
+ name = "";
+ boolean seenCreate = false;
+ boolean seenNew = false;
+ boolean start = true;
+ for (int a = 0; a < constraints.length; ++a)
+ {
+ String next = constraints[a].trim();
+ if (!(next.equals("createMBeanServer") ||
+ next.equals("findMBeanServer") ||
+ next.equals("newMBeanServer") ||
+ next.equals("releaseMBeanServer")))
+ throw new IllegalArgumentException("An invalid constraint, " +
+ next + ", was specified.");
+ if (next.equals("newMBeanServer"))
+ seenNew = true;
+ else if (next.equals("createMBeanServer"))
+ seenCreate = true;
+ else
+ {
+ if (!start)
+ name += ",";
+ name += next;
+ start = false;
+ }
+ }
+ if (seenNew && !seenCreate)
+ name += (start ? "" : ",") + "newMBeanServer";
+ else if (seenCreate)
+ name += (start ? "" : ",") + "createMBeanServer";
}
return name;
}
}
-
-
-
-
diff --git a/javax/management/MBeanTrustPermission.java b/javax/management/MBeanTrustPermission.java
index 57d0e6889..371e1295e 100644
--- a/javax/management/MBeanTrustPermission.java
+++ b/javax/management/MBeanTrustPermission.java
@@ -46,8 +46,8 @@ import java.security.BasicPermission;
* It has a target, but no actions. Valid values for the target
* are <code>"register"</code> and <code>"*"</code>, the latter
* representing both the existing <code>"register"</code> target
- * and any future targets.
- *
+ * and any future targets.
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -96,10 +96,10 @@ public class MBeanTrustPermission
{
super(target, actions);
if ((!(target.equals("register"))) &&
- (!(target.equals("*"))))
+ (!(target.equals("*"))))
throw new IllegalArgumentException("The target must be 'register' or '*'");
if (actions != null && !(actions.length() == 0))
- throw new IllegalArgumentException("The actions must be null or ''");
+ throw new IllegalArgumentException("The actions must be null or ''");
}
-
+
}
diff --git a/javax/management/MalformedObjectNameException.java b/javax/management/MalformedObjectNameException.java
index e2f577490..9a9899193 100644
--- a/javax/management/MalformedObjectNameException.java
+++ b/javax/management/MalformedObjectNameException.java
@@ -73,4 +73,3 @@ public class MalformedObjectNameException
}
}
-
diff --git a/javax/management/NotCompliantMBeanException.java b/javax/management/NotCompliantMBeanException.java
index f2252f28b..a8fa7a852 100644
--- a/javax/management/NotCompliantMBeanException.java
+++ b/javax/management/NotCompliantMBeanException.java
@@ -75,4 +75,3 @@ public class NotCompliantMBeanException
}
}
-
diff --git a/javax/management/Notification.java b/javax/management/Notification.java
index 2bbc206a8..0831c297c 100644
--- a/javax/management/Notification.java
+++ b/javax/management/Notification.java
@@ -139,7 +139,7 @@ public class Notification
/**
* Creates a new {@link Notification} object with the specified type,
- * source, sequence number and timestamp.
+ * source, sequence number and timestamp.
*
* @param type the type of the notification.
* @param source the source of the notification.
@@ -147,14 +147,14 @@ public class Notification
* @param timeStamp the time the notification was emitted.
*/
public Notification(String type, Object source, long sequenceNumber,
- long timeStamp)
+ long timeStamp)
{
this(type, source, sequenceNumber, timeStamp, "");
}
/**
* Creates a new {@link Notification} object with the specified type,
- * source, sequence number, timestamp and message.
+ * source, sequence number, timestamp and message.
*
* @param type the type of the notification.
* @param source the source of the notification.
@@ -163,7 +163,7 @@ public class Notification
* @param message the message contained in the notification.
*/
public Notification(String type, Object source, long sequenceNumber,
- long timeStamp, String message)
+ long timeStamp, String message)
{
super(source);
this.type = type;
@@ -184,7 +184,7 @@ public class Notification
* @param message the message contained in the notification.
*/
public Notification(String type, Object source, long sequenceNumber,
- String message)
+ String message)
{
this(type, source, sequenceNumber, new Date().getTime(), message);
}
@@ -304,15 +304,15 @@ public class Notification
/**
* A textual representation of the notification.
- *
+ *
* @return the notification in {@link java.lang.String} form.
*/
public String toString()
{
return getClass().getName()
- + "[message=" + message
- + ", sequenceNumber=" + sequenceNumber
- + ", source=" + source
+ + "[message=" + message
+ + ", sequenceNumber=" + sequenceNumber
+ + ", source=" + source
+ ", timeStamp=" + timeStamp
+ ", type=" + type
+ ", userData=" + userData
@@ -332,4 +332,3 @@ public class Notification
}
}
-
diff --git a/javax/management/NotificationBroadcaster.java b/javax/management/NotificationBroadcaster.java
index 139d842bb..2196e980f 100644
--- a/javax/management/NotificationBroadcaster.java
+++ b/javax/management/NotificationBroadcaster.java
@@ -55,7 +55,7 @@ package javax.management;
*/
public interface NotificationBroadcaster
{
-
+
/**
* Registers the specified listener as a new recipient of
* notifications from this bean. If non-null, the filter
@@ -77,8 +77,8 @@ public interface NotificationBroadcaster
* @see #removeNotificationListener(NotificationListener)
*/
void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException;
/**
@@ -109,4 +109,3 @@ public interface NotificationBroadcaster
throws ListenerNotFoundException;
}
-
diff --git a/javax/management/NotificationBroadcasterSupport.java b/javax/management/NotificationBroadcasterSupport.java
index 1df84e542..723d17e77 100644
--- a/javax/management/NotificationBroadcasterSupport.java
+++ b/javax/management/NotificationBroadcasterSupport.java
@@ -117,7 +117,7 @@ public class NotificationBroadcasterSupport
* thread; only calls which have successfully passed through the
* filter are sent to the executor. This is equivalent to calling
* <code>NotificationBroadcasterSupport(executor, null)</code>.
- *
+ *
* @param executor the executor to use for each call to
* <code>handleNotification()</code>.
* @since 1.6
@@ -138,7 +138,7 @@ public class NotificationBroadcasterSupport
* calling <code>NotificationBroadcasterSupport(null, info)</code>.
*
* @param info an array of {@link MBeanNotificationInfo} objects
- * describing the notifications delivered by this
+ * describing the notifications delivered by this
* broadcaster. This may be <code>null</code>, which
* is taken as being equivalent to an empty array.
*/
@@ -159,17 +159,17 @@ public class NotificationBroadcasterSupport
* information about the notifications on calls to
* {@link #getNotificationInfo()}, where a clone will be
* returned if the array is non-empty.
- *
+ *
* @param executor the executor to use for each call to
* <code>handleNotification()</code>.
* @param info an array of {@link MBeanNotificationInfo} objects
- * describing the notifications delivered by this
+ * describing the notifications delivered by this
* broadcaster. This may be <code>null</code>, which
* is taken as being equivalent to an empty array.
* @since 1.6
*/
public NotificationBroadcasterSupport(Executor executor,
- MBeanNotificationInfo... info)
+ MBeanNotificationInfo... info)
{
this.executor = executor;
this.info = info;
@@ -196,8 +196,8 @@ public class NotificationBroadcasterSupport
* @see #removeNotificationListener(NotificationListener)
*/
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException
{
if (listener == null)
@@ -234,8 +234,8 @@ public class NotificationBroadcasterSupport
* @param passback the passback object of the listener.
*/
protected void handleNotification(NotificationListener listener,
- Notification notif,
- Object passback)
+ Notification notif,
+ Object passback)
{
listener.handleNotification(notif, passback);
}
@@ -260,15 +260,15 @@ public class NotificationBroadcasterSupport
boolean foundOne = false;
while (it.hasNext())
{
- if (it.next().getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ if (it.next().getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
/**
@@ -289,16 +289,16 @@ public class NotificationBroadcasterSupport
* java.lang.Object)
*/
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
@@ -326,19 +326,19 @@ public class NotificationBroadcasterSupport
{
for (ListenerData ldata : listeners)
{
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notif))
- {
- if (executor == null)
- try
- {
- handleNotification(ldata.getListener(), notif,
- ldata.getPassback());
- }
- catch (Exception e) { /* Ignore */ }
- else
- executor.execute(new DispatchTask(ldata, notif));
- }
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notif))
+ {
+ if (executor == null)
+ try
+ {
+ handleNotification(ldata.getListener(), notif,
+ ldata.getPassback());
+ }
+ catch (Exception e) { /* Ignore */ }
+ else
+ executor.execute(new DispatchTask(ldata, notif));
+ }
}
}
@@ -366,7 +366,7 @@ public class NotificationBroadcasterSupport
* @param notif the notification to send.
*/
public DispatchTask(ListenerData ldata,
- Notification notif)
+ Notification notif)
{
this.ldata = ldata;
this.notif = notif;
@@ -378,13 +378,12 @@ public class NotificationBroadcasterSupport
public void run()
{
try
- {
- handleNotification(ldata.getListener(), notif,
- ldata.getPassback());
- }
+ {
+ handleNotification(ldata.getListener(), notif,
+ ldata.getPassback());
+ }
catch (Exception e) { /* Ignore */ }
}
}
}
-
diff --git a/javax/management/NotificationEmitter.java b/javax/management/NotificationEmitter.java
index 002e2fe18..7187d8cdf 100644
--- a/javax/management/NotificationEmitter.java
+++ b/javax/management/NotificationEmitter.java
@@ -49,7 +49,7 @@ package javax.management;
public interface NotificationEmitter
extends NotificationBroadcaster
{
-
+
/**
* Removes the specified listener from the list of recipients
* of notifications from this bean. Only the first instance with
@@ -68,9 +68,8 @@ public interface NotificationEmitter
* java.lang.Object)
*/
void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException;
}
-
diff --git a/javax/management/NotificationFilter.java b/javax/management/NotificationFilter.java
index a8e41c93f..db39aad7f 100644
--- a/javax/management/NotificationFilter.java
+++ b/javax/management/NotificationFilter.java
@@ -51,7 +51,7 @@ import java.io.Serializable;
public interface NotificationFilter
extends Serializable
{
-
+
/**
* Returns true if the specified notification should be passed
* on to the listener.
@@ -63,4 +63,3 @@ public interface NotificationFilter
boolean isNotificationEnabled(Notification notification);
}
-
diff --git a/javax/management/NotificationFilterSupport.java b/javax/management/NotificationFilterSupport.java
index 28be87188..a71f5c717 100644
--- a/javax/management/NotificationFilterSupport.java
+++ b/javax/management/NotificationFilterSupport.java
@@ -108,7 +108,7 @@ public class NotificationFilterSupport
if (!enabledTypes.contains(prefix))
enabledTypes.add(prefix);
}
-
+
/**
* Returns the list of enabled types for this
* filter.
@@ -132,7 +132,7 @@ public class NotificationFilterSupport
String nType = notif.getType();
for (String type : enabledTypes)
if (nType.startsWith(type))
- return true;
+ return true;
return false;
}
diff --git a/javax/management/NotificationListener.java b/javax/management/NotificationListener.java
index 69b08eee3..4810e9187 100644
--- a/javax/management/NotificationListener.java
+++ b/javax/management/NotificationListener.java
@@ -49,7 +49,7 @@ import java.util.EventListener;
public interface NotificationListener
extends EventListener
{
-
+
/**
* Invoked by the notifying bean when a notification is to
* be delivered to the recipient. As the transmission of
@@ -67,4 +67,3 @@ public interface NotificationListener
void handleNotification(Notification notification, Object passback);
}
-
diff --git a/javax/management/ObjectInstance.java b/javax/management/ObjectInstance.java
index df364cffc..1328db0e2 100644
--- a/javax/management/ObjectInstance.java
+++ b/javax/management/ObjectInstance.java
@@ -110,7 +110,7 @@ public class ObjectInstance
return false;
ObjectInstance i = (ObjectInstance) obj;
return (i.getClassName().equals(className) &&
- i.getObjectName().equals(name));
+ i.getObjectName().equals(name));
}
/**
diff --git a/javax/management/ObjectName.java b/javax/management/ObjectName.java
index d3ccd201f..856d03f03 100644
--- a/javax/management/ObjectName.java
+++ b/javax/management/ObjectName.java
@@ -101,7 +101,7 @@ import java.io.ObjectOutputStream;
* '<code>domain: key1 = value1 </code>' has a key ' key1 ' with value
* ' value1 '. Newlines are disallowed, except where escaped in quoted
* values.
- * </p>
+ * </p>
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -156,13 +156,13 @@ public class ObjectName
{
try
{
- WILDCARD = new ObjectName("");
+ WILDCARD = new ObjectName("");
}
catch (MalformedObjectNameException e)
{
- throw (InternalError) (new InternalError("A problem occurred " +
- "initializing the ObjectName " +
- "wildcard.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "initializing the ObjectName " +
+ "wildcard.").initCause(e));
}
}
@@ -208,34 +208,34 @@ public class ObjectName
String[] pairs = rest.split(",");
if (pairs.length == 0 && !isPattern())
throw new MalformedObjectNameException("A name that is not a " +
- "pattern must contain at " +
- "least one key-value pair.");
+ "pattern must contain at " +
+ "least one key-value pair.");
propertyListString = "";
for (int a = 0; a < pairs.length; ++a)
{
- if (pairs[a].equals("*"))
- {
- if (propertyListPattern)
- throw new MalformedObjectNameException("Multiple wildcards " +
- "in properties.");
- propertyListPattern = true;
- continue;
- }
- int sep = pairs[a].indexOf('=');
- if (sep == -1)
- throw new MalformedObjectNameException("A key must be " +
- "followed by a value.");
- String key = pairs[a].substring(0, sep);
- if (properties.containsKey(key))
- throw new MalformedObjectNameException("The same key occurs " +
- "more than once.");
- String value = pairs[a].substring(sep+1);
- properties.put(key, value);
- propertyListString += key + "=" + value + ",";
+ if (pairs[a].equals("*"))
+ {
+ if (propertyListPattern)
+ throw new MalformedObjectNameException("Multiple wildcards " +
+ "in properties.");
+ propertyListPattern = true;
+ continue;
+ }
+ int sep = pairs[a].indexOf('=');
+ if (sep == -1)
+ throw new MalformedObjectNameException("A key must be " +
+ "followed by a value.");
+ String key = pairs[a].substring(0, sep);
+ if (properties.containsKey(key))
+ throw new MalformedObjectNameException("The same key occurs " +
+ "more than once.");
+ String value = pairs[a].substring(sep+1);
+ properties.put(key, value);
+ propertyListString += key + "=" + value + ",";
}
if (propertyListString.length() > 0)
propertyListString =
- propertyListString.substring(0, propertyListString.length() - 1);
+ propertyListString.substring(0, propertyListString.length() - 1);
checkComponents();
}
@@ -300,48 +300,48 @@ public class ObjectName
{
if (domain.indexOf(':') != -1)
throw new MalformedObjectNameException("The domain includes a ':' " +
- "character.");
+ "character.");
if (domain.indexOf('\n') != -1)
throw new MalformedObjectNameException("The domain includes a newline " +
- "character.");
+ "character.");
char[] keychars = new char[] { '\n', ':', ',', '*', '?', '=' };
char[] valchars = new char[] { '\n', ':', ',', '=' };
for (Map.Entry<String,String> entry : properties.entrySet())
{
- for (int a = 0; a < keychars.length; ++a)
- if (entry.getKey().indexOf(keychars[a]) != -1)
- throw new MalformedObjectNameException("A key contains a '" +
- keychars[a] + "' " +
- "character.");
- String value = entry.getValue();
- int quote = value.indexOf('"');
- if (quote == 0)
- {
- try
- {
- unquote(value);
- }
- catch (IllegalArgumentException e)
- {
- throw (MalformedObjectNameException)
- new MalformedObjectNameException("The quoted value is " +
- "invalid.").initCause(e);
- }
- }
- else if (quote != -1)
- throw new MalformedObjectNameException("A value contains " +
- "a '\"' character.");
- else
- {
- for (int a = 0; a < valchars.length; ++a)
- if (value.indexOf(valchars[a]) != -1)
- throw new MalformedObjectNameException("A value contains " +
- "a '" + valchars[a] + "' " +
- "character.");
-
- }
- if (value.indexOf('*') != -1 || value.indexOf('?') != -1)
- propertyValuePattern = true;
+ for (int a = 0; a < keychars.length; ++a)
+ if (entry.getKey().indexOf(keychars[a]) != -1)
+ throw new MalformedObjectNameException("A key contains a '" +
+ keychars[a] + "' " +
+ "character.");
+ String value = entry.getValue();
+ int quote = value.indexOf('"');
+ if (quote == 0)
+ {
+ try
+ {
+ unquote(value);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw (MalformedObjectNameException)
+ new MalformedObjectNameException("The quoted value is " +
+ "invalid.").initCause(e);
+ }
+ }
+ else if (quote != -1)
+ throw new MalformedObjectNameException("A value contains " +
+ "a '\"' character.");
+ else
+ {
+ for (int a = 0; a < valchars.length; ++a)
+ if (value.indexOf(valchars[a]) != -1)
+ throw new MalformedObjectNameException("A value contains " +
+ "a '" + valchars[a] + "' " +
+ "character.");
+
+ }
+ if (value.indexOf('*') != -1 || value.indexOf('?') != -1)
+ propertyValuePattern = true;
}
}
@@ -375,33 +375,33 @@ public class ObjectName
if (isDomainPattern())
{
- if (!domainMatches(domain, 0, name.getDomain(), 0))
- return false;
+ if (!domainMatches(domain, 0, name.getDomain(), 0))
+ return false;
}
else
{
- if (!domain.equals(name.getDomain()))
- return false;
+ if (!domain.equals(name.getDomain()))
+ return false;
}
if (isPropertyPattern())
{
- Hashtable<String,String> oProps = name.getKeyPropertyList();
- for (Map.Entry<String,String> entry : properties.entrySet())
- {
- String key = entry.getKey();
- if (!(oProps.containsKey(key)))
- return false;
- String val = entry.getValue();
- if (!(val.equals(oProps.get(key))))
- return false;
- }
+ Hashtable<String,String> oProps = name.getKeyPropertyList();
+ for (Map.Entry<String,String> entry : properties.entrySet())
+ {
+ String key = entry.getKey();
+ if (!(oProps.containsKey(key)))
+ return false;
+ String val = entry.getValue();
+ if (!(val.equals(oProps.get(key))))
+ return false;
+ }
}
else
{
- if (!getCanonicalKeyPropertyListString().equals
- (name.getCanonicalKeyPropertyListString()))
- return false;
+ if (!getCanonicalKeyPropertyListString().equals
+ (name.getCanonicalKeyPropertyListString()))
+ return false;
}
return true;
}
@@ -416,29 +416,29 @@ public class ObjectName
* @return true if the domain matches the pattern.
*/
private static boolean domainMatches(String pattern, int patternindex,
- String domain, int domainindex)
+ String domain, int domainindex)
{
while (patternindex < pattern.length())
{
- char c = pattern.charAt(patternindex++);
-
- if (c == '*')
- {
- for (int i = domain.length(); i >= domainindex; i--)
- {
- if (domainMatches(pattern, patternindex, domain, i))
- return true;
- }
- return false;
- }
-
- if (domainindex >= domain.length())
- return false;
-
- if (c != '?' && c != domain.charAt(domainindex))
- return false;
-
- domainindex++;
+ char c = pattern.charAt(patternindex++);
+
+ if (c == '*')
+ {
+ for (int i = domain.length(); i >= domainindex; i--)
+ {
+ if (domainMatches(pattern, patternindex, domain, i))
+ return true;
+ }
+ return false;
+ }
+
+ if (domainindex >= domain.length())
+ return false;
+
+ if (c != '?' && c != domain.charAt(domainindex))
+ return false;
+
+ domainindex++;
}
return true;
}
@@ -457,8 +457,8 @@ public class ObjectName
{
if (obj instanceof ObjectName)
{
- ObjectName o = (ObjectName) obj;
- return getCanonicalName().equals(o.getCanonicalName());
+ ObjectName o = (ObjectName) obj;
+ return getCanonicalName().equals(o.getCanonicalName());
}
return false;
}
@@ -467,7 +467,7 @@ public class ObjectName
* Returns the property list in canonical form. The keys
* are ordered using the lexicographic ordering used by
* {@link java.lang.String#compareTo(java.lang.Object)}.
- *
+ *
* @return the property list, with the keys in lexicographic
* order.
*/
@@ -477,10 +477,10 @@ public class ObjectName
Iterator<Map.Entry<String,String>> i = properties.entrySet().iterator();
while (i.hasNext())
{
- Map.Entry<String,String> entry = i.next();
- builder.append(entry.getKey() + "=" + entry.getValue());
- if (i.hasNext())
- builder.append(",");
+ Map.Entry<String,String> entry = i.next();
+ builder.append(entry.getKey() + "=" + entry.getValue());
+ if (i.hasNext())
+ builder.append(",");
}
return builder.toString();
}
@@ -488,7 +488,7 @@ public class ObjectName
/**
* <p>
* Returns the name as a string in canonical form. More precisely,
- * this returns a string of the format
+ * this returns a string of the format
* &lt;domain&gt;:&lt;properties&gt;&lt;wild&gt;. &lt;properties&gt;
* is the same value as returned by
* {@link #getCanonicalKeyPropertyListString()}. &lt;wild&gt;
@@ -499,7 +499,7 @@ public class ObjectName
* <li>'*' if &lt;properties&gt; is empty.</li>
* <li>',*' if there is at least one key-value pair.</li>
* </ul>
- *
+ *
* @return the canonical string form of the object name, as specified
* above.
*/
@@ -539,13 +539,13 @@ public class ObjectName
{
try
{
- return new ObjectName(name.getCanonicalName());
+ return new ObjectName(name.getCanonicalName());
}
catch (MalformedObjectNameException e)
{
- throw (InternalError)
- (new InternalError("The canonical name of " +
- "the given name is invalid.").initCause(e));
+ throw (InternalError)
+ (new InternalError("The canonical name of " +
+ "the given name is invalid.").initCause(e));
}
}
@@ -557,7 +557,7 @@ public class ObjectName
*
* @param name the {@link ObjectName} to provide an instance of.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -582,7 +582,7 @@ public class ObjectName
* @param key the key of the property.
* @param value the value of the property.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -606,7 +606,7 @@ public class ObjectName
* @param domain the domain part of the object name.
* @param properties the key-value property pairs.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -615,7 +615,7 @@ public class ObjectName
* @throws NullPointerException if <code>name</code> is <code>null</code>.
*/
public static ObjectName getInstance(String domain,
- Hashtable<String,String> properties)
+ Hashtable<String,String> properties)
throws MalformedObjectNameException
{
return new ObjectName(domain, properties);
@@ -654,7 +654,7 @@ public class ObjectName
* list. If the object name was created using {@link
* ObjectName(String)}, then this string will contain the properties
* in the same order they were given in at creation.
- *
+ *
* @return the property list.
*/
public String getKeyPropertyListString()
@@ -784,8 +784,8 @@ public class ObjectName
* <li>Otherwise, s is used verbatim.
* </ul></li>
* <li>The string is terminated with a closing quote character, '"'.</li>
- * </ul>
- *
+ * </ul>
+ *
* @param string the string to quote.
* @return a quoted version of the supplied string.
* @throws NullPointerException if <code>string</code> is <code>null</code>.
@@ -796,27 +796,27 @@ public class ObjectName
builder.append('"');
for (int a = 0; a < string.length(); ++a)
{
- char s = string.charAt(a);
- switch (s)
- {
- case '"':
- builder.append("\\\"");
- break;
- case '*':
- builder.append("\\*");
- break;
- case '?':
- builder.append("\\?");
- break;
- case '\\':
- builder.append("\\\\");
- break;
- case '\n':
- builder.append("\\\n");
- break;
- default:
- builder.append(s);
- }
+ char s = string.charAt(a);
+ switch (s)
+ {
+ case '"':
+ builder.append("\\\"");
+ break;
+ case '*':
+ builder.append("\\*");
+ break;
+ case '?':
+ builder.append("\\?");
+ break;
+ case '\\':
+ builder.append("\\\\");
+ break;
+ case '\n':
+ builder.append("\\\n");
+ break;
+ default:
+ builder.append(s);
+ }
}
builder.append('"');
return builder.toString();
@@ -881,7 +881,7 @@ public class ObjectName
* @param in the input stream to read from.
* @throws IOException if an I/O error occurs.
*/
- private void readObject(ObjectInputStream in)
+ private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
in.defaultReadObject();
@@ -908,7 +908,7 @@ public class ObjectName
* @return the unquoted string.
* @throws NullPointerException if <code>q</code> is <code>null</code>.
* @throws IllegalArgumentException if the string is not a valid
- * quoted string i.e. it is not
+ * quoted string i.e. it is not
* surrounded by quotation marks
* and/or characters are not properly
* escaped.
@@ -917,25 +917,25 @@ public class ObjectName
{
if (q.charAt(0) != '"')
throw new IllegalArgumentException("The string does " +
- "not start with a quote.");
+ "not start with a quote.");
if (q.charAt(q.length() - 1) != '"')
throw new IllegalArgumentException("The string does " +
- "not end with a quote.");
+ "not end with a quote.");
CPStringBuilder builder = new CPStringBuilder();
for (int a = 1; a < (q.length() - 1); ++a)
{
- char n = q.charAt(a);
- if (n == '\\')
- {
- n = q.charAt(++a);
- if (n != '"' && n != '?' && n != '*' &&
- n != 'n' && n != '\\')
- throw new IllegalArgumentException("Illegal escaped character: "
- + n);
- }
- else if (n == '"' || n == '\n')
- throw new IllegalArgumentException("Illegal character: " + n);
- builder.append(n);
+ char n = q.charAt(a);
+ if (n == '\\')
+ {
+ n = q.charAt(++a);
+ if (n != '"' && n != '?' && n != '*' &&
+ n != 'n' && n != '\\')
+ throw new IllegalArgumentException("Illegal escaped character: "
+ + n);
+ }
+ else if (n == '"' || n == '\n')
+ throw new IllegalArgumentException("Illegal character: " + n);
+ builder.append(n);
}
return builder.toString();
diff --git a/javax/management/OperationsException.java b/javax/management/OperationsException.java
index cbd90d637..b0e434de4 100644
--- a/javax/management/OperationsException.java
+++ b/javax/management/OperationsException.java
@@ -73,4 +73,3 @@ public class OperationsException
}
}
-
diff --git a/javax/management/PersistentMBean.java b/javax/management/PersistentMBean.java
index e47e2c5fa..51ee4604b 100644
--- a/javax/management/PersistentMBean.java
+++ b/javax/management/PersistentMBean.java
@@ -74,7 +74,7 @@ public interface PersistentMBean
*/
void load()
throws MBeanException, RuntimeOperationsException,
- InstanceNotFoundException;
+ InstanceNotFoundException;
/**
* <p>
@@ -121,6 +121,6 @@ public interface PersistentMBean
*/
void store()
throws MBeanException, RuntimeOperationsException,
- InstanceNotFoundException;
+ InstanceNotFoundException;
}
diff --git a/javax/management/Query.java b/javax/management/Query.java
index 80b76b1b6..7cd02704b 100644
--- a/javax/management/Query.java
+++ b/javax/management/Query.java
@@ -42,7 +42,7 @@ package javax.management;
* may be used to list and enumerate management beans, via
* the {@link MBeanServer}. By using the methods in this class,
* complex queries can be created from their more basic
- * components.
+ * components.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -61,7 +61,7 @@ public class Query
* query to be used in serialization.
*/
public static final int MINUS = 1;
-
+
/**
* A code representing the {@link #times(ValueExp, ValueExp)
* query to be used in serialization.
@@ -133,7 +133,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp anySubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, "*" + string.getValue() + "*");
}
@@ -168,7 +168,7 @@ public class Query
* {@link QualifiedAttributeValueExp}.
*/
public static AttributeValueExp attr(String className,
- String name)
+ String name)
{
return new QualifiedAttributeValueExp(className, name);
}
@@ -189,7 +189,7 @@ public class Query
* {@link BetweenQueryExp}.
*/
public static QueryExp between(ValueExp v1, ValueExp v2,
- ValueExp v3)
+ ValueExp v3)
{
return new BetweenQueryExp(v1, v2, v3);
}
@@ -213,7 +213,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * dividing <code>v1</code> by <code>v2</code>.
+ * dividing <code>v1</code> by <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -229,7 +229,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
- * comparing <code>v1</code> to <code>v2</code> for equality.
+ * comparing <code>v1</code> to <code>v2</code> for equality.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -257,7 +257,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp finalSubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, "*" + string.getValue());
}
@@ -265,7 +265,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing <code>v1</code> to <code>v2</code> to see if
- * <code>v1</code> is greater than or equal to <code>v2</code>.
+ * <code>v1</code> is greater than or equal to <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -282,7 +282,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing <code>v1</code> to <code>v2</code> to see if
- * <code>v1</code> is greater than <code>v2</code>.
+ * <code>v1</code> is greater than <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -327,7 +327,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp initialSubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, string.getValue() + "*");
}
@@ -357,7 +357,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing <code>v1</code> to <code>v2</code> to see if
- * <code>v1</code> is less than or equal to <code>v2</code>.
+ * <code>v1</code> is less than or equal to <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -374,7 +374,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing <code>v1</code> to <code>v2</code> to see if
- * <code>v1</code> is less than <code>v2</code>.
+ * <code>v1</code> is less than <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -422,14 +422,14 @@ public class Query
* as the non-public class {@link MatchQueryExp}.
*/
public static QueryExp match(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, string.getValue());
}
/**
* Returns a value expression which evaluates to the result of
- * subtracting <code>v2</code> from <code>v1</code>.
+ * subtracting <code>v2</code> from <code>v1</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -474,7 +474,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * adding <code>v1</code> to <code>v2</code>.
+ * adding <code>v1</code> to <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -490,7 +490,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * multiplying <code>v1</code> by <code>v2</code>.
+ * multiplying <code>v1</code> by <code>v2</code>.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -505,7 +505,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the boolean value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -518,7 +518,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the double value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -531,7 +531,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the float value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -544,7 +544,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the integer value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -557,7 +557,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the long value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -570,7 +570,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the {@link Number} value to wrap.
* @return a value expression wrapping <code>val</code>. This
@@ -583,7 +583,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified string.
+ * Returns a value expression wrapping the specified string.
*
* @param val the {@link String} to wrap.
* @return a {@link StringValueExp} wrapping <code>val</code>.
@@ -609,7 +609,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -1081892073854801359L;
-
+
/**
* The first operand.
*/
@@ -653,7 +653,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return exp1.apply(name) && exp2.apply(name);
}
@@ -676,7 +676,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -7156603696948215014L;
-
+
/**
* The attribute to match against.
*/
@@ -695,7 +695,7 @@ public class Query
* @param pattern the pattern.
*/
public MatchQueryExp(AttributeValueExp exp,
- String pattern)
+ String pattern)
{
this.exp = exp;
this.pattern = pattern;
@@ -720,7 +720,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String val = ((StringValueExp) exp.apply(name)).getValue();
int valPos = 0;
@@ -728,83 +728,83 @@ public class Query
int fallbackP = -1;
boolean backslash = false;
for (int a = 0; a < pattern.length(); ++a)
- {
- boolean matched = false;
- int next = pattern.codePointAt(a);
- if (!backslash)
- {
- if (next == '?' && valPos < val.length())
- {
- ++valPos;
- matched = true;
- }
- else if (next == '*')
- {
- fallback = valPos;
- fallbackP = a;
- matched = true;
- }
- else if (next == '[' && valPos < val.length())
- {
- boolean negated = false;
- int b = a + 1;
- int classChar = pattern.codePointAt(b);
- do
- {
- if (classChar == '!' && b == a + 1)
- negated = true;
- else if (pattern.codePointAt(b + 1) == '-' &&
- pattern.codePointAt(b + 2) != ']')
- {
- if (classChar > pattern.codePointAt(b + 2))
- throw new BadStringOperationException("Invalid range: " +
- classChar + " to " +
- pattern.codePointAt(b+2));
- for (int c = classChar; c <= pattern.codePointAt(b+2); ++c)
- if (val.codePointAt(valPos) == c)
- matched = true;
- b = b + 2;
- }
- else if (val.codePointAt(valPos) == classChar)
- matched = true;
- ++b;
- classChar = pattern.codePointAt(b);
- } while (classChar != ']');
- if (negated)
- matched = !matched;
- ++valPos;
- a = b;
- }
- else if (next == '\\')
- backslash = true;
- else if (valPos < val.length() && next == val.codePointAt(valPos))
- {
- matched = true;
- ++valPos;
- }
- }
- else
- {
- backslash = false;
- if (valPos < val.length() && next == val.codePointAt(valPos))
- {
- matched = true;
- ++valPos;
- }
- }
- if (!matched)
- if (fallback != -1)
- {
- ++fallback;
- valPos = fallback;
- a = fallbackP;
- if (valPos == val.length())
- return false;
- continue;
- }
- else
- return false;
- }
+ {
+ boolean matched = false;
+ int next = pattern.codePointAt(a);
+ if (!backslash)
+ {
+ if (next == '?' && valPos < val.length())
+ {
+ ++valPos;
+ matched = true;
+ }
+ else if (next == '*')
+ {
+ fallback = valPos;
+ fallbackP = a;
+ matched = true;
+ }
+ else if (next == '[' && valPos < val.length())
+ {
+ boolean negated = false;
+ int b = a + 1;
+ int classChar = pattern.codePointAt(b);
+ do
+ {
+ if (classChar == '!' && b == a + 1)
+ negated = true;
+ else if (pattern.codePointAt(b + 1) == '-' &&
+ pattern.codePointAt(b + 2) != ']')
+ {
+ if (classChar > pattern.codePointAt(b + 2))
+ throw new BadStringOperationException("Invalid range: " +
+ classChar + " to " +
+ pattern.codePointAt(b+2));
+ for (int c = classChar; c <= pattern.codePointAt(b+2); ++c)
+ if (val.codePointAt(valPos) == c)
+ matched = true;
+ b = b + 2;
+ }
+ else if (val.codePointAt(valPos) == classChar)
+ matched = true;
+ ++b;
+ classChar = pattern.codePointAt(b);
+ } while (classChar != ']');
+ if (negated)
+ matched = !matched;
+ ++valPos;
+ a = b;
+ }
+ else if (next == '\\')
+ backslash = true;
+ else if (valPos < val.length() && next == val.codePointAt(valPos))
+ {
+ matched = true;
+ ++valPos;
+ }
+ }
+ else
+ {
+ backslash = false;
+ if (valPos < val.length() && next == val.codePointAt(valPos))
+ {
+ matched = true;
+ ++valPos;
+ }
+ }
+ if (!matched)
+ if (fallback != -1)
+ {
+ ++fallback;
+ valPos = fallback;
+ a = fallbackP;
+ if (valPos == val.length())
+ return false;
+ continue;
+ }
+ else
+ return false;
+ }
return true;
}
}
@@ -867,22 +867,22 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- if (!(QueryEval.getMBeanServer().getObjectInstance(name).getClassName().equals(className)))
- throw new BadAttributeValueExpException("The value is not from " +
- "the correct class.");
- }
+ {
+ if (!(QueryEval.getMBeanServer().getObjectInstance(name).getClassName().equals(className)))
+ throw new BadAttributeValueExpException("The value is not from " +
+ "the correct class.");
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
return super.apply(name);
}
-
+
}
/**
@@ -902,7 +902,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -2933597532866307444L;
-
+
/**
* The value to compare.
*/
@@ -928,7 +928,7 @@ public class Query
* @param exp3 the upper bound.
*/
public BetweenQueryExp(ValueExp exp1, ValueExp exp2,
- ValueExp exp3)
+ ValueExp exp3)
{
this.exp1 = exp1;
this.exp2 = exp2;
@@ -954,7 +954,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v1 = exp1.apply(name).toString();
String v2 = exp2.apply(name).toString();
@@ -999,19 +999,19 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- return new StringValueExp(QueryEval.getMBeanServer().getObjectInstance(name).getClassName());
- }
+ {
+ return new StringValueExp(QueryEval.getMBeanServer().getObjectInstance(name).getClassName());
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
}
-
+
}
/**
@@ -1032,7 +1032,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 1216286847881456786L;
-
+
/**
* The operation to perform.
*/
@@ -1082,23 +1082,23 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
NumericValueExp v1 = (NumericValueExp) exp1.apply(name);
NumericValueExp v2 = (NumericValueExp) exp2.apply(name);
switch (op)
- {
- case PLUS:
- return v1.plus(v2);
- case MINUS:
- return v1.minus(v2);
- case TIMES:
- return v1.times(v2);
- case DIV:
- return v1.div(v2);
- default:
- throw new BadBinaryOpValueExpException(this);
- }
+ {
+ case PLUS:
+ return v1.plus(v2);
+ case MINUS:
+ return v1.minus(v2);
+ case TIMES:
+ return v1.times(v2);
+ case DIV:
+ return v1.div(v2);
+ default:
+ throw new BadBinaryOpValueExpException(this);
+ }
}
/**
@@ -1110,22 +1110,22 @@ public class Query
{
String opS;
switch (op)
- {
- case PLUS:
- opS = "+";
- break;
- case MINUS:
- opS = "-";
- break;
- case TIMES:
- opS = "x";
- break;
- case DIV:
- opS = "/";
- break;
- default:
- opS = "?";
- }
+ {
+ case PLUS:
+ opS = "+";
+ break;
+ case MINUS:
+ opS = "-";
+ break;
+ case TIMES:
+ opS = "x";
+ break;
+ case DIV:
+ opS = "/";
+ break;
+ default:
+ opS = "?";
+ }
return exp1 + " " + opS + " " + exp2;
}
}
@@ -1148,7 +1148,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -5690656271650491000L;
-
+
/**
* The operation to perform.
*/
@@ -1198,25 +1198,25 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v1 = exp1.apply(name).toString();
String v2 = exp2.apply(name).toString();
switch (relOp)
- {
- case EQ:
- return v1.equals(v2);
- case GT:
- return v1.compareTo(v2) > 0;
- case GE:
- return v1.compareTo(v2) >= 0;
- case LE:
- return v1.compareTo(v2) <= 0;
- case LT:
- return v1.compareTo(v2) < 0;
- default:
- throw new BadStringOperationException("Invalid operator: " + relOp);
- }
+ {
+ case EQ:
+ return v1.equals(v2);
+ case GT:
+ return v1.compareTo(v2) > 0;
+ case GE:
+ return v1.compareTo(v2) >= 0;
+ case LE:
+ return v1.compareTo(v2) <= 0;
+ case LT:
+ return v1.compareTo(v2) < 0;
+ default:
+ throw new BadStringOperationException("Invalid operator: " + relOp);
+ }
}
/**
@@ -1228,25 +1228,25 @@ public class Query
{
String op;
switch (relOp)
- {
- case EQ:
- op = "=";
- break;
- case GT:
- op = ">";
- break;
- case GE:
- op = ">=";
- break;
- case LE:
- op = "<=";
- break;
- case LT:
- op = "<";
- break;
- default:
- op = "?";
- }
+ {
+ case EQ:
+ op = "=";
+ break;
+ case GT:
+ op = ">";
+ break;
+ case GE:
+ op = ">=";
+ break;
+ case LE:
+ op = "<=";
+ break;
+ case LT:
+ op = "<";
+ break;
+ default:
+ op = "?";
+ }
return exp1 + " " + op + " " + exp2;
}
}
@@ -1268,7 +1268,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -5801329450358952434L;
-
+
/**
* The value to look for.
*/
@@ -1312,12 +1312,12 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v = val.apply(name).toString();
for (ValueExp vl : valueList)
- if (v.equals(vl.apply(name).toString()))
- return true;
+ if (v.equals(vl.apply(name).toString()))
+ return true;
return false;
}
@@ -1358,7 +1358,7 @@ public class Query
/**
* Checks that the bean specified by the supplied
- * {@link ObjectName} is of the correct class
+ * {@link ObjectName} is of the correct class
* using {@link MBeanServer#isInstanceOf(ObjectName,String)}.
* where the string is obtained by evaluating
* <code>classNameValue</code>.
@@ -1378,21 +1378,21 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- String className = ((StringValueExp)
- classNameValue.apply(name)).getValue();
- return QueryEval.getMBeanServer().isInstanceOf(name, className);
- }
+ {
+ String className = ((StringValueExp)
+ classNameValue.apply(name)).getValue();
+ return QueryEval.getMBeanServer().isInstanceOf(name, className);
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
}
-
+
}
/**
@@ -1411,7 +1411,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 5269643775896723397L;
-
+
/**
* The expression to negate.
*/
@@ -1446,7 +1446,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return !(exp.apply(name));
}
@@ -1469,7 +1469,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 2962973084421716523L;
-
+
/**
* The first operand.
*/
@@ -1513,7 +1513,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return exp1.apply(name) || exp2.apply(name);
}
@@ -1542,7 +1542,7 @@ public class Query
* The boolean value.
*/
private boolean val;
-
+
/**
* Constructs a new {@link BooleanValueExp} using the
* specified value.
@@ -1572,11 +1572,11 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return this;
}
-
+
/**
* Returns the value as a string.
*
@@ -1613,7 +1613,7 @@ public class Query
* The numeric value.
*/
private Number val;
-
+
/**
* Constructs a new {@link NumericValueExp} using the
* specified value.
@@ -1643,11 +1643,11 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return this;
}
-
+
/**
* Returns the value.
*/
@@ -1677,51 +1677,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d + v.longValue());
- else
- return new NumericValueExp(d + v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d + v.longValue());
+ else
+ return new NumericValueExp(d + v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f + v.longValue());
- else
- return new NumericValueExp(f + v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f + v.longValue());
+ else
+ return new NumericValueExp(f + v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l + v.longValue());
- else
- return new NumericValueExp(l + v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l + v.longValue());
+ else
+ return new NumericValueExp(l + v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i + v.doubleValue());
+ return new NumericValueExp(i + v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i + v.floatValue());
+ return new NumericValueExp(i + v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i + v.longValue());
+ return new NumericValueExp(i + v.longValue());
else
- return new NumericValueExp(i + v.intValue());
- }
+ return new NumericValueExp(i + v.intValue());
+ }
/**
* Return New NumericValueExp(the result of subtracting the specified
@@ -1734,51 +1734,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d - v.longValue());
- else
- return new NumericValueExp(d - v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d - v.longValue());
+ else
+ return new NumericValueExp(d - v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f - v.longValue());
- else
- return new NumericValueExp(f - v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f - v.longValue());
+ else
+ return new NumericValueExp(f - v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l - v.longValue());
- else
- return new NumericValueExp(l - v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l - v.longValue());
+ else
+ return new NumericValueExp(l - v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i - v.doubleValue());
+ return new NumericValueExp(i - v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i - v.floatValue());
+ return new NumericValueExp(i - v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i - v.longValue());
+ return new NumericValueExp(i - v.longValue());
else
- return new NumericValueExp(i - v.intValue());
- }
+ return new NumericValueExp(i - v.intValue());
+ }
/**
* Return New NumericValueExp(the result of multiplying the specified
@@ -1791,51 +1791,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d * v.longValue());
- else
- return new NumericValueExp(d * v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d * v.longValue());
+ else
+ return new NumericValueExp(d * v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f * v.longValue());
- else
- return new NumericValueExp(f * v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f * v.longValue());
+ else
+ return new NumericValueExp(f * v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l * v.longValue());
- else
- return new NumericValueExp(l * v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l * v.longValue());
+ else
+ return new NumericValueExp(l * v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i * v.doubleValue());
+ return new NumericValueExp(i * v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i * v.floatValue());
+ return new NumericValueExp(i * v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i * v.longValue());
+ return new NumericValueExp(i * v.longValue());
else
- return new NumericValueExp(i * v.intValue());
- }
+ return new NumericValueExp(i * v.intValue());
+ }
/**
* Return New NumericValueExp(the result of dividing this
@@ -1849,53 +1849,52 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d / v.longValue());
- else
- return new NumericValueExp(d / v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d / v.longValue());
+ else
+ return new NumericValueExp(d / v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f / v.longValue());
- else
- return new NumericValueExp(f / v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f / v.longValue());
+ else
+ return new NumericValueExp(f / v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l / v.longValue());
- else
- return new NumericValueExp(l / v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l / v.longValue());
+ else
+ return new NumericValueExp(l / v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i / v.doubleValue());
+ return new NumericValueExp(i / v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i / v.floatValue());
+ return new NumericValueExp(i / v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i / v.longValue());
+ return new NumericValueExp(i / v.longValue());
else
- return new NumericValueExp(i / v.intValue());
- }
+ return new NumericValueExp(i / v.intValue());
+ }
}
}
-
diff --git a/javax/management/QueryEval.java b/javax/management/QueryEval.java
index 375270ae9..0b9df6155 100644
--- a/javax/management/QueryEval.java
+++ b/javax/management/QueryEval.java
@@ -57,7 +57,7 @@ public class QueryEval
private static final long serialVersionUID = 2675899265640874796L;
/**
- * Stores the server used, on a
+ * Stores the server used, on a
* thread-by-thread basis.
*/
private static InheritableThreadLocal<MBeanServer> server =
@@ -83,7 +83,7 @@ public class QueryEval
* Sets the {@link MBeanServer} on which the query will be
* performed. This value is inherited automatically by
* child threads. This method is only non-static for historical
- * reasons; it makes no use of instance-related values.
+ * reasons; it makes no use of instance-related values.
*
* @param svr the server to use.
*/
diff --git a/javax/management/QueryExp.java b/javax/management/QueryExp.java
index 124228c78..778e28f5e 100644
--- a/javax/management/QueryExp.java
+++ b/javax/management/QueryExp.java
@@ -74,7 +74,7 @@ public interface QueryExp
*/
boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException;
+ BadAttributeValueExpException, InvalidApplicationException;
/**
* Changes the {@link MBeanServer} on which this query is performed.
@@ -84,4 +84,3 @@ public interface QueryExp
void setMBeanServer(MBeanServer server);
}
-
diff --git a/javax/management/ReflectionException.java b/javax/management/ReflectionException.java
index 0f19b5b34..96b4ea526 100644
--- a/javax/management/ReflectionException.java
+++ b/javax/management/ReflectionException.java
@@ -115,4 +115,3 @@ public class ReflectionException
}
}
-
diff --git a/javax/management/RuntimeErrorException.java b/javax/management/RuntimeErrorException.java
index 811dc40f2..f361a2c1c 100644
--- a/javax/management/RuntimeErrorException.java
+++ b/javax/management/RuntimeErrorException.java
@@ -112,4 +112,3 @@ public class RuntimeErrorException
}
}
-
diff --git a/javax/management/RuntimeMBeanException.java b/javax/management/RuntimeMBeanException.java
index 95225a80a..1c8b242b5 100644
--- a/javax/management/RuntimeMBeanException.java
+++ b/javax/management/RuntimeMBeanException.java
@@ -111,4 +111,3 @@ public class RuntimeMBeanException
}
}
-
diff --git a/javax/management/RuntimeOperationsException.java b/javax/management/RuntimeOperationsException.java
index 8a830a5e7..8c134f07e 100644
--- a/javax/management/RuntimeOperationsException.java
+++ b/javax/management/RuntimeOperationsException.java
@@ -52,12 +52,12 @@ package javax.management;
public class RuntimeOperationsException
extends JMRuntimeException
{
-
+
/**
* Compatible with JDK 1.5
*/
private static final long serialVersionUID = -8408923047489133588L;
-
+
/* Sun re-implemented causality -- don't know why, but
serialization demands we do too... */
@@ -89,7 +89,7 @@ public class RuntimeOperationsException
* @param message the error message to give to the user.
*/
public RuntimeOperationsException(RuntimeException e,
- String message)
+ String message)
{
super(message);
runtimeException = e;
@@ -118,4 +118,3 @@ public class RuntimeOperationsException
}
}
-
diff --git a/javax/management/ServiceNotFoundException.java b/javax/management/ServiceNotFoundException.java
index 602e1490d..1c0d74286 100644
--- a/javax/management/ServiceNotFoundException.java
+++ b/javax/management/ServiceNotFoundException.java
@@ -72,4 +72,3 @@ public class ServiceNotFoundException
}
}
-
diff --git a/javax/management/StandardMBean.java b/javax/management/StandardMBean.java
index 13e95bd39..8e30fc58b 100644
--- a/javax/management/StandardMBean.java
+++ b/javax/management/StandardMBean.java
@@ -85,7 +85,7 @@ public class StandardMBean
* Constructs a new {@link StandardMBean} using the specified
* interface and <code>this</code> as the instance. This should
* be used to create an instance via subclassing.
- *
+ *
* @param iface the interface this bean implements, or <code>null</code>
* if the interface should be determined using the naming
* convention (class X has interface XMBean).
@@ -99,31 +99,31 @@ public class StandardMBean
{
if (iface == null)
{
- String className = getClass().getName();
- try
- {
- iface = Class.forName(className + "MBean");
- }
- catch (ClassNotFoundException e)
- {
- for (Class<?> nextIface : getClass().getInterfaces())
- {
- if (JMX.isMXBeanInterface(nextIface))
- {
- iface = nextIface;
- break;
- }
- }
- if (iface == null)
- throw (NotCompliantMBeanException)
- (new NotCompliantMBeanException("An interface for the class "
- + className +
- " was not found.").initCause(e));
- }
+ String className = getClass().getName();
+ try
+ {
+ iface = Class.forName(className + "MBean");
+ }
+ catch (ClassNotFoundException e)
+ {
+ for (Class<?> nextIface : getClass().getInterfaces())
+ {
+ if (JMX.isMXBeanInterface(nextIface))
+ {
+ iface = nextIface;
+ break;
+ }
+ }
+ if (iface == null)
+ throw (NotCompliantMBeanException)
+ (new NotCompliantMBeanException("An interface for the class "
+ + className +
+ " was not found.").initCause(e));
+ }
}
if (!(iface.isInstance(this)))
- throw new NotCompliantMBeanException("The instance, " + impl +
- ", is not an instance of " + iface);
+ throw new NotCompliantMBeanException("The instance, " + impl +
+ ", is not an instance of " + iface);
impl = this;
this.iface = iface;
}
@@ -131,7 +131,7 @@ public class StandardMBean
/**
* Constructs a new {@link StandardMBean} using the specified
* interface and the supplied instance as the implementation.
- *
+ *
* @param impl the implementation.
* @param iface the interface the bean implements, or <code>null</code>
* if the interface should be determined using the naming
@@ -149,35 +149,35 @@ public class StandardMBean
throw new IllegalArgumentException("The specified implementation is null.");
if (iface == null)
{
- Class<?> implClass = impl.getClass();
- String className = implClass.getName();
- try
- {
- this.iface = Class.forName(className + "MBean", true,
- implClass.getClassLoader());
- }
- catch (ClassNotFoundException e)
- {
- for (Class<?> nextIface : implClass.getInterfaces())
- {
- if (JMX.isMXBeanInterface(nextIface))
- {
- this.iface = nextIface;
- break;
- }
- }
- if (this.iface == null)
- throw (NotCompliantMBeanException)
- (new NotCompliantMBeanException("An interface for the class " +
- className +
- " was not found.").initCause(e));
- }
+ Class<?> implClass = impl.getClass();
+ String className = implClass.getName();
+ try
+ {
+ this.iface = Class.forName(className + "MBean", true,
+ implClass.getClassLoader());
+ }
+ catch (ClassNotFoundException e)
+ {
+ for (Class<?> nextIface : implClass.getInterfaces())
+ {
+ if (JMX.isMXBeanInterface(nextIface))
+ {
+ this.iface = nextIface;
+ break;
+ }
+ }
+ if (this.iface == null)
+ throw (NotCompliantMBeanException)
+ (new NotCompliantMBeanException("An interface for the class " +
+ className +
+ " was not found.").initCause(e));
+ }
}
else
this.iface = iface;
if (!(this.iface.isInstance(impl)))
- throw new NotCompliantMBeanException("The instance, " + impl +
- ", is not an instance of " + iface);
+ throw new NotCompliantMBeanException("The instance, " + impl +
+ ", is not an instance of " + iface);
this.impl = impl;
}
@@ -223,44 +223,44 @@ public class StandardMBean
*/
public Object getAttribute(String name)
throws AttributeNotFoundException, MBeanException,
- ReflectionException
+ ReflectionException
{
Method getter;
- try
+ try
{
- getter = iface.getMethod("get" + name);
+ getter = iface.getMethod("get" + name);
}
catch (NoSuchMethodException e)
{
- try
- {
- getter = iface.getMethod("is" + name);
- }
- catch (NoSuchMethodException ex)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(ex));
- }
+ try
+ {
+ getter = iface.getMethod("is" + name);
+ }
+ catch (NoSuchMethodException ex)
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(ex));
+ }
}
Object result;
try
{
- result = getter.invoke(impl);
+ result = getter.invoke(impl);
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to retrieve " + name);
+ throw new ReflectionException(e, "Failed to retrieve " + name);
}
catch (IllegalArgumentException e)
{
- throw new ReflectionException(e, "Failed to retrieve " + name);
+ throw new ReflectionException(e, "Failed to retrieve " + name);
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(),
- "The getter of " + name +
- " threw an exception");
+ throw new MBeanException((Exception) e.getCause(),
+ "The getter of " + name +
+ " threw an exception");
}
return result;
}
@@ -280,23 +280,23 @@ public class StandardMBean
AttributeList list = new AttributeList(names.length);
for (int a = 0; a < names.length; ++a)
{
- try
- {
- Object value = getAttribute(names[a]);
- list.add(new Attribute(names[a], value));
- }
- catch (AttributeNotFoundException e)
- {
- /* Ignored */
- }
- catch (ReflectionException e)
- {
- /* Ignored */
- }
- catch (MBeanException e)
- {
- /* Ignored */
- }
+ try
+ {
+ Object value = getAttribute(names[a]);
+ list.add(new Attribute(names[a], value));
+ }
+ catch (AttributeNotFoundException e)
+ {
+ /* Ignored */
+ }
+ catch (ReflectionException e)
+ {
+ /* Ignored */
+ }
+ catch (MBeanException e)
+ {
+ /* Ignored */
+ }
}
return list;
}
@@ -349,7 +349,7 @@ public class StandardMBean
* @return the constructor information to use.
*/
protected MBeanConstructorInfo[] getConstructors(MBeanConstructorInfo[]
- constructors, Object impl)
+ constructors, Object impl)
{
if (impl == null || impl == this)
return constructors;
@@ -406,7 +406,7 @@ public class StandardMBean
* @return the description to use in the instance.
*/
protected String getDescription(MBeanConstructorInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getDescription();
}
@@ -477,7 +477,7 @@ public class StandardMBean
* @return the description to use in the instance.
*/
protected String getDescription(MBeanOperationInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getDescription();
}
@@ -533,7 +533,7 @@ public class StandardMBean
* detailed in this class are called to allow the values used
* to be overrided:
* <ul>
- * <li>For each attribute,
+ * <li>For each attribute,
* {@link #getDescription(MBeanAttributeInfo)} is called.</li>
* <li>For each constructor,
* {@link #getDescription(MBeanConstructorInfo)} is called,
@@ -573,117 +573,117 @@ public class StandardMBean
List<MBeanOperationInfo> operations = new ArrayList<MBeanOperationInfo>();
for (int a = 0; a < methods.length; ++a)
{
- String name = methods[a].getName();
- if (((name.startsWith("get") &&
- methods[a].getReturnType() != Void.TYPE) ||
- (name.startsWith("is") &&
- methods[a].getReturnType() == Boolean.TYPE)) &&
- methods[a].getParameterTypes().length == 0)
- {
- Method[] amethods;
- String attrib;
- if (name.startsWith("is"))
- attrib = name.substring(2);
- else
- attrib = name.substring(3);
- if (attributes.containsKey(attrib))
- amethods = (Method[]) attributes.get(attrib);
- else
- {
- amethods = new Method[2];
- attributes.put(attrib, amethods);
- }
- amethods[0] = methods[a];
- }
- else if (name.startsWith("set") &&
- methods[a].getReturnType() == Void.TYPE &&
- methods[a].getParameterTypes().length == 1)
- {
- Method[] amethods;
- String attrib = name.substring(3);
- if (attributes.containsKey(attrib))
- amethods = (Method[]) attributes.get(attrib);
- else
- {
- amethods = new Method[2];
- attributes.put(attrib, amethods);
- }
- amethods[1] = methods[a];
- }
- else
- operations.add(new MBeanOperationInfo(methods[a].getName(),
- methods[a]));
+ String name = methods[a].getName();
+ if (((name.startsWith("get") &&
+ methods[a].getReturnType() != Void.TYPE) ||
+ (name.startsWith("is") &&
+ methods[a].getReturnType() == Boolean.TYPE)) &&
+ methods[a].getParameterTypes().length == 0)
+ {
+ Method[] amethods;
+ String attrib;
+ if (name.startsWith("is"))
+ attrib = name.substring(2);
+ else
+ attrib = name.substring(3);
+ if (attributes.containsKey(attrib))
+ amethods = (Method[]) attributes.get(attrib);
+ else
+ {
+ amethods = new Method[2];
+ attributes.put(attrib, amethods);
+ }
+ amethods[0] = methods[a];
+ }
+ else if (name.startsWith("set") &&
+ methods[a].getReturnType() == Void.TYPE &&
+ methods[a].getParameterTypes().length == 1)
+ {
+ Method[] amethods;
+ String attrib = name.substring(3);
+ if (attributes.containsKey(attrib))
+ amethods = (Method[]) attributes.get(attrib);
+ else
+ {
+ amethods = new Method[2];
+ attributes.put(attrib, amethods);
+ }
+ amethods[1] = methods[a];
+ }
+ else
+ operations.add(new MBeanOperationInfo(methods[a].getName(),
+ methods[a]));
}
List<MBeanAttributeInfo> attribs = new ArrayList<MBeanAttributeInfo>(attributes.size());
for (Map.Entry<String,Method[]> entry : attributes.entrySet())
{
- Method[] amethods = entry.getValue();
- try
- {
- attribs.add(new MBeanAttributeInfo(entry.getKey(),
- entry.getKey(),
- amethods[0], amethods[1]));
- }
- catch (IntrospectionException e)
- {
- /* Shouldn't happen; both shouldn't be null */
- throw new IllegalStateException("The two methods passed to " +
- "the MBeanAttributeInfo " +
- "constructor for " + entry +
- "were null.", e);
- }
+ Method[] amethods = entry.getValue();
+ try
+ {
+ attribs.add(new MBeanAttributeInfo(entry.getKey(),
+ entry.getKey(),
+ amethods[0], amethods[1]));
+ }
+ catch (IntrospectionException e)
+ {
+ /* Shouldn't happen; both shouldn't be null */
+ throw new IllegalStateException("The two methods passed to " +
+ "the MBeanAttributeInfo " +
+ "constructor for " + entry +
+ "were null.", e);
+ }
}
MBeanAttributeInfo[] ainfo = new MBeanAttributeInfo[attribs.size()];
for (int a = 0; a < ainfo.length; ++a)
{
- MBeanAttributeInfo oldInfo = (MBeanAttributeInfo) attribs.get(a);
- String desc = getDescription(oldInfo);
- ainfo[a] = new MBeanAttributeInfo(oldInfo.getName(),
- oldInfo.getType(), desc,
- oldInfo.isReadable(),
- oldInfo.isWritable(),
- oldInfo.isIs());
+ MBeanAttributeInfo oldInfo = (MBeanAttributeInfo) attribs.get(a);
+ String desc = getDescription(oldInfo);
+ ainfo[a] = new MBeanAttributeInfo(oldInfo.getName(),
+ oldInfo.getType(), desc,
+ oldInfo.isReadable(),
+ oldInfo.isWritable(),
+ oldInfo.isIs());
}
Constructor<?>[] cons = impl.getClass().getConstructors();
MBeanConstructorInfo[] cinfo = new MBeanConstructorInfo[cons.length];
for (int a = 0; a < cinfo.length; ++a)
{
- MBeanConstructorInfo oldInfo = new MBeanConstructorInfo(cons[a].getName(),
- cons[a]);
- String desc = getDescription(oldInfo);
- MBeanParameterInfo[] params = oldInfo.getSignature();
- MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
- for (int b = 0; b < pinfo.length; ++b)
- {
- String pdesc = getDescription(oldInfo, params[b], b);
- String pname = getParameterName(oldInfo, params[b], b);
- pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
- pdesc);
- }
- cinfo[a] = new MBeanConstructorInfo(oldInfo.getName(), desc,
- pinfo);
+ MBeanConstructorInfo oldInfo = new MBeanConstructorInfo(cons[a].getName(),
+ cons[a]);
+ String desc = getDescription(oldInfo);
+ MBeanParameterInfo[] params = oldInfo.getSignature();
+ MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
+ for (int b = 0; b < pinfo.length; ++b)
+ {
+ String pdesc = getDescription(oldInfo, params[b], b);
+ String pname = getParameterName(oldInfo, params[b], b);
+ pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
+ pdesc);
+ }
+ cinfo[a] = new MBeanConstructorInfo(oldInfo.getName(), desc,
+ pinfo);
}
cinfo = getConstructors(cinfo, impl);
MBeanOperationInfo[] oinfo = new MBeanOperationInfo[operations.size()];
for (int a = 0; a < oinfo.length; ++a)
{
- MBeanOperationInfo oldInfo = (MBeanOperationInfo) operations.get(a);
- String desc = getDescription(oldInfo);
- int impact = getImpact(oldInfo);
- MBeanParameterInfo[] params = oldInfo.getSignature();
- MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
- for (int b = 0; b < pinfo.length; ++b)
- {
- String pdesc = getDescription(oldInfo, params[b], b);
- String pname = getParameterName(oldInfo, params[b], b);
- pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
- pdesc);
- }
- oinfo[a] = new MBeanOperationInfo(oldInfo.getName(), desc, pinfo,
- oldInfo.getReturnType(), impact);
+ MBeanOperationInfo oldInfo = (MBeanOperationInfo) operations.get(a);
+ String desc = getDescription(oldInfo);
+ int impact = getImpact(oldInfo);
+ MBeanParameterInfo[] params = oldInfo.getSignature();
+ MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
+ for (int b = 0; b < pinfo.length; ++b)
+ {
+ String pdesc = getDescription(oldInfo, params[b], b);
+ String pname = getParameterName(oldInfo, params[b], b);
+ pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
+ pdesc);
+ }
+ oinfo[a] = new MBeanOperationInfo(oldInfo.getName(), desc, pinfo,
+ oldInfo.getReturnType(), impact);
}
info = new MBeanInfo(impl.getClass().getName(), impl.getClass().getName(),
- ainfo, cinfo, oinfo, null);
+ ainfo, cinfo, oinfo, null);
String cname = getClassName(info);
String desc = getDescription(info);
MBeanNotificationInfo[] ninfo = null;
@@ -720,7 +720,7 @@ public class StandardMBean
* @return the name to use in the instance.
*/
protected String getParameterName(MBeanConstructorInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getName();
}
@@ -741,7 +741,7 @@ public class StandardMBean
* @return the name to use in the instance.
*/
protected String getParameterName(MBeanOperationInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getName();
}
@@ -753,7 +753,7 @@ public class StandardMBean
* corresponding to each parameter. The class loader used to
* load these classes is the same as that used for loading the
* management bean itself.
- *
+ *
* @param name the name of the action to invoke.
* @param params the parameters used to call the action.
* @param signature the signature of the action.
@@ -771,56 +771,56 @@ public class StandardMBean
throws MBeanException, ReflectionException
{
if (name.startsWith("get") || name.startsWith("is") ||
- name.startsWith("set"))
+ name.startsWith("set"))
throw new ReflectionException(new NoSuchMethodException(),
- "Invocation of an attribute " +
- "method is disallowed.");
+ "Invocation of an attribute " +
+ "method is disallowed.");
ClassLoader loader = getClass().getClassLoader();
Class<?>[] sigTypes;
if (signature != null)
{
- sigTypes = new Class<?>[signature.length];
- for (int a = 0; a < signature.length; ++a)
- try
- {
- sigTypes[a] = Class.forName(signature[a], true, loader);
- }
- catch (ClassNotFoundException e)
- {
- throw new ReflectionException(e, "The class, " + signature[a] +
- ", in the method signature " +
- "could not be loaded.");
- }
+ sigTypes = new Class<?>[signature.length];
+ for (int a = 0; a < signature.length; ++a)
+ try
+ {
+ sigTypes[a] = Class.forName(signature[a], true, loader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ReflectionException(e, "The class, " + signature[a] +
+ ", in the method signature " +
+ "could not be loaded.");
+ }
}
else
sigTypes = null;
Method method;
try
{
- method = iface.getMethod(name, sigTypes);
+ method = iface.getMethod(name, sigTypes);
}
catch (NoSuchMethodException e)
{
- throw new ReflectionException(e, "The method, " + name +
- ", could not be found.");
+ throw new ReflectionException(e, "The method, " + name +
+ ", could not be found.");
}
Object result;
try
{
- result = method.invoke(impl, params);
+ result = method.invoke(impl, params);
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to call " + name);
+ throw new ReflectionException(e, "Failed to call " + name);
}
catch (IllegalArgumentException e)
{
- throw new ReflectionException(e, "Failed to call " + name);
+ throw new ReflectionException(e, "Failed to call " + name);
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(), "The method "
- + name + " threw an exception");
+ throw new MBeanException((Exception) e.getCause(), "The method "
+ + name + " threw an exception");
}
return result;
}
@@ -850,30 +850,30 @@ public class StandardMBean
*/
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException
+ MBeanException, ReflectionException
{
String name = attribute.getName();
String attName = name.substring(0, 1).toUpperCase() + name.substring(1);
- Object val = attribute.getValue();
+ Object val = attribute.getValue();
try
{
- getMutator(attName, val.getClass()).invoke(impl, new Object[] { val });
+ getMutator(attName, val.getClass()).invoke(impl, new Object[] { val });
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to set " + name);
+ throw new ReflectionException(e, "Failed to set " + name);
}
catch (IllegalArgumentException e)
{
- throw ((InvalidAttributeValueException)
- new InvalidAttributeValueException(attribute.getValue() +
- " is an invalid value for " +
- name).initCause(e));
+ throw ((InvalidAttributeValueException)
+ new InvalidAttributeValueException(attribute.getValue() +
+ " is an invalid value for " +
+ name).initCause(e));
}
catch (InvocationTargetException e)
{
- throw new MBeanException(e, "The getter of " + name +
- " threw an exception");
+ throw new MBeanException(e, "The getter of " + name +
+ " threw an exception");
}
}
@@ -893,28 +893,28 @@ public class StandardMBean
Iterator<Object> it = attributes.iterator();
while (it.hasNext())
{
- try
- {
- Attribute attrib = (Attribute) it.next();
- setAttribute(attrib);
- list.add(attrib);
- }
- catch (AttributeNotFoundException e)
- {
- /* Ignored */
- }
- catch (InvalidAttributeValueException e)
- {
- /* Ignored */
- }
- catch (ReflectionException e)
- {
- /* Ignored */
- }
- catch (MBeanException e)
- {
- /* Ignored */
- }
+ try
+ {
+ Attribute attrib = (Attribute) it.next();
+ setAttribute(attrib);
+ list.add(attrib);
+ }
+ catch (AttributeNotFoundException e)
+ {
+ /* Ignored */
+ }
+ catch (InvalidAttributeValueException e)
+ {
+ /* Ignored */
+ }
+ catch (ReflectionException e)
+ {
+ /* Ignored */
+ }
+ catch (MBeanException e)
+ {
+ /* Ignored */
+ }
}
return list;
}
@@ -937,8 +937,8 @@ public class StandardMBean
if (impl == null)
throw new IllegalArgumentException("The specified implementation is null.");
if (!(iface.isInstance(impl)))
- throw new NotCompliantMBeanException("The instance, " + impl +
- ", is not an instance of " + iface);
+ throw new NotCompliantMBeanException("The instance, " + impl +
+ ", is not an instance of " + iface);
this.impl = impl;
}
@@ -956,128 +956,128 @@ public class StandardMBean
{
String mutator = "set" + name;
Exception ex = null;
- try
+ try
{
- return iface.getMethod(mutator, type);
+ return iface.getMethod(mutator, type);
}
catch (NoSuchMethodException e)
{
- /* Ignored; we'll try harder instead */
- ex = e;
+ /* Ignored; we'll try harder instead */
+ ex = e;
}
/* Special cases */
if (type == Boolean.class)
try
- {
- return iface.getMethod(mutator, Boolean.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Boolean.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Byte.class)
try
- {
- return iface.getMethod(mutator, Byte.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Byte.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Character.class)
try
- {
- return iface.getMethod(mutator, Character.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Character.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Double.class)
try
- {
- return iface.getMethod(mutator, Double.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Double.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Float.class)
try
- {
- return iface.getMethod(mutator, Float.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Float.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Integer.class)
try
- {
- return iface.getMethod(mutator, Integer.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Integer.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Long.class)
try
- {
- return iface.getMethod(mutator, Long.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Long.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
if (type == Short.class)
try
- {
- return iface.getMethod(mutator, Short.TYPE);
- }
+ {
+ return iface.getMethod(mutator, Short.TYPE);
+ }
catch (NoSuchMethodException e)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(e));
- }
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(e));
+ }
/* Superclasses and interfaces */
for (Class<?> i : type.getInterfaces())
try
- {
- return getMutator(name, i);
- }
+ {
+ return getMutator(name, i);
+ }
catch (AttributeNotFoundException e)
- {
- ex = e;
- }
+ {
+ ex = e;
+ }
Class<?> sclass = type.getSuperclass();
if (sclass != null && sclass != Object.class)
try
- {
- return getMutator(name, sclass);
- }
+ {
+ return getMutator(name, sclass);
+ }
catch (AttributeNotFoundException e)
- {
- ex = e;
- }
+ {
+ ex = e;
+ }
/* If we get this far, give up */
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(ex));
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(ex));
}
}
diff --git a/javax/management/StringValueExp.java b/javax/management/StringValueExp.java
index f3ce00b53..0ecd06597 100644
--- a/javax/management/StringValueExp.java
+++ b/javax/management/StringValueExp.java
@@ -94,7 +94,7 @@ public class StringValueExp
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return this;
}
diff --git a/javax/management/ValueExp.java b/javax/management/ValueExp.java
index 503f23221..f98927672 100644
--- a/javax/management/ValueExp.java
+++ b/javax/management/ValueExp.java
@@ -70,7 +70,7 @@ public interface ValueExp
*/
ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException;
+ BadAttributeValueExpException, InvalidApplicationException;
/**
* Changes the {@link MBeanServer} on which this query is performed.
@@ -83,4 +83,3 @@ public interface ValueExp
void setMBeanServer(MBeanServer server);
}
-
diff --git a/javax/management/loading/ClassLoaderRepository.java b/javax/management/loading/ClassLoaderRepository.java
index 2526d5262..cfd031e62 100644
--- a/javax/management/loading/ClassLoaderRepository.java
+++ b/javax/management/loading/ClassLoaderRepository.java
@@ -136,4 +136,3 @@ public interface ClassLoaderRepository
throws ClassNotFoundException;
}
-
diff --git a/javax/management/openmbean/ArrayType.java b/javax/management/openmbean/ArrayType.java
index 1a23f666f..fc1887014 100644
--- a/javax/management/openmbean/ArrayType.java
+++ b/javax/management/openmbean/ArrayType.java
@@ -44,14 +44,14 @@ import java.util.Map;
/**
* The open type descriptor for arrays of open data values.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
public class ArrayType<T>
extends OpenType<T>
{
-
+
/**
* Compatible with JDK 1.5
*/
@@ -108,8 +108,8 @@ public class ArrayType<T>
* a loadable class.
*/
private static final String getArrayClassName(OpenType<?> elementType,
- int dim,
- boolean primitive)
+ int dim,
+ boolean primitive)
throws OpenDataException
{
Class<?> type;
@@ -117,22 +117,22 @@ public class ArrayType<T>
type = getPrimitiveTypeClass((SimpleType<?>) elementType);
else
{
- String className = elementType.getClassName();
- try
- {
- type = Class.forName(className);
- }
- catch (ClassNotFoundException e)
- {
- throw new OpenDataException("The class name, " + className +
- ", is unavailable.");
- }
+ String className = elementType.getClassName();
+ try
+ {
+ type = Class.forName(className);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new OpenDataException("The class name, " + className +
+ ", is unavailable.");
+ }
}
while (type.isArray())
type = type.getComponentType();
return
Array.newInstance(type,
- new int[getDimensions(elementType, dim)]).getClass().getName();
+ new int[getDimensions(elementType, dim)]).getClass().getName();
}
/**
@@ -146,11 +146,11 @@ public class ArrayType<T>
* @throws IllegalArgumentException if <code>dim</code> is less than 1.
*/
private static final int getDimensions(OpenType<?> elementType,
- int dim)
+ int dim)
{
if (dim < 1)
throw new IllegalArgumentException("Dimensions must be greater " +
- "than or equal to 1.");
+ "than or equal to 1.");
if (elementType instanceof ArrayType)
return dim + ((ArrayType<?>) elementType).getDimension();
return dim;
@@ -184,7 +184,7 @@ public class ArrayType<T>
if (type.equals(Long.TYPE))
return SimpleType.LONG;
if (type.equals(Short.TYPE))
- return SimpleType.SHORT;
+ return SimpleType.SHORT;
if (type.equals(Void.TYPE))
return SimpleType.VOID;
throw new OpenDataException(type + " is not a primitive type.");
@@ -218,7 +218,7 @@ public class ArrayType<T>
if (type.equals(SimpleType.LONG))
return Long.TYPE;
if (type.equals(SimpleType.SHORT))
- return Short.TYPE;
+ return Short.TYPE;
if (type.equals(SimpleType.VOID))
return Void.TYPE;
throw new OpenDataException(type + " is not a primitive type.");
@@ -257,7 +257,7 @@ public class ArrayType<T>
{
OpenType<?> trueElemType = getElementType(elemType);
if (elemType instanceof ArrayType &&
- ((ArrayType<?>) elemType).isPrimitiveArray())
+ ((ArrayType<?>) elemType).isPrimitiveArray())
return getPrimitiveTypeClass((SimpleType<?>) trueElemType).getName();
return trueElemType.getClassName();
}
@@ -309,21 +309,21 @@ public class ArrayType<T>
public ArrayType(int dim, OpenType<?> elementType)
throws OpenDataException
{
- super(getArrayClassName(elementType, dim, false),
- getArrayClassName(elementType, dim, false),
- getDimensions(elementType, dim) + "-dimension array of "
- + getElementTypeName(elementType));
+ super(getArrayClassName(elementType, dim, false),
+ getArrayClassName(elementType, dim, false),
+ getDimensions(elementType, dim) + "-dimension array of "
+ + getElementTypeName(elementType));
if (!(elementType instanceof SimpleType ||
- elementType instanceof CompositeType ||
- elementType instanceof TabularType ||
- elementType instanceof ArrayType))
+ elementType instanceof CompositeType ||
+ elementType instanceof TabularType ||
+ elementType instanceof ArrayType))
throw new OpenDataException("The element type must be a simple " +
- "type, an array type, a composite type " +
- "or a tabular type.");
+ "type, an array type, a composite type " +
+ "or a tabular type.");
dimension = getDimensions(elementType, dim);
this.elementType = getElementType(elementType);
primitiveArray = (elementType instanceof ArrayType &&
- ((ArrayType<?>) elementType).isPrimitiveArray());
+ ((ArrayType<?>) elementType).isPrimitiveArray());
}
/**
@@ -377,10 +377,10 @@ public class ArrayType<T>
throws OpenDataException
{
super(getArrayClassName(elementType, 1, primitiveArray),
- getArrayClassName(elementType, 1, primitiveArray),
- "1-dimension array of " +
- (primitiveArray ? getPrimitiveTypeClass(elementType).getName()
- : elementType.getClassName()));
+ getArrayClassName(elementType, 1, primitiveArray),
+ "1-dimension array of " +
+ (primitiveArray ? getPrimitiveTypeClass(elementType).getName()
+ : elementType.getClassName()));
dimension = 1;
this.elementType = elementType;
this.primitiveArray = primitiveArray;
@@ -400,7 +400,7 @@ public class ArrayType<T>
* <li>The primitive array flag is set the same in both
* instances.</li>
* </ul>
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -410,8 +410,8 @@ public class ArrayType<T>
return false;
ArrayType<?> atype = (ArrayType<?>) obj;
return (atype.getDimension() == dimension &&
- atype.getElementOpenType().equals(elementType) &&
- atype.isPrimitiveArray() == primitiveArray);
+ atype.getElementOpenType().equals(elementType) &&
+ atype.isPrimitiveArray() == primitiveArray);
}
/**
@@ -438,7 +438,7 @@ public class ArrayType<T>
* @throws OpenDataException if the class name of {@code elementType}
* is not in {@link OpenType#ALLOWED_CLASSNAMES_LIST}.
* @since 1.6
- */
+ */
@SuppressWarnings("unchecked")
public static <E> ArrayType<E[]> getArrayType(OpenType<E> elementType)
throws OpenDataException
@@ -484,7 +484,7 @@ public class ArrayType<T>
* @throws IllegalArgumentException if the type is not a primitive
* array.
* @since 1.6
- */
+ */
@SuppressWarnings("unchecked")
public static <T> ArrayType<T> getPrimitiveArrayType(Class<T> type)
{
@@ -495,32 +495,32 @@ public class ArrayType<T>
int dim = 0;
do
{
- comType = comType.getComponentType();
- ++dim;
- if (comType == null)
- throw new IllegalArgumentException("The given class is " +
- "not an array.");
+ comType = comType.getComponentType();
+ ++dim;
+ if (comType == null)
+ throw new IllegalArgumentException("The given class is " +
+ "not an array.");
} while (comType.isArray());
try
{
- arr = new ArrayType<T>(getPrimitiveType(comType), true);
+ arr = new ArrayType<T>(getPrimitiveType(comType), true);
}
catch (OpenDataException e)
{
- throw new IllegalArgumentException("The array is not of a primitive " +
- "type", e);
+ throw new IllegalArgumentException("The array is not of a primitive " +
+ "type", e);
}
while (dim > 1)
try
- {
- arr = new ArrayType<T>(1, arr);
- --dim;
- }
+ {
+ arr = new ArrayType<T>(1, arr);
+ --dim;
+ }
catch (OpenDataException e)
- {
- throw (Error)
- new InternalError("Couldn't generate extra dimensions").initCause(e);
- }
+ {
+ throw (Error)
+ new InternalError("Couldn't generate extra dimensions").initCause(e);
+ }
primCache.put(type, arr);
return arr;
}
@@ -570,8 +570,8 @@ public class ArrayType<T>
{
if (hashCode == null)
hashCode = Integer.valueOf(dimension +
- elementType.hashCode() +
- Boolean.valueOf(primitiveArray).hashCode());
+ elementType.hashCode() +
+ Boolean.valueOf(primitiveArray).hashCode());
return hashCode.intValue();
}
@@ -619,21 +619,21 @@ public class ArrayType<T>
Class<?> elementClass = null;
try
{
- elementClass = Class.forName(getClassName());
+ elementClass = Class.forName(getClassName());
}
catch (ClassNotFoundException e)
{
- throw new IllegalStateException("The array type's element " +
- "class could not be found.", e);
+ throw new IllegalStateException("The array type's element " +
+ "class could not be found.", e);
}
if (!(elementClass.isAssignableFrom(objClass)))
return false;
for (int a = 0; a < Array.getLength(obj); ++a)
{
- Object elem = Array.get(obj, a);
- if (elem != null &&
- (!(elementType.isValue(elem))))
- return false;
+ Object elem = Array.get(obj, a);
+ if (elem != null &&
+ (!(elementType.isValue(elem))))
+ return false;
}
return true;
}
@@ -661,11 +661,11 @@ public class ArrayType<T>
{
if (string == null)
string = getClass().getName()
- + "[name=" + getTypeName()
- + ", dimension=" + dimension
- + ", elementType=" + elementType
- + ", primitiveArray=" + primitiveArray
- + "]";
+ + "[name=" + getTypeName()
+ + ", dimension=" + dimension
+ + ", elementType=" + elementType
+ + ", primitiveArray=" + primitiveArray
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/CompositeData.java b/javax/management/openmbean/CompositeData.java
index 3134bc4c4..c3d2b2d9d 100644
--- a/javax/management/openmbean/CompositeData.java
+++ b/javax/management/openmbean/CompositeData.java
@@ -151,4 +151,3 @@ public interface CompositeData
Collection<?> values();
}
-
diff --git a/javax/management/openmbean/CompositeDataInvocationHandler.java b/javax/management/openmbean/CompositeDataInvocationHandler.java
index 170ec32c7..4f10f6ea2 100644
--- a/javax/management/openmbean/CompositeDataInvocationHandler.java
+++ b/javax/management/openmbean/CompositeDataInvocationHandler.java
@@ -49,7 +49,7 @@ import java.lang.reflect.Proxy;
* {@link CompositeData} object. An instance of {@link CompositeData}
* consists of a series of key-value mappings. This handler assumes
* these keys to be the names of attributes, and thus provides
- * accessor methods by returning the associated value.
+ * accessor methods by returning the associated value.
* </p>
* <p>
* As an example, consider the following interface:
@@ -110,7 +110,7 @@ public class CompositeDataInvocationHandler
{
if (data == null)
throw new IllegalArgumentException("The CompositeData instance " +
- "must be non-null.");
+ "must be non-null.");
this.data = data;
}
@@ -149,18 +149,18 @@ public class CompositeDataInvocationHandler
String mName = method.getName();
if (mName.equals("equals"))
{
- if (args[0] instanceof Proxy)
- {
- InvocationHandler h = Proxy.getInvocationHandler(args[0]);
- if (h instanceof CompositeDataInvocationHandler)
- return data.equals(((CompositeDataInvocationHandler)
- h).getCompositeData());
- }
- return false;
+ if (args[0] instanceof Proxy)
+ {
+ InvocationHandler h = Proxy.getInvocationHandler(args[0]);
+ if (h instanceof CompositeDataInvocationHandler)
+ return data.equals(((CompositeDataInvocationHandler)
+ h).getCompositeData());
+ }
+ return false;
}
if (mName.equals("hashCode"))
{
- return data.hashCode();
+ return data.hashCode();
}
String attrib = null;
if (mName.startsWith("get"))
@@ -171,18 +171,18 @@ public class CompositeDataInvocationHandler
throw new NoSuchMethodException(mName + " is not an accessor.");
if (!data.containsKey(attrib))
{
- if (Character.isLowerCase(attrib.charAt(0)))
- throw new NoSuchMethodException("The attribute " +
- attrib + " is not available " +
- "in the given CompositeData " +
- "object");
- attrib = Character.toLowerCase(attrib.charAt(0))
- + attrib.substring(1);
- if (!data.containsKey(attrib))
- throw new NoSuchMethodException("The attribute " +
- attrib + " is not available " +
- "in the given CompositeData " +
- "object");
+ if (Character.isLowerCase(attrib.charAt(0)))
+ throw new NoSuchMethodException("The attribute " +
+ attrib + " is not available " +
+ "in the given CompositeData " +
+ "object");
+ attrib = Character.toLowerCase(attrib.charAt(0))
+ + attrib.substring(1);
+ if (!data.containsKey(attrib))
+ throw new NoSuchMethodException("The attribute " +
+ attrib + " is not available " +
+ "in the given CompositeData " +
+ "object");
}
return data.get(attrib);
}
diff --git a/javax/management/openmbean/CompositeDataSupport.java b/javax/management/openmbean/CompositeDataSupport.java
index 6bce2672d..2cc6f4049 100644
--- a/javax/management/openmbean/CompositeDataSupport.java
+++ b/javax/management/openmbean/CompositeDataSupport.java
@@ -109,9 +109,9 @@ public class CompositeDataSupport
public CompositeDataSupport(CompositeType type, Map<String, ?> items)
throws OpenDataException
{
- this(type,
- items.keySet().toArray(new String[items.size()]),
- items.values().toArray());
+ this(type,
+ items.keySet().toArray(new String[items.size()]),
+ items.values().toArray());
}
/**
@@ -157,26 +157,26 @@ public class CompositeDataSupport
Set<String> typeKeys = type.keySet();
if (typeKeys.size() != names.length)
throw new OpenDataException("The number of field names does not match " +
- "the type description.");
+ "the type description.");
contents = new TreeMap<String, Object>();
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is null.");
- if (names[a].length() == 0)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is an empty string.");
- if (values[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the values " +
- "array is null.");
- if (!(typeKeys.contains(names[a])))
- throw new OpenDataException("The name, " + names[a] + ", is not a " +
- "field in the given type description.");
- if (!(type.getType(names[a]).isValue(values[a])))
- throw new OpenDataException("The value, " + values[a] + ", is not a " +
- "valid value for the " + names[a] + " field.");
- contents.put(names[a], values[a]);
+ if (names[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is null.");
+ if (names[a].length() == 0)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is an empty string.");
+ if (values[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the values " +
+ "array is null.");
+ if (!(typeKeys.contains(names[a])))
+ throw new OpenDataException("The name, " + names[a] + ", is not a " +
+ "field in the given type description.");
+ if (!(type.getType(names[a]).isValue(values[a])))
+ throw new OpenDataException("The value, " + values[a] + ", is not a " +
+ "valid value for the " + names[a] + " field.");
+ contents.put(names[a], values[a]);
}
}
@@ -229,10 +229,10 @@ public class CompositeDataSupport
return false;
for (String key : contents.keySet())
{
- if (!(data.containsKey(key)))
- return false;
- if (!(data.get(key).equals(contents.get(key))))
- return false;
+ if (!(data.containsKey(key)))
+ return false;
+ if (!(data.get(key).equals(contents.get(key))))
+ return false;
}
return true;
}
@@ -343,4 +343,3 @@ public class CompositeDataSupport
}
}
-
diff --git a/javax/management/openmbean/CompositeType.java b/javax/management/openmbean/CompositeType.java
index 3244c6457..e36fed151 100644
--- a/javax/management/openmbean/CompositeType.java
+++ b/javax/management/openmbean/CompositeType.java
@@ -46,7 +46,7 @@ import java.util.TreeMap;
/**
* The open type descriptor for instances of the
* {@link CompositeData} class.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -109,34 +109,34 @@ public class CompositeType
* before comparison.
*/
public CompositeType(String name, String desc, String[] names,
- String[] descs, OpenType<?>[] types)
+ String[] descs, OpenType<?>[] types)
throws OpenDataException
{
super(CompositeData.class.getName(), name, desc);
- if (names.length == 0
- || names.length != descs.length
- || names.length != types.length)
+ if (names.length == 0
+ || names.length != descs.length
+ || names.length != types.length)
throw new IllegalArgumentException("Arrays must be non-empty " +
- "and of equal size.");
+ "and of equal size.");
nameToDescription = new TreeMap<String,String>();
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- throw new IllegalArgumentException("Name " + a + " is null.");
- if (descs[a] == null)
- throw new IllegalArgumentException("Description " + a +
- " is null.");
- String fieldName = names[a].trim();
- if (fieldName.length() == 0)
- throw new IllegalArgumentException("Name " + a + " is " +
- "the empty string.");
- if (descs[a].length() == 0)
- throw new IllegalArgumentException("Description " + a + " is " +
- "the empty string.");
- if (nameToDescription.containsKey(fieldName))
- throw new OpenDataException(fieldName + " appears more " +
- "than once.");
- nameToDescription.put(fieldName, descs[a]);
+ if (names[a] == null)
+ throw new IllegalArgumentException("Name " + a + " is null.");
+ if (descs[a] == null)
+ throw new IllegalArgumentException("Description " + a +
+ " is null.");
+ String fieldName = names[a].trim();
+ if (fieldName.length() == 0)
+ throw new IllegalArgumentException("Name " + a + " is " +
+ "the empty string.");
+ if (descs[a].length() == 0)
+ throw new IllegalArgumentException("Description " + a + " is " +
+ "the empty string.");
+ if (nameToDescription.containsKey(fieldName))
+ throw new OpenDataException(fieldName + " appears more " +
+ "than once.");
+ nameToDescription.put(fieldName, descs[a]);
}
nameToType = new TreeMap<String,OpenType<?>>();
for (int a = 0; a < names.length; ++a)
@@ -167,7 +167,7 @@ public class CompositeType
* <li>The type names are equal.</li>
* <li>The fields and their types match.</li>
* </ul>
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -184,7 +184,7 @@ public class CompositeType
for (String key : keys)
{
if (!(ctype.getType(key).equals(getType(key))))
- return false;
+ return false;
}
return true;
}
@@ -222,7 +222,7 @@ public class CompositeType
/**
* <p>
* Returns the hash code of the composite data type.
- * This is computed as the sum of the hash codes of
+ * This is computed as the sum of the hash codes of
* each field name and its type, together with the hash
* code of the type name. These are the same elements
* of the type that are compared as part of the
@@ -242,18 +242,18 @@ public class CompositeType
{
if (hashCode == null)
{
- int elementTotal = 0;
- for (Map.Entry<String,OpenType<?>> entry : nameToType.entrySet())
- {
- elementTotal += (entry.getKey().hashCode() +
- entry.getValue().hashCode());
- }
- hashCode = Integer.valueOf(elementTotal
- + getTypeName().hashCode());
+ int elementTotal = 0;
+ for (Map.Entry<String,OpenType<?>> entry : nameToType.entrySet())
+ {
+ elementTotal += (entry.getKey().hashCode() +
+ entry.getValue().hashCode());
+ }
+ hashCode = Integer.valueOf(elementTotal
+ + getTypeName().hashCode());
}
return hashCode.intValue();
}
-
+
/**
* Returns true if the specified object is a member of this
* composite type. The object is judged to be so if it is
@@ -268,15 +268,15 @@ public class CompositeType
{
if (obj instanceof CompositeData)
{
- CompositeData data = (CompositeData) obj;
- return equals(data.getCompositeType());
+ CompositeData data = (CompositeData) obj;
+ return equals(data.getCompositeType());
}
return false;
}
/**
* Returns an unmodifiable {@link java.util.Set}-based
- * view of the field names that form part of this
+ * view of the field names that form part of this
* {@link CompositeType} instance. The names are stored
* in ascending alphanumeric order.
*
@@ -311,9 +311,9 @@ public class CompositeType
{
if (string == null)
string = getClass().getName()
- + "[name=" + getTypeName()
- + ", fields=" + nameToType
- + "]";
+ + "[name=" + getTypeName()
+ + ", fields=" + nameToType
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/InvalidKeyException.java b/javax/management/openmbean/InvalidKeyException.java
index 5f0cf7603..e9458ba91 100644
--- a/javax/management/openmbean/InvalidKeyException.java
+++ b/javax/management/openmbean/InvalidKeyException.java
@@ -74,4 +74,3 @@ public class InvalidKeyException
}
}
-
diff --git a/javax/management/openmbean/InvalidOpenTypeException.java b/javax/management/openmbean/InvalidOpenTypeException.java
index 9c9ff8cfa..b4f49ba13 100644
--- a/javax/management/openmbean/InvalidOpenTypeException.java
+++ b/javax/management/openmbean/InvalidOpenTypeException.java
@@ -73,4 +73,3 @@ public class InvalidOpenTypeException
}
}
-
diff --git a/javax/management/openmbean/KeyAlreadyExistsException.java b/javax/management/openmbean/KeyAlreadyExistsException.java
index cc6bba636..69b22c433 100644
--- a/javax/management/openmbean/KeyAlreadyExistsException.java
+++ b/javax/management/openmbean/KeyAlreadyExistsException.java
@@ -74,4 +74,3 @@ public class KeyAlreadyExistsException
}
}
-
diff --git a/javax/management/openmbean/OpenDataException.java b/javax/management/openmbean/OpenDataException.java
index a476cc1d4..5e2a0b746 100644
--- a/javax/management/openmbean/OpenDataException.java
+++ b/javax/management/openmbean/OpenDataException.java
@@ -76,4 +76,3 @@ public class OpenDataException
}
}
-
diff --git a/javax/management/openmbean/OpenMBeanAttributeInfo.java b/javax/management/openmbean/OpenMBeanAttributeInfo.java
index 1b276fd19..d52130600 100644
--- a/javax/management/openmbean/OpenMBeanAttributeInfo.java
+++ b/javax/management/openmbean/OpenMBeanAttributeInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanAttributeInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>openType.equals(object.getOpenType())</code>,
* <code>defaultValue.equals(object.getDefaultValue())</code>,
diff --git a/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java b/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
index 6da2e95e6..098f72e71 100644
--- a/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
@@ -44,7 +44,7 @@ import java.util.Set;
import javax.management.MBeanAttributeInfo;
/**
- * Describes an attribute of an open management bean.
+ * Describes an attribute of an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -113,11 +113,11 @@ public class OpenMBeanAttributeInfoSupport
* the empty string.
*/
public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<?> type,
- boolean isReadable, boolean isWritable,
- boolean isIs)
+ boolean isReadable, boolean isWritable,
+ boolean isIs)
{
super(name, type == null ? null : type.getClassName(), desc, isReadable,
- isWritable, isIs);
+ isWritable, isIs);
if (name == null)
throw new IllegalArgumentException("The name may not be null.");
if (desc == null)
@@ -128,7 +128,7 @@ public class OpenMBeanAttributeInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
}
/**
@@ -158,8 +158,8 @@ public class OpenMBeanAttributeInfoSupport
* of {@link ArrayType} or {@link TabularType}.
*/
public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs, defaultValue, null);
@@ -168,7 +168,7 @@ public class OpenMBeanAttributeInfoSupport
/**
* <p>
* Constructs a new {@link OpenMBeanAttributeInfo} using the
- * specified name, description, open type, access properties,
+ * specified name, description, open type, access properties,
* default, maximum and minimum values. The name, description
* and open type cannot be <code>null</code> and the name and
* description may not be equal to the empty string. The
@@ -187,7 +187,7 @@ public class OpenMBeanAttributeInfoSupport
* <li>The default value must be smaller than or equal to the maximum value
* (literally, <code>defaultValue.compareTo(maxValue) <= 0</code>.</li>
* </ul>
- *
+ *
* @param name the name of the attribute.
* @param desc a description of the attribute.
* @param type the open type of the attribute.
@@ -205,39 +205,39 @@ public class OpenMBeanAttributeInfoSupport
*/
@SuppressWarnings("unchecked")
public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue,
- Comparable<T> minimumValue,
- Comparable<T> maximumValue)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue,
+ Comparable<T> minimumValue,
+ Comparable<T> maximumValue)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
+ "open type given.");
if (minimumValue != null && !(type.isValue(minimumValue)))
throw new OpenDataException("The minimum value is not a member of the " +
- "open type given.");
+ "open type given.");
if (maximumValue != null && !(type.isValue(maximumValue)))
throw new OpenDataException("The maximum value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (minimumValue != null && maximumValue != null
- && minimumValue.compareTo((T) maximumValue) > 0)
+ "array or tabular types.");
+ if (minimumValue != null && maximumValue != null
+ && minimumValue.compareTo((T) maximumValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "maximum.");
- if (minimumValue != null && defaultValue != null
- && minimumValue.compareTo(defaultValue) > 0)
+ "maximum.");
+ if (minimumValue != null && defaultValue != null
+ && minimumValue.compareTo(defaultValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "default.");
+ "default.");
if (defaultValue != null && maximumValue != null
- && maximumValue.compareTo(defaultValue) < 0)
+ && maximumValue.compareTo(defaultValue) < 0)
throw new OpenDataException("The default value is greater than the " +
- "maximum.");
-
+ "maximum.");
+
openType = type;
this.defaultValue = defaultValue;
minValue = minimumValue;
@@ -282,40 +282,40 @@ public class OpenMBeanAttributeInfoSupport
* @throws OpenDataException if any condition in the list above is broken.
*/
public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue,
- T[] legalValues)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue,
+ T[] legalValues)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (legalValues != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "array or tabular types.");
+ if (legalValues != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Legal values are not applicable for " +
- "array or tabular types.");
+ "array or tabular types.");
if (legalValues != null && legalValues.length > 0)
{
- Set<T> lv = new HashSet<T>(legalValues.length);
- for (int a = 0; a < legalValues.length; ++a)
- {
- if (legalValues[a] != null &&
- !(type.isValue(legalValues[a])))
- throw new OpenDataException("The legal value, "
- + legalValues[a] +
- "is not a member of the " +
- "open type given.");
- lv.add(legalValues[a]);
- }
- if (defaultValue != null && !(lv.contains(defaultValue)))
- throw new OpenDataException("The default value is not in the set " +
- "of legal values.");
- this.legalValues = Collections.unmodifiableSet(lv);
+ Set<T> lv = new HashSet<T>(legalValues.length);
+ for (int a = 0; a < legalValues.length; ++a)
+ {
+ if (legalValues[a] != null &&
+ !(type.isValue(legalValues[a])))
+ throw new OpenDataException("The legal value, "
+ + legalValues[a] +
+ "is not a member of the " +
+ "open type given.");
+ lv.add(legalValues[a]);
+ }
+ if (defaultValue != null && !(lv.contains(defaultValue)))
+ throw new OpenDataException("The default value is not in the set " +
+ "of legal values.");
+ this.legalValues = Collections.unmodifiableSet(lv);
}
openType = type;
this.defaultValue = defaultValue;
@@ -329,7 +329,7 @@ public class OpenMBeanAttributeInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanAttributeInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>openType.equals(object.getOpenType())</code>,
* <code>isRead == object.isReadable()</code>,
@@ -446,20 +446,20 @@ public class OpenMBeanAttributeInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- openType.hashCode() +
- Boolean.valueOf(isReadable()).hashCode() +
- (2 *
- Boolean.valueOf(isWritable()).hashCode()) +
- (4 * Boolean.valueOf(isIs()).hashCode()) +
- (defaultValue == null ? 0 :
- defaultValue.hashCode()) +
- (minValue == null ? 0 :
- minValue.hashCode()) +
- (maxValue == null ? 0 :
- maxValue.hashCode()) +
- (legalValues == null ? 0 :
- legalValues.hashCode()));
+ hashCode = Integer.valueOf(getName().hashCode() +
+ openType.hashCode() +
+ Boolean.valueOf(isReadable()).hashCode() +
+ (2 *
+ Boolean.valueOf(isWritable()).hashCode()) +
+ (4 * Boolean.valueOf(isIs()).hashCode()) +
+ (defaultValue == null ? 0 :
+ defaultValue.hashCode()) +
+ (minValue == null ? 0 :
+ minValue.hashCode()) +
+ (maxValue == null ? 0 :
+ maxValue.hashCode()) +
+ (legalValues == null ? 0 :
+ legalValues.hashCode()));
return hashCode.intValue();
}
@@ -531,16 +531,16 @@ public class OpenMBeanAttributeInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",openType=" + openType
- + ",isReadable=" + isReadable()
- + ",isWritable=" + isWritable()
- + ",isIs=" + isIs()
- + ",defaultValue=" + defaultValue
- + ",minValue=" + minValue
- + ",maxValue=" + maxValue
- + ",legalValues=" + legalValues
- + "]";
+ + "[name=" + getName()
+ + ",openType=" + openType
+ + ",isReadable=" + isReadable()
+ + ",isWritable=" + isWritable()
+ + ",isIs=" + isIs()
+ + ",defaultValue=" + defaultValue
+ + ",minValue=" + minValue
+ + ",maxValue=" + maxValue
+ + ",legalValues=" + legalValues
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/OpenMBeanConstructorInfo.java b/javax/management/openmbean/OpenMBeanConstructorInfo.java
index 34cef131f..5bccdb639 100644
--- a/javax/management/openmbean/OpenMBeanConstructorInfo.java
+++ b/javax/management/openmbean/OpenMBeanConstructorInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanConstructorInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* and <code>signature.equals(object.getSignature())</code>.
*/
diff --git a/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java b/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
index 9dac01a59..c187d5d13 100644
--- a/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
@@ -43,7 +43,7 @@ import javax.management.MBeanConstructorInfo;
import javax.management.MBeanParameterInfo;
/**
- * Describes a constructor for an open management bean.
+ * Describes a constructor for an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -89,7 +89,7 @@ public class OpenMBeanConstructorInfoSupport
* {@link javax.management.MBeanParameterInfo}
*/
public OpenMBeanConstructorInfoSupport(String name, String desc,
- OpenMBeanParameterInfo[] sig)
+ OpenMBeanParameterInfo[] sig)
{
super(name, desc, (MBeanParameterInfo[]) sig);
if (name == null)
@@ -100,7 +100,7 @@ public class OpenMBeanConstructorInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
}
/**
@@ -110,7 +110,7 @@ public class OpenMBeanConstructorInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* and <code>signature.equals(object.getSignature())</code>.
*/
@@ -140,8 +140,8 @@ public class OpenMBeanConstructorInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- Arrays.asList(getSignature()).hashCode());
+ hashCode = Integer.valueOf(getName().hashCode() +
+ Arrays.asList(getSignature()).hashCode());
return hashCode.intValue();
}
@@ -165,9 +165,9 @@ public class OpenMBeanConstructorInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",signature=" + Arrays.toString(getSignature())
- + "]";
+ + "[name=" + getName()
+ + ",signature=" + Arrays.toString(getSignature())
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/OpenMBeanInfo.java b/javax/management/openmbean/OpenMBeanInfo.java
index 5aa4df451..98da260e7 100644
--- a/javax/management/openmbean/OpenMBeanInfo.java
+++ b/javax/management/openmbean/OpenMBeanInfo.java
@@ -66,7 +66,7 @@ public interface OpenMBeanInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanInfo}
- * instance,
+ * instance,
* <code>className.equals(object.getClassName())</code>
* and each info class has an equal in the other object.
*/
diff --git a/javax/management/openmbean/OpenMBeanInfoSupport.java b/javax/management/openmbean/OpenMBeanInfoSupport.java
index d67ff76a0..c335d7512 100644
--- a/javax/management/openmbean/OpenMBeanInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanInfoSupport.java
@@ -47,7 +47,7 @@ import javax.management.MBeanNotificationInfo;
import javax.management.MBeanOperationInfo;
/**
- * Describes an open management bean.
+ * Describes an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -97,16 +97,16 @@ public class OpenMBeanInfoSupport
* is not assignable to the equivalent
* <code>MBeanXXXInfo</code> class.
*/
- public OpenMBeanInfoSupport(String name, String desc,
- OpenMBeanAttributeInfo[] attribs,
- OpenMBeanConstructorInfo[] cons,
- OpenMBeanOperationInfo[] ops,
- MBeanNotificationInfo[] notifs)
+ public OpenMBeanInfoSupport(String name, String desc,
+ OpenMBeanAttributeInfo[] attribs,
+ OpenMBeanConstructorInfo[] cons,
+ OpenMBeanOperationInfo[] ops,
+ MBeanNotificationInfo[] notifs)
{
super(name, desc, (MBeanAttributeInfo[]) attribs,
- (MBeanConstructorInfo[]) cons,
- (MBeanOperationInfo[]) ops,
- notifs);
+ (MBeanConstructorInfo[]) cons,
+ (MBeanOperationInfo[]) ops,
+ notifs);
}
/**
@@ -116,7 +116,7 @@ public class OpenMBeanInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanInfo}
- * instance,
+ * instance,
* <code>className.equals(object.getClassName())</code>
* and each info class has an equal in the other object.
*/
@@ -149,12 +149,12 @@ public class OpenMBeanInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode =
- Integer.valueOf(getClassName().hashCode() +
- new HashSet<MBeanAttributeInfo>(Arrays.asList(getAttributes())).hashCode() +
- new HashSet<MBeanConstructorInfo>(Arrays.asList(getConstructors())).hashCode() +
- new HashSet<MBeanNotificationInfo>(Arrays.asList(getNotifications())).hashCode() +
- new HashSet<MBeanOperationInfo>(Arrays.asList(getOperations())).hashCode());
+ hashCode =
+ Integer.valueOf(getClassName().hashCode() +
+ new HashSet<MBeanAttributeInfo>(Arrays.asList(getAttributes())).hashCode() +
+ new HashSet<MBeanConstructorInfo>(Arrays.asList(getConstructors())).hashCode() +
+ new HashSet<MBeanNotificationInfo>(Arrays.asList(getNotifications())).hashCode() +
+ new HashSet<MBeanOperationInfo>(Arrays.asList(getOperations())).hashCode());
return hashCode.intValue();
}
@@ -179,12 +179,12 @@ public class OpenMBeanInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[className=" + getClassName()
- + ",attributes=" + Arrays.toString(getAttributes())
- + ",constructors=" + Arrays.toString(getConstructors())
- + ",notifications=" + Arrays.toString(getNotifications())
- + ",operations=" + Arrays.toString(getOperations())
- + "]";
+ + "[className=" + getClassName()
+ + ",attributes=" + Arrays.toString(getAttributes())
+ + ",constructors=" + Arrays.toString(getConstructors())
+ + ",notifications=" + Arrays.toString(getNotifications())
+ + ",operations=" + Arrays.toString(getOperations())
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/OpenMBeanOperationInfo.java b/javax/management/openmbean/OpenMBeanOperationInfo.java
index e835b8d13..3b5bf9260 100644
--- a/javax/management/openmbean/OpenMBeanOperationInfo.java
+++ b/javax/management/openmbean/OpenMBeanOperationInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanOperationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>signature.equals(object.getSignature())</code>,
* <code>returnOpenType.equals(object.getReturnOpenType())</code>,
diff --git a/javax/management/openmbean/OpenMBeanOperationInfoSupport.java b/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
index c01433de0..992df344a 100644
--- a/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
@@ -43,7 +43,7 @@ import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
/**
- * Describes a operation for an open management bean.
+ * Describes a operation for an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -82,7 +82,7 @@ public class OpenMBeanOperationInfoSupport
* description may not be equal to the empty string, and neither
* the name, description nor the open return type may be
* <code>null</code>. The value of <code>impact</code> must be
- * one of the four valid values
+ * one of the four valid values
* ({@link javax.management.MBeanOperationInfo#INFO},
* {@link javax.management.MBeanOperationInfo#ACTION},
* {@link javax.management.MBeanOperationInfo#ACTION_INFO} and
@@ -107,11 +107,11 @@ public class OpenMBeanOperationInfoSupport
* {@link javax.management.MBeanParameterInfo}
*/
public OpenMBeanOperationInfoSupport(String name, String desc,
- OpenMBeanParameterInfo[] sig,
- OpenType<?> type, int impact)
+ OpenMBeanParameterInfo[] sig,
+ OpenType<?> type, int impact)
{
super(name, desc, (MBeanParameterInfo[]) sig,
- type == null ? null : type.getClassName(), impact);
+ type == null ? null : type.getClassName(), impact);
if (name == null)
throw new IllegalArgumentException("The name may not be null.");
if (desc == null)
@@ -122,9 +122,9 @@ public class OpenMBeanOperationInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
- if (impact != ACTION && impact != INFO &&
- impact != ACTION_INFO && impact != UNKNOWN)
+ "empty string.");
+ if (impact != ACTION && impact != INFO &&
+ impact != ACTION_INFO && impact != UNKNOWN)
throw new IllegalArgumentException("The impact factor is an invalid value.");
returnOpenType = type;
}
@@ -136,7 +136,7 @@ public class OpenMBeanOperationInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>signature.equals(object.getSignature())</code>,
* <code>returnOpenType.equals(object.getReturnOpenType())</code>,
@@ -182,10 +182,10 @@ public class OpenMBeanOperationInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- returnOpenType.hashCode() +
- Integer.valueOf(getImpact()).hashCode() +
- Arrays.asList(getSignature()).hashCode());
+ hashCode = Integer.valueOf(getName().hashCode() +
+ returnOpenType.hashCode() +
+ Integer.valueOf(getImpact()).hashCode() +
+ Arrays.asList(getSignature()).hashCode());
return hashCode.intValue();
}
@@ -209,30 +209,30 @@ public class OpenMBeanOperationInfoSupport
{
if (string == null)
{
- String impactString;
- switch (getImpact())
- {
- case INFO:
- impactString = "INFO";
- break;
- case ACTION:
- impactString = "ACTION";
- break;
- case ACTION_INFO:
- impactString = "ACTION_INFO";
- break;
- case UNKNOWN:
- impactString = "UNKNOWN";
- break;
- default:
- impactString = "ERRONEOUS VALUE";
- }
- string = getClass().getName()
- + "[name=" + getName()
- + ",signature=" + Arrays.toString(getSignature())
- + ",returnOpenType=" + returnOpenType
- + ",impact=" + impactString
- + "]";
+ String impactString;
+ switch (getImpact())
+ {
+ case INFO:
+ impactString = "INFO";
+ break;
+ case ACTION:
+ impactString = "ACTION";
+ break;
+ case ACTION_INFO:
+ impactString = "ACTION_INFO";
+ break;
+ case UNKNOWN:
+ impactString = "UNKNOWN";
+ break;
+ default:
+ impactString = "ERRONEOUS VALUE";
+ }
+ string = getClass().getName()
+ + "[name=" + getName()
+ + ",signature=" + Arrays.toString(getSignature())
+ + ",returnOpenType=" + returnOpenType
+ + ",impact=" + impactString
+ + "]";
}
return string;
}
diff --git a/javax/management/openmbean/OpenMBeanParameterInfo.java b/javax/management/openmbean/OpenMBeanParameterInfo.java
index 75d1baf94..0869a686f 100644
--- a/javax/management/openmbean/OpenMBeanParameterInfo.java
+++ b/javax/management/openmbean/OpenMBeanParameterInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanParameterInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>openType.equals(object.getOpenType())</code>,
* <code>defaultValue.equals(object.getDefaultValue())</code>,
diff --git a/javax/management/openmbean/OpenMBeanParameterInfoSupport.java b/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
index 5f86bf4af..78ad1c5a0 100644
--- a/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
@@ -45,7 +45,7 @@ import javax.management.MBeanParameterInfo;
/**
* Describes the parameters of a constructor or operation associated
- * with an open management bean.
+ * with an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -122,7 +122,7 @@ public class OpenMBeanParameterInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
openType = type;
}
@@ -150,7 +150,7 @@ public class OpenMBeanParameterInfoSupport
* of {@link ArrayType} or {@link TabularType}.
*/
public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
- T defaultValue)
+ T defaultValue)
throws OpenDataException
{
this(name, desc, type, defaultValue, null);
@@ -177,7 +177,7 @@ public class OpenMBeanParameterInfoSupport
* <li>The default value must be smaller than or equal to the maximum value
* (literally, <code>defaultValue.compareTo(maxValue) <= 0</code>.</li>
* </ul>
- *
+ *
* @param name the name of the parameter.
* @param desc a description of the parameter.
* @param type the open type of the parameter.
@@ -192,37 +192,37 @@ public class OpenMBeanParameterInfoSupport
*/
@SuppressWarnings("unchecked")
public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
- T defaultValue, Comparable<T> minimumValue,
- Comparable<T> maximumValue)
+ T defaultValue, Comparable<T> minimumValue,
+ Comparable<T> maximumValue)
throws OpenDataException
{
this(name, desc, type);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
+ "open type given.");
if (minimumValue != null && !(type.isValue(minimumValue)))
throw new OpenDataException("The minimum value is not a member of the " +
- "open type given.");
+ "open type given.");
if (maximumValue != null && !(type.isValue(maximumValue)))
throw new OpenDataException("The maximum value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (minimumValue != null && maximumValue != null
- && minimumValue.compareTo((T) maximumValue) > 0)
+ "array or tabular types.");
+ if (minimumValue != null && maximumValue != null
+ && minimumValue.compareTo((T) maximumValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "maximum.");
- if (minimumValue != null && defaultValue != null
- && minimumValue.compareTo(defaultValue) > 0)
+ "maximum.");
+ if (minimumValue != null && defaultValue != null
+ && minimumValue.compareTo(defaultValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "default.");
+ "default.");
if (defaultValue != null && maximumValue != null
- && maximumValue.compareTo(defaultValue) < 0)
+ && maximumValue.compareTo(defaultValue) < 0)
throw new OpenDataException("The default value is greater than the " +
- "maximum.");
-
+ "maximum.");
+
this.defaultValue = defaultValue;
minValue = minimumValue;
maxValue = maximumValue;
@@ -263,38 +263,38 @@ public class OpenMBeanParameterInfoSupport
* @throws OpenDataException if any condition in the list above is broken.
*/
public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
- T defaultValue, T[] legalValues)
+ T defaultValue, T[] legalValues)
throws OpenDataException
{
this(name, desc, type);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (legalValues != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "array or tabular types.");
+ if (legalValues != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Legal values are not applicable for " +
- "array or tabular types.");
+ "array or tabular types.");
if (legalValues != null && legalValues.length > 0)
{
- Set<T> lv = new HashSet<T>(legalValues.length);
- for (int a = 0; a < legalValues.length; ++a)
- {
- if (legalValues[a] != null &&
- !(type.isValue(legalValues[a])))
- throw new OpenDataException("The legal value, "
- + legalValues[a] +
- "is not a member of the " +
- "open type given.");
- lv.add(legalValues[a]);
- }
- if (defaultValue != null && !(lv.contains(defaultValue)))
- throw new OpenDataException("The default value is not in the set " +
- "of legal values.");
- this.legalValues = Collections.unmodifiableSet(lv);
+ Set<T> lv = new HashSet<T>(legalValues.length);
+ for (int a = 0; a < legalValues.length; ++a)
+ {
+ if (legalValues[a] != null &&
+ !(type.isValue(legalValues[a])))
+ throw new OpenDataException("The legal value, "
+ + legalValues[a] +
+ "is not a member of the " +
+ "open type given.");
+ lv.add(legalValues[a]);
+ }
+ if (defaultValue != null && !(lv.contains(defaultValue)))
+ throw new OpenDataException("The default value is not in the set " +
+ "of legal values.");
+ this.legalValues = Collections.unmodifiableSet(lv);
}
this.defaultValue = defaultValue;
}
@@ -307,7 +307,7 @@ public class OpenMBeanParameterInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* <code>name.equals(object.getName())</code>,
* <code>openType.equals(object.getOpenType())</code>,
* <code>defaultValue.equals(object.getDefaultValue())</code>,
@@ -418,16 +418,16 @@ public class OpenMBeanParameterInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- openType.hashCode() +
- (defaultValue == null ? 0 :
- defaultValue.hashCode()) +
- (minValue == null ? 0 :
- minValue.hashCode()) +
- (maxValue == null ? 0 :
- maxValue.hashCode()) +
- (legalValues == null ? 0 :
- legalValues.hashCode()));
+ hashCode = Integer.valueOf(getName().hashCode() +
+ openType.hashCode() +
+ (defaultValue == null ? 0 :
+ defaultValue.hashCode()) +
+ (minValue == null ? 0 :
+ minValue.hashCode()) +
+ (maxValue == null ? 0 :
+ maxValue.hashCode()) +
+ (legalValues == null ? 0 :
+ legalValues.hashCode()));
return hashCode.intValue();
}
@@ -499,13 +499,13 @@ public class OpenMBeanParameterInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",openType=" + openType
- + ",defaultValue=" + defaultValue
- + ",minValue=" + minValue
- + ",maxValue=" + maxValue
- + ",legalValues=" + legalValues
- + "]";
+ + "[name=" + getName()
+ + ",openType=" + openType
+ + ",defaultValue=" + defaultValue
+ + ",minValue=" + minValue
+ + ",maxValue=" + maxValue
+ + ",legalValues=" + legalValues
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/OpenType.java b/javax/management/openmbean/OpenType.java
index f3a97fef3..d8abc7cf0 100644
--- a/javax/management/openmbean/OpenType.java
+++ b/javax/management/openmbean/OpenType.java
@@ -47,7 +47,7 @@ import java.util.List;
* applicable data values for open MBeans. An open type
* is defined by its name and description, and the name
* of the Java class it maps to.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -99,7 +99,7 @@ public abstract class OpenType<T>
"java.util.Date",
"javax.management.ObjectName",
CompositeData.class.getName(),
- TabularData.class.getName()
+ TabularData.class.getName()
};
/**
@@ -107,8 +107,8 @@ public abstract class OpenType<T>
* used as open types. Note that each type is also available
* in array form, possibly with multiple dimensions.
*/
- public static final List<String> ALLOWED_CLASSNAMES_LIST =
- Arrays.asList(ALLOWED_CLASSNAMES);
+ public static final List<String> ALLOWED_CLASSNAMES_LIST =
+ Arrays.asList(ALLOWED_CLASSNAMES);
/**
* Constructs a new {@link OpenType} for the specified class
@@ -136,25 +136,25 @@ public abstract class OpenType<T>
{
if (name == null || name.equals(""))
throw new IllegalArgumentException("The name can not be null " +
- "or the empty string.");
+ "or the empty string.");
if (desc == null || desc.equals(""))
throw new IllegalArgumentException("The description can not " +
- "be null or the empty string.");
+ "be null or the empty string.");
Class<?> type;
try
{
- type = Class.forName(className);
+ type = Class.forName(className);
}
catch (ClassNotFoundException e)
{
- throw (OpenDataException) new OpenDataException("The class name, " + className +
- ", is unavailable.").initCause(e);
+ throw (OpenDataException) new OpenDataException("The class name, " + className +
+ ", is unavailable.").initCause(e);
}
while (type.isArray())
type = type.getComponentType();
if (!(type.isPrimitive() || ALLOWED_CLASSNAMES_LIST.contains(type.getName())))
- throw new OpenDataException("The class name, " + className +
- ", does not specify a valid open type.");
+ throw new OpenDataException("The class name, " + className +
+ ", does not specify a valid open type.");
this.className = className;
typeName = name;
description = desc;
@@ -172,7 +172,7 @@ public abstract class OpenType<T>
/**
* Returns the name of the Java class this type represents. This must
* be one of the {@link ALLOWED_CLASSNAMES} or an array of one of them.
- * The specification of arrays follows the standard set by
+ * The specification of arrays follows the standard set by
* {@link java.lang.Class#getName()} i.e. the name is the class name
* preceded by n instances of '[' and an 'L', where n is number of
* dimensions used by the array.
diff --git a/javax/management/openmbean/SimpleType.java b/javax/management/openmbean/SimpleType.java
index ef05e9dfe..81b991bdf 100644
--- a/javax/management/openmbean/SimpleType.java
+++ b/javax/management/openmbean/SimpleType.java
@@ -56,7 +56,7 @@ import javax.management.ObjectName;
* basic Java types. As a result, the valid instances of this
* class are predefined, and no constructor is given for creating
* new instances.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -80,7 +80,7 @@ public final class SimpleType<T>
* The {@link SimpleType} representation of
* <code>java.lang.Boolean</code>.
*/
- public static final SimpleType<Boolean> BOOLEAN;
+ public static final SimpleType<Boolean> BOOLEAN;
/**
* The {@link SimpleType} representation of
@@ -98,7 +98,7 @@ public final class SimpleType<T>
* The {@link SimpleType} representation of
* <code>java.util.Date</code>.
*/
- public static final SimpleType<Date> DATE;
+ public static final SimpleType<Date> DATE;
/**
* The {@link SimpleType} representation of
@@ -171,28 +171,28 @@ public final class SimpleType<T>
{
try
{
- BIGDECIMAL = new SimpleType<BigDecimal>("java.math.BigDecimal");
- BIGINTEGER = new SimpleType<BigInteger>("java.math.BigInteger");
- BOOLEAN = new SimpleType<Boolean>("java.lang.Boolean");
- BYTE = new SimpleType<Byte>("java.lang.Byte");
- CHARACTER = new SimpleType<Character>("java.lang.Character");
- DATE = new SimpleType<Date>("java.util.Date");
- DOUBLE = new SimpleType<Double>("java.lang.Double");
- FLOAT = new SimpleType<Float>("java.lang.Float");
- INTEGER = new SimpleType<Integer>("java.lang.Integer");
- LONG = new SimpleType<Long>("java.lang.Long");
- OBJECTNAME =
- new SimpleType<ObjectName>("javax.management.ObjectName");
- SHORT = new SimpleType<Short>("java.lang.Short");
- STRING = new SimpleType<String>("java.lang.String");
- VOID = new SimpleType<Void>("java.lang.Void");
+ BIGDECIMAL = new SimpleType<BigDecimal>("java.math.BigDecimal");
+ BIGINTEGER = new SimpleType<BigInteger>("java.math.BigInteger");
+ BOOLEAN = new SimpleType<Boolean>("java.lang.Boolean");
+ BYTE = new SimpleType<Byte>("java.lang.Byte");
+ CHARACTER = new SimpleType<Character>("java.lang.Character");
+ DATE = new SimpleType<Date>("java.util.Date");
+ DOUBLE = new SimpleType<Double>("java.lang.Double");
+ FLOAT = new SimpleType<Float>("java.lang.Float");
+ INTEGER = new SimpleType<Integer>("java.lang.Integer");
+ LONG = new SimpleType<Long>("java.lang.Long");
+ OBJECTNAME =
+ new SimpleType<ObjectName>("javax.management.ObjectName");
+ SHORT = new SimpleType<Short>("java.lang.Short");
+ STRING = new SimpleType<String>("java.lang.String");
+ VOID = new SimpleType<Void>("java.lang.Void");
}
catch (OpenDataException e)
{
- /* In normal circumstances, this shouldn't be possible. */
- throw new IllegalStateException("A invalid class name " +
- "was passed to the SimpleType " +
- "constructor.", e);
+ /* In normal circumstances, this shouldn't be possible. */
+ throw new IllegalStateException("A invalid class name " +
+ "was passed to the SimpleType " +
+ "constructor.", e);
}
}
@@ -200,12 +200,12 @@ public final class SimpleType<T>
* Constructs a new {@link SimpleType} instance for the given
* class name. The class name is also used as the type name
* and description of the {@link OpenType} instance.
- *
+ *
* @param name the name of the class this instance should
* represent.
* @throws OpenDataException if somehow the constructor of the
* superclass is passed an invalid
- * class name.
+ * class name.
*/
private SimpleType(String name)
throws OpenDataException
@@ -224,7 +224,7 @@ public final class SimpleType<T>
* {@link SimpleType}.</li>
* <li>The class names are equal.</li>
* </ul>
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -319,7 +319,7 @@ public final class SimpleType<T>
if (equals(VOID))
return VOID;
throw new InvalidObjectException("Invalid simple type instance " +
- "deserialized.");
+ "deserialized.");
}
/**
@@ -342,8 +342,8 @@ public final class SimpleType<T>
{
if (string == null)
string = getClass().getName()
- + "[name=" + getClassName()
- + "]";
+ + "[name=" + getClassName()
+ + "]";
return string;
}
diff --git a/javax/management/openmbean/TabularData.java b/javax/management/openmbean/TabularData.java
index 75ab00b7e..8bceae85e 100644
--- a/javax/management/openmbean/TabularData.java
+++ b/javax/management/openmbean/TabularData.java
@@ -63,7 +63,7 @@ public interface TabularData
* this instance's tabular type. The returned indices are the
* values of the fields in the supplied {@link CompositeData}
* instance that match the names given in the {@link TabularType}.
- *
+ *
* @param val the {@link CompositeData} value whose index should
* be calculated.
* @return the index the value would take on, if it were to be added.
@@ -154,14 +154,14 @@ public interface TabularData
/**
* Returns true if this {@link TabularData} instance
* contains no {@link CompositeData} values.
- *
+ *
* @return true if the instance is devoid of rows.
*/
boolean isEmpty();
/**
* Returns a {@link java.util.Set} view of the keys or
- * indices of this {@link TabularData} instance.
+ * indices of this {@link TabularData} instance.
*
* @return a set containing the keys of this instance.
*/
@@ -174,7 +174,7 @@ public interface TabularData
* the same index as an existing value. The index is
* calculated using the index names of the
* {@link TabularType} for this instance.
- *
+ *
* @param val the {@link CompositeData} value to add.
* @throws NullPointerException if <code>val</code> is
* <code>null</code>.
@@ -198,7 +198,7 @@ public interface TabularData
* value can not be added, then none of the values should
* be. If the array is <code>null</code> or empty, the
* method simply returns.
- *
+ *
* @param vals the {@link CompositeData} values to add.
* @throws NullPointerException if a value from the array is
* <code>null</code>.
@@ -247,7 +247,7 @@ public interface TabularData
* object.
*/
String toString();
-
+
/**
* Returns the values associated with this instance.
*
@@ -256,4 +256,3 @@ public interface TabularData
Collection<?> values();
}
-
diff --git a/javax/management/openmbean/TabularDataSupport.java b/javax/management/openmbean/TabularDataSupport.java
index 8557f5f24..e2da1b42d 100644
--- a/javax/management/openmbean/TabularDataSupport.java
+++ b/javax/management/openmbean/TabularDataSupport.java
@@ -115,7 +115,7 @@ public class TabularDataSupport
tabularType = type;
dataMap = new HashMap<Object,Object>(cap, lf);
}
-
+
/**
* Calculates the index the specified {@link CompositeData} value
* would have, if it was to be added to this {@link TabularData}
@@ -127,7 +127,7 @@ public class TabularDataSupport
* this instance's tabular type. The returned indices are the
* values of the fields in the supplied {@link CompositeData}
* instance that match the names given in the {@link TabularType}.
- *
+ *
* @param val the {@link CompositeData} value whose index should
* be calculated.
* @return the index the value would take on, if it were to be added.
@@ -139,8 +139,8 @@ public class TabularDataSupport
{
if (!(val.getCompositeType().equals(tabularType.getRowType())))
throw new InvalidOpenTypeException("The type of the given value " +
- "does not match the row type " +
- "of this instance.");
+ "does not match the row type " +
+ "of this instance.");
List<String> indexNames = tabularType.getIndexNames();
List<String> matchingIndicies = new ArrayList<String>(indexNames.size());
for (String name : indexNames)
@@ -169,12 +169,12 @@ public class TabularDataSupport
TabularDataSupport clone = null;
try
{
- clone = (TabularDataSupport) super.clone();
- clone.setMap((HashMap<Object,Object>) dataMap.clone());
+ clone = (TabularDataSupport) super.clone();
+ clone.setMap((HashMap<Object,Object>) dataMap.clone());
}
catch (CloneNotSupportedException e)
{
- /* This won't happen as we implement Cloneable */
+ /* This won't happen as we implement Cloneable */
}
return clone;
}
@@ -336,7 +336,7 @@ public class TabularDataSupport
{
if (!(isKeyValid(key)))
throw new InvalidKeyException("The key does not match the " +
- "tabular type of this instance.");
+ "tabular type of this instance.");
return (CompositeData) dataMap.get(key);
}
@@ -369,7 +369,7 @@ public class TabularDataSupport
/**
* Returns true if this {@link TabularData} instance
* contains no {@link CompositeData} values.
- *
+ *
* @return true if the instance is devoid of rows.
*/
public boolean isEmpty()
@@ -391,9 +391,9 @@ public class TabularDataSupport
CompositeType rowType = tabularType.getRowType();
for (int a = 0; it.hasNext(); ++a)
{
- OpenType<?> type = rowType.getType(it.next());
- if (!(type.isValue(key[a])))
- return false;
+ OpenType<?> type = rowType.getType(it.next());
+ if (!(type.isValue(key[a])))
+ return false;
}
return true;
}
@@ -422,7 +422,7 @@ public class TabularDataSupport
* the same index as an existing value. The index is
* calculated using the index names of the
* {@link TabularType} for this instance.
- *
+ *
* @param val the {@link CompositeData} value to add.
* @throws NullPointerException if <code>val</code> is
* <code>null</code>.
@@ -438,7 +438,7 @@ public class TabularDataSupport
Object[] key = calculateIndex(val);
if (dataMap.containsKey(key))
throw new KeyAlreadyExistsException("A value with this index " +
- "already exists.");
+ "already exists.");
dataMap.put(key, val);
}
@@ -476,7 +476,7 @@ public class TabularDataSupport
* value can not be added, then none of the values should
* be. If the array is <code>null</code> or empty, the
* method simply returns.
- *
+ *
* @param vals the {@link CompositeData} values to add.
* @throws NullPointerException if a value from the array is
* <code>null</code>.
@@ -496,12 +496,12 @@ public class TabularDataSupport
Map<Object,Object> mapToAdd = new HashMap<Object,Object>(vals.length);
for (int a = 0; a < vals.length; ++a)
{
- Object[] key = calculateIndex(vals[a]);
- if (dataMap.containsKey(key))
- throw new KeyAlreadyExistsException("Element " + a + ": A " +
- "value with this index " +
- "already exists.");
- mapToAdd.put(key, vals[a]);
+ Object[] key = calculateIndex(vals[a]);
+ if (dataMap.containsKey(key))
+ throw new KeyAlreadyExistsException("Element " + a + ": A " +
+ "value with this index " +
+ "already exists.");
+ mapToAdd.put(key, vals[a]);
}
dataMap.putAll(mapToAdd);
}
@@ -541,7 +541,7 @@ public class TabularDataSupport
Iterator<?> it = vals.iterator();
for (int a = 0; it.hasNext(); ++a)
{
- data[a] = (CompositeData) it.next();
+ data[a] = (CompositeData) it.next();
}
putAll(data);
}
@@ -583,7 +583,7 @@ public class TabularDataSupport
{
if (!(isKeyValid(key)))
throw new InvalidKeyException("The key does not match the " +
- "tabular type of this instance.");
+ "tabular type of this instance.");
return (CompositeData) dataMap.remove(key);
}
@@ -622,11 +622,11 @@ public class TabularDataSupport
public String toString()
{
return getClass().getName()
- + "[tabularType=" + tabularType
+ + "[tabularType=" + tabularType
+ ",dataMap=" + dataMap
+ "]";
}
-
+
/**
* Returns a collection (or bag) view of the values in this Map. The
* collection is backed by the map, so that changes in one show up in
@@ -646,4 +646,3 @@ public class TabularDataSupport
}
}
-
diff --git a/javax/management/openmbean/TabularType.java b/javax/management/openmbean/TabularType.java
index 5a861d061..5ea220701 100644
--- a/javax/management/openmbean/TabularType.java
+++ b/javax/management/openmbean/TabularType.java
@@ -45,7 +45,7 @@ import java.util.List;
/**
* The open type descriptor for instances of the
* {@link TabularData} class.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -92,7 +92,7 @@ public class TabularType
* The result of <code>TabularData.class.getName()</code> is adopted
* as the class name (see {@link OpenType}). The ordering of the array
* elements is relevant in determining the indicies of the values in the
- * table, and thus in the use of the
+ * table, and thus in the use of the
* {@link TabularData#get(java.lang.Object[])} and
* {@link TabularData#remove(java.lang.Object[])} methods of the
* {@link TabularData} class.
@@ -108,7 +108,7 @@ public class TabularType
* name in the given row type.
*/
public TabularType(String name, String desc, CompositeType rowType,
- String[] indexNames)
+ String[] indexNames)
throws OpenDataException
{
super(TabularData.class.getName(), name, desc);
@@ -116,16 +116,16 @@ public class TabularType
throw new IllegalArgumentException("A null row type was given.");
for (int a = 0; a < indexNames.length; ++a)
{
- if (indexNames[a] == null)
- throw new IllegalArgumentException("Name " + a +
- " is null.");
- if (indexNames[a].length() == 0)
- throw new IllegalArgumentException("Name " + a +
- " is the empty string.");
- if (!(rowType.containsKey(indexNames[a])))
- throw new OpenDataException("No matching key for " +
- indexNames[a] + " was found in " +
- "the supplied row type.");
+ if (indexNames[a] == null)
+ throw new IllegalArgumentException("Name " + a +
+ " is null.");
+ if (indexNames[a].length() == 0)
+ throw new IllegalArgumentException("Name " + a +
+ " is the empty string.");
+ if (!(rowType.containsKey(indexNames[a])))
+ throw new OpenDataException("No matching key for " +
+ indexNames[a] + " was found in " +
+ "the supplied row type.");
}
this.rowType = rowType;
this.indexNames = Collections.unmodifiableList(Arrays.asList(indexNames));
@@ -144,7 +144,7 @@ public class TabularType
* <li>The row types are equal.</li>
* <li>The index names are equal and in the same order.</li>
* </ul>
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -154,8 +154,8 @@ public class TabularType
return false;
TabularType ttype = (TabularType) obj;
return (ttype.getTypeName().equals(getTypeName())
- && (ttype.getRowType().equals(getRowType()))
- && (ttype.getIndexNames().equals(getIndexNames())));
+ && (ttype.getRowType().equals(getRowType()))
+ && (ttype.getIndexNames().equals(getIndexNames())));
}
/**
@@ -205,16 +205,16 @@ public class TabularType
{
if (hashCode == null)
{
- int elementTotal = 0;
- for (String s : indexNames)
- elementTotal += s.hashCode();
- hashCode = Integer.valueOf(elementTotal
- + getTypeName().hashCode()
- + rowType.hashCode());
+ int elementTotal = 0;
+ for (String s : indexNames)
+ elementTotal += s.hashCode();
+ hashCode = Integer.valueOf(elementTotal
+ + getTypeName().hashCode()
+ + rowType.hashCode());
}
return hashCode.intValue();
}
-
+
/**
* Returns true if the specified object is a member of this
* tabular type. The object is judged to be so if it is
@@ -229,8 +229,8 @@ public class TabularType
{
if (obj instanceof TabularData)
{
- TabularData data = (TabularData) obj;
- return equals(data.getTabularType());
+ TabularData data = (TabularData) obj;
+ return equals(data.getTabularType());
}
return false;
}
@@ -258,10 +258,10 @@ public class TabularType
{
if (string == null)
string = getClass().getName()
- + "[name=" + getTypeName()
- + ", rowType=" + rowType
- + ", indexNames=" + indexNames
- + "]";
+ + "[name=" + getTypeName()
+ + ", rowType=" + rowType
+ + ", indexNames=" + indexNames
+ + "]";
return string;
}
diff --git a/javax/management/remote/NotificationResult.java b/javax/management/remote/NotificationResult.java
index c0b2d9ba1..09945f06e 100644
--- a/javax/management/remote/NotificationResult.java
+++ b/javax/management/remote/NotificationResult.java
@@ -101,14 +101,14 @@ public class NotificationResult
* <code>null</code>.
*/
public NotificationResult(long startSeqNumber, long nextSeqNumber,
- TargetedNotification[] notifications)
+ TargetedNotification[] notifications)
{
if (startSeqNumber < 0)
throw new IllegalArgumentException("Starting sequence number is " +
- "less than 0.");
+ "less than 0.");
if (nextSeqNumber < 0)
throw new IllegalArgumentException("Next sequence number is " +
- "less than 0.");
+ "less than 0.");
if (notifications == null)
throw new IllegalArgumentException("The array of notifications is null.");
earliestSequenceNumber = startSeqNumber;
@@ -158,7 +158,7 @@ public class NotificationResult
{
return getClass().getName() +
"[earliestSequenceNumber=" + earliestSequenceNumber +
- ",nextSequenceNumber=" + nextSequenceNumber +
+ ",nextSequenceNumber=" + nextSequenceNumber +
",targetedNotifications=" + targetedNotifications +
"]";
}
diff --git a/javax/management/remote/TargetedNotification.java b/javax/management/remote/TargetedNotification.java
index c383c9184..07246189f 100644
--- a/javax/management/remote/TargetedNotification.java
+++ b/javax/management/remote/TargetedNotification.java
@@ -124,4 +124,3 @@ public class TargetedNotification
}
}
-
diff --git a/javax/management/remote/rmi/RMIConnection.java b/javax/management/remote/rmi/RMIConnection.java
index 430f1c7dc..434051d58 100644
--- a/javax/management/remote/rmi/RMIConnection.java
+++ b/javax/management/remote/rmi/RMIConnection.java
@@ -154,8 +154,8 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
void addNotificationListener(ObjectName name, ObjectName listener,
- MarshalledObject filter, MarshalledObject passback,
- Subject delegationSubject)
+ MarshalledObject filter, MarshalledObject passback,
+ Subject delegationSubject)
throws InstanceNotFoundException, IOException;
/**
@@ -226,7 +226,7 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Integer[] addNotificationListeners(ObjectName[] names, MarshalledObject[] filters,
- Subject[] delegationSubjects)
+ Subject[] delegationSubjects)
throws InstanceNotFoundException, IOException;
/**
@@ -254,7 +254,7 @@ public interface RMIConnection
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -262,7 +262,7 @@ public interface RMIConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with. This may
@@ -297,14 +297,14 @@ public interface RMIConnection
* not have permission to invoke this operation.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
@SuppressWarnings("unchecked")
ObjectInstance createMBean(String className, ObjectName name,
- MarshalledObject params, String[] sig,
- Subject delegationSubject)
+ MarshalledObject params, String[] sig,
+ Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
* <p>
@@ -320,7 +320,7 @@ public interface RMIConnection
* under the supplied name. The class is loaded using the
* given class loader. If this argument is <code>null</code>,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -328,7 +328,7 @@ public interface RMIConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
* </p>
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with. This may
@@ -369,12 +369,12 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, MarshalledObject params,
- String[] sig, Subject delegationSubject)
+ ObjectName loaderName, MarshalledObject params,
+ String[] sig, Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
* <p>
@@ -394,7 +394,7 @@ public interface RMIConnection
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, ObjectName, Object[], String)
* <code>createMBean(className, name, loaderName, (Object[]) null,
* (String) null)</code>} with <code>null</code> parameters
@@ -434,12 +434,12 @@ public interface RMIConnection
* @see #createMBean(String, ObjectName, ObjectName, MarshalledObject,
* String[], Subject)
*/
- ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Subject delegationSubject)
+ ObjectInstance createMBean(String className, ObjectName name,
+ ObjectName loaderName, Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
* <p>
@@ -449,7 +449,7 @@ public interface RMIConnection
* using the default constructor and registering it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
* </p>
* <p>
* If the name supplied is <code>null</code>, then the bean is
@@ -458,7 +458,7 @@ public interface RMIConnection
* of this interface will be used to obtain the name in this case.
* </p>
* <p>
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* <code>createMBean(className, name, (Object[]) null,
* (String[]) null)</code>} with <code>null</code> parameters
@@ -495,10 +495,10 @@ public interface RMIConnection
* @see #createMBean(String, ObjectName, MarshalledObject, String[], Subject)
*/
ObjectInstance createMBean(String className, ObjectName name,
- Subject delegationSubject)
+ Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
* <p>
@@ -552,8 +552,8 @@ public interface RMIConnection
* @throws IOException if an I/O error occurs.
*/
NotificationResult fetchNotifications(long sequenceNumber,
- int maxNotifications,
- long timeout)
+ int maxNotifications,
+ long timeout)
throws IOException;
/**
@@ -587,8 +587,8 @@ public interface RMIConnection
*/
Object getAttribute(ObjectName bean, String name, Subject delegationSubject)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException,
- IOException;
+ InstanceNotFoundException, ReflectionException,
+ IOException;
/**
* Handles {@link
@@ -616,13 +616,13 @@ public interface RMIConnection
* @see DynamicMBean#getAttributes(String[])
*/
AttributeList getAttributes(ObjectName bean, String[] names,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Returns the unique identifier for this connection to the RMI
- * server.
+ * server.
*
* @return the connection ID.
* @throws IOException if an I/O error occurred.
@@ -707,7 +707,7 @@ public interface RMIConnection
*/
MBeanInfo getMBeanInfo(ObjectName name, Subject delegationSubject)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* Handles {@link
@@ -769,9 +769,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Object invoke(ObjectName bean, String name, MarshalledObject params,
- String[] sig, Subject delegationSubject)
+ String[] sig, Subject delegationSubject)
throws InstanceNotFoundException, MBeanException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* <p>
@@ -790,7 +790,7 @@ public interface RMIConnection
* <li>Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.</li>
* </ul>
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if <code>name</code> is
* an instance of.
@@ -807,7 +807,7 @@ public interface RMIConnection
* the bean server.
*/
boolean isInstanceOf(ObjectName name, String className,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, IOException;
/**
@@ -852,7 +852,7 @@ public interface RMIConnection
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -873,9 +873,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Set<ObjectInstance> queryMBeans(ObjectName name, MarshalledObject query,
- Subject delegationSubject)
+ Subject delegationSubject)
throws IOException;
-
+
/**
* <p>
* Handles {@link
@@ -896,7 +896,7 @@ public interface RMIConnection
* <p>
* If both the object name and the query expression are <code>null</code>,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
* </p>
*
* @param name an {@link ObjectName} to use as a filter.
@@ -916,7 +916,7 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Set<ObjectName> queryNames(ObjectName name, MarshalledObject query,
- Subject delegationSubject)
+ Subject delegationSubject)
throws IOException;
/**
@@ -962,12 +962,12 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- MarshalledObject filter,
- MarshalledObject passback,
- Subject delegationSubject)
+ ObjectName listener,
+ MarshalledObject filter,
+ MarshalledObject passback,
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -998,9 +998,9 @@ public interface RMIConnection
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name, ObjectName listener,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes one or more {@link NotificationListener}s from the specified
@@ -1014,7 +1014,7 @@ public interface RMIConnection
* identifiers provided by the
* {@link #addNotificationListeners(ObjectName[], MarshalledObject[],
* Subject)} method to select the listeners to remove.
- *
+ *
* @param name the name of the management bean from which the
* listeners should be removed.
* @param listenerIds the identifiers of the listeners to remove.
@@ -1036,9 +1036,9 @@ public interface RMIConnection
* @see #addNotificationListeners(ObjectName[], MarshalledObject[], Subject)
*/
void removeNotificationListeners(ObjectName name, Integer[] listenerIds,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -1082,10 +1082,10 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
void setAttribute(ObjectName name, MarshalledObject attribute,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException, IOException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException, IOException;
/**
* Handles {@link
@@ -1123,9 +1123,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
AttributeList setAttributes(ObjectName name, MarshalledObject attributes,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -1153,9 +1153,9 @@ public interface RMIConnection
* not have permission to invoke this operation.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
void unregisterMBean(ObjectName name, Subject delegationSubject)
throws InstanceNotFoundException, MBeanRegistrationException,
- IOException;
+ IOException;
}
diff --git a/javax/naming/AuthenticationException.java b/javax/naming/AuthenticationException.java
index 1a6ade930..36310d3ad 100644
--- a/javax/naming/AuthenticationException.java
+++ b/javax/naming/AuthenticationException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class AuthenticationException extends NamingSecurityException
{
private static final long serialVersionUID = 3678497619904568096L;
diff --git a/javax/naming/AuthenticationNotSupportedException.java b/javax/naming/AuthenticationNotSupportedException.java
index a1e811b44..9ebda40bb 100644
--- a/javax/naming/AuthenticationNotSupportedException.java
+++ b/javax/naming/AuthenticationNotSupportedException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class AuthenticationNotSupportedException
extends NamingSecurityException
{
diff --git a/javax/naming/BinaryRefAddr.java b/javax/naming/BinaryRefAddr.java
index 923c48e23..373802a8c 100644
--- a/javax/naming/BinaryRefAddr.java
+++ b/javax/naming/BinaryRefAddr.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -53,7 +53,7 @@ import java.util.Arrays;
public class BinaryRefAddr extends RefAddr
{
static final long serialVersionUID = -3415254970957330361L;
-
+
/**
* The possibly null content of this RefAddr.
* Set by the constructor and returned by getContent.
@@ -109,7 +109,7 @@ public class BinaryRefAddr extends RefAddr
{
byte[] c1 = (byte[]) this.getContent();
byte[] c2 = (byte[]) refAddr.getContent();
- return Arrays.equals(c1, c2);
+ return Arrays.equals(c1, c2);
}
}
return false;
@@ -133,7 +133,7 @@ public class BinaryRefAddr extends RefAddr
}
private static char[] hex = {'0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
/**
* Returns a String representation of the RefAddr. Only the first 32 bytes
* of the content are added as hex encoded characters.
@@ -147,8 +147,8 @@ public class BinaryRefAddr extends RefAddr
byte[] b = (byte[]) getContent();
for (int i=0; i < b.length && i < 32; i++)
{
- sb.append(hex[(b[i]&0xf0)>>4]);
- sb.append(hex[b[i]&0x0f]);
+ sb.append(hex[(b[i]&0xf0)>>4]);
+ sb.append(hex[b[i]&0x0f]);
}
if (b.length > 32)
sb.append("...");
diff --git a/javax/naming/Binding.java b/javax/naming/Binding.java
index a34f8b329..23bb4592e 100644
--- a/javax/naming/Binding.java
+++ b/javax/naming/Binding.java
@@ -39,14 +39,14 @@ exception statement from your version. */
package javax.naming;
/**
- * <code>Binding</code> represents the name-object mapping of a
+ * <code>Binding</code> represents the name-object mapping of a
* binding in a context.
* <p>
* Bindings are mappings of a name to an object and this class is used to
* specify such mappings. The bindings of a context are retrieved by the
* <code>Context#listBindings()</code> methods.
* </p>
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -56,7 +56,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param obj the bound object
@@ -68,9 +68,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name and object and a
+ * Constructs an instance with the given name and object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param obj the bound object
@@ -84,7 +84,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name, classname and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the classname to set (maybe <code>null</code>)
@@ -97,9 +97,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name, classname, object and a
+ * Constructs an instance with the given name, classname, object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the classname to set (maybe <code>null</code>)
@@ -107,7 +107,7 @@ public class Binding extends NameClassPair
* @param obj the bound object
*/
public Binding (String name, String className, Object obj,
- boolean isRelative)
+ boolean isRelative)
{
super (name, className, isRelative);
boundObj = obj;
@@ -119,7 +119,7 @@ public class Binding extends NameClassPair
* Returns the classname if set explicitly. If not and the bound object is
* not <code>null</code> the classname of the bound object is used.
* </p>
- *
+ *
* @return The fully qualified classname (may be <code>null</code>).
*/
public String getClassName ()
@@ -150,7 +150,7 @@ public class Binding extends NameClassPair
/**
* Returns the string representation.
- * @return The string as given by the NameClassPair superclass plus
+ * @return The string as given by the NameClassPair superclass plus
* the bound objects string representation seperated by a colon.
*/
public String toString ()
diff --git a/javax/naming/CannotProceedException.java b/javax/naming/CannotProceedException.java
index bc2085879..26b1d0b0c 100644
--- a/javax/naming/CannotProceedException.java
+++ b/javax/naming/CannotProceedException.java
@@ -35,11 +35,11 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/javax/naming/CommunicationException.java b/javax/naming/CommunicationException.java
index 7b11b5fac..485e5cd1d 100644
--- a/javax/naming/CommunicationException.java
+++ b/javax/naming/CommunicationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class CommunicationException extends NamingException
{
private static final long serialVersionUID = 3618507780299986611L;
diff --git a/javax/naming/CompositeName.java b/javax/naming/CompositeName.java
index 4593bae63..7d4d362bd 100644
--- a/javax/naming/CompositeName.java
+++ b/javax/naming/CompositeName.java
@@ -53,14 +53,14 @@ import java.util.Vector;
* the composite name http://www.gnu.org/software/classpath/index.html spans
* over three namespaces (the protocol http, the web server location
* (www.gnu.org) and the index.html location on the server).
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class CompositeName implements Name, Cloneable, Serializable
{
private static final long serialVersionUID = 1667768148915813118L;
-
- private transient Vector<String> elts;
+
+ private transient Vector<String> elts;
public CompositeName ()
{
@@ -72,8 +72,8 @@ public class CompositeName implements Name, Cloneable, Serializable
elts = new Vector<String> ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -84,49 +84,49 @@ public class CompositeName implements Name, Cloneable, Serializable
{
elts = new Vector<String> ();
// Parse the string into its components.
- final char no_quote = 'x'; // Use 'x' to mean no quoting.
+ final char no_quote = 'x'; // Use 'x' to mean no quoting.
char quote = no_quote;
boolean escaped = false;
StringBuilder new_element = new StringBuilder ();
for (int i = 0; i < n.length (); ++i)
{
- char c = n.charAt (i);
- if (escaped)
- escaped = false;
- else if (c == '\\')
- {
- escaped = true;
- continue;
- }
- else if (quote != no_quote)
- {
- if (quote == c)
- {
- // The quotes must surround a complete component.
- if (i + 1 < n.length () && n.charAt (i + 1) != '/')
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- quote = no_quote;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && (c == '\'' || c == '"'))
- {
- quote = c;
- continue;
- }
- else if (c == '/')
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- continue;
- }
-
- new_element.append (c);
+ char c = n.charAt (i);
+ if (escaped)
+ escaped = false;
+ else if (c == '\\')
+ {
+ escaped = true;
+ continue;
+ }
+ else if (quote != no_quote)
+ {
+ if (quote == c)
+ {
+ // The quotes must surround a complete component.
+ if (i + 1 < n.length () && n.charAt (i + 1) != '/')
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ quote = no_quote;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && (c == '\'' || c == '"'))
+ {
+ quote = c;
+ continue;
+ }
+ else if (c == '/')
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ continue;
+ }
+
+ new_element.append (c);
}
if (new_element.length () != 0)
@@ -156,11 +156,11 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration<String> e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -173,8 +173,8 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration<String> e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -195,10 +195,10 @@ public class CompositeName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = elts.get (i);
- int comp = f.compareTo (cn.elts.get (i));
- if (comp != 0)
- return comp;
+ String f = elts.get (i);
+ int comp = f.compareTo (cn.elts.get (i));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -213,8 +213,8 @@ public class CompositeName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (delta + i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (delta + i)))
+ return false;
}
return true;
}
@@ -288,8 +288,8 @@ public class CompositeName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (i)))
+ return false;
}
return true;
}
@@ -299,33 +299,33 @@ public class CompositeName implements Name, Cloneable, Serializable
CPStringBuilder result = new CPStringBuilder ();
for (int i = 0; i < elts.size (); ++i)
{
- // For simplicity we choose to always quote using escapes and
- // never quotes.
- String elt = elts.get (i);
- if (i > 0
- || (i == elts.size () - 1 && elt.equals ("")))
- result.append ('/');
- for (int k = 0; k < elt.length (); ++k)
- {
- char c = elt.charAt (k);
- // We must quote
- // ... a leading quote,
- if ((k == 0 && (c == '"' || c == '\''))
- // ... an escape preceding a meta character,
- // or at the end of a component,
- || (c == '\\'
- && (k == elt.length () - 1
- || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
- // ... or a component separator.
- || c == '/')
- result.append ('\\');
- result.append (c);
- }
+ // For simplicity we choose to always quote using escapes and
+ // never quotes.
+ String elt = elts.get (i);
+ if (i > 0
+ || (i == elts.size () - 1 && elt.equals ("")))
+ result.append ('/');
+ for (int k = 0; k < elt.length (); ++k)
+ {
+ char c = elt.charAt (k);
+ // We must quote
+ // ... a leading quote,
+ if ((k == 0 && (c == '"' || c == '\''))
+ // ... an escape preceding a meta character,
+ // or at the end of a component,
+ || (c == '\\'
+ && (k == elt.length () - 1
+ || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
+ // ... or a component separator.
+ || c == '/')
+ result.append ('\\');
+ result.append (c);
+ }
}
return result.toString ();
}
-
- private void readObject(ObjectInputStream s)
+
+ private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
int size = s.readInt();
diff --git a/javax/naming/CompoundName.java b/javax/naming/CompoundName.java
index 26b44c16f..d410f6a97 100644
--- a/javax/naming/CompoundName.java
+++ b/javax/naming/CompoundName.java
@@ -52,8 +52,8 @@ import java.util.Vector;
/**
* Represents hierarchical names from the single namespace. For instance,
* the path /home/audriusa/classpath/file.txt is the compound name, using
- * the filesystem namespace.
- *
+ * the filesystem namespace.
+ *
* @author Tom Tromey (tromey@redhat.com)
* @date May 16, 2001
*
@@ -82,8 +82,8 @@ public class CompoundName implements Name, Cloneable, Serializable
initializeSyntax ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -104,79 +104,79 @@ public class CompoundName implements Name, Cloneable, Serializable
String quote = null;
while (i < n.length ())
{
- String special = isSpecial (n, i);
-
- if (special == escape && escape != null)
- {
- if (n.length () == i + special.length ())
- {
- // A trailing escape is treated as itself.
- new_element.append (special);
- i += special.length ();
- }
- else
- {
- String eSpecial = isSpecial (n, i + special.length ());
- if (eSpecial != null)
- {
- // Treat the escape as an escape.
- new_element.append (eSpecial);
- i += special.length () + eSpecial.length ();
- }
- else
- {
- // Treat the escape as itself.
- new_element.append (special);
- i += special.length ();
- }
- continue;
- }
- }
- else if (quote != null)
- {
- // It is safe to use == here.
- if (quote == special)
- {
- // Quotes must surround a complete component.
- if (i + quote.length () < n.length ()
- && ! n.startsWith (separator, i + quote.length ()))
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += quote.length ();
- quote = null;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && special == beginQuote
- && beginQuote != null)
- {
- quote = endQuote;
- i += special.length ();
- continue;
- }
- else if (new_element.length () == 0
- && special == beginQuote2
- && beginQuote2 != null)
- {
- quote = endQuote2;
- i += special.length ();
- continue;
- }
- else if (direction != FLAT && special == separator)
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += special.length ();
- continue;
- }
-
- // Nothing in particular, so try the next character.
- new_element.append (n.charAt (i));
- ++i;
+ String special = isSpecial (n, i);
+
+ if (special == escape && escape != null)
+ {
+ if (n.length () == i + special.length ())
+ {
+ // A trailing escape is treated as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ else
+ {
+ String eSpecial = isSpecial (n, i + special.length ());
+ if (eSpecial != null)
+ {
+ // Treat the escape as an escape.
+ new_element.append (eSpecial);
+ i += special.length () + eSpecial.length ();
+ }
+ else
+ {
+ // Treat the escape as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ continue;
+ }
+ }
+ else if (quote != null)
+ {
+ // It is safe to use == here.
+ if (quote == special)
+ {
+ // Quotes must surround a complete component.
+ if (i + quote.length () < n.length ()
+ && ! n.startsWith (separator, i + quote.length ()))
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += quote.length ();
+ quote = null;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && special == beginQuote
+ && beginQuote != null)
+ {
+ quote = endQuote;
+ i += special.length ();
+ continue;
+ }
+ else if (new_element.length () == 0
+ && special == beginQuote2
+ && beginQuote2 != null)
+ {
+ quote = endQuote2;
+ i += special.length ();
+ continue;
+ }
+ else if (direction != FLAT && special == separator)
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += special.length ();
+ continue;
+ }
+
+ // Nothing in particular, so try the next character.
+ new_element.append (n.charAt (i));
+ ++i;
}
if (new_element.length () != 0)
@@ -184,13 +184,13 @@ public class CompoundName implements Name, Cloneable, Serializable
if (direction == RIGHT_TO_LEFT)
{
- // Reverse the order of the elements.
- int len = elts.size ();
- for (i = 0; i < len / 2; ++i)
- {
- String t = elts.set (i, elts.get (len - i - 1));
- elts.set (len - i - 1, t);
- }
+ // Reverse the order of the elements.
+ int len = elts.size ();
+ for (i = 0; i < len / 2; ++i)
+ {
+ String t = elts.set (i, elts.get (len - i - 1));
+ elts.set (len - i - 1, t);
+ }
}
// Error checking.
@@ -215,11 +215,11 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration<String> e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -232,8 +232,8 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration<String> e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -254,10 +254,10 @@ public class CompoundName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = canonicalize (elts.get (i));
- int comp = f.compareTo (canonicalize (cn.elts.get (i)));
- if (comp != 0)
- return comp;
+ String f = canonicalize (elts.get (i));
+ int comp = f.compareTo (canonicalize (cn.elts.get (i)));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -272,9 +272,9 @@ public class CompoundName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (delta + i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (delta + i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -346,9 +346,9 @@ public class CompoundName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -368,7 +368,7 @@ public class CompoundName implements Name, Cloneable, Serializable
else if (endQuote != null && element.startsWith (endQuote, offset))
special = endQuote;
else if (beginQuote2 != null
- && element.startsWith (beginQuote2, offset))
+ && element.startsWith (beginQuote2, offset))
special = beginQuote2;
else if (endQuote2 != null && element.startsWith (endQuote2, offset))
special = endQuote2;
@@ -382,30 +382,30 @@ public class CompoundName implements Name, Cloneable, Serializable
int size = elts.size ();
for (int i = 0; i < size; ++i)
{
- // Find the appropriate element. FIXME: not clear what FLAT
- // means.
- int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
- String element = elts.get (offset);
- if (i > 0
- || (i == size - 1 && element.equals ("")))
- result.append (separator);
-
- int k = 0;
- while (k < element.length ())
- {
- String special = isSpecial (element, k);
- if (special != null)
- {
- result.append (escape);
- result.append (special);
- k += special.length ();
- }
- else
- {
- result.append (element.charAt (k));
- ++k;
- }
- }
+ // Find the appropriate element. FIXME: not clear what FLAT
+ // means.
+ int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
+ String element = elts.get (offset);
+ if (i > 0
+ || (i == size - 1 && element.equals ("")))
+ result.append (separator);
+
+ int k = 0;
+ while (k < element.length ())
+ {
+ String special = isSpecial (element, k);
+ if (special != null)
+ {
+ result.append (escape);
+ result.append (special);
+ k += special.length ();
+ }
+ else
+ {
+ result.append (element.charAt (k));
+ ++k;
+ }
+ }
}
return result.toString ();
@@ -422,17 +422,17 @@ public class CompoundName implements Name, Cloneable, Serializable
if (trimBlanks)
{
- int first = 0;
- while (first < ret.length ()
- && Character.isWhitespace (ret.charAt (first)))
- ++first;
+ int first = 0;
+ while (first < ret.length ()
+ && Character.isWhitespace (ret.charAt (first)))
+ ++first;
- int last = ret.length () - 1;
- while (last >= first
- && Character.isWhitespace (ret.charAt (last)))
- --last;
+ int last = ret.length () - 1;
+ while (last >= first
+ && Character.isWhitespace (ret.charAt (last)))
+ --last;
- ret = ret.substring (first, last);
+ ret = ret.substring (first, last);
}
return ret;
@@ -451,8 +451,8 @@ public class CompoundName implements Name, Cloneable, Serializable
this.direction = LEFT_TO_RIGHT;
else
{
- // If we don't recognize it, default to flat.
- this.direction = FLAT;
+ // If we don't recognize it, default to flat.
+ this.direction = FLAT;
}
// This is required unless the direction is FLAT. Unfortunately
@@ -461,18 +461,18 @@ public class CompoundName implements Name, Cloneable, Serializable
this.ignoreCase
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.ignorecase",
- "false")).booleanValue ();
+ "false")).booleanValue ();
this.escape = mySyntax.getProperty ("jndi.syntax.escape", null);
this.beginQuote = mySyntax.getProperty ("jndi.syntax.beginquote", null);
this.endQuote = mySyntax.getProperty ("jndi.syntax.endquote",
- this.beginQuote);
+ this.beginQuote);
this.beginQuote2 = mySyntax.getProperty ("jndi.syntax.beginquote2",
- null);
+ null);
this.endQuote2 = mySyntax.getProperty ("jndi.syntax.endquote2",
- this.beginQuote2);
+ this.beginQuote2);
this.trimBlanks
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.trimblanks",
- "false")).booleanValue ();
+ "false")).booleanValue ();
}
private void readObject(ObjectInputStream s)
diff --git a/javax/naming/ConfigurationException.java b/javax/naming/ConfigurationException.java
index 1f4002aa4..eb2fbfeec 100644
--- a/javax/naming/ConfigurationException.java
+++ b/javax/naming/ConfigurationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ConfigurationException extends NamingException
{
private static final long serialVersionUID = - 2535156726228855704L;
diff --git a/javax/naming/Context.java b/javax/naming/Context.java
index 4b87b9e01..35217ffc4 100644
--- a/javax/naming/Context.java
+++ b/javax/naming/Context.java
@@ -127,7 +127,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -143,7 +143,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -159,7 +159,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -169,7 +169,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -179,7 +179,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -193,7 +193,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -209,7 +209,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -224,7 +224,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -237,7 +237,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -249,7 +249,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -265,7 +265,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -279,7 +279,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -292,7 +292,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -305,7 +305,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -315,7 +315,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -329,7 +329,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -344,7 +344,7 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
@@ -355,19 +355,19 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
*/
void destroySubcontext(String name) throws NamingException;
-
+
/**
* Retrieves the named object, not following the link of the terminal atomic
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
@@ -380,18 +380,18 @@ public interface Context
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
* @throws NamingException
*/
Object lookupLink(String name) throws NamingException;
-
+
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
@@ -401,17 +401,17 @@ public interface Context
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
*/
NameParser getNameParser(String name) throws NamingException;
-
+
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -424,7 +424,7 @@ public interface Context
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -433,12 +433,12 @@ public interface Context
* @throws NamingException
*/
String composeName(String name, String prefix) throws NamingException;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal.
- *
+ *
* @param propName the name of the new property
* @param propVal the value of the new property
* @return the previous value of this property or null if the property has not
@@ -447,33 +447,33 @@ public interface Context
*/
Object addToEnvironment(String propName, Object propVal)
throws NamingException;
-
+
/**
* Removes the property with the given name from the environment. Returns
* without action if this property is not defined.
- *
+ *
* @param propName the name of the property being removed.
* @return the value of the property that has been removed or null if the
* property was not defined.
* @throws NamingException
*/
Object removeFromEnvironment(String propName) throws NamingException;
-
+
/**
* Returns the environment, associated with this naming context. The returned
* table should never be modified by the caller. Use {@link #addToEnvironment}
* and {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
Hashtable<?,?> getEnvironment() throws NamingException;
-
+
/**
* Releases all resources, associated with this context. The close() method
* can be called several times, but after it has been once invoked, it is not
* allowed to call any other method of this context,
- *
+ *
* @throws NamingException
*/
void close() throws NamingException;
@@ -482,7 +482,7 @@ public interface Context
* Returs the full name of this naming context. The returned string is not a
* JNDI composite name and should not be passed directly to the methods of the
* naming context.
- *
+ *
* @return the full name of this naming context, in its own namespace.
* @throws OperationNotSupportedException if the naming system, represented by
* this context, does not support the notation of the full name.
diff --git a/javax/naming/ContextNotEmptyException.java b/javax/naming/ContextNotEmptyException.java
index e856341c1..816e70312 100644
--- a/javax/naming/ContextNotEmptyException.java
+++ b/javax/naming/ContextNotEmptyException.java
@@ -41,9 +41,9 @@ package javax.naming;
/**
* This exception is thrown in response to the attempt to destroy the non
* empty context. Only empty contexts (without bindings) can be destroyed.
- *
+ *
* @see Context#destroySubcontext
- */
+ */
public class ContextNotEmptyException extends NamingException
{
private static final long serialVersionUID = 1090963683348219877L;
diff --git a/javax/naming/InitialContext.java b/javax/naming/InitialContext.java
index a5fe5f0cf..c33122adf 100644
--- a/javax/naming/InitialContext.java
+++ b/javax/naming/InitialContext.java
@@ -63,18 +63,18 @@ public class InitialContext implements Context
* this field.
*/
protected Context defaultInitCtx;
-
+
/**
* Indicates if the initial context was obtained by calling
- * {@link NamingManager#getInitialContext}.
+ * {@link NamingManager#getInitialContext}.
*/
protected boolean gotDefault = false;
-
+
/**
* The environment, associated with this initial context.
*/
protected Hashtable<Object,Object> myProps;
-
+
/**
* The list of the properties, to that the second alternative value must
* be appended after the colon to the first possible value. Used in
@@ -87,13 +87,13 @@ public class InitialContext implements Context
colon_list.add(Context.OBJECT_FACTORIES);
colon_list.add(Context.URL_PKG_PREFIXES);
colon_list.add(Context.STATE_FACTORIES);
- }
-
+ }
+
/**
* The properties that are searched in the agreed places in the
* {@link #init(Hashtable)} method.
*/
- static final String[] use_properties =
+ static final String[] use_properties =
{
Context.DNS_URL,
Context.INITIAL_CONTEXT_FACTORY,
@@ -102,11 +102,11 @@ public class InitialContext implements Context
Context.STATE_FACTORIES,
Context.URL_PKG_PREFIXES,
};
-
-
+
+
/**
* Creates the new initial context with the given properties.
- *
+ *
* @param environment the properties, used by the initial context being
* created.
* @throws NamingException
@@ -115,11 +115,11 @@ public class InitialContext implements Context
{
init(environment);
}
-
+
/**
* Creates the initial context with the possibility to delay its
* initialisation.
- *
+ *
* @param lazy specified if the initialization should not be performed by this
* constructor (true). If the valueis false, it works the same way as
* the parameterless constructor.
@@ -130,18 +130,18 @@ public class InitialContext implements Context
if (! lazy)
init(null);
}
-
+
/**
* Creates teh new initial context with no properties. Same as
* InitialContext(null).
- *
+ *
* @throws NamingException
*/
public InitialContext() throws NamingException
{
init(null);
}
-
+
/**
* <p>
* Initialises the context, using the properties, specified in the passed
@@ -160,7 +160,7 @@ public class InitialContext implements Context
* specified by the system property "gnu.classpath.home.url".
* </ul>
* </p>
- *
+ *
* @param environment the table of the properties, may be null. The method
* modifies the table and stores the reference to it. The caller must
* not later reuse this structure for other purposes.
@@ -191,12 +191,12 @@ public class InitialContext implements Context
if (value != null)
pApplet.put(key, value);
}
-
+
value = System.getProperty(key);
if (value != null)
pSystem.put(key, value);
}
-
+
merge(myProps, pSystem);
if (pApplet != null)
merge(myProps, pApplet);
@@ -249,7 +249,7 @@ public class InitialContext implements Context
merge(myProps, p);
}
}
-
+
/**
* Merge the content of the two tables. If the second table contains the key
* that is missing in the first table, this key - value pair is copied to the
@@ -257,16 +257,16 @@ public class InitialContext implements Context
* {@link #colon_list} set also contains this key, the value from the second
* table is appended to the value from the first table after semicolon, and
* the resulted value replaces the value in the first table.
- *
+ *
* @param primary the first table to merge. The merged result is also stored
* in this table.
* @param additional the second table, from where additional values are taken
- */
+ */
static void merge (Hashtable<Object, Object> primary,
Hashtable<Object, Object> additional)
{
Enumeration en = additional.keys();
-
+
while (en.hasMoreElements())
{
String key2 = (String) en.nextElement();
@@ -280,13 +280,13 @@ public class InitialContext implements Context
}
}
}
-
+
/**
* Get the default initial context. If {@link #gotDefault} == false, this
* method obtains the initial context from the naming manager and sets
* gotDefault to true. Otherwise the cached value ({@link #defaultInitCtx} is
* returned.
- *
+ *
* @return the default initial context
* @throws NamingException
*/
@@ -305,7 +305,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -323,7 +323,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -348,19 +348,19 @@ public class InitialContext implements Context
return getDefaultInitCtx();
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (Name name) throws NamingException
{
try
@@ -374,7 +374,7 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (String name) throws NamingException
{
try
@@ -388,147 +388,147 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rebind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
-
+
/** @inheritDoc */
public void rebind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (Name oldName, Name newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (String oldName, String newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<NameClassPair> list (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration<Binding> listBindings (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Name composeName (Name name, Name prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
- /** @inheritDoc */
- public String composeName (String name,
+ /** @inheritDoc */
+ public String composeName (String name,
String prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
-
+
/** @inheritDoc */
- public Object addToEnvironment (String propName,
+ public Object addToEnvironment (String propName,
Object propVal) throws NamingException
{
return myProps.put (propName, propVal);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object removeFromEnvironment (String propName) throws NamingException
{
return myProps.remove (propName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Hashtable<?,?> getEnvironment () throws NamingException
{
return myProps;
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void close () throws NamingException
{
myProps = null;
@@ -537,7 +537,7 @@ public class InitialContext implements Context
/**
* This operation is not supported for the initial naming context.
- *
+ *
* @throws OperationNotSupportedException always, unless the method is
* overridden in the derived class.
*/
diff --git a/javax/naming/InsufficientResourcesException.java b/javax/naming/InsufficientResourcesException.java
index 7a9ebe037..a7bc3a85e 100644
--- a/javax/naming/InsufficientResourcesException.java
+++ b/javax/naming/InsufficientResourcesException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class InsufficientResourcesException extends NamingException
{
private static final long serialVersionUID = 6227672693037844532L;
diff --git a/javax/naming/InterruptedNamingException.java b/javax/naming/InterruptedNamingException.java
index 90d6e5ec0..e42981a6d 100644
--- a/javax/naming/InterruptedNamingException.java
+++ b/javax/naming/InterruptedNamingException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class InterruptedNamingException extends NamingException
{
private static final long serialVersionUID = 6404516648893194728L;
diff --git a/javax/naming/InvalidNameException.java b/javax/naming/InvalidNameException.java
index 286f0455d..e76a152a8 100644
--- a/javax/naming/InvalidNameException.java
+++ b/javax/naming/InvalidNameException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/javax/naming/LimitExceededException.java b/javax/naming/LimitExceededException.java
index 8c005ac2c..64151193f 100644
--- a/javax/naming/LimitExceededException.java
+++ b/javax/naming/LimitExceededException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class LimitExceededException extends NamingException
{
private static final long serialVersionUID = - 776898738660207856L;
diff --git a/javax/naming/LinkException.java b/javax/naming/LinkException.java
index 8f5df8b03..f5c661bbb 100644
--- a/javax/naming/LinkException.java
+++ b/javax/naming/LinkException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/javax/naming/LinkLoopException.java b/javax/naming/LinkLoopException.java
index 0c68e01bf..539294e84 100644
--- a/javax/naming/LinkLoopException.java
+++ b/javax/naming/LinkLoopException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class LinkLoopException extends LinkException
{
private static final long serialVersionUID = - 3119189944325198009L;
diff --git a/javax/naming/MalformedLinkException.java b/javax/naming/MalformedLinkException.java
index db0753ded..e665b34c3 100644
--- a/javax/naming/MalformedLinkException.java
+++ b/javax/naming/MalformedLinkException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class MalformedLinkException extends LinkException
{
private static final long serialVersionUID = - 3066740437737830242L;
diff --git a/javax/naming/Name.java b/javax/naming/Name.java
index 687ebd6fb..3b22ba5ee 100644
--- a/javax/naming/Name.java
+++ b/javax/naming/Name.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -63,7 +63,7 @@ import java.util.Enumeration;
public interface Name extends Cloneable, Serializable, Comparable<Object>
{
// This class is implemented as gnu.javax.naming.ictxImpl.trans.GnuName
-
+
long serialVersionUID = -3617482732056931635L;
/**
@@ -96,7 +96,7 @@ public interface Name extends Cloneable, Serializable, Comparable<Object>
* Returns the components till the given index as a <code>Name</code>.
* The returned <code>Name</code> can be modified without changing the
* original.
- *
+ *
* @param posn the ending position, exclusive
*
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
@@ -109,7 +109,7 @@ public interface Name extends Cloneable, Serializable, Comparable<Object>
* <code>Name</code>.
* The returned <code>Name</code> can be modified without changing the
* original.
- *
+ *
* @param posn the starting position, inclusive. If it is equal to the size
* of the name, the empty name is returned.
*
diff --git a/javax/naming/NameAlreadyBoundException.java b/javax/naming/NameAlreadyBoundException.java
index 5ddd7d8ba..07b92eee4 100644
--- a/javax/naming/NameAlreadyBoundException.java
+++ b/javax/naming/NameAlreadyBoundException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NameAlreadyBoundException extends NamingException
{
private static final long serialVersionUID = - 8491441000356780586L;
diff --git a/javax/naming/NameClassPair.java b/javax/naming/NameClassPair.java
index 7925d45d8..f4f9fda00 100644
--- a/javax/naming/NameClassPair.java
+++ b/javax/naming/NameClassPair.java
@@ -41,14 +41,14 @@ package javax.naming;
import java.io.Serializable;
/**
- * <code>NameClassPair</code> represents the name-classname mapping pair
+ * <code>NameClassPair</code> represents the name-classname mapping pair
* of a binding in a context.
* <p>
* Bindings are mappings of a name to an object and this class is used to
* specify the mapping of the name to the class type of the bound object.
* As classname the fully qualified classname is used.
* </p>
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -58,7 +58,7 @@ public class NameClassPair implements Serializable
/**
* Constructs an instance with the given name and classname.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be <code>null</code>)
* @param className the name of the class. If <code>null</code> the bound
@@ -70,9 +70,9 @@ public class NameClassPair implements Serializable
}
/**
- * Constructs an instance with the given name and classname and a
+ * Constructs an instance with the given name and classname and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding (may not be <code>null</code>)
* @param className the name of the class. If <code>null</code> the bound
* object is also <code>null</code>
@@ -87,7 +87,7 @@ public class NameClassPair implements Serializable
/**
* Returns the classname of the binding.
- * @return The fully qualified classname or <code>null</code> if the
+ * @return The fully qualified classname or <code>null</code> if the
* bound object is null.
*/
public String getClassName ()
@@ -106,7 +106,7 @@ public class NameClassPair implements Serializable
/**
* Checks whether the name is relative to the target context or not.
- * @return <code>true</code> if the name is relative,
+ * @return <code>true</code> if the name is relative,
* <code>false</code> otherwise.
*/
public boolean isRelative ()
@@ -140,43 +140,43 @@ public class NameClassPair implements Serializable
{
this.isRel = r;
}
-
+
/**
- * Sets the full name for this binding. Setting the full name by this
- * method is the only way to initialize full names of bindings if
+ * Sets the full name for this binding. Setting the full name by this
+ * method is the only way to initialize full names of bindings if
* supported by a specific naming system.
- *
- * @param fullName the full name of this binding. If not set or set to
+ *
+ * @param fullName the full name of this binding. If not set or set to
* <code>null</code> the <code>getNameInNamespace()</code> method will
* throw an exception
- *
+ *
* @see #getNameInNamespace()
- *
+ *
* @since 1.5
*/
- public void setNameInNamespace(String fullName)
+ public void setNameInNamespace(String fullName)
{
this.fullName = fullName;
}
-
+
/**
* Returns the full name for this binding. The full name of a binding is
- * defined as the absolute name in its own namespace and is not valid
+ * defined as the absolute name in its own namespace and is not valid
* outside.
- *
+ *
* @return The full name in the bindings namespace.
- * @throws UnsupportedOperationException if no full name is applicable in
+ * @throws UnsupportedOperationException if no full name is applicable in
* the specific naming system.
- *
+ *
* @see Context#getNameInNamespace()
- *
+ *
* @since 1.5
*/
public String getNameInNamespace()
{
if (this.fullName == null)
throw new UnsupportedOperationException();
-
+
return this.fullName;
}
diff --git a/javax/naming/NameNotFoundException.java b/javax/naming/NameNotFoundException.java
index b7c24a629..64e45f36f 100644
--- a/javax/naming/NameNotFoundException.java
+++ b/javax/naming/NameNotFoundException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class NameNotFoundException extends NamingException
{
private static final long serialVersionUID = - 8007156725367842053L;
diff --git a/javax/naming/NameParser.java b/javax/naming/NameParser.java
index 004b40627..c83200308 100644
--- a/javax/naming/NameParser.java
+++ b/javax/naming/NameParser.java
@@ -46,10 +46,10 @@ package javax.naming;
* @see Context#getNameParser(Name)
*/
public interface NameParser
-{
+{
/**
* Parser the string name representation into the {@link Name} representation
- *
+ *
* @param name the string representation of the name
* @return the {@link Name} representation of the name.
* @throws InvalidNameException if the name violates the syntax, expected by
@@ -58,5 +58,3 @@ public interface NameParser
*/
Name parse (String name) throws NamingException;
}
-
-
diff --git a/javax/naming/NamingEnumeration.java b/javax/naming/NamingEnumeration.java
index a7c57706f..cd0963d41 100644
--- a/javax/naming/NamingEnumeration.java
+++ b/javax/naming/NamingEnumeration.java
@@ -35,7 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
import java.util.Enumeration;
@@ -58,16 +58,16 @@ public interface NamingEnumeration<T> extends Enumeration<T>
* Returns the next element in this enumeration. The naming - specific
* exceptions are only throws after returning all still available elements of
* the enumeration.
- *
+ *
* @return the next element of this enumeration
* @throws NamingException
*/
T next() throws NamingException;
-
+
/**
* Checks if there are more unvisited elements in the enumeration, throwing
* exceptions if there are some unvisited, but not available elements.
- *
+ *
* @return true if there are some unvisited elements, false otherwise.
* @throws PartialResultException if the enumeration, returned by the
* {@link Context#list(Name)} or other similar method contains only
@@ -77,13 +77,13 @@ public interface NamingEnumeration<T> extends Enumeration<T>
* @throws NamingException
*/
boolean hasMore() throws NamingException;
-
+
/**
* Immediately frees all resources, owned by this enumeration. If invoked, it
* must be the last method called for that enumeration.
- *
+ *
* @throws NamingException
- */
+ */
void close() throws NamingException;
}
diff --git a/javax/naming/NamingException.java b/javax/naming/NamingException.java
index 7a5c35eb5..28b817210 100644
--- a/javax/naming/NamingException.java
+++ b/javax/naming/NamingException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -199,9 +199,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.addAll(name);
- }
+ {
+ remainingName.addAll(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -216,9 +216,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.add(name);
- }
+ {
+ remainingName.add(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -243,24 +243,24 @@ public class NamingException extends Exception
Throwable cause = getRootCause();
if (cause != null)
{
- sb.append(" caused by ");
- sb.append(cause);
+ sb.append(" caused by ");
+ sb.append(cause);
}
Name remaining = getRemainingName();
if (remaining != null)
{
- sb.append(" [remainingName: ");
- sb.append(remaining);
+ sb.append(" [remainingName: ");
+ sb.append(remaining);
}
Object resolved = getResolvedObj();
if (objectInfo && resolved != null)
{
- if (remainingName == null)
- sb.append(" [");
- else
- sb.append(", ");
- sb.append("resolvedObj: ");
- sb.append(resolved);
+ if (remainingName == null)
+ sb.append(" [");
+ else
+ sb.append(", ");
+ sb.append("resolvedObj: ");
+ sb.append(resolved);
}
if ((remaining != null) || (objectInfo && resolved != null))
sb.append(']');
@@ -314,4 +314,3 @@ public class NamingException extends Exception
super.printStackTrace(pw);
}
}
-
diff --git a/javax/naming/NamingSecurityException.java b/javax/naming/NamingSecurityException.java
index ae7f5edf6..34ad6dfa4 100644
--- a/javax/naming/NamingSecurityException.java
+++ b/javax/naming/NamingSecurityException.java
@@ -38,11 +38,11 @@ exception statement from your version. */
package javax.naming;
-
+
public abstract class NamingSecurityException extends NamingException
{
private static final long serialVersionUID = 5855287647294685775L;
-
+
public NamingSecurityException ()
{
super ();
diff --git a/javax/naming/NoInitialContextException.java b/javax/naming/NoInitialContextException.java
index 5e4f6df0e..a51f56766 100644
--- a/javax/naming/NoInitialContextException.java
+++ b/javax/naming/NoInitialContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoInitialContextException extends NamingException
{
private static final long serialVersionUID = - 3413733186901258623L;
diff --git a/javax/naming/NoPermissionException.java b/javax/naming/NoPermissionException.java
index 02764a991..7934e0906 100644
--- a/javax/naming/NoPermissionException.java
+++ b/javax/naming/NoPermissionException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoPermissionException extends NamingSecurityException
{
private static final long serialVersionUID = 8395332708699751775L;
diff --git a/javax/naming/NotContextException.java b/javax/naming/NotContextException.java
index a27f10f18..a543a38e3 100644
--- a/javax/naming/NotContextException.java
+++ b/javax/naming/NotContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NotContextException extends NamingException
{
private static final long serialVersionUID = 849752551644540417L;
diff --git a/javax/naming/PartialResultException.java b/javax/naming/PartialResultException.java
index 28f0467fe..dd2813b4b 100644
--- a/javax/naming/PartialResultException.java
+++ b/javax/naming/PartialResultException.java
@@ -42,7 +42,7 @@ package javax.naming;
* Thrown from the {@link javax.naming.NamingEnumeration}, this exception
* indicates that the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class PartialResultException extends NamingException
{
private static final long serialVersionUID = 2572144970049426786L;
diff --git a/javax/naming/RefAddr.java b/javax/naming/RefAddr.java
index f345c8829..6e4de1cfc 100644
--- a/javax/naming/RefAddr.java
+++ b/javax/naming/RefAddr.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -71,12 +71,12 @@ public abstract class RefAddr implements Serializable
*/
protected RefAddr(String addrType)
{
- if (addrType == null)
- throw new NullPointerException("addrType cannot be null");
-
+ if (addrType == null)
+ throw new NullPointerException("addrType cannot be null");
+
this.addrType = addrType;
}
-
+
/**
* Returns the non-null address type given to the constructor.
*/
@@ -84,13 +84,13 @@ public abstract class RefAddr implements Serializable
{
return addrType;
}
-
+
/**
* Returns the possibly null content of this RefAddr.
* The actual value is defined by the non-abstract subclass.
*/
public abstract Object getContent();
-
+
/**
* Checks if the object is a RefAddr with the same type and content.
*
@@ -107,10 +107,10 @@ public abstract class RefAddr implements Serializable
{
Object c1 = this.getContent();
Object c2 = refAddr.getContent();
- if (c1 == null)
- return c2 == null;
- else
- return c1.equals(c2);
+ if (c1 == null)
+ return c2 == null;
+ else
+ return c1.equals(c2);
}
}
return false;
diff --git a/javax/naming/Reference.java b/javax/naming/Reference.java
index fedbf589b..6a2626da0 100644
--- a/javax/naming/Reference.java
+++ b/javax/naming/Reference.java
@@ -45,37 +45,37 @@ import java.util.Vector;
/**
* This class represents a reference to an object that is located outside of the
* naming/directory system.
- *
+ *
* @see Referenceable
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class Reference implements Cloneable, Serializable
{
private static final long serialVersionUID = - 1673475790065791735L;
-
+
/**
- * The list of addresses, stored in this reference. The object may be
+ * The list of addresses, stored in this reference. The object may be
* have by several different addresses.
*/
protected Vector<RefAddr> addrs;
-
+
/**
* The name of the class factory to create an instance of the object,
* referenced by this reference.
*/
protected String classFactory;
-
+
/**
* The location, from where the class factory should be loaded.
*/
protected String classFactoryLocation;
-
+
/**
* The name of the class of the object, to that this reference refers.
*/
protected String className;
-
+
/**
* Create a new reference that is referencting to the object of the
* specified class.
@@ -85,7 +85,7 @@ public class Reference implements Cloneable, Serializable
this.className = className;
addrs = new Vector<RefAddr> ();
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class with the given address.
@@ -96,17 +96,17 @@ public class Reference implements Cloneable, Serializable
addrs = new Vector<RefAddr> ();
addrs.add (addr);
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects.
- *
+ *
* @param className the object class name
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
- public Reference (String className, String factoryClassName,
+ public Reference (String className, String factoryClassName,
String factoryLocation)
{
this.className = className;
@@ -119,14 +119,14 @@ public class Reference implements Cloneable, Serializable
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects and also the address of this object.
- *
+ *
* @param className the object class name
* @param addr the address of the object
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
public Reference (String className, RefAddr addr,
- String factoryClassName, String factoryLocation)
+ String factoryClassName, String factoryLocation)
{
this.className = className;
this.classFactory = factoryClassName;
@@ -136,14 +136,14 @@ public class Reference implements Cloneable, Serializable
}
/**
- * Add the new address for this object at the given position of the
+ * Add the new address for this object at the given position of the
* address list.
*/
public void add (int posn, RefAddr addr)
{
addrs.add (posn, addr);
}
-
+
/**
* Appends the new object address to the end of the address list.
*/
@@ -151,7 +151,7 @@ public class Reference implements Cloneable, Serializable
{
addrs.add (addr);
}
-
+
/**
* Removes all defined addresses of the object.
*/
@@ -163,7 +163,7 @@ public class Reference implements Cloneable, Serializable
public Object clone ()
{
Reference r = new Reference (className, classFactory,
- classFactoryLocation);
+ classFactoryLocation);
r.addrs = (Vector<RefAddr>) addrs.clone ();
return r;
}
@@ -173,7 +173,7 @@ public class Reference implements Cloneable, Serializable
{
return (a == null) ? (b == null) : a.equals (b);
}
-
+
/**
* Compares two addresses for equality, by value.
*/
@@ -183,11 +183,11 @@ public class Reference implements Cloneable, Serializable
return false;
Reference r = (Reference) obj;
return (equals (classFactory, r.classFactory)
- && equals (classFactoryLocation, r.classFactoryLocation)
- && equals (className, r.className)
- && addrs.equals (r.addrs));
+ && equals (classFactoryLocation, r.classFactoryLocation)
+ && equals (className, r.className)
+ && addrs.equals (r.addrs));
}
-
+
/**
* Get the address of this object at the given position.
*/
@@ -195,12 +195,12 @@ public class Reference implements Cloneable, Serializable
{
return addrs.get (posn);
}
-
+
/**
* Get the given type of address for this object.
- *
+ *
* @param addrType the needed type of address
- *
+ *
* @return the address of this object, having the specified type. If there
* is no address of such type, null is returned.
*/
@@ -208,13 +208,13 @@ public class Reference implements Cloneable, Serializable
{
for (int i = 0; i < addrs.size (); ++i)
{
- RefAddr r = addrs.get (i);
- if (addrType.equals (r.getType ()))
- return r;
+ RefAddr r = addrs.get (i);
+ if (addrType.equals (r.getType ()))
+ return r;
}
return null;
}
-
+
/**
* Get the enumeration over all defined addresses of the object.
*/
@@ -222,20 +222,20 @@ public class Reference implements Cloneable, Serializable
{
return addrs.elements ();
}
-
+
/**
* Get the name of the class of the referenced object.
- *
+ *
* @see #className
*/
public String getClassName ()
{
return className;
}
-
+
/**
* Get the location of the factory class of the referenced object.
- *
+ *
* @see #classFactoryLocation
*/
public String getFactoryClassLocation ()
@@ -245,18 +245,18 @@ public class Reference implements Cloneable, Serializable
/**
* Get the name of the factory class of the referenced object
- *
+ *
* @see #classFactory
*/
public String getFactoryClassName ()
{
return classFactory;
}
-
+
/**
- * Get the hashcode of this reference.
- *
- * @return the sum of the hash codes of the addresses.
+ * Get the hashcode of this reference.
+ *
+ * @return the sum of the hash codes of the addresses.
*/
public int hashCode ()
{
@@ -267,19 +267,19 @@ public class Reference implements Cloneable, Serializable
h += addrs.get (i).hashCode ();
return h;
}
-
+
/**
* Remove the address at the given position.
- *
+ *
* @param posn the position of the address to remove
- *
+ *
* @return the removed address
*/
public Object remove (int posn)
{
return addrs.remove (posn);
}
-
+
/**
* Return the number of the defined addresses.
*/
@@ -287,7 +287,7 @@ public class Reference implements Cloneable, Serializable
{
return addrs.size ();
}
-
+
/**
* Return the string representation.
*/
@@ -296,9 +296,9 @@ public class Reference implements Cloneable, Serializable
String x = getClass ().toString () + "[";
for (int i = 0; i < addrs.size (); ++i)
{
- if (i > 0)
- x += ",";
- x += addrs.get (i).toString ();
+ if (i > 0)
+ x += ",";
+ x += addrs.get (i).toString ();
}
return x + "]";
}
diff --git a/javax/naming/Referenceable.java b/javax/naming/Referenceable.java
index 21c5238bc..ed8e4d444 100644
--- a/javax/naming/Referenceable.java
+++ b/javax/naming/Referenceable.java
@@ -46,9 +46,9 @@ public interface Referenceable
{
/**
* Get the reference about this object.
- *
+ *
* @return the reference about this object, cannot be null.
- *
+ *
* @throws NamingException if the naming exception has been raised while
* retrieving the reference.
*/
diff --git a/javax/naming/ReferralException.java b/javax/naming/ReferralException.java
index c264d637f..b596af02e 100644
--- a/javax/naming/ReferralException.java
+++ b/javax/naming/ReferralException.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
@@ -48,7 +48,7 @@ import java.util.Hashtable;
public abstract class ReferralException extends NamingException
{
private static final long serialVersionUID = -2881363844695698876L;
-
+
protected ReferralException ()
{
super ();
diff --git a/javax/naming/ServiceUnavailableException.java b/javax/naming/ServiceUnavailableException.java
index ddb154f9e..6a07bc613 100644
--- a/javax/naming/ServiceUnavailableException.java
+++ b/javax/naming/ServiceUnavailableException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ServiceUnavailableException extends NamingException
{
private static final long serialVersionUID = - 4996964726566773444L;
diff --git a/javax/naming/SizeLimitExceededException.java b/javax/naming/SizeLimitExceededException.java
index caffa70c3..8f0523fa4 100644
--- a/javax/naming/SizeLimitExceededException.java
+++ b/javax/naming/SizeLimitExceededException.java
@@ -43,7 +43,7 @@ package javax.naming;
* indicates that there are more elements than the previously specified
* size limit. Hence the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class SizeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = 7129289564879168579L;
diff --git a/javax/naming/StringRefAddr.java b/javax/naming/StringRefAddr.java
index f40da8fd8..02f072ecf 100644
--- a/javax/naming/StringRefAddr.java
+++ b/javax/naming/StringRefAddr.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/javax/naming/TimeLimitExceededException.java b/javax/naming/TimeLimitExceededException.java
index e3456f5bb..95188d259 100644
--- a/javax/naming/TimeLimitExceededException.java
+++ b/javax/naming/TimeLimitExceededException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class TimeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = - 3597009011385034696L;
diff --git a/javax/naming/directory/AttributeInUseException.java b/javax/naming/directory/AttributeInUseException.java
index 9be25c9a9..08f337c5c 100644
--- a/javax/naming/directory/AttributeInUseException.java
+++ b/javax/naming/directory/AttributeInUseException.java
@@ -35,7 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming.directory;
import javax.naming.NamingException;
diff --git a/javax/naming/directory/Attributes.java b/javax/naming/directory/Attributes.java
index 2dc2c6101..50df17c2d 100644
--- a/javax/naming/directory/Attributes.java
+++ b/javax/naming/directory/Attributes.java
@@ -59,4 +59,3 @@ public interface Attributes extends Cloneable, Serializable
Attribute remove(String attrID);
Object clone();
}
-
diff --git a/javax/naming/directory/BasicAttribute.java b/javax/naming/directory/BasicAttribute.java
index 2715c9672..65b44169e 100644
--- a/javax/naming/directory/BasicAttribute.java
+++ b/javax/naming/directory/BasicAttribute.java
@@ -56,7 +56,7 @@ import javax.naming.OperationNotSupportedException;
public class BasicAttribute implements Attribute
{
private static final long serialVersionUID = 6743528196119291326L;
-
+
/** The ID of this attribute. */
protected String attrID;
/** True if this attribute's values are ordered. */
@@ -126,8 +126,8 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- return true;
+ if (equals (val, values.get (i)))
+ return true;
}
return false;
@@ -140,29 +140,29 @@ public class BasicAttribute implements Attribute
BasicAttribute b = (BasicAttribute) obj;
if (ordered != b.ordered
- || ! attrID.equals (b.attrID)
- || values.size () != b.values.size ())
+ || ! attrID.equals (b.attrID)
+ || values.size () != b.values.size ())
return false;
for (int i = 0; i < values.size (); ++i)
{
- boolean ok = false;
- if (ordered)
- ok = equals (values.get (i), b.values.get (i));
- else
- {
- for (int j = 0; j < b.values.size (); ++j)
- {
- if (equals (values.get (i), b.values.get (j)))
- {
- ok = true;
- break;
- }
- }
- }
-
- if (! ok)
- return false;
+ boolean ok = false;
+ if (ordered)
+ ok = equals (values.get (i), b.values.get (i));
+ else
+ {
+ for (int j = 0; j < b.values.size (); ++j)
+ {
+ if (equals (values.get (i), b.values.get (j)))
+ {
+ ok = true;
+ break;
+ }
+ }
+ }
+
+ if (! ok)
+ return false;
}
return true;
@@ -210,19 +210,19 @@ public class BasicAttribute implements Attribute
int val = attrID.hashCode ();
for (int i = 0; i < values.size (); ++i)
{
- Object o = values.get (i);
- if (o == null)
- {
- // Nothing.
- }
- else if (o instanceof Object[])
- {
- Object[] a = (Object[]) o;
- for (int j = 0; j < a.length; ++j)
- val += a[j].hashCode ();
- }
- else
- val += o.hashCode ();
+ Object o = values.get (i);
+ if (o == null)
+ {
+ // Nothing.
+ }
+ else if (o instanceof Object[])
+ {
+ Object[] a = (Object[]) o;
+ for (int j = 0; j < a.length; ++j)
+ val += a[j].hashCode ();
+ }
+ else
+ val += o.hashCode ();
}
return val;
@@ -242,11 +242,11 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- {
- values.remove (i);
- return true;
- }
+ if (equals (val, values.get (i)))
+ {
+ values.remove (i);
+ return true;
+ }
}
return false;
@@ -281,27 +281,27 @@ public class BasicAttribute implements Attribute
if (one instanceof Object[])
{
- if (! (two instanceof Object[]))
- return false;
+ if (! (two instanceof Object[]))
+ return false;
- Object[] aone = (Object[]) one;
- Object[] atwo = (Object[]) two;
+ Object[] aone = (Object[]) one;
+ Object[] atwo = (Object[]) two;
- if (aone.length != atwo.length)
- return false;
+ if (aone.length != atwo.length)
+ return false;
- for (int i = 0; i < aone.length; ++i)
- {
- if (! aone[i].equals (atwo[i]))
- return false;
- }
+ for (int i = 0; i < aone.length; ++i)
+ {
+ if (! aone[i].equals (atwo[i]))
+ return false;
+ }
- return true;
+ return true;
}
return one.equals (two);
}
-
+
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
@@ -317,9 +317,9 @@ public class BasicAttribute implements Attribute
s.defaultWriteObject();
s.writeInt(values.size());
for (int i=0; i < values.size(); i++)
- s.writeObject(values.get(i));
+ s.writeObject(values.get(i));
}
-
+
// Used when enumerating this attribute.
private class BasicAttributeEnumeration implements NamingEnumeration
{
@@ -351,7 +351,7 @@ public class BasicAttribute implements Attribute
public Object nextElement () throws NoSuchElementException
{
if (where == values.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
return values.get (where++);
}
}
diff --git a/javax/naming/directory/BasicAttributes.java b/javax/naming/directory/BasicAttributes.java
index 54b1f197b..8b607a8cc 100644
--- a/javax/naming/directory/BasicAttributes.java
+++ b/javax/naming/directory/BasicAttributes.java
@@ -54,7 +54,7 @@ import javax.naming.NamingException;
public class BasicAttributes implements Attributes
{
private static final long serialVersionUID = 4980164073184639448L;
-
+
public BasicAttributes ()
{
this (false);
@@ -98,16 +98,16 @@ public class BasicAttributes implements Attributes
Attributes bs = (Attributes) obj;
if (ignoreCase != bs.isCaseIgnored()
- || attributes.size () != bs.size ())
+ || attributes.size () != bs.size ())
return false;
NamingEnumeration bas = bs.getAll();
while (bas.hasMoreElements())
{
- Attribute a = (Attribute) bas.nextElement();
- Attribute b = get(a.getID ());
- if (! a.equals(b))
- return false;
+ Attribute a = (Attribute) bas.nextElement();
+ Attribute b = get(a.getID ());
+ if (! a.equals(b))
+ return false;
}
return true;
@@ -117,10 +117,10 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- return at;
+ Attribute at = attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ return at;
}
return null;
@@ -139,7 +139,7 @@ public class BasicAttributes implements Attributes
{
return attrs.hasMore();
}
-
+
public boolean hasMoreElements()
{
return attrs.hasMoreElements();
@@ -191,13 +191,13 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = (Attribute) attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- {
- attributes.remove (i);
- return at;
- }
+ Attribute at = (Attribute) attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ {
+ attributes.remove (i);
+ return at;
+ }
}
return null;
@@ -213,9 +213,9 @@ public class BasicAttributes implements Attributes
String r = "";
for (int i = 0; i < attributes.size (); ++i)
{
- if (i > 0)
- r += "; ";
- r += attributes.get (i).toString ();
+ if (i > 0)
+ r += "; ";
+ r += attributes.get (i).toString ();
}
return r;
}
@@ -230,7 +230,7 @@ public class BasicAttributes implements Attributes
{
s.defaultReadObject();
int size = s.readInt();
- attributes = new Vector<Attribute>(size);
+ attributes = new Vector<Attribute>(size);
for (int i = 0; i < size; i++)
attributes.add((Attribute) s.readObject());
}
@@ -275,7 +275,7 @@ public class BasicAttributes implements Attributes
public Attribute nextElement () throws NoSuchElementException
{
if (where >= attributes.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
Attribute at = attributes.get (where);
++where;
return at;
diff --git a/javax/naming/directory/InitialDirContext.java b/javax/naming/directory/InitialDirContext.java
index 8c7852fbb..68130b28c 100644
--- a/javax/naming/directory/InitialDirContext.java
+++ b/javax/naming/directory/InitialDirContext.java
@@ -211,7 +211,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration<SearchResult> search(String name,
@@ -220,7 +220,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration<SearchResult> search(Name name,
@@ -257,7 +257,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
public NamingEnumeration<SearchResult> search(String name,
@@ -267,6 +267,6 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
}
diff --git a/javax/naming/directory/ModificationItem.java b/javax/naming/directory/ModificationItem.java
index 56a5ae609..b7cb48e68 100644
--- a/javax/naming/directory/ModificationItem.java
+++ b/javax/naming/directory/ModificationItem.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -57,8 +57,8 @@ public class ModificationItem implements Serializable
if (attr == null)
throw new IllegalArgumentException("attr is null");
if (mod_op != DirContext.ADD_ATTRIBUTE &&
- mod_op != DirContext.REPLACE_ATTRIBUTE &&
- mod_op != DirContext.REMOVE_ATTRIBUTE)
+ mod_op != DirContext.REPLACE_ATTRIBUTE &&
+ mod_op != DirContext.REMOVE_ATTRIBUTE)
throw new IllegalArgumentException("mod_op is invalid");
this.mod_op = mod_op;
this.attr = attr;
diff --git a/javax/naming/directory/SearchControls.java b/javax/naming/directory/SearchControls.java
index 5ba488bf7..805e97170 100644
--- a/javax/naming/directory/SearchControls.java
+++ b/javax/naming/directory/SearchControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -66,7 +66,7 @@ public class SearchControls implements Serializable
}
public SearchControls(int scope, long countlim, int timelim, String[] attrs,
- boolean retobj, boolean deref)
+ boolean retobj, boolean deref)
{
searchScope = scope;
timeLimit = timelim;
diff --git a/javax/naming/directory/SearchResult.java b/javax/naming/directory/SearchResult.java
index ce6bfed6e..5d6a2b1f8 100644
--- a/javax/naming/directory/SearchResult.java
+++ b/javax/naming/directory/SearchResult.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -58,21 +58,21 @@ public class SearchResult extends Binding
}
public SearchResult(String name, Object obj, Attributes attrs,
- boolean isRelative)
+ boolean isRelative)
{
super(name, obj, isRelative);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs)
+ Attributes attrs)
{
super(name, className, obj);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs, boolean isRelative)
+ Attributes attrs, boolean isRelative)
{
super(name, className, obj, isRelative);
this.attrs = attrs;
diff --git a/javax/naming/event/EventContext.java b/javax/naming/event/EventContext.java
index 32629c04c..fbee9718d 100644
--- a/javax/naming/event/EventContext.java
+++ b/javax/naming/event/EventContext.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -55,11 +55,11 @@ public interface EventContext extends Context
void addNamingListener (Name target, int scope, NamingListener l)
throws NamingException;
-
+
void addNamingListener (String target, int scope, NamingListener l)
throws NamingException;
-
+
void removeNamingListener (NamingListener l) throws NamingException;
-
+
boolean targetMustExist() throws NamingException;
}
diff --git a/javax/naming/event/NamespaceChangeListener.java b/javax/naming/event/NamespaceChangeListener.java
index 464b7187a..efe797e7a 100644
--- a/javax/naming/event/NamespaceChangeListener.java
+++ b/javax/naming/event/NamespaceChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/event/NamingEvent.java b/javax/naming/event/NamingEvent.java
index 1bf381a44..dcc8c89b1 100644
--- a/javax/naming/event/NamingEvent.java
+++ b/javax/naming/event/NamingEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -62,7 +62,7 @@ public class NamingEvent extends EventObject
protected Binding newBinding;
public NamingEvent(EventContext source, int type, Binding newBd,
- Binding oldBd, Object changeInfo)
+ Binding oldBd, Object changeInfo)
{
super(source);
this.type = type;
@@ -106,17 +106,17 @@ public class NamingEvent extends EventObject
switch (type)
{
case OBJECT_ADDED:
- ((NamespaceChangeListener) listener).objectAdded(this);
- break;
+ ((NamespaceChangeListener) listener).objectAdded(this);
+ break;
case OBJECT_REMOVED:
- ((NamespaceChangeListener) listener).objectRemoved(this);
- break;
+ ((NamespaceChangeListener) listener).objectRemoved(this);
+ break;
case OBJECT_RENAMED:
- ((NamespaceChangeListener) listener).objectRenamed(this);
- break;
+ ((NamespaceChangeListener) listener).objectRenamed(this);
+ break;
case OBJECT_CHANGED:
- ((ObjectChangeListener) listener).objectChanged(this);
- break;
+ ((ObjectChangeListener) listener).objectChanged(this);
+ break;
}
}
}
diff --git a/javax/naming/event/NamingExceptionEvent.java b/javax/naming/event/NamingExceptionEvent.java
index 3a9de21f5..27a7552d8 100644
--- a/javax/naming/event/NamingExceptionEvent.java
+++ b/javax/naming/event/NamingExceptionEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
diff --git a/javax/naming/event/NamingListener.java b/javax/naming/event/NamingListener.java
index 4f313a35c..e820d55c3 100644
--- a/javax/naming/event/NamingListener.java
+++ b/javax/naming/event/NamingListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.event;
import java.util.EventListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/event/ObjectChangeListener.java b/javax/naming/event/ObjectChangeListener.java
index 00e8c4cb0..63ccc5bab 100644
--- a/javax/naming/event/ObjectChangeListener.java
+++ b/javax/naming/event/ObjectChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/Control.java b/javax/naming/ldap/Control.java
index 9f6409b53..b852c0063 100644
--- a/javax/naming/ldap/Control.java
+++ b/javax/naming/ldap/Control.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/ControlFactory.java b/javax/naming/ldap/ControlFactory.java
index b8151640f..05d53f9a8 100644
--- a/javax/naming/ldap/ControlFactory.java
+++ b/javax/naming/ldap/ControlFactory.java
@@ -58,8 +58,8 @@ public abstract class ControlFactory
throws NamingException;
public static Control getControlInstance (Control control,
- Context ctx,
- Hashtable<?, ?> env)
+ Context ctx,
+ Hashtable<?, ?> env)
throws NamingException
{
String path = (String) env.get (LdapContext.CONTROL_FACTORIES);
@@ -74,32 +74,32 @@ public abstract class ControlFactory
StringTokenizer tokens = new StringTokenizer (path, ":");
while (tokens.hasMoreTokens ())
{
- String name = tokens.nextToken ();
- try
- {
- Class k = Class.forName (name);
- ControlFactory cf = (ControlFactory) k.newInstance ();
- Control ctrl = cf.getControlInstance (control);
- if (ctrl != null)
- return ctrl;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // Ignore it.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String name = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (name);
+ ControlFactory cf = (ControlFactory) k.newInstance ();
+ Control ctrl = cf.getControlInstance (control);
+ if (ctrl != null)
+ return ctrl;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // Ignore it.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return control;
diff --git a/javax/naming/ldap/ExtendedRequest.java b/javax/naming/ldap/ExtendedRequest.java
index e6379c0c0..43ddcd7d0 100644
--- a/javax/naming/ldap/ExtendedRequest.java
+++ b/javax/naming/ldap/ExtendedRequest.java
@@ -41,7 +41,7 @@ package javax.naming.ldap;
import java.io.Serializable;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,7 +51,7 @@ public interface ExtendedRequest extends Serializable
String getID();
byte[] getEncodedValue();
ExtendedResponse createExtendedResponse(String id,
- byte[] berValue, int offset,
- int length)
- throws NamingException;
+ byte[] berValue, int offset,
+ int length)
+ throws NamingException;
}
diff --git a/javax/naming/ldap/ExtendedResponse.java b/javax/naming/ldap/ExtendedResponse.java
index a3b6dd12c..18b222161 100644
--- a/javax/naming/ldap/ExtendedResponse.java
+++ b/javax/naming/ldap/ExtendedResponse.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/HasControls.java b/javax/naming/ldap/HasControls.java
index a1698963f..f3b97fca4 100644
--- a/javax/naming/ldap/HasControls.java
+++ b/javax/naming/ldap/HasControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/InitialLdapContext.java b/javax/naming/ldap/InitialLdapContext.java
index 1a29c6ae8..011ff5ab5 100644
--- a/javax/naming/ldap/InitialLdapContext.java
+++ b/javax/naming/ldap/InitialLdapContext.java
@@ -69,12 +69,12 @@ public class InitialLdapContext
Hashtable<Object, Object> myenv = null;
if (connControls != null)
{
- if (environment == null)
- myenv = new Hashtable<Object, Object> ();
- else
- myenv = (Hashtable<Object, Object>) environment.clone ();
- myenv.put ("java.naming.ldap.control.connect",
- connControls);
+ if (environment == null)
+ myenv = new Hashtable<Object, Object> ();
+ else
+ myenv = (Hashtable<Object, Object>) environment.clone ();
+ myenv.put ("java.naming.ldap.control.connect",
+ connControls);
}
init (myenv);
diff --git a/javax/naming/ldap/LdapContext.java b/javax/naming/ldap/LdapContext.java
index 10b72f77f..ff11259be 100644
--- a/javax/naming/ldap/LdapContext.java
+++ b/javax/naming/ldap/LdapContext.java
@@ -40,7 +40,7 @@ package javax.naming.ldap;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/LdapReferralException.java b/javax/naming/ldap/LdapReferralException.java
index 87942b9fc..faa719c36 100644
--- a/javax/naming/ldap/LdapReferralException.java
+++ b/javax/naming/ldap/LdapReferralException.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.ReferralException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/StartTlsRequest.java b/javax/naming/ldap/StartTlsRequest.java
index b0a30b54f..42ee8d774 100644
--- a/javax/naming/ldap/StartTlsRequest.java
+++ b/javax/naming/ldap/StartTlsRequest.java
@@ -55,7 +55,7 @@ public class StartTlsRequest
/**
* The assigned object identifier for this response.
*/
- public static final String OID = "1.3.6.1.4.1.1466.20037";
+ public static final String OID = "1.3.6.1.4.1.1466.20037";
/**
* Create a new instance.
diff --git a/javax/naming/ldap/UnsolicitedNotification.java b/javax/naming/ldap/UnsolicitedNotification.java
index 0b6f9d779..ca911f541 100644
--- a/javax/naming/ldap/UnsolicitedNotification.java
+++ b/javax/naming/ldap/UnsolicitedNotification.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/ldap/UnsolicitedNotificationEvent.java b/javax/naming/ldap/UnsolicitedNotificationEvent.java
index f9946064a..52e591a61 100644
--- a/javax/naming/ldap/UnsolicitedNotificationEvent.java
+++ b/javax/naming/ldap/UnsolicitedNotificationEvent.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.util.EventObject;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -47,12 +47,12 @@ import java.util.EventObject;
public class UnsolicitedNotificationEvent extends EventObject
{
private static final long serialVersionUID = -2382603380799883705L;
-
+
// Serialized fields.
private UnsolicitedNotification notice;
public UnsolicitedNotificationEvent(Object src,
- UnsolicitedNotification notice)
+ UnsolicitedNotification notice)
{
super(src);
this.notice = notice;
diff --git a/javax/naming/ldap/UnsolicitedNotificationListener.java b/javax/naming/ldap/UnsolicitedNotificationListener.java
index fd56f0598..f2a35da6c 100644
--- a/javax/naming/ldap/UnsolicitedNotificationListener.java
+++ b/javax/naming/ldap/UnsolicitedNotificationListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.event.NamingListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/javax/naming/spi/DirObjectFactory.java b/javax/naming/spi/DirObjectFactory.java
index 1a71c28f7..47fb7a1e7 100644
--- a/javax/naming/spi/DirObjectFactory.java
+++ b/javax/naming/spi/DirObjectFactory.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,6 +51,6 @@ import javax.naming.directory.Attributes;
public interface DirObjectFactory extends ObjectFactory
{
Object getObjectInstance(Object obj, Name name, Context nameCtx,
- Hashtable<?, ?> environment, Attributes attrs)
- throws Exception;
+ Hashtable<?, ?> environment, Attributes attrs)
+ throws Exception;
}
diff --git a/javax/naming/spi/DirStateFactory.java b/javax/naming/spi/DirStateFactory.java
index 6ddd12f36..1c0c21b13 100644
--- a/javax/naming/spi/DirStateFactory.java
+++ b/javax/naming/spi/DirStateFactory.java
@@ -44,7 +44,7 @@ import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -76,8 +76,8 @@ public interface DirStateFactory extends StateFactory
}
DirStateFactory.Result getStateToBind(Object obj, Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes inAttrs)
- throws NamingException;
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes inAttrs)
+ throws NamingException;
}
diff --git a/javax/naming/spi/DirectoryManager.java b/javax/naming/spi/DirectoryManager.java
index a6d91b20c..4abb5f1a6 100644
--- a/javax/naming/spi/DirectoryManager.java
+++ b/javax/naming/spi/DirectoryManager.java
@@ -73,28 +73,28 @@ public class DirectoryManager extends NamingManager
// Try to create an object using the factory. Return null on
// failure.
private static Object tryCreateObject (ObjectFactory factory,
- Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable environment,
- Attributes attrs)
+ Object refInfo,
+ Name name,
+ Context nameCtx,
+ Hashtable environment,
+ Attributes attrs)
throws Exception
{
if (factory instanceof DirObjectFactory)
{
- DirObjectFactory dof = (DirObjectFactory) factory;
- return dof.getObjectInstance (refInfo, name, nameCtx,
- environment, attrs);
+ DirObjectFactory dof = (DirObjectFactory) factory;
+ return dof.getObjectInstance (refInfo, name, nameCtx,
+ environment, attrs);
}
else
return factory.getObjectInstance (refInfo, name, nameCtx,
- environment);
+ environment);
}
public static Object getObjectInstance (Object refInfo, Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes attrs)
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes attrs)
throws Exception
{
ObjectFactory factory = null;
@@ -103,139 +103,139 @@ public class DirectoryManager extends NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass);
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = tryCreateObject (factory,
- refInfo,
- name,
- nameCtx,
- environment,
- attrs);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName);
- factory = (ObjectFactory) k.newInstance ();
- Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass);
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = tryCreateObject (factory,
+ refInfo,
+ name,
+ nameCtx,
+ environment,
+ attrs);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName);
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = tryCreateObject (factory, refInfo, name,
+ nameCtx, environment, attrs);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
+ nameCtx, environment, attrs);
return obj == null ? refInfo : obj;
}
public static DirStateFactory.Result getStateToBind (Object obj,
- Name name,
- Context nameCtx,
- Hashtable<?, ?> environment,
- Attributes attrs)
+ Name name,
+ Context nameCtx,
+ Hashtable<?, ?> environment,
+ Attributes attrs)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName);
- StateFactory factory = (StateFactory) k.newInstance ();
-
- DirStateFactory.Result result = null;
- if (factory instanceof DirStateFactory)
- {
- DirStateFactory dsf = (DirStateFactory) factory;
- result = dsf.getStateToBind (obj, name, nameCtx, environment,
- attrs);
- }
- else
- {
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- result = new DirStateFactory.Result (o, attrs);
- }
- if (result != null)
- return result;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName);
+ StateFactory factory = (StateFactory) k.newInstance ();
+
+ DirStateFactory.Result result = null;
+ if (factory instanceof DirStateFactory)
+ {
+ DirStateFactory dsf = (DirStateFactory) factory;
+ result = dsf.getStateToBind (obj, name, nameCtx, environment,
+ attrs);
+ }
+ else
+ {
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ result = new DirStateFactory.Result (o, attrs);
+ }
+ if (result != null)
+ return result;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return new DirStateFactory.Result (obj, attrs);
diff --git a/javax/naming/spi/InitialContextFactory.java b/javax/naming/spi/InitialContextFactory.java
index f715327ef..bd13c6e38 100644
--- a/javax/naming/spi/InitialContextFactory.java
+++ b/javax/naming/spi/InitialContextFactory.java
@@ -58,7 +58,7 @@ public interface InitialContextFactory
{
/**
* Create a new initial context
- *
+ *
* @param environment the properties, used when creating the context. The
* implementing class will not modify the table nor keep the
* reference to it. After the method returns, the caller can safely
diff --git a/javax/naming/spi/InitialContextFactoryBuilder.java b/javax/naming/spi/InitialContextFactoryBuilder.java
index 31bafe6dc..12ee888ba 100644
--- a/javax/naming/spi/InitialContextFactoryBuilder.java
+++ b/javax/naming/spi/InitialContextFactoryBuilder.java
@@ -47,14 +47,14 @@ import javax.naming.NamingException;
* initial naming contexts. JNDI allows to specifiy different initial contexts
* at runtime. The user program can install its own initial context factory
* builder.
- *
+ *
* @see NamingManager#setInitialContextFactoryBuilder
*/
public interface InitialContextFactoryBuilder
{
/**
* Create the new initial context factory
- *
+ *
* @param environment the properties, used for creation of the initial
* context factory. The parameter is owned by the caller: it is safe to reuse
* the table for other purposes after the method returns.
diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java
index cc8d46fa4..d974513b3 100644
--- a/javax/naming/spi/NamingManager.java
+++ b/javax/naming/spi/NamingManager.java
@@ -84,16 +84,16 @@ public class NamingManager
/**
* Checks if the initial context factory builder has been set.
- *
+ *
* @return true if the builder has been set
- *
+ *
* @see #setInitialContextFactoryBuilder(InitialContextFactoryBuilder)
*/
public static boolean hasInitialContextFactoryBuilder ()
{
return icfb != null;
}
-
+
/**
* Creates the initial context. If the initial object factory builder has
* been set with {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)},
@@ -101,54 +101,54 @@ public class NamingManager
* for the property Context.INITIAL_CONTEXT_FACTORY first in the passed
* table and then in the system properties. The value of this property is
* uses as a class name to install the context factory. The corresponding
- * class must exist, be public and have the public parameterless constructor.
- *
+ * class must exist, be public and have the public parameterless constructor.
+ *
* @param environment the properties, used to create the context.
- *
+ *
* @return the created context
- *
+ *
* @throws NoInitialContextException if the initial builder is not set,
* the property Context.INITIAL_CONTEXT_FACTORY is missing of the
- * class, named by this property, cannot be instantiated.
+ * class, named by this property, cannot be instantiated.
* @throws NamingException if throws by the context factory
*/
public static Context getInitialContext (Hashtable<?, ?> environment)
throws NamingException
{
InitialContextFactory icf = null;
-
+
if (icfb != null)
icf = icfb.createInitialContextFactory(environment);
else
- {
- String java_naming_factory_initial = null;
- if (environment != null)
- java_naming_factory_initial
- = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- java_naming_factory_initial =
- System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- throw new
- NoInitialContextException ("Can't find property: "
- + Context.INITIAL_CONTEXT_FACTORY);
-
- try
- {
- icf = (InitialContextFactory)Class.forName
- (java_naming_factory_initial, true,
- Thread.currentThread().getContextClassLoader())
- .newInstance ();
- }
- catch (Exception exception)
- {
- NoInitialContextException e
- = new NoInitialContextException
- ("Can't load InitialContextFactory class: "
- + java_naming_factory_initial);
- e.setRootCause(exception);
- throw e;
- }
+ {
+ String java_naming_factory_initial = null;
+ if (environment != null)
+ java_naming_factory_initial
+ = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ java_naming_factory_initial =
+ System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ throw new
+ NoInitialContextException ("Can't find property: "
+ + Context.INITIAL_CONTEXT_FACTORY);
+
+ try
+ {
+ icf = (InitialContextFactory)Class.forName
+ (java_naming_factory_initial, true,
+ Thread.currentThread().getContextClassLoader())
+ .newInstance ();
+ }
+ catch (Exception exception)
+ {
+ NoInitialContextException e
+ = new NoInitialContextException
+ ("Can't load InitialContextFactory class: "
+ + java_naming_factory_initial);
+ e.setRootCause(exception);
+ throw e;
+ }
}
return icf.getInitialContext (environment);
@@ -178,7 +178,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param refInfo passed to the factory
* @param name passed to the factory
* @param nameCtx passed to the factory
@@ -198,7 +198,7 @@ public class NamingManager
// The final default location, as specified in the documentation.
String finalPrefix = "com.sun.jndi.url";
-
+
CPStringBuilder allPrefixes = new CPStringBuilder();
String prefixes;
@@ -208,7 +208,7 @@ public class NamingManager
if (prefixes != null)
allPrefixes.append(prefixes);
}
-
+
prefixes = System.getProperty(Context.URL_PKG_PREFIXES);
if (prefixes != null)
{
@@ -224,7 +224,7 @@ public class NamingManager
allPrefixes.append(finalPrefix);
scheme = scheme + "." + scheme + "URLContextFactory";
-
+
StringTokenizer tokens = new StringTokenizer(allPrefixes.toString(), ":");
while (tokens.hasMoreTokens())
{
@@ -279,8 +279,8 @@ public class NamingManager
{
// Anything from getObjectInstance.
}
- }
-
+ }
+
return null;
}
@@ -322,9 +322,9 @@ public class NamingManager
}
}
return null;
- }
-
-
+ }
+
+
/**
* <p>
* Creates the URL context for the given URL scheme id.
@@ -345,7 +345,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param scheme the url scheme that must be supported by the given context
* @param environment the properties for creating the factory and context
* (may be null)
@@ -354,7 +354,7 @@ public class NamingManager
* context.
*/
public static Context getURLContext (String scheme,
- Hashtable<?, ?> environment)
+ Hashtable<?, ?> environment)
throws NamingException
{
return getURLContext (null, null, null, scheme, environment);
@@ -362,12 +362,12 @@ public class NamingManager
/**
* Sets the initial object factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
*/
@@ -385,7 +385,7 @@ public class NamingManager
}
static StringTokenizer getPlusPath (String property, Hashtable env,
- Context nameCtx)
+ Context nameCtx)
throws NamingException
{
String path = (String) env.get (property);
@@ -398,12 +398,12 @@ public class NamingManager
path += ":" + path2;
return new StringTokenizer (path != null ? path : "", ":");
}
-
+
/**
* <p>Creates an object for the specified name context, environment and
* referencing context object.</p>
* <p>
- * If the builder factory is set by
+ * If the builder factory is set by
* {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)}, the call is
* delegated to that factory. Otherwise, the object is created using the
* following rules:
@@ -415,20 +415,20 @@ public class NamingManager
* are StringRefAddrs having the address type "URL", the object is
* created by the URL context factory. The used factory corresponds the
* the naming schema of the each URL. If the attempt to create
- * the object this way is not successful, the subsequent rule is
+ * the object this way is not successful, the subsequent rule is
* tried.</li>
* <li> If the refInfo is not an instance of Reference or Referencable
* (for example, null), the object is created by the factories,
- * specified in the Context.OBJECT_FACTORIES property of the
+ * specified in the Context.OBJECT_FACTORIES property of the
* environment and the provider resource file, associated with the
* nameCtx. The value of this property is the colon separated list
* of the possible factories. If none of the factories can be
- * loaded, the refInfo is returned.
+ * loaded, the refInfo is returned.
* </ul>
* </p>
* <p>The object factory must be public and have the public parameterless
* constructor.</p>
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -441,19 +441,19 @@ public class NamingManager
* @param environment contains additional information for creating the object.
* This paramter can be null if there is no need to provide any
* additional information.
- *
+ *
* @return the created object. If the creation fails, in some cases
* the parameter refInfo may be returned.
- *
+ *
* @throws NamingException if the attempt to name the new object has failed
* @throws Exception if the object factory throws it. The object factory
* only throws an exception if it does not want other factories
* to be used to create the object.
*/
public static Object getObjectInstance (Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable<?, ?> environment)
+ Name name,
+ Context nameCtx,
+ Hashtable<?, ?> environment)
throws Exception
{
ObjectFactory factory = null;
@@ -462,102 +462,102 @@ public class NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = factory.getObjectInstance (refInfo,
- name,
- nameCtx,
- environment);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = factory.getObjectInstance (refInfo,
+ name,
+ nameCtx,
+ environment);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = factory.getObjectInstance (refInfo, name,
+ nameCtx, environment);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
+ nameCtx, environment);
return obj == null ? refInfo : obj;
}
/**
* Sets the initial context factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
- *
+ *
* @see #hasInitialContextFactoryBuilder()
*/
- public static void setInitialContextFactoryBuilder
+ public static void setInitialContextFactoryBuilder
(InitialContextFactoryBuilder builder)
throws NamingException
{
@@ -570,17 +570,17 @@ public class NamingManager
if (builder != null)
icfb = builder;
}
-
+
/**
* Creates a context in which the context operation must be continued.
* This method is used by operations on names that span multiple namespaces.
- *
+ *
* @param cpe the exception that triggered this continuation. This method
* obtains the environment ({@link CannotProceedException#getEnvironment()}
* and sets the environment property {@link #CPE} = cpe.
- *
+ *
* @return a non null context for continuing the operation
- *
+ *
* @throws NamingException if the naming problems have occured
*/
public static Context getContinuationContext (CannotProceedException cpe)
@@ -593,12 +593,12 @@ public class NamingManager
// TODO: Check if this implementation matches the API specification
try
{
- Object obj = getObjectInstance (cpe.getResolvedObj(),
- cpe.getAltName (),
- cpe.getAltNameCtx (),
- env);
- if (obj != null)
- return (Context) obj;
+ Object obj = getObjectInstance (cpe.getResolvedObj(),
+ cpe.getAltName (),
+ cpe.getAltNameCtx (),
+ env);
+ if (obj != null)
+ return (Context) obj;
}
catch (Exception _)
{
@@ -609,10 +609,10 @@ public class NamingManager
throw cpe;
}
-
+
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -624,46 +624,46 @@ public class NamingManager
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- */
+ */
public static Object getStateToBind (Object obj, Name name,
- Context nameCtx, Hashtable<?, ?> environment)
+ Context nameCtx, Hashtable<?, ?> environment)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- StateFactory factory = (StateFactory) k.newInstance ();
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- return o;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ StateFactory factory = (StateFactory) k.newInstance ();
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ return o;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return obj;
diff --git a/javax/naming/spi/ObjectFactory.java b/javax/naming/spi/ObjectFactory.java
index 4534481a7..d44d2ff65 100644
--- a/javax/naming/spi/ObjectFactory.java
+++ b/javax/naming/spi/ObjectFactory.java
@@ -54,7 +54,7 @@ public interface ObjectFactory
/**
* Creates the object, using the specified name and location information. The
* call of this method must be thread safe.
- *
+ *
* @param refObj may provide the reference and location information. Can be null.
* @param name the name of the new object in the scope of the specified naming
* context. Can be null if the name is not specified.
@@ -67,8 +67,8 @@ public interface ObjectFactory
* @return the newly created object or null if the object cannot be created
* @throws Exception if this factory suggest not to try creating of this
* object by other alternative factories
- *
- * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
+ *
+ * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
*/
Object getObjectInstance (Object refObj, Name name, Context nameCtx,
Hashtable<?, ?> environment)
diff --git a/javax/naming/spi/ObjectFactoryBuilder.java b/javax/naming/spi/ObjectFactoryBuilder.java
index 6a528b17a..e0886d144 100644
--- a/javax/naming/spi/ObjectFactoryBuilder.java
+++ b/javax/naming/spi/ObjectFactoryBuilder.java
@@ -43,19 +43,19 @@ import java.util.Hashtable;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.Referenceable;
-
+
/**
* Represents the builder that creates the object factories.
- *
+ *
* @see NamingManager#setObjectFactoryBuilder(ObjectFactoryBuilder)
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface ObjectFactoryBuilder
{
/**
* Create a new object using the supplied environment.
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -65,6 +65,6 @@ public interface ObjectFactoryBuilder
* @throws NamingException
*/
ObjectFactory createObjectFactory(Object refInfo,
- Hashtable<?, ?> environment)
- throws NamingException;
+ Hashtable<?, ?> environment)
+ throws NamingException;
}
diff --git a/javax/naming/spi/ResolveResult.java b/javax/naming/spi/ResolveResult.java
index d5051a5d4..3945b9b43 100644
--- a/javax/naming/spi/ResolveResult.java
+++ b/javax/naming/spi/ResolveResult.java
@@ -43,12 +43,12 @@ import java.io.Serializable;
import javax.naming.CompositeName;
import javax.naming.InvalidNameException;
import javax.naming.Name;
-
+
/**
* Stores the partial resolution of the name. This class contains the
* object to which part of the name has been resolved and the remaining,
- * unresolved part of this name.
- *
+ * unresolved part of this name.
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
@@ -61,22 +61,22 @@ public class ResolveResult implements Serializable
* The object, to that part of the name has been resolved.
*/
protected Object resolvedObj;
-
+
/**
* The remaining, unresolved part of the name.
*/
protected Name remainingName;
-
+
/**
* Create the unitialised instance with both parts being null.
*/
protected ResolveResult()
{
}
-
+
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -88,7 +88,7 @@ public class ResolveResult implements Serializable
remainingName = new CompositeName ();
try
{
- remainingName.add (remaining);
+ remainingName.add (remaining);
}
catch (InvalidNameException _)
{
@@ -97,7 +97,7 @@ public class ResolveResult implements Serializable
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -109,7 +109,7 @@ public class ResolveResult implements Serializable
/**
* Get the remaining unresolved part of the name
- *
+ *
* @return the remaining unresolved part of the name.
*/
public Name getRemainingName()
@@ -119,17 +119,17 @@ public class ResolveResult implements Serializable
/**
* Get the object to that the name was partially resolved
- *
+ *
* @return the object, to that the name is partially resolved
*/
public Object getResolvedObj()
{
return resolvedObj;
}
-
+
/**
* Set the remaining unresolved name.
- *
+ *
* @param name the name being set. The passed parameter is cloned, so the
* caller can reuse or modify it after the method returns.
*/
@@ -137,17 +137,17 @@ public class ResolveResult implements Serializable
{
remainingName = (Name) name.clone();
}
-
+
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingName(Name name)
{
try
{
- remainingName.addAll(name);
+ remainingName.addAll(name);
}
catch (InvalidNameException _)
{
@@ -156,14 +156,14 @@ public class ResolveResult implements Serializable
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingComponent(String name)
{
try
{
- remainingName.add(name);
+ remainingName.add(name);
}
catch (InvalidNameException _)
{
@@ -172,7 +172,7 @@ public class ResolveResult implements Serializable
/**
* Set the object to that the part of the name has been resolved.
- *
+ *
* @param obj the object, to that the name has been partially resolved.
*/
public void setResolvedObj(Object obj)
diff --git a/javax/naming/spi/Resolver.java b/javax/naming/spi/Resolver.java
index 67174cfa5..7a009fabc 100644
--- a/javax/naming/spi/Resolver.java
+++ b/javax/naming/spi/Resolver.java
@@ -41,19 +41,19 @@ package javax.naming.spi;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* <p>Represents the object, capable for the at least partial name resolution.
* The object is not necessay capable for the complete name resolution and
* need not implement the {@link Context}.</p>
* <p>
* Both passed parameters and returned results are owned by the caller.</p>
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface Resolver
{
- ResolveResult resolveToClass(Name name,
+ ResolveResult resolveToClass(Name name,
Class<? extends Context> contextType)
throws NamingException;
ResolveResult resolveToClass(String name,
diff --git a/javax/naming/spi/StateFactory.java b/javax/naming/spi/StateFactory.java
index 0c48309e3..d674803a4 100644
--- a/javax/naming/spi/StateFactory.java
+++ b/javax/naming/spi/StateFactory.java
@@ -43,13 +43,13 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* Represents a factory, producing the object states for binding. The operation,
* performed by this factory, is the reverse operation with related to the
* operation, performed by the {@link ObjectFactory}. Classes, implementing
* this interface, must be public and have public parameterless constructor.
- *
+ *
* @see DirStateFactory
* @see ObjectFactory
* @author Warren Levy (warrenl@redhat.com)
@@ -58,7 +58,7 @@ public interface StateFactory
{
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -70,10 +70,10 @@ public interface StateFactory
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- *
+ *
* @see NamingManager#getStateToBind
* @see DirectoryManager#getStateToBind
*/
Object getStateToBind(Object obj, Name name, Context nameCtx,
- Hashtable<?, ?> environment) throws NamingException;
+ Hashtable<?, ?> environment) throws NamingException;
}
diff --git a/javax/net/ssl/CertPathTrustManagerParameters.java b/javax/net/ssl/CertPathTrustManagerParameters.java
index b6dc135e1..c23d65490 100644
--- a/javax/net/ssl/CertPathTrustManagerParameters.java
+++ b/javax/net/ssl/CertPathTrustManagerParameters.java
@@ -1,4 +1,4 @@
-/* CertPathTrustManagerParameters.java --
+/* CertPathTrustManagerParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/javax/net/ssl/KeyManagerFactory.java b/javax/net/ssl/KeyManagerFactory.java
index 33f2fda9c..d9519512a 100644
--- a/javax/net/ssl/KeyManagerFactory.java
+++ b/javax/net/ssl/KeyManagerFactory.java
@@ -134,7 +134,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the first
* provider that implements it.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @return An appropriate implementation of that algoritm.
* @throws NoSuchAlgorithmException If no provider implements the requested
@@ -164,7 +164,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the named
* provider.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @param provider The name of the provider to get the implementation from.
* @return An appropriate implementation of that algorithm.
@@ -190,7 +190,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the given
* provider.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @param provider The provider to get the implementation from.
* @return An appropriate implementation of that algorithm.
diff --git a/javax/net/ssl/KeyStoreBuilderParameters.java b/javax/net/ssl/KeyStoreBuilderParameters.java
index 2aa665ed5..26b61428f 100644
--- a/javax/net/ssl/KeyStoreBuilderParameters.java
+++ b/javax/net/ssl/KeyStoreBuilderParameters.java
@@ -1,4 +1,4 @@
-/* KeyStoreBuilderParameters.java --
+/* KeyStoreBuilderParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/javax/net/ssl/SSLContext.java b/javax/net/ssl/SSLContext.java
index dcc850809..9a6e9a5f0 100644
--- a/javax/net/ssl/SSLContext.java
+++ b/javax/net/ssl/SSLContext.java
@@ -94,7 +94,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the first
* provider that implements it.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @return The new context.
* @throws NoSuchAlgorithmException If no provider implements the given
@@ -124,7 +124,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the named
* provider.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @param provider The name of the provider to get the implementation from.
* @return The new context.
@@ -149,7 +149,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the specified
* provider.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @param provider The name of the provider to get the implementation from.
* @return The new context.
diff --git a/javax/net/ssl/SSLEngine.java b/javax/net/ssl/SSLEngine.java
index efab9725b..2ba7bb636 100644
--- a/javax/net/ssl/SSLEngine.java
+++ b/javax/net/ssl/SSLEngine.java
@@ -73,7 +73,7 @@ public abstract class SSLEngine
this.peerPort = peerPort;
}
-
+
/**
* Begin, or restart, the SSL handshake.
@@ -359,8 +359,8 @@ public abstract class SSLEngine
* negative, or if 'length+offset' is greater than 'sinks.length'.
*/
public abstract SSLEngineResult unwrap (ByteBuffer source,
- ByteBuffer[] sinks, int offset,
- int length)
+ ByteBuffer[] sinks, int offset,
+ int length)
throws javax.net.ssl.SSLException;
/**
@@ -436,7 +436,7 @@ public abstract class SSLEngine
* negative, or if 'length+offset' is greater than 'sources.length'.
*/
public abstract SSLEngineResult wrap (ByteBuffer[] sources, int offset,
- int length, ByteBuffer sink)
+ int length, ByteBuffer sink)
throws SSLException;
}
diff --git a/javax/net/ssl/SSLEngineResult.java b/javax/net/ssl/SSLEngineResult.java
index 0d6a435dd..4d15258f3 100644
--- a/javax/net/ssl/SSLEngineResult.java
+++ b/javax/net/ssl/SSLEngineResult.java
@@ -1,4 +1,4 @@
-/* SSLEngineResult.java --
+/* SSLEngineResult.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class SSLEngineResult
* <code>null</code>, or if either integer is negative.
*/
public SSLEngineResult (Status status, HandshakeStatus handshakeStatus,
- int bytesConsumed, int bytesProduced)
+ int bytesConsumed, int bytesProduced)
{
if (status == null)
throw new IllegalArgumentException ("'status' may not be null");
@@ -80,7 +80,7 @@ public class SSLEngineResult
this.bytesProduced = bytesProduced;
}
-
+
/**
* An enumeration of possible general states.
@@ -143,7 +143,7 @@ public class SSLEngineResult
NEED_UNWRAP
}
-
+
/**
* Returns the number of bytes consumed by the previous operation.
@@ -188,7 +188,7 @@ public class SSLEngineResult
public String toString ()
{
return (super.toString () + " [ status: " + status + "; handshakeStatus: "
- + handshakeStatus + "; bytesConsumed: " + bytesConsumed
- + "; bytesProduced: " + bytesProduced + " ]");
+ + handshakeStatus + "; bytesConsumed: " + bytesConsumed
+ + "; bytesProduced: " + bytesProduced + " ]");
}
}
diff --git a/javax/net/ssl/SSLException.java b/javax/net/ssl/SSLException.java
index 3213b0b45..c72671730 100644
--- a/javax/net/ssl/SSLException.java
+++ b/javax/net/ssl/SSLException.java
@@ -45,7 +45,7 @@ import java.io.IOException;
* exception is thrown instead of this exception.
*
* @author Casey Marshall (rsdio@metastatic.org)
- *
+ *
* @since 1.4
*/
public class SSLException extends IOException
@@ -64,7 +64,7 @@ public class SSLException extends IOException
{
super(message);
}
-
+
/**
* Create a new instance with a descriptive error message and
* a cause.
@@ -77,7 +77,7 @@ public class SSLException extends IOException
super(message);
initCause(cause);
}
-
+
/**
* Create a new instance with a cause.
* @param cause the cause
diff --git a/javax/net/ssl/TrustManagerFactory.java b/javax/net/ssl/TrustManagerFactory.java
index f868ae75b..e08501a7b 100644
--- a/javax/net/ssl/TrustManagerFactory.java
+++ b/javax/net/ssl/TrustManagerFactory.java
@@ -96,7 +96,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the first provider that implements it.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @return The instance of the trust manager factory.
* @throws NoSuchAlgorithmException If no provider implements the given
@@ -126,7 +126,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the named provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The name of the provider to get the instance from.
* @return The instance of the trust manager factory.
@@ -152,7 +152,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the specified provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The provider to get the instance from.
* @return The instance of the trust manager factory.
diff --git a/javax/net/ssl/X509ExtendedKeyManager.java b/javax/net/ssl/X509ExtendedKeyManager.java
index ccd146f82..0e7c4d484 100644
--- a/javax/net/ssl/X509ExtendedKeyManager.java
+++ b/javax/net/ssl/X509ExtendedKeyManager.java
@@ -1,4 +1,4 @@
-/* X509ExtendedKeyManager.java --
+/* X509ExtendedKeyManager.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/javax/print/AttributeException.java b/javax/print/AttributeException.java
index 1251b00bb..9a72c53d0 100644
--- a/javax/print/AttributeException.java
+++ b/javax/print/AttributeException.java
@@ -46,29 +46,29 @@ import javax.print.attribute.Attribute;
* provide further information of printing errors if unsupported
* attribute classes or values of attributes are involved.
* <p>
- * There exists no <code>PrintException</code> class implementing this
- * interface. Providing these extensions in <code>PrintException</code>
- * subclasses is left to the concrete print service implementation.
- * </p>
- *
+ * There exists no <code>PrintException</code> class implementing this
+ * interface. Providing these extensions in <code>PrintException</code>
+ * subclasses is left to the concrete print service implementation.
+ * </p>
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface AttributeException
{
/**
* Returns the unsupported printing attribute classes for a print service
- * that does not support the attribute category at all. The returned
+ * that does not support the attribute category at all. The returned
* class instances are sublcasses of the base interface {@link Attribute}.
- *
+ *
* @return The unsupported attribute classes, or <code>null</code> if there
* are no such attribute classes.
*/
Class[] getUnsupportedAttributes();
-
+
/**
* Returns the unsupported attribute values of printing attributes a specific
* print service does support but not the particular provided value.
- *
+ *
* @return The unsupported attribute values, or <code>null</code> if there
* are no such attributes values.
*/
diff --git a/javax/print/CancelablePrintJob.java b/javax/print/CancelablePrintJob.java
index 39a25440e..60ad584aa 100644
--- a/javax/print/CancelablePrintJob.java
+++ b/javax/print/CancelablePrintJob.java
@@ -39,18 +39,18 @@ exception statement from your version. */
package javax.print;
/**
- * <code>CancelablePrintJob</code> represents a print job which can be
+ * <code>CancelablePrintJob</code> represents a print job which can be
* canceled.
* <p>
- * It is implemented by <code>DocPrintJob</code>s which support to cancel
- * a print job during processing. Clients need to explicitly test if a given
- * <code>DocPrintJob</code> object from a print service implementes this
+ * It is implemented by <code>DocPrintJob</code>s which support to cancel
+ * a print job during processing. Clients need to explicitly test if a given
+ * <code>DocPrintJob</code> object from a print service implementes this
* interface and therefore supports cancelling.
* </p><p>
* Implementor of java print services should implement this interface if
* cancelling is supported by the underlying print system. If implemented the
- * corresponding print job event
- * {@link javax.print.event.PrintJobEvent#JOB_CANCELED} should be delivered to
+ * corresponding print job event
+ * {@link javax.print.event.PrintJobEvent#JOB_CANCELED} should be delivered to
* registered clients. Implementations have to be thread-safe.
* </p>
*
diff --git a/javax/print/Doc.java b/javax/print/Doc.java
index c489de1b6..d8b6ff082 100644
--- a/javax/print/Doc.java
+++ b/javax/print/Doc.java
@@ -45,29 +45,29 @@ import java.io.Reader;
import javax.print.attribute.DocAttributeSet;
/**
- * <code>Doc</code> specifies the interface for print services how to obtain
- * the print data and document specific attributes for printing.
+ * <code>Doc</code> specifies the interface for print services how to obtain
+ * the print data and document specific attributes for printing.
* <p>
- * The print data is always passed to a {@link javax.print.DocPrintJob} object
+ * The print data is always passed to a {@link javax.print.DocPrintJob} object
* as a <code>Doc</code> object which allows the print services to:
* <ul>
* <li>Determine the actual document format of the supplied print data. This
* is supplied as a {@link javax.print.DocFlavor} object with the MIME type
* and the representation class of the print data.</li>
* <li>Obtain the print data either in its representation class or depending
- * on the document format through convenience methods as a
+ * on the document format through convenience methods as a
* {@link java.io.Reader} or an {@link java.io.InputStream}.</li>
* <li>Obtain the document's attribute set specifying the attributes which
* apply to this document instance.</li>
- * </ul>
+ * </ul>
* </p><p>
- * Every method of a <code>Doc</code> implementation has to return always the
- * same object on every method call. Therefore if the print job consumes the
- * print data via a stream or a reader object it can read only once the
- * supplied print data. Implementations of this interface have to be thread
- * safe.
+ * Every method of a <code>Doc</code> implementation has to return always the
+ * same object on every method call. Therefore if the print job consumes the
+ * print data via a stream or a reader object it can read only once the
+ * supplied print data. Implementations of this interface have to be thread
+ * safe.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface Doc
@@ -75,20 +75,20 @@ public interface Doc
/**
* Returns the unmodifiable view of the attributes of this doc object.
* <p>
- * The attributes of this doc's attributes set overrides attributes of
- * the same category in the print job's attribute set. If an attribute
+ * The attributes of this doc's attributes set overrides attributes of
+ * the same category in the print job's attribute set. If an attribute
* is not available in this doc's attributes set or <code>null</code>
* is returned the attributes of the same category of the print job are
- * used.
+ * used.
* </p>
- *
+ *
* @return The unmodifiable attributes set, or <code>null</code>.
*/
DocAttributeSet getAttributes();
/**
* Returns the flavor of this doc objects print data.
- *
+ *
* @return The document flavor.
*/
DocFlavor getDocFlavor();
@@ -100,7 +100,7 @@ public interface Doc
* document flavor ({@link DocFlavor#getRepresentationClassName()})
* and can be cast to this representation class.
* </p>
- *
+ *
* @return The print data in the representation class.
* @throws IOException if representation class is a stream and I/O
* exception occures.
@@ -118,10 +118,10 @@ public interface Doc
* <li><code>java.io.Reader</code></li>
* </ul>
* otherwise this method returns <code>null</code>.
- * </p>
- *
+ * </p>
+ *
* @return The <code>Reader</code> object, or <code>null</code>.
- *
+ *
* @throws IOException if an error occurs.
*/
Reader getReaderForText() throws IOException;
@@ -136,11 +136,11 @@ public interface Doc
* <li><code>java.io.InputStream</code></li>
* </ul>
* otherwise this method returns <code>null</code>.
- * </p>
- *
+ * </p>
+ *
* @return The <code>InputStream</code> object, or <code>null</code>.
- *
+ *
* @throws IOException if an error occurs.
*/
InputStream getStreamForBytes() throws IOException;
-} \ No newline at end of file
+}
diff --git a/javax/print/DocFlavor.java b/javax/print/DocFlavor.java
index 603059525..b95f46231 100644
--- a/javax/print/DocFlavor.java
+++ b/javax/print/DocFlavor.java
@@ -49,71 +49,71 @@ import java.util.Map;
import java.util.TreeMap;
/**
- * <code>DocFlavor</code> provides a description of the format in which the
+ * <code>DocFlavor</code> provides a description of the format in which the
* print data will be supplied in a print job to the print service.
* <p>
* A doc flavor consists of two parts:
* <ul>
* <li>
- * The MIME type (Multipurpose Internet Mail Extensions types as described
+ * The MIME type (Multipurpose Internet Mail Extensions types as described
* in RFC 2045/2046) specifying the media format of the print data.
* </li><li>
- * The representation class name which is the fully qualified name of the
- * class providing the print data to the print job. For example if the print
- * data is supplied as a byte array the representation class name will be
+ * The representation class name which is the fully qualified name of the
+ * class providing the print data to the print job. For example if the print
+ * data is supplied as a byte array the representation class name will be
* <code>"[B"</code> or for an input stream <code>"java.io.InputStream"</code>.
* </li>
* </ul>
- * The <code>DocFlavor</code> class is therefore used in several places in the
- * Java Print Service API. A print service provides its supported document
+ * The <code>DocFlavor</code> class is therefore used in several places in the
+ * Java Print Service API. A print service provides its supported document
* flavors as an array of DocFlavor objects and a print job gets the flavor of
* its data to print from the <code>Doc</code> object provided as a DocFlavor
* instance.
* </p>
* <p>
- * It has to be differentiated between <b>client formatted</b> and <b>service
- * formatted</b> print data. Client formatted print data is already provided
- * formatted by the client e.g. in an image format or as postscript. For
- * service formatted print data, the Java Print Service instance produces
- * the formatted print data. Here the doc flavor's representation class name
- * does specify an interface instead of the actual print data source. The
+ * It has to be differentiated between <b>client formatted</b> and <b>service
+ * formatted</b> print data. Client formatted print data is already provided
+ * formatted by the client e.g. in an image format or as postscript. For
+ * service formatted print data, the Java Print Service instance produces
+ * the formatted print data. Here the doc flavor's representation class name
+ * does specify an interface instead of the actual print data source. The
* print service will call the methods of the given implementation of this
* interface with a special Graphics object capable of producing formatted
* print data from the graphics routines inside the interface methods.
* </p>
* <p>
* <h3>Client formatted print data document flavors</h3>
- * The print service uses the representation class of the doc flavor to know
- * how to retrieve the print data. If the representation class is a
- * <code>URL</code> it will open the URL to read the print data from it. If it is
- * a <code>byte[]</code> it will directly use the array and send it to the
- * printer. There are predefined doc flavor as inner class for the most common
+ * The print service uses the representation class of the doc flavor to know
+ * how to retrieve the print data. If the representation class is a
+ * <code>URL</code> it will open the URL to read the print data from it. If it is
+ * a <code>byte[]</code> it will directly use the array and send it to the
+ * printer. There are predefined doc flavor as inner class for the most common
* representation class types:
* <ul>
- * <li>Character arrays (<code>char[]</code>): The characters of the array
+ * <li>Character arrays (<code>char[]</code>): The characters of the array
* represent the print data.</li>
- * <li>Character streams (<code>java.io.Reader</code>): The whole characters
+ * <li>Character streams (<code>java.io.Reader</code>): The whole characters
* read from the stream represent the print data.</li>
- * <li>String (<code>java.lang.String</code>): The characters of the String
+ * <li>String (<code>java.lang.String</code>): The characters of the String
* represent the print data.</li>
- * <li>Byte arrays (<code>byte[]</code>): The bytes of the array represent the
+ * <li>Byte arrays (<code>byte[]</code>): The bytes of the array represent the
* print data. Encoding if text content is given in the mime type.</li>
- * <li>Byte streams (<code>java.io.InputStream</code>): The whole bytes read
- * from the stream represent the print data. If text content the encoding is
+ * <li>Byte streams (<code>java.io.InputStream</code>): The whole bytes read
+ * from the stream represent the print data. If text content the encoding is
* specified in the mime type.</li>
- * <li>Uniform Resource Locator (<code>java.net.URL</code>): The bytes read
- * from the stream through opening of the URL represent the print data.
+ * <li>Uniform Resource Locator (<code>java.net.URL</code>): The bytes read
+ * from the stream through opening of the URL represent the print data.
* If text content the encoding is specified in the mime type.</li></li>
* </ul>
* </p>
* <p>
* <h3>Service formatted print data document flavors</h3>
* The print service uses the provided object implementing the interface
- * specified by the representation class to produce the formatted print data.
- * The mime type of service formatted data is always
- * <code>"application/x-java-jvm-local-objectref"</code> to signal the local
+ * specified by the representation class to produce the formatted print data.
+ * The mime type of service formatted data is always
+ * <code>"application/x-java-jvm-local-objectref"</code> to signal the local
* reference to the print data object implementing the interface. Predefined
- * doc flavor classes exist as an inner class for the three available interface
+ * doc flavor classes exist as an inner class for the three available interface
* to produce print data:
* <ul>
* <li>Pageable object (<code>java.awt.print.Pageable</code>): A pageable object
@@ -122,13 +122,13 @@ import java.util.TreeMap;
* <li>Printable object (<code>java.awt.print.Printable</code>): A printable object
* is supplied to the print service. The print service will call the methods of
* the interface with a Grahics object to produce the formatted print data.</li>
- * <li>Renderable Image object
+ * <li>Renderable Image object
* (<code>java.awt.image.renderable.RenderableImage</code>): A renderable image
* object is supplied to the print service. The print service calls methods of
* this interface to obtain the image to be printed.</li>
* </ul>
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -137,9 +137,9 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use a byte array for the print data representation.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "[B" (byte array).</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class BYTE_ARRAY
@@ -206,7 +206,7 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Byte array doc flavor with a MIME Type of "text/plain; charset=us-ascii".
*/
- public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII = new BYTE_ARRAY("text/plain; charset=us-ascii");
+ public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII = new BYTE_ARRAY("text/plain; charset=us-ascii");
/**
* Byte array doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
@@ -223,13 +223,13 @@ public class DocFlavor implements Cloneable, Serializable
* Byte array doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final BYTE_ARRAY TEXT_PLAIN_UTF_8 = new BYTE_ARRAY("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "[B".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -238,20 +238,20 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "[B");
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use a char array for the print data representation.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "[C" (char array).</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class CHAR_ARRAY
extends DocFlavor
{
private static final long serialVersionUID = -8720590903724405128L;
-
+
/**
* Char array doc flavor with a MIME Type of "text/html; charset=utf-16".
*/
@@ -262,11 +262,11 @@ public class DocFlavor implements Cloneable, Serializable
public static final DocFlavor.CHAR_ARRAY TEXT_PLAIN = new CHAR_ARRAY("text/plain; charset=utf-16");
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "[C".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -275,13 +275,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "[C");
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use an InputStream to retrieve the print data.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "java.io.InputStream".</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class INPUT_STREAM
@@ -365,13 +365,13 @@ public class DocFlavor implements Cloneable, Serializable
* InputStream doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final INPUT_STREAM TEXT_PLAIN_UTF_8 = new INPUT_STREAM("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.io.InputStream".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -380,13 +380,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.io.InputStream");
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use an Reader to retrieve the print data.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "java.io.Reader".</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class READER
@@ -402,13 +402,13 @@ public class DocFlavor implements Cloneable, Serializable
* Reader doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
public static final DocFlavor.READER TEXT_PLAIN = new READER("text/plain; charset=utf-16");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.io.Reader".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -417,13 +417,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.io.Reader");
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use service formatted print data.
- * <p>All the defined doc flavors have a MIME type of
+ * <p>All the defined doc flavors have a MIME type of
* "application/x-java-jvm-local-objectref".</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class SERVICE_FORMATTED
@@ -432,28 +432,28 @@ public class DocFlavor implements Cloneable, Serializable
private static final long serialVersionUID = 6181337766266637256L;
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.print.Pageable".
*/
public static final DocFlavor.SERVICE_FORMATTED PAGEABLE = new SERVICE_FORMATTED("java.awt.print.Pageable");
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.print.Printable".
*/
public static final DocFlavor.SERVICE_FORMATTED PRINTABLE = new SERVICE_FORMATTED("java.awt.print.Printable");
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.image.renderable.RenderableImage".
*/
public static final DocFlavor.SERVICE_FORMATTED RENDERABLE_IMAGE = new SERVICE_FORMATTED("java.awt.image.renderable.RenderableImage");
-
+
/**
- * Constructor for doc flavor objects with a MIME type of
+ * Constructor for doc flavor objects with a MIME type of
* "application/x-java-jvm-local-objectref" and the given
* print data representation classname.
- *
+ *
* @param className the representation classname
- *
+ *
* @throws NullPointerException if className is <code>null</code>.
*/
public SERVICE_FORMATTED(String className)
@@ -461,13 +461,13 @@ public class DocFlavor implements Cloneable, Serializable
super("application/x-java-jvm-local-objectref", className);
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which use a String for the print data representation.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "java.lang.String".</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class STRING
@@ -483,13 +483,13 @@ public class DocFlavor implements Cloneable, Serializable
* String doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
public static final DocFlavor.STRING TEXT_PLAIN = new STRING("text/plain; charset=utf-16");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.lang.String".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -498,13 +498,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.lang.String");
}
}
-
+
/**
* Predefined static <code>DocFlavor</code> objects for document
* types which have an URL where to retrieve the print data.
- * <p>All the defined doc flavors have a print data representation
+ * <p>All the defined doc flavors have a print data representation
* classname of "java.net.URL".</p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class URL
@@ -588,13 +588,13 @@ public class DocFlavor implements Cloneable, Serializable
* URL doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final DocFlavor.URL TEXT_PLAIN_UTF_8 = new URL("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.net.URL".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is <code>null</code>.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -603,12 +603,12 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.net.URL");
}
}
-
+
private static final long serialVersionUID = -4512080796965449721L;
-
+
/**
* The string representing the host encoding. This is the encoding
- * used in the predefined HOST doc flavors
+ * used in the predefined HOST doc flavors
* (e.g. {@link BYTE_ARRAY#TEXT_HTML_HOST}).
*/
public static final String hostEncoding = Charset.defaultCharset().name();
@@ -616,17 +616,17 @@ public class DocFlavor implements Cloneable, Serializable
private transient String mediaSubtype;
private transient String mediaType;
private transient TreeMap params;
-
+
// name as defined in Serialized Form JDK 1.4
private String myClassName;
-
+
/**
- * Constructs a <code>DocFlavor</code> object with the given MIME type and
+ * Constructs a <code>DocFlavor</code> object with the given MIME type and
* representation class name.
- *
+ *
* @param mimeType the MIME type string.
* @param className the fully-qualified name of the representation class.
- *
+ *
* @throws NullPointerException if mimeType or className are <code>null</code>.
* @throws IllegalArgumentException if given mimeType has syntax errors.
*/
@@ -637,15 +637,15 @@ public class DocFlavor implements Cloneable, Serializable
params = new TreeMap();
parseMimeType(mimeType);
-
+
myClassName = className;
}
-
+
/**
* Parses the given string as MIME type.
* The mediatype, mediasubtype and all parameter/value
* combinations are extracted, comments are dropped.
- *
+ *
* @param mimeType the string to parse
* @throws IllegalArgumentException if not conformant.
*/
@@ -656,11 +656,11 @@ public class DocFlavor implements Cloneable, Serializable
int PARAM_NAME = 3;
int PARAM_VALUE = 4;
int COMMENT_START = 5;
-
+
int state = 0;
int lastState = 0; // keeps track of state before comment
int tok;
-
+
try
{
String paramName = null;
@@ -778,7 +778,7 @@ public class DocFlavor implements Cloneable, Serializable
throw new InternalError("IOException during parsing String " + mimeType);
}
}
-
+
/**
* Checks if this doc flavor object is equal to the given object.
* <p>
@@ -787,7 +787,7 @@ public class DocFlavor implements Cloneable, Serializable
* types has to be equal in their media type, media subtype, their
* paramter/value combinations and the representation classname.
* </p>
- *
+ *
* @param obj the object to test.
* @return <code>true</code> if equal, <code>false</code> otherwise.
*/
@@ -799,14 +799,14 @@ public class DocFlavor implements Cloneable, Serializable
DocFlavor tmp = (DocFlavor) obj;
return (getMimeType().equals(tmp.getMimeType())
- && getRepresentationClassName().equals(tmp.getRepresentationClassName()));
+ && getRepresentationClassName().equals(tmp.getRepresentationClassName()));
}
/**
* Returns the media subtype of this flavor object.
* A mimetype of "text/html; charset=us-ascii" will
- * return "html" as the media subtype.
- *
+ * return "html" as the media subtype.
+ *
* @return The media subtype.
*/
public String getMediaSubtype()
@@ -818,7 +818,7 @@ public class DocFlavor implements Cloneable, Serializable
* Returns the media type of this flavor object.
* A mimetype of "text/html; charset=us-ascii" will
* return "text" as the media type.
- *
+ *
* @return The media type.
*/
public String getMediaType()
@@ -830,7 +830,7 @@ public class DocFlavor implements Cloneable, Serializable
* Returns the mime type of this flavor object.
* The mimetype will have every parameter value
* enclosed in quotes.
- *
+ *
* @return The mime type.
*/
public String getMimeType()
@@ -840,8 +840,8 @@ public class DocFlavor implements Cloneable, Serializable
while (it.hasNext())
{
- Map.Entry entry = (Map.Entry) it.next();
- mimeType += "; " + entry.getKey() + "=\"" + entry.getValue() + "\"";
+ Map.Entry entry = (Map.Entry) it.next();
+ mimeType += "; " + entry.getKey() + "=\"" + entry.getValue() + "\"";
}
return mimeType;
@@ -850,7 +850,7 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Returns the value for an optional parameter of the mime type of this
* flavor object.
- *
+ *
* @param paramName the name of the parameter
* @return The value for the parameter, or <code>null</code> if none bound.
* @throws NullPointerException if paramName is <code>null</code>.
@@ -859,13 +859,13 @@ public class DocFlavor implements Cloneable, Serializable
{
if (paramName == null)
throw new NullPointerException();
-
+
return (String) params.get(paramName.toLowerCase());
}
/**
* Returns the name of the representation class of this flavor object.
- *
+ *
* @return The representation classname.
*/
public String getRepresentationClassName()
@@ -875,30 +875,30 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Returns a hash code for this doc flavor object.
- *
+ *
* @return The hashcode.
*/
public int hashCode()
{
return ((mediaType.hashCode()
- * mediaSubtype.hashCode()
- * myClassName.hashCode()) ^ params.hashCode());
+ * mediaSubtype.hashCode()
+ * myClassName.hashCode()) ^ params.hashCode());
}
/**
* Returns a string representation of this doc flavor object.
* The returned string is of the form
* getMimeType() + "; class=\"" + getRepresentationClassName() + "\"";
- *
+ *
* @return The constructed string representation.
*/
public String toString()
{
return getMimeType() + "; class=\"" + getRepresentationClassName() + "\"";
}
-
+
// needs special treatment for serialization
- private void readObject(ObjectInputStream stream)
+ private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
params = new TreeMap();
diff --git a/javax/print/DocPrintJob.java b/javax/print/DocPrintJob.java
index eec4e2afc..ffafa47a5 100644
--- a/javax/print/DocPrintJob.java
+++ b/javax/print/DocPrintJob.java
@@ -44,14 +44,14 @@ import javax.print.event.PrintJobAttributeListener;
import javax.print.event.PrintJobListener;
/**
- * <code>DocPrintJob</code> represents a print job which supports printing
- * of a single document.
+ * <code>DocPrintJob</code> represents a print job which supports printing
+ * of a single document.
* <p>
- * An instance can be obtained from every <code>PrintService</code> available
- * by calling the {@link javax.print.PrintService#createPrintJob()} method.
+ * An instance can be obtained from every <code>PrintService</code> available
+ * by calling the {@link javax.print.PrintService#createPrintJob()} method.
* A print job is bound to the print service it is created from.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocPrintJob
@@ -63,62 +63,62 @@ public interface DocPrintJob
* If the given attribute set is empty no changes will be reported.
* If the set is <code>null</code> all attributes are monitored.
* </p>
- *
+ *
* @param listener the listener to register.
* @param attributes the attributes to observe.
- *
+ *
* @see #removePrintJobAttributeListener(PrintJobAttributeListener)
*/
void addPrintJobAttributeListener(PrintJobAttributeListener listener,
- PrintJobAttributeSet attributes);
+ PrintJobAttributeSet attributes);
/**
* Registers a listener for events occuring during processing
* of this print job.
- *
+ *
* @param listener the listener to add, if <code>null</code> nothing is done.
- *
+ *
* @see #removePrintJobListener(PrintJobListener)
*/
void addPrintJobListener(PrintJobListener listener);
/**
- * Returns the print job's attributes.
+ * Returns the print job's attributes.
* <p>
- * The returned set of attributes is a snapshot at the time of calling this
+ * The returned set of attributes is a snapshot at the time of calling this
* method and will not be updated if changes to the print job's attributes
* happens. To monitor changes register a print job listener.
* </p>
- *
- * @return The attributes of this print job,
+ *
+ * @return The attributes of this print job,
* may be empty but never <code>null</code>.
*/
PrintJobAttributeSet getAttributes();
/**
* Returns the <code>PrintService</code> object this print job is bound to.
- *
+ *
* @return The print service.
*/
PrintService getPrintService();
/**
* Prints a document with the specified print job attributes.
- *
+ *
* <p>
- * If the doc flavor provided by the <code>Doc</code> implementation is
- * not supported by this print service a <code>PrintException</code>
+ * If the doc flavor provided by the <code>Doc</code> implementation is
+ * not supported by this print service a <code>PrintException</code>
* implementing the <code>FlavorException</code> interface will be thrown.
* </p>
- *
+ *
* @param doc the document to print
- * @param attributes the job attributes to use. If <code>null</code> the
+ * @param attributes the job attributes to use. If <code>null</code> the
* default attribute values of the print service will be used.
- *
- * @throws PrintException if an error occurs. The thrown exception may
- * implement refining print exception interface to provide more detail of
+ *
+ * @throws PrintException if an error occurs. The thrown exception may
+ * implement refining print exception interface to provide more detail of
* the error.
- *
+ *
* @see AttributeException
* @see FlavorException
*/
@@ -127,22 +127,22 @@ public interface DocPrintJob
/**
* Removes the given listener from the listeners registered for changes
* in their provided attribute set during processing of this print job.
- *
+ *
* @param listener the listener to remove, if <code>null</code> or not
* registered nothing will be done.
- *
+ *
* @see #addPrintJobAttributeListener(PrintJobAttributeListener, PrintJobAttributeSet)
- */
+ */
void removePrintJobAttributeListener(PrintJobAttributeListener listener);
/**
- * Removes the given listener from the listeners registered for events
+ * Removes the given listener from the listeners registered for events
* occuring during processing of this print job.
- *
+ *
* @param listener the listener to remove, if <code>null</code> or not
* registered nothing will be done.
- *
+ *
* @see #addPrintJobListener(PrintJobListener)
*/
void removePrintJobListener(PrintJobListener listener);
-} \ No newline at end of file
+}
diff --git a/javax/print/FlavorException.java b/javax/print/FlavorException.java
index 879f10807..3e2fde2f4 100644
--- a/javax/print/FlavorException.java
+++ b/javax/print/FlavorException.java
@@ -44,19 +44,19 @@ package javax.print;
* provide further information of printing errors if unsupported
* document flavors are involved.
* <p>
- * There exists no <code>PrintException</code> class implementing this
- * interface. Providing this extension in <code>PrintException</code>
+ * There exists no <code>PrintException</code> class implementing this
+ * interface. Providing this extension in <code>PrintException</code>
* subclasses is left to the concrete print service implementation.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface FlavorException
{
/**
* Returns the unsupported document flavors.
- *
+ *
* @return The unsupported document flavors.
*/
DocFlavor[] getUnsupportedFlavors();
-} \ No newline at end of file
+}
diff --git a/javax/print/MultiDoc.java b/javax/print/MultiDoc.java
index 6e9ec841f..40a83ab0c 100644
--- a/javax/print/MultiDoc.java
+++ b/javax/print/MultiDoc.java
@@ -46,30 +46,30 @@ import java.io.IOException;
* documents for use in a print job.
* <p>
* Implementations of this interface are used to pass multiple documents, to be
- * printed as one print job, to the <code>MultiDocPrintJob</code> instance.
+ * printed as one print job, to the <code>MultiDocPrintJob</code> instance.
* </p><p>
- * There exists no implementation of this interface in the Java Print Service
+ * There exists no implementation of this interface in the Java Print Service
* API. Implementors may assume the following usage in print jobs and the needed
- * behaviour for implementations: The print job fetches the single documents via
- * iteration by consecutive calls of the {@link #getDoc()} method to obtain the
- * current document follwing calls of the {@link #next()} method to get the next
+ * behaviour for implementations: The print job fetches the single documents via
+ * iteration by consecutive calls of the {@link #getDoc()} method to obtain the
+ * current document follwing calls of the {@link #next()} method to get the next
* multidoc object for the next <code>getDoc()</code> method call (if returned
- * multidoc object is not <code>null</code>). The print service will fetch the
- * document object and then retrieve the print data from the document before it
+ * multidoc object is not <code>null</code>). The print service will fetch the
+ * document object and then retrieve the print data from the document before it
* proceeds with the next call for the next MultiDoc object in the sequence.
* </p><p>
* Implementations of this interface have to be multiple thread-safe.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDoc
{
/**
* Returns the current document.
- *
+ *
* @return The current document.
- *
+ *
* @throws IOException if an error occurs
*/
Doc getDoc() throws IOException;
@@ -77,11 +77,11 @@ public interface MultiDoc
/**
* Returns the next <code>MultiDoc</code> object that contains the
* next document for retrieval.
- *
+ *
* @return The next <code>MultiDoc</code> object, or <code>null</code>
* if no more documents are available.
- *
+ *
* @throws IOException if an error occurs
*/
MultiDoc next() throws IOException;
-} \ No newline at end of file
+}
diff --git a/javax/print/MultiDocPrintJob.java b/javax/print/MultiDocPrintJob.java
index 36089b5d0..c030c4d64 100644
--- a/javax/print/MultiDocPrintJob.java
+++ b/javax/print/MultiDocPrintJob.java
@@ -42,36 +42,35 @@ import javax.print.attribute.PrintRequestAttributeSet;
/**
- * <code>MultiDocPrintJob</code> represents a print job which supports
+ * <code>MultiDocPrintJob</code> represents a print job which supports
* printing of multiple documents as one print job.
* <p>
* An instance can be obtained from every <code>MultiDocPrintService</code>
- * available by calling the
- * {@link javax.print.MultiDocPrintService#createMultiDocPrintJob()} method.
+ * available by calling the
+ * {@link javax.print.MultiDocPrintService#createMultiDocPrintJob()} method.
* A print job is bound to the print service it is created from.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDocPrintJob extends DocPrintJob
{
/**
- * Prints the documents supplied in the given <code>MultiDoc</code> object
+ * Prints the documents supplied in the given <code>MultiDoc</code> object
* as one print job with the given printing attributes.
- *
- * @param multiDoc the documents to print. Every document must have a
+ *
+ * @param multiDoc the documents to print. Every document must have a
* flavor supported by the bound print service.
- * @param attributes the printing attributes to apply to the print job. If
+ * @param attributes the printing attributes to apply to the print job. If
* <code>null</code> the default attribute values will be used.
- *
- * @throws PrintException if an error occurs. The thrown exception may
- * implement refining print exception interface to provide more detail of
+ *
+ * @throws PrintException if an error occurs. The thrown exception may
+ * implement refining print exception interface to provide more detail of
* the error.
- *
+ *
* @see FlavorException
* @see AttributeException
*/
void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes)
throws PrintException;
}
- \ No newline at end of file
diff --git a/javax/print/MultiDocPrintService.java b/javax/print/MultiDocPrintService.java
index 105e72210..b0ebfd15a 100644
--- a/javax/print/MultiDocPrintService.java
+++ b/javax/print/MultiDocPrintService.java
@@ -40,21 +40,21 @@ package javax.print;
/**
- * <code>MultiDocPrintService</code> represents print services that are
- * capable of printing multiple documents as one print job. It provides an
+ * <code>MultiDocPrintService</code> represents print services that are
+ * capable of printing multiple documents as one print job. It provides an
* additional method for the creation of a print job for multiple documents.
- *
+ *
* @see javax.print.MultiDoc
* @see javax.print.MultiDocPrintJob
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDocPrintService extends PrintService
{
/**
* Create a job that can print a <code>MultiDoc</code> object.
- *
+ *
* @return The created print job.
*/
MultiDocPrintJob createMultiDocPrintJob();
-} \ No newline at end of file
+}
diff --git a/javax/print/PrintException.java b/javax/print/PrintException.java
index 6fd46b506..8ff29b20c 100644
--- a/javax/print/PrintException.java
+++ b/javax/print/PrintException.java
@@ -42,8 +42,8 @@ package javax.print;
* <code>PrintException</code> is used to report exceptions during the
* usage of a print service implementation.
* <p>
- * This base class only provides the possibility to report a message as
- * exception. A concrete print service implementation may provide
+ * This base class only provides the possibility to report a message as
+ * exception. A concrete print service implementation may provide
* specialised subclasses implementing one or more of the following
* exception interfaces:<br>
* <ul>
@@ -52,7 +52,7 @@ package javax.print;
* <li>{@link javax.print.URIException}</li>
* </ul>
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintException extends Exception
@@ -67,7 +67,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param e chained exception
*/
public PrintException(Exception e)
@@ -77,7 +77,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param s detailed message, or null for no message
*/
public PrintException(String s)
@@ -87,7 +87,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param s detailed message, or null for no message
* @param e chained exception
*/
@@ -95,4 +95,4 @@ public class PrintException extends Exception
{
super(s, e);
}
-} \ No newline at end of file
+}
diff --git a/javax/print/PrintService.java b/javax/print/PrintService.java
index 125d27083..b7bd50088 100644
--- a/javax/print/PrintService.java
+++ b/javax/print/PrintService.java
@@ -48,57 +48,57 @@ import javax.print.event.PrintServiceAttributeListener;
* A <code>PrintService</code> represents a printer available for printing.
* <p>
* The print service hereby may be a real physical printer device, a printer
- * group with same capabilities or a logical print service (like for example
+ * group with same capabilities or a logical print service (like for example
* a PDF writer). The print service is used to query the capabilities of the
* represented printer instance. If a suitable print service is found it is
- * used to create a print job for the actual printing process.
+ * used to create a print job for the actual printing process.
* </p>
* @see javax.print.DocPrintJob
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintService
{
/**
- * Creates and returns a new print job which is capable to handle all
+ * Creates and returns a new print job which is capable to handle all
* the document flavors supported by this print service.
- *
+ *
* @return The created print job object.
*/
DocPrintJob createPrintJob();
-
+
/**
* Determines if two services refer to the same underlying service.
- *
+ *
* @param obj the service to check against
- *
+ *
* @return <code>true</code> if both services refer to the same underlying
* service, <code>false</code> otherwise.
*/
boolean equals(Object obj);
-
+
/**
* Returns the value of the single specified attribute.
- *
+ *
* @param category the category of a <code>PrintServiceAttribute</code>
- *
+ *
* @return The value of the attribute, or <code>null</code> if the attribute
* category is not supported by this print service implementation.
- *
+ *
* @throws NullPointerException if category is <code>null</code>.
* @throws IllegalArgumentException if category is not a class that
* implements <code>PrintServiceAttribute</code>.
*/
<T extends PrintServiceAttribute> T getAttribute(Class<T> category);
-
+
/**
- * Returns the attributes describing this print service. The returned
+ * Returns the attributes describing this print service. The returned
* attributes set is unmodifiable and represents the current state of
- * the print service. As some print service attributes may change
+ * the print service. As some print service attributes may change
* (depends on the print service implementation) a subsequent call to
- * this method may return a different set. To monitor changes a
- * <code>PrintServiceAttributeListener</code> may be registered.
- *
+ * this method may return a different set. To monitor changes a
+ * <code>PrintServiceAttributeListener</code> may be registered.
+ *
* @return All the description attributes of this print service.
* @see #addPrintServiceAttributeListener(PrintServiceAttributeListener)
*/
@@ -111,67 +111,67 @@ public interface PrintService
* A return value of <code>null</code> means either that the print service
* does not support the attribute category or there is no default value
* available for this category. To distinguish these two case one can test
- * with {@link #isAttributeCategorySupported(Class)} if the category is
+ * with {@link #isAttributeCategorySupported(Class)} if the category is
* supported.
* </p>
- *
+ *
* @param category the category of the attribute
- *
+ *
* @return The default value, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>category</code> is <code>null</code>
* @throws IllegalArgumentException if <code>category</code> is a class
- * not implementing <code>Attribute</code>
+ * not implementing <code>Attribute</code>
*/
Object getDefaultAttributeValue(Class<? extends Attribute> category);
-
+
/**
* Returns the name of this print service.
* This may be the value of the <code>PrinterName</code> attribute.
- *
+ *
* @return The print service name.
*/
String getName();
-
+
/**
* Returns a factory for UI components if supported by the print service.
- *
+ *
* @return A factory for UI components or <code>null</code>.
*/
ServiceUIFactory getServiceUIFactory();
-
+
/**
* Returns all supported attribute categories.
- *
+ *
* @return The class array of all supported attribute categories.
*/
Class<?>[] getSupportedAttributeCategories();
-
+
/**
- * Determines and returns all supported attribute values of a given
- * attribute category a client can use when setting up a print job
- * for this print service.
+ * Determines and returns all supported attribute values of a given
+ * attribute category a client can use when setting up a print job
+ * for this print service.
* <p>
* The returned object may be one of the following types:
* <ul>
- * <li>A single instance of the attribute category to indicate that any
+ * <li>A single instance of the attribute category to indicate that any
* value will be supported.</li>
- * <li>An array of the same type as the attribute category to test,
+ * <li>An array of the same type as the attribute category to test,
* containing all the supported values for this category.</li>
- * <li>A single object (of any other type than the attribute category)
- * which indicates bounds on the supported values.</li>
- * </ul>
+ * <li>A single object (of any other type than the attribute category)
+ * which indicates bounds on the supported values.</li>
+ * </ul>
* </p>
- *
+ *
* @param category the attribute category to test
* @param flavor the document flavor to use, or <code>null</code>
- * @param attributes set of attributes for a supposed job,
+ * @param attributes set of attributes for a supposed job,
* or <code>null</code>
- *
- * @return A object (as defined above) indicating the supported values
- * for the given attribute category, or <code>null</code> if this print
+ *
+ * @return A object (as defined above) indicating the supported values
+ * for the given attribute category, or <code>null</code> if this print
* service doesn't support the given attribute category at all.
- *
+ *
* @throws NullPointerException if <code>category</code> is null
* @throws IllegalArgumentException if <code>category</code> is a class not
* implementing <code>Attribute</code>, or if <code>flavor</code> is not
@@ -180,116 +180,116 @@ public interface PrintService
Object getSupportedAttributeValues(Class<? extends Attribute> category,
DocFlavor flavor,
AttributeSet attributes);
-
+
/**
* Determines and returns an array of all supported document flavors which
- * can be used to supply print data to this print service.
+ * can be used to supply print data to this print service.
* <p>
* The supported attribute categories may differ between the supported
* document flavors. To test for supported attributes one can use the
* {@link #getUnsupportedAttributes(DocFlavor, AttributeSet)} method with
* the specific doc flavor and attributes set.
* </p>
- *
+ *
* @return the supported document flavors
*/
DocFlavor[] getSupportedDocFlavors();
-
+
/**
* Identifies all the unsupported attributes of the given set of attributes
- * in the context of the specified document flavor.
+ * in the context of the specified document flavor.
* <p>
- * The given flavor has to be supported by the print service (use
- * {@link #isDocFlavorSupported(DocFlavor)} to verify). The method will
+ * The given flavor has to be supported by the print service (use
+ * {@link #isDocFlavorSupported(DocFlavor)} to verify). The method will
* return <code>null</code> if all given attributes are supported. Otherwise
* a set of unsupported attributes are returned. The attributes in the
* returned set may be completely unsupported or only the specific requested
- * value. If flavor is <code>null</code> the default document flavor of the
+ * value. If flavor is <code>null</code> the default document flavor of the
* print service is used in the identification process.
* </p>
- *
+ *
* @param flavor document flavor to test, or <code>null</code>.
* @param attributes set of printing attributes for a supposed job
- *
- * @return <code>null</code> if this print service supports all the given
+ *
+ * @return <code>null</code> if this print service supports all the given
* attributes for the specified doc flavor. Otherwise the set of unsupported
* attributes are returned.
- *
+ *
* @throws IllegalArgumentException if <code>flavor</code> is unsupported
*/
AttributeSet getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes);
-
+
/**
* Returns a hashcode for this print service.
- *
+ *
* @return The hashcode.
*/
int hashCode();
-
+
/**
- * Determines a given attribute category is supported by this
+ * Determines a given attribute category is supported by this
* print service implementation. This only tests for the category
* not for any specific values of this category nor in the context
* of a specific document flavor.
- *
+ *
* @param category the category to check
- *
+ *
* @return <code>true</code> if <code>category</code> is supported,
* <code>false</code> otherwise.
- *
+ *
* @throws NullPointerException if <code>category</code> is <code>null</code>
* @throws IllegalArgumentException if <code>category</code> is a class not
* implementing <code>Attribute</code>.
*/
boolean isAttributeCategorySupported(Class<? extends Attribute> category);
-
+
/**
- * Determines if a given attribute value is supported when creating a print
- * job for this print service.
+ * Determines if a given attribute value is supported when creating a print
+ * job for this print service.
* <p>
- * If either the document flavor or the provided attributes are
- * <code>null</code> it is determined if the given attribute value is
+ * If either the document flavor or the provided attributes are
+ * <code>null</code> it is determined if the given attribute value is
* supported in some combination of the available document flavors and
* attributes of the print service. Otherwise it is checked for the
* specific context of the given document flavor/attributes set.
* </p>
- *
+ *
* @param attrval the attribute value to check
* @param flavor the document flavor to use, or <code>null</code>.
* @param attributes set of attributes to use, or <code>null</code>.
- *
+ *
* @return <code>true</code> if the attribute value is supported in the
* requested context, <code>false</code> otherwise.
- *
+ *
* @throws NullPointerException if <code>attrval</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>flavor</code> is not supported
* by this print service
*/
boolean isAttributeValueSupported(Attribute attrval, DocFlavor flavor, AttributeSet attributes);
-
+
/**
* Determines if a given document flavor is supported or not.
- *
+ *
* @param flavor the document flavor to check
- *
+ *
* @return <code>true</code> if <code>flavor</code> is supported,
* <code>false</code> otherwise.
- *
+ *
* @throws NullPointerException if <code>flavor</code> is null.
*/
boolean isDocFlavorSupported(DocFlavor flavor);
-
+
/**
* Registers a print service attribute listener to this print service.
- *
+ *
* @param listener the listener to add
*/
void addPrintServiceAttributeListener(PrintServiceAttributeListener listener);
-
+
/**
* De-registers a print service attribute listener from this print service.
- *
+ *
* @param listener the listener to remove
*/
void removePrintServiceAttributeListener(PrintServiceAttributeListener listener);
diff --git a/javax/print/PrintServiceLookup.java b/javax/print/PrintServiceLookup.java
index 57cb8dc9f..1ea1f9547 100644
--- a/javax/print/PrintServiceLookup.java
+++ b/javax/print/PrintServiceLookup.java
@@ -50,54 +50,54 @@ import javax.print.attribute.AttributeSet;
/**
- * <code>PrintServiceLookup</code> implementations provide a way to lookup
+ * <code>PrintServiceLookup</code> implementations provide a way to lookup
* print services based on different constraints.
* <p>
- * Implementations are located and loaded automatically through the SPI JAR
- * file specification. Therefore implementation classes must provide a default
- * constructor for instantiation. Furthermore, applications are able to
+ * Implementations are located and loaded automatically through the SPI JAR
+ * file specification. Therefore implementation classes must provide a default
+ * constructor for instantiation. Furthermore, applications are able to
* register further instances directly at runtime.
* </p><p>
- * If an SecurityManager is installed implementors should call
- * <code>checkPrintJobAccess()</code> to disable access for untrusted code.
- * This check is to be made in every lookup service implementation for
- * flexibility. Print services registered by applications through
- * <code>registerService(PrintService)</code> are suppressed in the
- * lookup results if a security manager is installed and disallows access.
+ * If an SecurityManager is installed implementors should call
+ * <code>checkPrintJobAccess()</code> to disable access for untrusted code.
+ * This check is to be made in every lookup service implementation for
+ * flexibility. Print services registered by applications through
+ * <code>registerService(PrintService)</code> are suppressed in the
+ * lookup results if a security manager is installed and disallows access.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class PrintServiceLookup
{
-
+
private static final CupsPrintServiceLookup systemProvider;
private static final HashSet printServices;
private static final HashSet printServiceLookups;
-
+
static
{
systemProvider = new CupsPrintServiceLookup();
-
+
printServices = new HashSet();
printServiceLookups = new HashSet();
-
+
// check for service providers
Iterator it = ServiceFactory.lookupProviders(PrintServiceLookup.class);
-
+
while (it.hasNext())
- printServiceLookups.add(it.next());
- }
-
+ printServiceLookups.add(it.next());
+ }
+
/**
* Constructs a <code>PrintServiceLookup</code> object.
*/
public PrintServiceLookup()
{
- // nothing to do here
+ // nothing to do here
}
-
+
/**
* Explicitly registers the provided print service lookup implementation.
* <p>
@@ -106,22 +106,22 @@ public abstract class PrintServiceLookup
* else fails.
* </p>
*
- * @param sp the print service lookup implementation to register.
+ * @param sp the print service lookup implementation to register.
* @return <code>true</code> if registered, <code>false</code> otherwise.
*/
public static boolean registerServiceProvider(PrintServiceLookup sp)
- {
+ {
return printServiceLookups.add(sp);
}
-
+
/**
* Explicitly registers the provided print service instance.
* <p>
* The registration will silently fail (returning <code>false</code>) if
- * the print service instance is already registered or the registration
+ * the print service instance is already registered or the registration
* somehow else fails.
* </p>
- * @param service the single print service to register.
+ * @param service the single print service to register.
* @return <code>true</code> if registered, <code>false</code> otherwise.
*/
public static boolean registerService(PrintService service)
@@ -143,78 +143,78 @@ public abstract class PrintServiceLookup
return false;
}
}
-
+
/**
* Searches print services capable of printing in the given document flavor
* which supports the specified printing attributes.
- *
- * @param flavor the document flavor to support. If <code>null</code> this
+ *
+ * @param flavor the document flavor to support. If <code>null</code> this
* constraint is ignored during lookup.
- * @param attributes the printing attributes to support. If
+ * @param attributes the printing attributes to support. If
* <code>null</code> this constraint is ignored during lookup.
- * @return The resulting available print services, or an array of length 0
- * if none is found.
+ * @return The resulting available print services, or an array of length 0
+ * if none is found.
*/
public static final PrintService[] lookupPrintServices(DocFlavor flavor,
AttributeSet attributes)
- {
+ {
ArrayList result = new ArrayList();
-
- PrintService[] services =
- systemProvider.getPrintServices(flavor, attributes);
+
+ PrintService[] services =
+ systemProvider.getPrintServices(flavor, attributes);
result.addAll(Arrays.asList(services));
-
+
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
PrintServiceLookup lookup = (PrintServiceLookup) it.next();
- services = lookup.getPrintServices(flavor, attributes);
+ services = lookup.getPrintServices(flavor, attributes);
result.addAll(Arrays.asList(services));
}
-
+
for (Iterator it = printServices.iterator(); it.hasNext(); )
{
PrintService service = (PrintService) it.next();
- if (systemProvider.checkPrintService(flavor, attributes, service))
+ if (systemProvider.checkPrintService(flavor, attributes, service))
result.add(service);
}
-
+
return (PrintService[]) result.toArray(new PrintService[result.size()]);
}
-
+
/**
- * Searches print services capable of multi document printing in all of the
+ * Searches print services capable of multi document printing in all of the
* given document flavors and supporting the specified printing attributes.
- *
- * @param flavors the document flavors to support. If <code>null</code> this
+ *
+ * @param flavors the document flavors to support. If <code>null</code> this
* constraint is ignored during lookup.
- * @param attributes the printing attributes to support. If
+ * @param attributes the printing attributes to support. If
* <code>null</code> this constraint is ignored during lookup.
- * @return The resulting available multi document print services, or an
- * array of length 0 if none is found.
+ * @return The resulting available multi document print services, or an
+ * array of length 0 if none is found.
*/
public static final MultiDocPrintService[] lookupMultiDocPrintServices(
DocFlavor[] flavors, AttributeSet attributes)
{
ArrayList result = new ArrayList();
-
- MultiDocPrintService[] services =
- systemProvider.getMultiDocPrintServices(flavors, attributes);
+
+ MultiDocPrintService[] services =
+ systemProvider.getMultiDocPrintServices(flavors, attributes);
result.addAll(Arrays.asList(services));
-
+
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
PrintServiceLookup lookup = (PrintServiceLookup) it.next();
- services = lookup.getMultiDocPrintServices(flavors, attributes);
+ services = lookup.getMultiDocPrintServices(flavors, attributes);
result.addAll(Arrays.asList(services));
}
-
+
for (Iterator it = printServices.iterator(); it.hasNext(); )
{
PrintService service = (PrintService) it.next();
- if (systemProvider.checkMultiDocPrintService(flavors, attributes, service))
+ if (systemProvider.checkMultiDocPrintService(flavors, attributes, service))
result.add(service);
}
-
+
return (MultiDocPrintService[]) result.toArray(
new MultiDocPrintService[result.size()]);
}
@@ -224,32 +224,32 @@ public abstract class PrintServiceLookup
* Searches the default print service in the current environment.
* <p>
* If multiple lookup services are registered and each has a default
- * print service the result is not specified. Usually the default
+ * print service the result is not specified. Usually the default
* print service of the native platform lookup service is returned.
* </p><p>
* The GNU classpath implementation will return the CUPS default
* printing service as the default print service, if available.
* </p><p>
* The default print service may be overriden by users through
- * the property <code>javax.print.defaultPrinter</code>. A service
+ * the property <code>javax.print.defaultPrinter</code>. A service
* specified must be found to be returned as the default.
* </p>
- *
+ *
* @return The default print service, or <code>null</code> if none found.
*/
public static final PrintService lookupDefaultPrintService()
{
// TODO Find out what the property controls and use it
// String defaultPrinter = System.getProperty("javax.print.defaultPrinter");
-
+
// first test for platform specified default services
PrintService service = systemProvider.getDefaultPrintService();
-
- if (service != null)
+
+ if (service != null)
return service;
-
+
// none available by systemDefaultProvider
- // search in other registered ones and take first
+ // search in other registered ones and take first
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
service = ((PrintServiceLookup) it.next()).getDefaultPrintService();
@@ -259,10 +259,10 @@ public abstract class PrintServiceLookup
return null;
}
-
+
/**
* Not to be called directly by applications.
- *
+ *
* @return The default lookup service of the implementing lookup service or
* <code>null</code> if there is no default one.
*/
@@ -270,34 +270,34 @@ public abstract class PrintServiceLookup
/**
* Not to be called directly by applications.
- *
+ *
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
- public abstract MultiDocPrintService[]
+ public abstract MultiDocPrintService[]
getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes);
/**
* Not to be called directly by applications.
- *
+ *
* @return All known print services of the implementing lookup service
- * regardless of supported features, or an array of length 0 if none is
+ * regardless of supported features, or an array of length 0 if none is
* available.
*/
public abstract PrintService[] getPrintServices();
/**
* Not to be called directly by applications.
- *
+ *
* @param flavor the document flavor which has to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
- public abstract PrintService[]
+ public abstract PrintService[]
getPrintServices(DocFlavor flavor, AttributeSet attributes);
}
diff --git a/javax/print/ServiceUI.java b/javax/print/ServiceUI.java
index 4a7b5bd4a..fa5086e85 100644
--- a/javax/print/ServiceUI.java
+++ b/javax/print/ServiceUI.java
@@ -1,4 +1,4 @@
-/* ServiceUI.java --
+/* ServiceUI.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,19 +48,19 @@ import java.util.Arrays;
import javax.print.attribute.PrintRequestAttributeSet;
/**
- * <code>ServiceUI</code> provides a method to create a graphical
+ * <code>ServiceUI</code> provides a method to create a graphical
* print dialog.
* <p>
* The graphical print dialog enables the user to browse the available
- * print services on the system. It provides user interfaces to interact
- * with the most common printing attributes likes specifying the number of
+ * print services on the system. It provides user interfaces to interact
+ * with the most common printing attributes likes specifying the number of
* copies to print or the page ranges.
* </p><p>
- * The initial appearance of the print dialog as shown to the user may be
- * specified by providing the default selected print service as well as
+ * The initial appearance of the print dialog as shown to the user may be
+ * specified by providing the default selected print service as well as
* initial values for the printing attributes in the user interface.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class ServiceUI
@@ -73,65 +73,65 @@ public class ServiceUI
{
// nothing to do here - only one static method
}
-
+
/**
- * Creates a modal graphical printing dialog at the specified location on
+ * Creates a modal graphical printing dialog at the specified location on
* the screen.
* <p>
- * The dialog will return the user selected print service and the given
- * attributes set will contain the modified printing attributes. If the
- * user cancels the printing dialog <code>null</code> will be returned and
+ * The dialog will return the user selected print service and the given
+ * attributes set will contain the modified printing attributes. If the
+ * user cancels the printing dialog <code>null</code> will be returned and
* the printing attributes set will be unmodified.
* </p><p>
* The values of the given attributes set (if not empty) will be displayed
- * initially unless the are unsupported by the print service. If a print
+ * initially unless the are unsupported by the print service. If a print
* service does not support a particular value it is substituted with the
* default value of the print service.
- * </p>
- *
+ * </p>
+ *
* @param gc the screen to use. <code>null</code> is default screen.
- * @param x the coordinate of the upper left edge of the dialog in screen
+ * @param x the coordinate of the upper left edge of the dialog in screen
* coordinates (not relative to the parent frame).
- * @param y the coordinate of the upper left edge of the dialog in screen
+ * @param y the coordinate of the upper left edge of the dialog in screen
* coordinates (not relative to the parent frame).
* @param services the print services to browse (not null).
* @param defaultService the default service. If <code>null</code>
* the first of the print services in the services array will be used.
* @param flavor the flavours to be printed.
- * @param attributes the attributes requested. Will be updated
- * by selections done by the user in the dialog.
- *
+ * @param attributes the attributes requested. Will be updated
+ * by selections done by the user in the dialog.
+ *
* @return The selected print service or <code>null</code> if user
* has cancelled the printer dialog.
- *
+ *
* @throws HeadlessException if GraphicsEnvironment is headless
- * @throws IllegalArgumentException if services is <code>null</code> or an
- * empty array, attributes are <code>null</code> or the given default
+ * @throws IllegalArgumentException if services is <code>null</code> or an
+ * empty array, attributes are <code>null</code> or the given default
* <code>PrintService<code> is not part of the print service array.
*/
- public static PrintService printDialog(GraphicsConfiguration gc, int x,
+ public static PrintService printDialog(GraphicsConfiguration gc, int x,
int y, PrintService[] services, PrintService defaultService,
DocFlavor flavor, PrintRequestAttributeSet attributes)
throws HeadlessException
- {
+ {
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException("GraphicsEnvironment is headless.");
-
+
if (services == null || services.length == 0 || attributes == null)
- throw new IllegalArgumentException("Given print service array / "
+ throw new IllegalArgumentException("Given print service array / "
+ "attributes may not be null");
-
- if (defaultService != null &&
+
+ if (defaultService != null &&
! Arrays.asList(services).contains(defaultService))
- throw new IllegalArgumentException("defaultService is not contained "
+ throw new IllegalArgumentException("defaultService is not contained "
+ " in the print service array");
-
- PrinterDialog dialog = new PrinterDialog(gc, services, defaultService,
+
+ PrinterDialog dialog = new PrinterDialog(gc, services, defaultService,
flavor, attributes);
-
+
dialog.setLocation(x, y);
dialog.show();
-
+
return dialog.getSelectedPrintService();
}
}
diff --git a/javax/print/ServiceUIFactory.java b/javax/print/ServiceUIFactory.java
index 1a5c1cfe2..4b660b683 100644
--- a/javax/print/ServiceUIFactory.java
+++ b/javax/print/ServiceUIFactory.java
@@ -39,46 +39,46 @@ exception statement from your version. */
package javax.print;
/**
- * <code>ServiceUIFactory</code> enables print services to provide additional
+ * <code>ServiceUIFactory</code> enables print services to provide additional
* user interface dialogs.
* <p>
- * A print service may provide a <code>ServiceUIFactory</code> implementation
+ * A print service may provide a <code>ServiceUIFactory</code> implementation
* if its <code>getServiceUIFactory()</code> method is called. If a factory
- * object is returned it can be queried for provided user interface dialogs.
+ * object is returned it can be queried for provided user interface dialogs.
* Different roles are defined to denote dialogs providing informations about
- * the print service, dialogs for administration of a print service and for
+ * the print service, dialogs for administration of a print service and for
* end-user browsing dialogs.
* </p><p>
- * The factory can support providing these UI roles in different dialog types
+ * The factory can support providing these UI roles in different dialog types
* (AWT, Swing, JComponent, Panel). The support and use of Swing interfaces is
* however preferred.
* </p>
- *
+ *
* @author Michael Koch
*/
public abstract class ServiceUIFactory
{
/** A user interface providing informations about the print service. */
public static final int ABOUT_UIROLE = 1;
-
+
/** A user interface to administer the print service. */
public static final int ADMIN_UIROLE = 2;
-
+
/** A user interface for end-user browsing of the print service. */
public static final int MAIN_UIROLE = 3;
-
+
/** Role IDs greater than this may be used for other private roles. */
public static final int RESERVED_UIROLE = 99;
/** Identifies a UI provided as an AWT dialog. */
public static final String DIALOG_UI = "java.awt.Dialog";
-
+
/** Identifies a UI provided as a Swing JComponent. */
public static final String JCOMPONENT_UI = "javax.swing.JComponent";
-
+
/** Identifies a UI provided as a Swing JDialog. */
public static final String JDIALOG_UI = "javax.swing.JDialog";
-
+
/** Identifies a UI provided as an AWT Panel. */
public static final String PANEL_UI = "java.awt.Panel";
@@ -87,18 +87,18 @@ public abstract class ServiceUIFactory
*/
public ServiceUIFactory()
{
- // Do nothing here.
+ // Do nothing here.
}
/**
* Returns an UI object which may be cast to the requested UI type.
- *
+ *
* @param role the role requested. Must be one of the standard roles
* or a private role supported by this factory
* @param ui type in which the role is requested
- *
+ *
* @return the UI role or null of this role is not supported by this factory
- *
+ *
* @throws IllegalArgumentException if <code>role</code> is neither one of
* the standard ones nor a private one supported by this factory
*/
@@ -106,13 +106,13 @@ public abstract class ServiceUIFactory
/**
* Returns the UI types supported by this factory for an UI role.
- *
+ *
* @param role the role to be looked up
- *
+ *
* @return an array of UI types
- *
+ *
* @throws IllegalArgumentException if <code>role</code> is neither one of
* the standard ones nor a private one supported by this factory
*/
public abstract String[] getUIClassNamesForRole(int role);
-} \ No newline at end of file
+}
diff --git a/javax/print/SimpleDoc.java b/javax/print/SimpleDoc.java
index a49406bcb..16b2d8225 100644
--- a/javax/print/SimpleDoc.java
+++ b/javax/print/SimpleDoc.java
@@ -1,4 +1,4 @@
-/* SimpleDoc.java --
+/* SimpleDoc.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,23 +49,23 @@ import javax.print.attribute.AttributeSetUtilities;
import javax.print.attribute.DocAttributeSet;
/**
- * Simple implementation of the <code>Doc</code> interface capable of handling
+ * Simple implementation of the <code>Doc</code> interface capable of handling
* the predefined document flavors of <code>DocFlavor</code>.
* <p>
- * This implementation can construct a reader or stream for the service from
+ * This implementation can construct a reader or stream for the service from
* the print data and ensures that always the same object is returned on each
- * method call. It does simple checks that the supplied data matches the
+ * method call. It does simple checks that the supplied data matches the
* specified flavor of the doc object and supports thread safe access.
- * </p>
- *
+ * </p>
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class SimpleDoc implements Doc
-{
+{
private final Object printData;
private final DocFlavor flavor;
private final DocAttributeSet attributes;
-
+
private InputStream stream;
private Reader reader;
@@ -74,17 +74,17 @@ public final class SimpleDoc implements Doc
* @param printData the object with the data to print.
* @param flavor the document flavor of the print data.
* @param attributes the attributes of the doc (may be <code>null</code>).
- *
+ *
* @throws IllegalArgumentException if either <code>printData</code> or
* <code>flavor</code> are <code>null</code>, or the print data is not
* supplied in the document format specified by the given flavor object.
*/
- public SimpleDoc(Object printData, DocFlavor flavor,
+ public SimpleDoc(Object printData, DocFlavor flavor,
DocAttributeSet attributes)
{
if (printData == null || flavor == null)
throw new IllegalArgumentException("printData/flavor may not be null");
-
+
if (! (printData.getClass().getName().equals(
flavor.getRepresentationClassName())
|| flavor.getRepresentationClassName().equals("java.io.Reader")
@@ -93,16 +93,16 @@ public final class SimpleDoc implements Doc
&& printData instanceof InputStream))
{
throw new IllegalArgumentException("data is not of declared flavor type");
- }
-
+ }
+
this.printData = printData;
this.flavor = flavor;
-
+
if (attributes != null)
this.attributes = AttributeSetUtilities.unmodifiableView(attributes);
else
this.attributes = null;
-
+
stream = null;
reader = null;
}
@@ -110,13 +110,13 @@ public final class SimpleDoc implements Doc
/**
* Returns the unmodifiable view of the attributes of this doc object.
* <p>
- * The attributes of this doc's attributes set overrides attributes of
- * the same category in the print job's attribute set. If an attribute
+ * The attributes of this doc's attributes set overrides attributes of
+ * the same category in the print job's attribute set. If an attribute
* is not available in this doc's attributes set or <code>null</code>
* is returned the attributes of the same category of the print job are
- * used.
+ * used.
* </p>
- *
+ *
* @return The unmodifiable attributes set, or <code>null</code>.
*/
public DocAttributeSet getAttributes()
@@ -126,7 +126,7 @@ public final class SimpleDoc implements Doc
/**
* Returns the flavor of this doc objects print data.
- *
+ *
* @return The document flavor.
*/
public DocFlavor getDocFlavor()
@@ -141,7 +141,7 @@ public final class SimpleDoc implements Doc
* document flavor ({@link DocFlavor#getRepresentationClassName()})
* and can be cast to this representation class.
* </p>
- *
+ *
* @return The print data in the representation class.
* @throws IOException if representation class is a stream and I/O
* exception occures.
@@ -162,10 +162,10 @@ public final class SimpleDoc implements Doc
* <li><code>java.io.Reader</code></li>
* </ul>
* otherwise this method returns <code>null</code>.
- * </p>
- *
+ * </p>
+ *
* @return The <code>Reader</code> object, or <code>null</code>.
- *
+ *
* @throws IOException if an error occurs.
*/
public Reader getReaderForText() throws IOException
@@ -182,9 +182,9 @@ public final class SimpleDoc implements Doc
else if (flavor instanceof DocFlavor.READER)
reader = (Reader) printData;
}
-
+
return reader;
- }
+ }
}
/**
@@ -197,10 +197,10 @@ public final class SimpleDoc implements Doc
* <li><code>java.io.InputStream</code></li>
* </ul>
* otherwise this method returns <code>null</code>.
- * </p>
- *
+ * </p>
+ *
* @return The <code>InputStream</code> object, or <code>null</code>.
- *
+ *
* @throws IOException if an error occurs.
*/
public InputStream getStreamForBytes() throws IOException
@@ -215,9 +215,9 @@ public final class SimpleDoc implements Doc
else if (flavor instanceof DocFlavor.INPUT_STREAM)
stream = (InputStream) printData;
}
-
+
return stream;
- }
+ }
}
}
diff --git a/javax/print/StreamPrintService.java b/javax/print/StreamPrintService.java
index 8398a734c..4b82ef767 100644
--- a/javax/print/StreamPrintService.java
+++ b/javax/print/StreamPrintService.java
@@ -46,21 +46,21 @@ import java.io.OutputStream;
* printing into a supplied output stream.
* <p>
* Beside providing the same functionality as a print service it additionally
- * allows to specify the output stream for the print data. A stream print
- * service is obtained via the {@link javax.print.StreamPrintServiceFactory}
+ * allows to specify the output stream for the print data. A stream print
+ * service is obtained via the {@link javax.print.StreamPrintServiceFactory}
* by looking for services supporting a given output format type.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class StreamPrintService implements PrintService
{
private boolean disposed;
private OutputStream out;
-
+
/**
* Constructs a <code>StreamPrintService</code> object.
- *
+ *
* @param out the <code>OutputStream</code> to use
*/
protected StreamPrintService(OutputStream out)
@@ -78,16 +78,16 @@ public abstract class StreamPrintService implements PrintService
/**
* Returns the document format emitted by this print service.
- * The returned string is a MIME type compatible with the
+ * The returned string is a MIME type compatible with the
* {@link DocFlavor} class.
- *
+ *
* @return The document format of the output.
*/
public abstract String getOutputFormat();
/**
* Returns the <code>OutputStream</code> of this object.
- *
+ *
* @return The <code>OutputStream</code>
*/
public OutputStream getOutputStream()
@@ -97,7 +97,7 @@ public abstract class StreamPrintService implements PrintService
/**
* Determines if this <code>StreamPrintService</code> object is disposed.
- *
+ *
* @return <code>true</code> if disposed already,
* otherwise <code>false</code>
*/
@@ -105,4 +105,4 @@ public abstract class StreamPrintService implements PrintService
{
return disposed;
}
-} \ No newline at end of file
+}
diff --git a/javax/print/StreamPrintServiceFactory.java b/javax/print/StreamPrintServiceFactory.java
index 90496b36a..44f715996 100644
--- a/javax/print/StreamPrintServiceFactory.java
+++ b/javax/print/StreamPrintServiceFactory.java
@@ -1,4 +1,4 @@
-/* StreamPrintServiceFactory.java --
+/* StreamPrintServiceFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,83 +46,83 @@ import java.util.HashSet;
import java.util.Iterator;
/**
- * <code>StreamPrintServiceFactory</code> provides a static method to lookup
+ * <code>StreamPrintServiceFactory</code> provides a static method to lookup
* registered factories to construct <code>StreamPrintService</code> instances.
* <p>
- * <code>StreamPrintService</code> are used to print into a provided output
- * stream in the document format provided by the stream print service
+ * <code>StreamPrintService</code> are used to print into a provided output
+ * stream in the document format provided by the stream print service
* implementation.
* </p><p>
- * Implementations are located and loaded automatically through the SPI JAR
- * file specification. Therefore implementation classes must provide a default
+ * Implementations are located and loaded automatically through the SPI JAR
+ * file specification. Therefore implementation classes must provide a default
* constructor for instantiation.
* </p>
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class StreamPrintServiceFactory
-{
+{
/**
* Default public constructor.
- * Used for automatic loading and instantiation through
+ * Used for automatic loading and instantiation through
* the SPI jar file specification.
*/
public StreamPrintServiceFactory()
{
// nothing to do
}
-
+
/**
- * Searches for matching factories providing stream print services that
- * support the printing of documents with the given document flavor into
+ * Searches for matching factories providing stream print services that
+ * support the printing of documents with the given document flavor into
* the given output mime type.
- *
- * @param flavor the document flavor needed, <code>null</code> doesn't
+ *
+ * @param flavor the document flavor needed, <code>null</code> doesn't
* constrain the lookup result.
- * @param outputMimeType the mime type needed, <code>null</code> doesn't
+ * @param outputMimeType the mime type needed, <code>null</code> doesn't
* constrain the lookup result.
- *
+ *
* @return The matching <code>StreamPrintServiceFactory</code> instances.
*/
public static StreamPrintServiceFactory[] lookupStreamPrintServiceFactories(
DocFlavor flavor, String outputMimeType)
{
HashSet set = new HashSet();
-
- Iterator it =
+
+ Iterator it =
ServiceFactory.lookupProviders(StreamPrintServiceFactory.class);
-
+
while (it.hasNext())
{
StreamPrintServiceFactory tmp = (StreamPrintServiceFactory) it.next();
if (tmp.getOutputFormat().equals(outputMimeType)
&& Arrays.asList(tmp.getSupportedDocFlavors()).contains(flavor))
- set.add(tmp);
+ set.add(tmp);
}
-
+
StreamPrintServiceFactory[] tmp = new StreamPrintServiceFactory[set.size()];
- return (StreamPrintServiceFactory[]) set.toArray(tmp);
- }
-
+ return (StreamPrintServiceFactory[]) set.toArray(tmp);
+ }
+
/**
* Returns the output format supported by this factory.
- *
+ *
* @return The mime type of the output format as string representation.
*/
public abstract String getOutputFormat();
-
+
/**
* Returns the document flavors this factory supports as flavors
* for the input documents.
- *
+ *
* @return The array of supported document flavors.
*/
public abstract DocFlavor[] getSupportedDocFlavors();
-
+
/**
* Constructs a <code>StreamPrintService</code> which directs its output
* the given output stream.
- *
+ *
* @param out the output stream for the produced document.
* @return The constructed stream print service.
*/
diff --git a/javax/print/URIException.java b/javax/print/URIException.java
index 9b22bdf2f..cedcbaafc 100644
--- a/javax/print/URIException.java
+++ b/javax/print/URIException.java
@@ -41,15 +41,15 @@ package javax.print;
import java.net.URI;
/**
- * <code>URIException</code> specifies methods a specific subclass of
- * {@link javax.print.PrintException} may implement to provide further
+ * <code>URIException</code> specifies methods a specific subclass of
+ * {@link javax.print.PrintException} may implement to provide further
* informations of printing errors if URI problems are involved.
* <p>
- * There exists no <code>PrintException</code> class implementing this
- * interface. Providing this extension in <code>PrintException</code>
- * subclasses is left to the concrete print service implementation.
+ * There exists no <code>PrintException</code> class implementing this
+ * interface. Providing this extension in <code>PrintException</code>
+ * subclasses is left to the concrete print service implementation.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface URIException
@@ -58,30 +58,30 @@ public interface URIException
* Indicates that the provided <code>URI</code> is not accessible.
*/
int URIInaccessible = 1;
-
+
/**
* Indicates any other problem which is not defined by
* the other reason constants.
*/
int URIOtherProblem = -1;
-
+
/**
* Indicates that the print service does not support a specific
* uri scheme (for example the ftp scheme).
*/
int URISchemeNotSupported = 2;
-
+
/**
* Returns the reason for this exception as
* predefined constants in this interface.
- *
+ *
* @return The reason.
*/
int getReason();
-
+
/**
* Returns the unsupported <code>URI</code> which caused this exception.
- *
+ *
* @return The unsupported <code>URI</code>.
*/
URI getUnsupportedURI();
diff --git a/javax/print/attribute/Attribute.java b/javax/print/attribute/Attribute.java
index 8b98377ba..0fc7e4df6 100644
--- a/javax/print/attribute/Attribute.java
+++ b/javax/print/attribute/Attribute.java
@@ -1,4 +1,4 @@
-/* Attribute.java --
+/* Attribute.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ import java.io.Serializable;
/**
* Base interface of every printing attribute of the Java Print Service API.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface Attribute extends Serializable
@@ -49,17 +49,17 @@ public interface Attribute extends Serializable
/**
* Returns the category of the printing attribute which is the specific
* attribute class implementing this interface.
- *
+ *
* @return The concrete {@link Class} instance of the attribute class.
*/
Class< ? extends Attribute> getCategory ();
/**
* Returns the descriptive name of the attribute category.
- *
+ *
* Implementations of the <code>Attribute</code> interfaces providing equal
* category values have to return equal name values.
- *
+ *
* @return The name of the attribute category.
*/
String getName ();
diff --git a/javax/print/attribute/AttributeSet.java b/javax/print/attribute/AttributeSet.java
index c8130c19f..d2111410f 100644
--- a/javax/print/attribute/AttributeSet.java
+++ b/javax/print/attribute/AttributeSet.java
@@ -1,4 +1,4 @@
-/* AttributeSet.java --
+/* AttributeSet.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,26 +57,26 @@ package javax.print.attribute;
* </ul>
* </p>
* <p>
- * Attribute sets may be unmodifiable depending on the context of usage. If
- * used as read-only attribute set modifying operations throw an
+ * Attribute sets may be unmodifiable depending on the context of usage. If
+ * used as read-only attribute set modifying operations throw an
* {@link javax.print.attribute.UnmodifiableSetException}.
* </p>
* <p>
* The Java Print Service API provides implementation classes for the existing
* attribute set interfaces but applications may use their own implementations.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute to the set.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute to the set.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
* @throws NullPointerException if the attribute is <code>null</code>.
@@ -86,73 +86,73 @@ public interface AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
-
+
/**
* Removes all attributes from this attribute set.
- *
+ *
* @throws UnmodifiableSetException if the set does not support modification.
*/
void clear ();
-
+
/**
- * Checks if this attributes set contains an attribute with the given
+ * Checks if this attributes set contains an attribute with the given
* category.
- *
+ *
* @param category the category to test for.
* @return <code>true</code> if an attribute of the category is contained
* in the set, <code>false</code> otherwise.
*/
boolean containsKey (Class<?> category);
-
+
/**
* Checks if this attribute set contains the given attribute.
- *
+ *
* @param attribute the attribute to test for.
* @return <code>true</code> if the attribute is contained in the set,
* <code>false</code> otherwise.
*/
boolean containsValue (Attribute attribute);
-
+
/**
* Tests this set for equality with the given object. <code>true</code> is
* returned, if the given object is also of type <code>AttributeSet</code>
* and the contained attributes are the same as in this set.
- *
+ *
* @param obj the Object to test.
* @return <code>true</code> if equal, false otherwise.
*/
boolean equals (Object obj);
-
+
/**
* Returns the attribute object contained in this set for the given attribute
- * category.
- *
- * @param category the category of the attribute. A <code>Class</code>
- * instance of a class implementing the <code>Attribute</code> interface.
- * @return The attribute for this category or <code>null</code> if no
- * attribute is contained for the given category.
+ * category.
+ *
+ * @param category the category of the attribute. A <code>Class</code>
+ * instance of a class implementing the <code>Attribute</code> interface.
+ * @return The attribute for this category or <code>null</code> if no
+ * attribute is contained for the given category.
* @throws NullPointerException if category is null.
- * @throws ClassCastException if category is not implementing
+ * @throws ClassCastException if category is not implementing
* <code>Attribute</code>.
*/
Attribute get (Class<?> category);
-
+
/**
* Returns the hashcode value. The hashcode value is the sum of all hashcodes
* of the attributes contained in this set.
- *
+ *
* @return The hashcode for this attribute set.
*/
int hashCode ();
-
+
/**
* Checks if the attribute set is empty.
*
@@ -163,30 +163,30 @@ public interface AttributeSet
/**
* Removes the given attribute from the set. If the given attribute is <code>null</code>
* nothing is done and <code>false</code> is returned.
- *
- * @param attribute the attribute to remove.
- * @return <code>true</code> if removed, false in all other cases.
+ *
+ * @param attribute the attribute to remove.
+ * @return <code>true</code> if removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
boolean remove (Attribute attribute);
-
+
/**
* Removes the attribute entry of the given category from the set. If the given
* category is <code>null</code> nothing is done and <code>false</code> is returned.
- *
+ *
* @param category the category of the entry to be removed.
- * @return <code>true</code> if an attribute is removed, false in all other cases.
+ * @return <code>true</code> if an attribute is removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
boolean remove (Class<?> category);
-
+
/**
* Returns the number of elements in this attribute set.
*
* @return The number of elements.
*/
int size ();
-
+
/**
* Returns the content of the attribute set as an array
*
diff --git a/javax/print/attribute/AttributeSetUtilities.java b/javax/print/attribute/AttributeSetUtilities.java
index 95c11a6ed..4b7378af5 100644
--- a/javax/print/attribute/AttributeSetUtilities.java
+++ b/javax/print/attribute/AttributeSetUtilities.java
@@ -1,4 +1,4 @@
-/* AttributeSetUtilities.java --
+/* AttributeSetUtilities.java --
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import java.io.Serializable;
* if state changing methods are invoked.
* </p>
* <p>
- * Methods for getting a synchronized view of an attribute set are also
+ * Methods for getting a synchronized view of an attribute set are also
* available. This view provides synchronized (thread safe) access to the
* underlying wrapped attribute set.
* </P>
@@ -60,17 +60,17 @@ import java.io.Serializable;
* <ul>
* <li>the given object is an attribute of the given interface.</li>
* <li>the category of given attribute is equals to a given category.</li>
- * <li>the given object is a <code>Class</code> that implements the given
+ * <li>the given object is a <code>Class</code> that implements the given
* interface name.</li>
* </ul>
- *
+ *
*/
public final class AttributeSetUtilities
{
/**
* This class isn't intended to be instantiated.
*/
- private AttributeSetUtilities()
+ private AttributeSetUtilities()
{
// only static methods
}
@@ -97,7 +97,7 @@ public final class AttributeSetUtilities
{
throw new UnmodifiableSetException();
}
-
+
public void clear()
{
throw new UnmodifiableSetException();
@@ -117,7 +117,7 @@ public final class AttributeSetUtilities
{
return attrset.equals(obj);
}
-
+
public Attribute get(Class interfaceName)
{
return attrset.get(interfaceName);
@@ -127,7 +127,7 @@ public final class AttributeSetUtilities
{
return attrset.hashCode();
}
-
+
public boolean isEmpty()
{
return attrset.isEmpty();
@@ -216,7 +216,7 @@ public final class AttributeSetUtilities
{
return attrset.addAll(attributes);
}
-
+
public synchronized void clear()
{
attrset.clear();
@@ -236,7 +236,7 @@ public final class AttributeSetUtilities
{
return attrset.equals(obj);
}
-
+
public synchronized Attribute get(Class interfaceName)
{
return attrset.get(interfaceName);
@@ -246,7 +246,7 @@ public final class AttributeSetUtilities
{
return attrset.hashCode();
}
-
+
public synchronized boolean isEmpty()
{
return attrset.isEmpty();
@@ -334,7 +334,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedDocAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -345,7 +345,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintJobAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -356,7 +356,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintRequestAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -367,7 +367,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintServiceAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -378,7 +378,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiableAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -389,7 +389,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiableDocAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -400,7 +400,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiablePrintJobAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -411,7 +411,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiablePrintRequestAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -426,7 +426,7 @@ public final class AttributeSetUtilities
/**
* Verifies that the given object is a <code>Class</code> that
* implements the given interface name and returns it casted.
- *
+ *
* @param object the object to test.
* @param interfaceName the <code>Class</code> to verify against.
* @return object casted to <code>Class</code>
@@ -448,11 +448,11 @@ public final class AttributeSetUtilities
throw new ClassCastException();
}
-
+
/**
* Verifies that the given object is an attribute of the given interface.
* and returns it casted to the interface type.
- *
+ *
* @param object the object to test.
* @param interfaceName the <code>Class</code> to verify against.
* @return the object casted to <code>Attribute</code>
@@ -475,7 +475,7 @@ public final class AttributeSetUtilities
/**
* Verifies that the category of attribute is equals to the given category
* class.
- *
+ *
* @param category the category to test.
* @param attribute the attribute to verify.
*
diff --git a/javax/print/attribute/DateTimeSyntax.java b/javax/print/attribute/DateTimeSyntax.java
index 8cff70219..7d587dbd8 100644
--- a/javax/print/attribute/DateTimeSyntax.java
+++ b/javax/print/attribute/DateTimeSyntax.java
@@ -1,4 +1,4 @@
-/* DateTimeSyntax.java --
+/* DateTimeSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,17 +41,17 @@ import java.io.Serializable;
import java.util.Date;
/**
- * <code>DateTimeSyntax</code> is the abstract base class of all attribute
+ * <code>DateTimeSyntax</code> is the abstract base class of all attribute
* classes having a date and a time as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class DateTimeSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -1400819079791208582L;
-
+
private Date value;
-
+
/**
* Creates a <code>DateTimeSyntax</code> with a given value.
*
@@ -79,10 +79,10 @@ public abstract class DateTimeSyntax implements Cloneable, Serializable
/**
* Tests if the given object is equal to this one.
- *
+ *
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
@@ -102,14 +102,14 @@ public abstract class DateTimeSyntax implements Cloneable, Serializable
{
return value.hashCode();
}
-
+
/**
* Returns the string representation for this object.
*
* @return The string representation.
*/
- public String toString()
+ public String toString()
{
- return value.toString();
+ return value.toString();
}
}
diff --git a/javax/print/attribute/DocAttribute.java b/javax/print/attribute/DocAttribute.java
index 9af3a7052..56114f73e 100644
--- a/javax/print/attribute/DocAttribute.java
+++ b/javax/print/attribute/DocAttribute.java
@@ -1,4 +1,4 @@
-/* DocAttribute.java --
+/* DocAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,20 +38,20 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * Marker interface for all attribute classes describing attributes of
- * a {@link javax.print.Doc} object.
+ * Marker interface for all attribute classes describing attributes of
+ * a {@link javax.print.Doc} object.
* <p>
- * Instances of implementing attribute classes may be collected in a
- * {@link javax.print.attribute.DocAttributeSet}.
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.DocAttributeSet}.
* </p><p>
* Attributes attached to a {@link javax.print.Doc} instance specify how the
- * data should be printed.
- * For example {@link javax.print.attribute.standard.Chromaticity} can be
+ * data should be printed.
+ * For example {@link javax.print.attribute.standard.Chromaticity} can be
* used to specify that a doc should be printed in color or monochrome.
* </p>
- *
+ *
* @see javax.print.attribute.DocAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttribute extends Attribute
diff --git a/javax/print/attribute/DocAttributeSet.java b/javax/print/attribute/DocAttributeSet.java
index d8d09eb48..35a2676b1 100644
--- a/javax/print/attribute/DocAttributeSet.java
+++ b/javax/print/attribute/DocAttributeSet.java
@@ -1,4 +1,4 @@
-/* DocAttributeSet.java --
+/* DocAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* <code>DocAttributeSet</code> specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.DocAttribute}.
* <p>
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* <code>DocAttribute</code> instances are allowed in this set.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* <code>DocAttribute</code>.
* @throws NullPointerException if the attribute is <code>null</code>.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface DocAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* <code>DocAttribute</code>.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/javax/print/attribute/EnumSyntax.java b/javax/print/attribute/EnumSyntax.java
index 9a5e62d45..e848dfcc3 100644
--- a/javax/print/attribute/EnumSyntax.java
+++ b/javax/print/attribute/EnumSyntax.java
@@ -1,4 +1,4 @@
-/* EnumSyntax.java --
+/* EnumSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,16 +43,16 @@ import java.io.Serializable;
/**
* <code>EnumSyntax</code> is the abstract base class of all enumeration
- * classes in the Java Print Service API.
+ * classes in the Java Print Service API.
* <p>
- * Every enumeration class which extends from EnumSyntax provides several
+ * Every enumeration class which extends from EnumSyntax provides several
* enumeration objects as singletons of its class.
* </p>
* <p>
* Notes for implementing subclasses:
* <ul>
* <li>
- * The values of all enumeration singelton instances have to be in a
+ * The values of all enumeration singelton instances have to be in a
* sequence which may start at any value. See: {@link #getOffset()}
* </li>
* <li>
@@ -61,50 +61,50 @@ import java.io.Serializable;
* </li>
* </ul>
* </p>
- * Example:
- * <pre>
+ * Example:
+ * <pre>
* public class PrinterState extends EnumSyntax
* {
* public static final PrinterState IDLE = new PrinterState(1);
* public static final PrinterState PROCESSING = new PrinterState(2);
* public static final PrinterState STOPPED = new PrinterState(3);
- *
+ *
* protected PrinterState(int value)
* {
* super(value);
* }
- *
+ *
* // Overridden because values start not at zero !
* protected int getOffset()
* {
* return 1;
* }
- *
- * private static final String[] stringTable = { "idle", "processing",
+ *
+ * private static final String[] stringTable = { "idle", "processing",
* "stopped" };
- *
+ *
* protected String[] getStringTable()
* {
* return stringTable;
* }
- *
- * private static final PrinterState[] enumValueTable = { IDLE,
+ *
+ * private static final PrinterState[] enumValueTable = { IDLE,
* PROCESSING, STOPPED};
- *
+ *
* protected EnumSyntax[] getEnumValueTable()
* {
* return enumValueTable;
* }
* }
* </pre>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class EnumSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -2739521845085831642L;
-
+
private int value;
/**
@@ -146,7 +146,7 @@ public abstract class EnumSyntax implements Cloneable, Serializable
}
/**
- * Returns the hashcode for this object.
+ * Returns the hashcode for this object.
* The hashcode is the value of this enumeration object.
*
* @return The hashcode.
@@ -173,7 +173,7 @@ public abstract class EnumSyntax implements Cloneable, Serializable
&& index >= 0
&& index < table.length)
return table[index];
-
+
return "" + value;
}
@@ -193,12 +193,12 @@ public abstract class EnumSyntax implements Cloneable, Serializable
/**
* Needed for singelton semantics during deserialisation.
- *
+ *
* Subclasses must not override this class. Subclasses have to override
- * <code>getEnumValueTable()</code> and should override
+ * <code>getEnumValueTable()</code> and should override
* <code>getStringTable()</code> for correct serialization.
- *
- * @return The Object at index <code>value - getOffset()</code>
+ *
+ * @return The Object at index <code>value - getOffset()</code>
* in getEnumValueTable.
* @throws ObjectStreamException if getEnumValueTable() returns null.
*/
@@ -227,10 +227,10 @@ public abstract class EnumSyntax implements Cloneable, Serializable
}
/**
- * Returns the lowest used value by the enumerations of this class.
- *
+ * Returns the lowest used value by the enumerations of this class.
+ *
* The default implementation returns 0. This is enough if enumerations
- * start with a zero value. Otherwise subclasses need to override this
+ * start with a zero value. Otherwise subclasses need to override this
* method for serialization and return the lowest value they use.
* .
* @return The lowest used value used.
diff --git a/javax/print/attribute/HashAttributeSet.java b/javax/print/attribute/HashAttributeSet.java
index 0f6b00730..39d00528d 100644
--- a/javax/print/attribute/HashAttributeSet.java
+++ b/javax/print/attribute/HashAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashAttributeSet.java --
+/* HashAttributeSet.java --
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ import java.util.Iterator;
public class HashAttributeSet implements AttributeSet, Serializable
{
private static final long serialVersionUID = 5311560590283707917L;
-
+
private Class myInterface;
private transient HashMap attributeMap = new HashMap();
@@ -95,7 +95,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Creates a <code>HashAttributeSet</code> object with attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
*/
public HashAttributeSet(AttributeSet attributes)
@@ -114,14 +114,14 @@ public class HashAttributeSet implements AttributeSet, Serializable
{
if (interfaceName == null)
throw new NullPointerException("interfaceName may not be null");
-
+
myInterface = interfaceName;
}
-
+
/**
* Creates a <code>HashAttributeSet</code> object with the given
* attribute in it.
- *
+ *
* @param attribute the attribute to put into the set.
* @param interfaceName the interface that all members must implement.
*
@@ -132,10 +132,10 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(Attribute attribute, Class<?> interfaceName)
{
this(interfaceName);
-
+
if (attribute == null)
throw new NullPointerException();
-
+
addInternal(attribute, interfaceName);
}
@@ -154,7 +154,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(Attribute[] attributes, Class<?> interfaceName)
{
this(interfaceName);
-
+
if (attributes != null)
{
for (int index = 0; index < attributes.length; index++)
@@ -166,7 +166,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Creates a <code>HashAttributeSet</code> object with attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
* @param interfaceName the interface that all members must implement.
*
@@ -176,18 +176,18 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(AttributeSet attributes, Class<?> interfaceName)
{
this(interfaceName);
-
+
if (attributes != null)
addAllInternal(attributes, interfaceName);
}
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute to the set.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute to the set.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
* @throws NullPointerException if the attribute is <code>null</code>.
@@ -214,11 +214,11 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
public boolean addAll(AttributeSet attributes)
@@ -240,7 +240,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes all attributes from this attribute set.
- *
+ *
* @throws UnmodifiableSetException if the set does not support modification.
*/
public void clear()
@@ -249,9 +249,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
}
/**
- * Checks if this attributes set contains an attribute with the given
+ * Checks if this attributes set contains an attribute with the given
* category.
- *
+ *
* @param category the category to test for.
* @return <code>true</code> if an attribute of the category is contained
* in the set, <code>false</code> otherwise.
@@ -263,7 +263,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Checks if this attribute set contains the given attribute.
- *
+ *
* @param attribute the attribute to test for.
* @return <code>true</code> if the attribute is contained in the set,
* <code>false</code> otherwise.
@@ -277,7 +277,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Tests this set for equality with the given object. <code>true</code> is
* returned, if the given object is also of type <code>AttributeSet</code>
* and the contained attributes are the same as in this set.
- *
+ *
* @param obj the Object to test.
* @return <code>true</code> if equal, false otherwise.
*/
@@ -291,28 +291,28 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Returns the attribute object contained in this set for the given attribute
- * category.
- *
- * @param category the category of the attribute. A <code>Class</code>
- * instance of a class implementing the <code>Attribute</code> interface.
- * @return The attribute for this category or <code>null</code> if no
- * attribute is contained for the given category.
+ * category.
+ *
+ * @param category the category of the attribute. A <code>Class</code>
+ * instance of a class implementing the <code>Attribute</code> interface.
+ * @return The attribute for this category or <code>null</code> if no
+ * attribute is contained for the given category.
* @throws NullPointerException if category is null.
- * @throws ClassCastException if category is not implementing
+ * @throws ClassCastException if category is not implementing
* <code>Attribute</code>.
*/
public Attribute get(Class<?> category)
{
if (category == null)
throw new NullPointerException("category may not be null");
-
+
return (Attribute) attributeMap.get(category);
}
-
+
/**
* Returns the hashcode value. The hashcode value is the sum of all hashcodes
* of the attributes contained in this set.
- *
+ *
* @return The hashcode for this attribute set.
*/
public int hashCode()
@@ -321,7 +321,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
Iterator it = attributeMap.values().iterator();
while (it.hasNext())
hashcode = hashcode + it.next().hashCode();
-
+
return hashcode;
}
@@ -338,9 +338,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes the given attribute from the set. If the given attribute is <code>null</code>
* nothing is done and <code>false</code> is returned.
- *
- * @param attribute the attribute to remove.
- * @return <code>true</code> if removed, false in all other cases.
+ *
+ * @param attribute the attribute to remove.
+ * @return <code>true</code> if removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
public boolean remove(Attribute attribute)
@@ -354,9 +354,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes the attribute entry of the given category from the set. If the given
* category is <code>null</code> nothing is done and <code>false</code> is returned.
- *
+ *
* @param category the category of the entry to be removed.
- * @return <code>true</code> if an attribute is removed, false in all other cases.
+ * @return <code>true</code> if an attribute is removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
public boolean remove(Class<?> category)
@@ -393,10 +393,10 @@ public class HashAttributeSet implements AttributeSet, Serializable
array[index] = (Attribute) it.next();
index++;
}
-
+
return array;
}
-
+
// Implemented as specified in serialized form
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException
@@ -407,13 +407,13 @@ public class HashAttributeSet implements AttributeSet, Serializable
for (int i=0; i < size; i++)
add((Attribute) s.readObject());
}
-
+
private void writeObject(ObjectOutputStream s) throws IOException
{
s.writeObject(myInterface);
s.writeInt(size());
Iterator it = attributeMap.values().iterator();
while (it.hasNext())
- s.writeObject(it.next());
+ s.writeObject(it.next());
}
}
diff --git a/javax/print/attribute/HashDocAttributeSet.java b/javax/print/attribute/HashDocAttributeSet.java
index 2317db3bc..73c25863e 100644
--- a/javax/print/attribute/HashDocAttributeSet.java
+++ b/javax/print/attribute/HashDocAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashDocAttributeSet.java --
+/* HashDocAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashDocAttributeSet extends HashAttributeSet
implements DocAttributeSet, Serializable
{
private static final long serialVersionUID = -1128534486061432528L;
-
+
/**
* Creates an empty <code>HashDocAttributeSet</code> object.
*/
@@ -88,7 +88,7 @@ public class HashDocAttributeSet extends HashAttributeSet
* Creates a <code>HashDocAttributeSet</code> object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of <code>DocAttribute</code>
diff --git a/javax/print/attribute/HashPrintJobAttributeSet.java b/javax/print/attribute/HashPrintJobAttributeSet.java
index ac4c902c3..ddeda3b47 100644
--- a/javax/print/attribute/HashPrintJobAttributeSet.java
+++ b/javax/print/attribute/HashPrintJobAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintJobAttributeSet.java --
+/* HashPrintJobAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
implements Serializable, PrintJobAttributeSet
{
private static final long serialVersionUID = -4204473656070350348L;
-
+
/**
* Creates an empty <code>HashPrintJobAttributeSet</code> object.
*/
@@ -55,7 +55,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(PrintJobAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintJobAttributeSet</code> object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(attribute, PrintJobAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintJobAttributeSet</code> object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(attributes, PrintJobAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintJobAttributeSet</code> object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of <code>PrintJobAttribute</code>
diff --git a/javax/print/attribute/HashPrintRequestAttributeSet.java b/javax/print/attribute/HashPrintRequestAttributeSet.java
index e74c0e00f..61c2537df 100644
--- a/javax/print/attribute/HashPrintRequestAttributeSet.java
+++ b/javax/print/attribute/HashPrintRequestAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintRequestAttributeSet.java --
+/* HashPrintRequestAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
implements Serializable, PrintRequestAttributeSet
{
private static final long serialVersionUID = 2364756266107751933L;
-
+
/**
* Creates an empty <code>HashPrintRequestAttributeSet</code> object.
*/
@@ -55,7 +55,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(PrintRequestAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintRequestAttributeSet</code> object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(attribute, PrintRequestAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintRequestAttributeSet</code> object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(attributes, PrintRequestAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintRequestAttributeSet</code> object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of <code>PrintRequestAttribute</code>
diff --git a/javax/print/attribute/HashPrintServiceAttributeSet.java b/javax/print/attribute/HashPrintServiceAttributeSet.java
index 155514f2b..bc934def2 100644
--- a/javax/print/attribute/HashPrintServiceAttributeSet.java
+++ b/javax/print/attribute/HashPrintServiceAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintServiceAttributeSet.java --
+/* HashPrintServiceAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
implements Serializable, PrintServiceAttributeSet
{
private static final long serialVersionUID = 6642904616179203070L;
-
+
/**
* Creates an empty <code>HashPrintServiceAttributeSet</code> object.
*/
@@ -55,7 +55,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(PrintServiceAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintServiceAttributeSet</code> object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(attribute, PrintServiceAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintServiceAttributeSet</code> object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(attributes, PrintServiceAttribute.class);
}
-
+
/**
* Creates a <code>HashPrintServiceAttributeSet</code> object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* <code>null</code> an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of <code>PrintServiceAttribute</code>
diff --git a/javax/print/attribute/IntegerSyntax.java b/javax/print/attribute/IntegerSyntax.java
index c2f9224a2..b53faa20a 100644
--- a/javax/print/attribute/IntegerSyntax.java
+++ b/javax/print/attribute/IntegerSyntax.java
@@ -1,4 +1,4 @@
-/* IntegerSyntax.java --
+/* IntegerSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,9 +40,9 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * <code>IntegerSyntax</code> is the abstract base class of all attribute
+ * <code>IntegerSyntax</code> is the abstract base class of all attribute
* classes having an integer as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class IntegerSyntax implements Cloneable, Serializable
@@ -94,7 +94,7 @@ public abstract class IntegerSyntax implements Cloneable, Serializable
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/PrintJobAttribute.java b/javax/print/attribute/PrintJobAttribute.java
index fd3663496..5954824d0 100644
--- a/javax/print/attribute/PrintJobAttribute.java
+++ b/javax/print/attribute/PrintJobAttribute.java
@@ -1,4 +1,4 @@
-/* PrintJobAttribute.java --
+/* PrintJobAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,19 +39,19 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes describing attributes or the
- * status of a ({@link javax.print.DocPrintJob} object.
+ * status of a ({@link javax.print.DocPrintJob} object.
* <p>
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintJobAttributeSet}.
* </p><p>
* A print service uses attributes of this type to inform about the status
- * of a print job.
- * For example {@link javax.print.attribute.standard.DateTimeAtProcessing}
- * is used to report at which date and time a job has started processing.
+ * of a print job.
+ * For example {@link javax.print.attribute.standard.DateTimeAtProcessing}
+ * is used to report at which date and time a job has started processing.
* </p>
- *
+ *
* @see javax.print.attribute.PrintJobAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttribute extends Attribute
diff --git a/javax/print/attribute/PrintJobAttributeSet.java b/javax/print/attribute/PrintJobAttributeSet.java
index 6283ae142..232f4b36a 100644
--- a/javax/print/attribute/PrintJobAttributeSet.java
+++ b/javax/print/attribute/PrintJobAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeSet.java --
+/* PrintJobAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* <code>PrintJobAttributeSet</code> specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintJobAttribute}.
* <p>
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* <code>PrintJobAttribute</code> instances are allowed in this set.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* <code>PrintJobAttribute</code>.
* @throws NullPointerException if the attribute is <code>null</code>.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintJobAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* <code>PrintJobAttribute</code>.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/javax/print/attribute/PrintRequestAttribute.java b/javax/print/attribute/PrintRequestAttribute.java
index 8a05b75d3..037838ca8 100644
--- a/javax/print/attribute/PrintRequestAttribute.java
+++ b/javax/print/attribute/PrintRequestAttribute.java
@@ -1,4 +1,4 @@
-/* PrintRequestAttribute.java --
+/* PrintRequestAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,14 +39,14 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes which specify a requested
- * attribute of {@link javax.print.DocPrintJob} object.
+ * attribute of {@link javax.print.DocPrintJob} object.
* <p>
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintRequestAttributeSet}.
* </p>
- *
+ *
* @see javax.print.attribute.PrintRequestAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttribute extends Attribute
diff --git a/javax/print/attribute/PrintRequestAttributeSet.java b/javax/print/attribute/PrintRequestAttributeSet.java
index 350d9a644..60098064f 100644
--- a/javax/print/attribute/PrintRequestAttributeSet.java
+++ b/javax/print/attribute/PrintRequestAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintRequestAttributeSet.java --
+/* PrintRequestAttributeSet.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* <code>PrintRequestAttributeSet</code> specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintRequestAttribute}.
* <p>
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* <code>PrintRequestAttribute</code> instances are allowed in this set.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* <code>PrintRequestAttribute</code>.
* @throws NullPointerException if the attribute is <code>null</code>.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintRequestAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* <code>PrintRequestAttribute</code>.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/javax/print/attribute/PrintServiceAttribute.java b/javax/print/attribute/PrintServiceAttribute.java
index 213f43796..82d26922a 100644
--- a/javax/print/attribute/PrintServiceAttribute.java
+++ b/javax/print/attribute/PrintServiceAttribute.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttribute.java --
+/* PrintServiceAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,19 +39,19 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes describing parameters
- * or the status of a {@link javax.print.PrintService}.
+ * or the status of a {@link javax.print.PrintService}.
* <p>
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintServiceAttributeSet}.
* </p><p>
* A print service uses attributes of this type to inform about the status
- * or the specific capabilities of itself.
+ * or the specific capabilities of itself.
* For example {@link javax.print.attribute.standard.PagesPerMinute} is used
- * to specify the average printable pages per minute of the print service.
+ * to specify the average printable pages per minute of the print service.
* </p>
- *
+ *
* @see javax.print.attribute.PrintServiceAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttribute extends Attribute
diff --git a/javax/print/attribute/PrintServiceAttributeSet.java b/javax/print/attribute/PrintServiceAttributeSet.java
index fa22ee0d9..418a59950 100644
--- a/javax/print/attribute/PrintServiceAttributeSet.java
+++ b/javax/print/attribute/PrintServiceAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeSet.java --
+/* PrintServiceAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* <code>PrintServiceAttributeSet</code> specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintServiceAttribute}.
* <p>
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* <code>PrintServiceAttribute</code> instances are allowed in this set.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* <code>PrintServiceAttribute</code>.
* @throws NullPointerException if the attribute is <code>null</code>.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintServiceAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return <code>true</code> if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* <code>PrintServiceAttribute</code>.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/javax/print/attribute/ResolutionSyntax.java b/javax/print/attribute/ResolutionSyntax.java
index aca4c0188..54468d087 100644
--- a/javax/print/attribute/ResolutionSyntax.java
+++ b/javax/print/attribute/ResolutionSyntax.java
@@ -1,4 +1,4 @@
-/* ResolutionSyntax.java --
+/* ResolutionSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,11 +40,11 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * <code>ResolutionSyntax</code> is the abstract base class of all attribute
+ * <code>ResolutionSyntax</code> is the abstract base class of all attribute
* classes which provide a resolution as value (e.g. printer resolution).
* <p>
* A <code>ResolutionSyntax</code> instance consists of two integer values
- * describing the resolution in feed and cross feed direction. The units of
+ * describing the resolution in feed and cross feed direction. The units of
* the given values is determined by two defined constants:
* <ul>
* <li>DPCM - dots per centimeter</li>
@@ -56,25 +56,25 @@ import java.io.Serializable;
* one of the two constants defining the actual units of the given values.
* </p>
* <p>
- * There are different methods provided to return the resolution values in
+ * There are different methods provided to return the resolution values in
* either of the both units and to compare if a resolution is less than or
* equal to a given other resolution attribute.
* </p>
* <p>
* <b>Internal storage:</b><br>
- * The resolutions are stored internally as dots per 100 inches (dphi). The
+ * The resolutions are stored internally as dots per 100 inches (dphi). The
* values of the provided constants for dots per inch (value 100) and dots
* per centimeter (value 254) are used as conversion factors to the internal
* storage units. To get the internal dphi values a multiplication of a given
- * resolution value with its units constant value is needed. Retrieving the
- * resolution for specific units is done by dividing the internal stored
- * value through the units constant value. Clients are therefore able to
+ * resolution value with its units constant value is needed. Retrieving the
+ * resolution for specific units is done by dividing the internal stored
+ * value through the units constant value. Clients are therefore able to
* provide their own resolution units by supplying other conversion factors.
* Subclasses of <code>ResolutionSyntax</code> have access to the internal
- * resolution values through the protected methods
+ * resolution values through the protected methods
* {@link #getCrossFeedResolutionDphi()} and {@link #getFeedResolutionDphi()}.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class ResolutionSyntax
@@ -94,7 +94,7 @@ public abstract class ResolutionSyntax
private int crossFeedResolution;
private int feedResolution;
-
+
/**
* Creates a <code>ResolutionSyntax</code> object with the given arguments.
*
@@ -121,7 +121,7 @@ public abstract class ResolutionSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
@@ -130,7 +130,7 @@ public abstract class ResolutionSyntax
return false;
ResolutionSyntax tmp = (ResolutionSyntax) obj;
-
+
return (crossFeedResolution == tmp.getCrossFeedResolutionDphi()
&& feedResolution == tmp.getFeedResolutionDphi());
}
@@ -186,7 +186,7 @@ public abstract class ResolutionSyntax
{
return feedResolution;
}
-
+
/**
* Returns the resolution as two field array. Index 0 is the cross feed
* resolution, index 1 the feed resolution.
@@ -214,7 +214,7 @@ public abstract class ResolutionSyntax
}
/**
- * Checks if the given resolution attribute is a lower or equal
+ * Checks if the given resolution attribute is a lower or equal
* to this resolution object.
*
* @param other the resolution to check against
@@ -252,7 +252,7 @@ public abstract class ResolutionSyntax
* for the cross feed and F for the feed direction resolution.
* U denotes the units name if one is supplied.
* </p>
- *
+ *
* @param units the units to use
* @param unitsName the name of the units. If <code>null</code>
* it is ommitted from the string representation.
@@ -263,7 +263,7 @@ public abstract class ResolutionSyntax
{
if (unitsName == null)
return getCrossFeedResolution(units) + "x" + getFeedResolution(units);
-
+
return ("" + getCrossFeedResolution(units)
+ "x" + getFeedResolution(units)
+ " " + unitsName);
diff --git a/javax/print/attribute/SetOfIntegerSyntax.java b/javax/print/attribute/SetOfIntegerSyntax.java
index 4c0dd2f19..b1e0af1a7 100644
--- a/javax/print/attribute/SetOfIntegerSyntax.java
+++ b/javax/print/attribute/SetOfIntegerSyntax.java
@@ -1,4 +1,4 @@
-/* SetOfIntegerSyntax.java --
+/* SetOfIntegerSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import java.util.Arrays;
import java.util.Comparator;
/**
- * <code>SetOfIntegerSyntax</code> is the abstract base class of all attribute
+ * <code>SetOfIntegerSyntax</code> is the abstract base class of all attribute
* classes which provide a set of non-negative integers as value (e.g. the
* page ranges to print) represented as single values or ranges of values.
* <p>
* A <code>SetOfIntegerSyntax</code> instance consists of an integer array of
* ranges. Ranges may have the same lower and upper bound representing a single
- * integer value. Ranges with a lower bound greater than the upper bound are
- * null ranges and discarded. Ranges may overlap in their values. In no case
+ * integer value. Ranges with a lower bound greater than the upper bound are
+ * null ranges and discarded. Ranges may overlap in their values. In no case
* negative integers are allowed.
* </p>
* <p>
@@ -65,21 +65,21 @@ import java.util.Comparator;
* Constructor for an instance with one range of integer values.
* </li><br>
* <li><code>SetOfIntegerSyntax(int[][] members)</code><br>
- * Flexible constructor for an instance with several single integer values
- * and/or several ranges of integer values. The allowed array form is an
- * array of integer arrays of length one or two. Examples are:
+ * Flexible constructor for an instance with several single integer values
+ * and/or several ranges of integer values. The allowed array form is an
+ * array of integer arrays of length one or two. Examples are:
* <code>int[0][]</code> for empty set of integers, <code>int[][] {{1}}</code>
* , <code>int[][] {{1,5}}</code>, <code>int[][] {{1,5},{7,9}}</code>,
* <code>int[][] {{3,7},{19}}</code>.
* </li><br>
* <li><code>SetOfIntegerSyntax(String s)</code><br>
- * Flexible constructor for an instance with several single integer values
+ * Flexible constructor for an instance with several single integer values
* and/or several ranges of integer values. The allowed String instance have
- * to be a String with comma separated ranges of integer values or single
+ * to be a String with comma separated ranges of integer values or single
* values. Ranges are represented by two integer with a hypen (-) or colon (:)
* between the lower and upper bound value. Whitespace characters are ignored.
- * Examples are: <code>""</code> for an empty set of integers,
- * <code>"1"</code>, <code>"1-5"</code>, <code>"1-5,7-9"</code>,
+ * Examples are: <code>""</code> for an empty set of integers,
+ * <code>"1"</code>, <code>"1-5"</code>, <code>"1-5,7-9"</code>,
* <code>"3-7,19"</code> and <code>"1:2,4"</code>.
* </li>
* </ul>
@@ -88,9 +88,9 @@ import java.util.Comparator;
* <b>Internal storage:</b><br>
* The set of integers are stored internally in a normalized array form.
* In the normalized array form the set of integer ranges are represented
- * in as few ranges as possible and overlapping ranges are merged. The ranges
- * are always represented as an integer array of length two with ranges
- * stored in {lower bound, upper bound} form. The ranges are stored in
+ * in as few ranges as possible and overlapping ranges are merged. The ranges
+ * are always represented as an integer array of length two with ranges
+ * stored in {lower bound, upper bound} form. The ranges are stored in
* ascending order, without any null ranges.
* </p>
* @author Michael Koch (konqueror@gmx.de)
@@ -132,13 +132,13 @@ public abstract class SetOfIntegerSyntax
}
values[outIndex++] = values[save];
}
-
+
int[][] result = new int[outIndex][];
System.arraycopy(values, 0, result, 0, outIndex);
-
+
return result;
}
-
+
/**
* Creates a <code>SetOfIntegerSyntax</code> object.
*
@@ -203,17 +203,17 @@ public abstract class SetOfIntegerSyntax
}
}
}
-
+
this.members = normalize(newMembers, outIndex);
}
-
+
private boolean skipWhitespace(StringCharacterIterator i)
{
while (Character.isWhitespace(i.current()))
i.next();
return i.current() == CharacterIterator.DONE;
}
-
+
private boolean skipNumber(StringCharacterIterator i)
{
boolean readAny = false;
@@ -238,24 +238,24 @@ public abstract class SetOfIntegerSyntax
if (s == null)
this.members = normalize(new int[0][], 0);
else
- {
+ {
ArrayList vals = new ArrayList();
-
+
StringCharacterIterator it = new StringCharacterIterator(s);
-
+
while (true)
{
// Skip whitespace.
if (skipWhitespace(it))
break;
-
+
// Parse integer.
int index = it.getIndex();
if (! skipNumber(it))
throw new IllegalArgumentException();
int[] item = new int[2];
item[0] = Integer.parseInt(s.substring(index, it.getIndex()));
-
+
if (! skipWhitespace(it))
{
char c = it.current();
@@ -274,17 +274,17 @@ public abstract class SetOfIntegerSyntax
}
else
item[1] = item[0];
-
- if (item[0] <= item[1])
+
+ if (item[0] <= item[1])
vals.add(item);
-
+
if (skipWhitespace(it))
break;
if (it.current() != ',')
throw new IllegalArgumentException();
it.next();
}
-
+
members = normalize((int[][]) vals.toArray(new int[0][]), vals.size());
}
}
@@ -393,7 +393,7 @@ public abstract class SetOfIntegerSyntax
*
* @param x an integer value
*
- * @return The next smallest integer value, or <code>-1</code> if there
+ * @return The next smallest integer value, or <code>-1</code> if there
* is no greater integer in the set.
*/
public int next(int x)
diff --git a/javax/print/attribute/Size2DSyntax.java b/javax/print/attribute/Size2DSyntax.java
index 0b5c10070..b9e0e25db 100644
--- a/javax/print/attribute/Size2DSyntax.java
+++ b/javax/print/attribute/Size2DSyntax.java
@@ -1,4 +1,4 @@
-/* Size2DSyntax.java --
+/* Size2DSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,12 +40,12 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * <code>Size2DSyntax</code> is the abstract base class of all attribute
+ * <code>Size2DSyntax</code> is the abstract base class of all attribute
* classes which provide a two dimensional size as value (e.g. the size of
* a media like Letter or A4).
* <p>
* A <code>Size2DSyntax</code> instance consists of two integer values
- * describing the size in the x and y dimension. The units of
+ * describing the size in the x and y dimension. The units of
* the given values is determined by two defined constants:
* <ul>
* <li>INCH - defines an inch</li>
@@ -54,7 +54,7 @@ import java.io.Serializable;
* </p>
* <p>
* A size 2D attribute is constructed by two values for the size of the x and
- * y dimension and the actual units of the given values as defined by the
+ * y dimension and the actual units of the given values as defined by the
* constants.
* </p>
* <p>
@@ -64,16 +64,16 @@ import java.io.Serializable;
* </p>
* <p>
* <b>Internal storage:</b><br>
- * The size of the x,y dimensions are stored internally in micrometers. The
+ * The size of the x,y dimensions are stored internally in micrometers. The
* values of the provided constants for inch (value 25400) and millimeters
* (value 1000) are used as conversion factors to the internal storage units.
* To get the internal micrometers values a multiplication of a given
* size value with its units constant value is done. Retrieving the size value
- * for specific units is done by dividing the internal stored value by the
- * units constant value. Clients are therefore able to provide their own
+ * for specific units is done by dividing the internal stored value by the
+ * units constant value. Clients are therefore able to provide their own
* size units by supplying other conversion factors.
* Subclasses of <code>Size2DSyntax</code> have access to the internal
- * size values through the protected methods
+ * size values through the protected methods
* {@link #getXMicrometers()} and {@link #getYMicrometers()}.
* </p>
*
@@ -221,7 +221,7 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
return ((float) y) / ((float) units);
}
-
+
/**
* Returns the size in y direction in mircometers.
* To be used by sublcasses that need access to the internal storage value.
@@ -247,10 +247,10 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
* Returns the string representation for this object.
* <p>
* The returned string is in the form "XxY um" with X standing
- * for size in x and Y for the size in y direction. The used
+ * for size in x and Y for the size in y direction. The used
* micrometers units is indicated by the appended "um" notation.
* </p>
- *
+ *
* @return The string representation in micrometers.
*/
public String toString()
@@ -262,11 +262,11 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
* Returns the string representation for this object.
* <p>
* The returned string is in the form "XxY U" with X standing
- * for size in x and Y for the size in y direction. U denotes
+ * for size in x and Y for the size in y direction. U denotes
* the units name if one is supplied. The values are given as
* floating point values.
* </p>
- *
+ *
* @param units the units to use
* @param unitsName the name of the units. If <code>null</code>
* it is ommitted from the string representation.
@@ -277,7 +277,7 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
{
if (unitsName == null)
return getX(units) + "x" + getY(units);
-
+
return getX(units) + "x" + getY(units) + " " + unitsName;
}
}
diff --git a/javax/print/attribute/SupportedValuesAttribute.java b/javax/print/attribute/SupportedValuesAttribute.java
index a001e7e91..5380b4609 100644
--- a/javax/print/attribute/SupportedValuesAttribute.java
+++ b/javax/print/attribute/SupportedValuesAttribute.java
@@ -1,4 +1,4 @@
-/* SupportedValuesAttribute.java --
+/* SupportedValuesAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * Marker interface for all attribute classes specifying the
+ * Marker interface for all attribute classes specifying the
* supported/allowed values for another printing attribute class.
* <p>
* A {@link javax.print.PrintService} instance for example provides
@@ -46,11 +46,11 @@ package javax.print.attribute;
* that a specific attribute type is supported and if the supported values.
* </p><p>
* E.g. a {@link javax.print.attribute.standard.JobPrioritySupported}
- * instance indicates that the attribute class
+ * instance indicates that the attribute class
* {@link javax.print.attribute.standard.JobPriority} is supported and
* provides the number of the possible priority levels.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface SupportedValuesAttribute extends Attribute
diff --git a/javax/print/attribute/TextSyntax.java b/javax/print/attribute/TextSyntax.java
index 2daab6ec3..43e3a9d30 100644
--- a/javax/print/attribute/TextSyntax.java
+++ b/javax/print/attribute/TextSyntax.java
@@ -1,4 +1,4 @@
-/* TextSyntax.java --
+/* TextSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ import java.io.Serializable;
import java.util.Locale;
/**
- * <code>TextSyntax</code> is the abstract base class of all attribute
+ * <code>TextSyntax</code> is the abstract base class of all attribute
* classes which provide a string as value (e.g. the location of the printer).
* <p>
* A <code>TextSyntax</code> instance consists of a string value and a
@@ -53,7 +53,7 @@ import java.util.Locale;
public abstract class TextSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -8130648736378144102L;
-
+
private String value;
private Locale locale;
@@ -71,7 +71,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
{
if (value == null)
throw new NullPointerException("value may not be null");
-
+
this.value = value;
this.locale = (locale == null ? Locale.getDefault() : locale);
}
@@ -119,7 +119,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
return false;
TextSyntax tmp = (TextSyntax) obj;
-
+
return (value.equals(tmp.getValue())
&& locale.equals(tmp.getLocale()));
}
@@ -127,7 +127,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
/**
* Returns a string representing the object. The returned
* string is the underlying text value of this object.
- *
+ *
* @return The string representation.
*/
public String toString()
diff --git a/javax/print/attribute/URISyntax.java b/javax/print/attribute/URISyntax.java
index 07deb4b57..a0903a46c 100644
--- a/javax/print/attribute/URISyntax.java
+++ b/javax/print/attribute/URISyntax.java
@@ -1,4 +1,4 @@
-/* URISyntax.java --
+/* URISyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,9 +41,9 @@ import java.io.Serializable;
import java.net.URI;
/**
- * <code>URISyntax</code> is the abstract base class of all attribute
+ * <code>URISyntax</code> is the abstract base class of all attribute
* classes having an Uniform Resource Identifier URI as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class URISyntax
@@ -73,7 +73,7 @@ public abstract class URISyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/UnmodifiableSetException.java b/javax/print/attribute/UnmodifiableSetException.java
index ed1687c4c..6712266b9 100644
--- a/javax/print/attribute/UnmodifiableSetException.java
+++ b/javax/print/attribute/UnmodifiableSetException.java
@@ -1,4 +1,4 @@
-/* UnmodifiableSetException.java --
+/* UnmodifiableSetException.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package javax.print.attribute;
/**
* Exception which is thrown if an operation on an unmodifiable set
* is invoked.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*
* @since 1.4
diff --git a/javax/print/attribute/standard/Chromaticity.java b/javax/print/attribute/standard/Chromaticity.java
index 3dec79893..619341f31 100644
--- a/javax/print/attribute/standard/Chromaticity.java
+++ b/javax/print/attribute/standard/Chromaticity.java
@@ -49,7 +49,7 @@ import javax.print.attribute.PrintRequestAttribute;
* should be printed in monochrome or color.
* <p>
* The attribute interacts with the document to be printed. If the document
- * to be printed is a monochrome document it will be printed monochrome
+ * to be printed is a monochrome document it will be printed monochrome
* regardless of the value of this attribute category. However if it is a
* color document supplying the attribute value <code>MONOCHROME</code>
* will prepare the document to be printed in monochrome instead of color.
@@ -63,20 +63,20 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* <b>IPP Compatibility:</b> Chromaticity is not an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class Chromaticity extends EnumSyntax
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
{
private static final long serialVersionUID = 4660543931355214012L;
-
+
/** Specifies monochrome printing. */
public static final Chromaticity MONOCHROME = new Chromaticity(0);
-
+
/** Specifies color printing. */
public static final Chromaticity COLOR = new Chromaticity(1);
-
+
private static final String[] stringTable = { "monochrome", "color" };
private static final Chromaticity[] enumValueTable = { MONOCHROME, COLOR };
@@ -109,7 +109,7 @@ public final class Chromaticity extends EnumSyntax
{
return "chromaticity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -130,5 +130,5 @@ public final class Chromaticity extends EnumSyntax
{
return enumValueTable;
}
-
+
}
diff --git a/javax/print/attribute/standard/ColorSupported.java b/javax/print/attribute/standard/ColorSupported.java
index c5e251a50..2fa8fd728 100644
--- a/javax/print/attribute/standard/ColorSupported.java
+++ b/javax/print/attribute/standard/ColorSupported.java
@@ -43,7 +43,7 @@ import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>ColorSupported</code> printing attribute specifies if a
+ * The <code>ColorSupported</code> printing attribute specifies if a
* printing device is capable of color printing.
* <p>
* This attributes just tells if a printer device supports color printing
@@ -56,7 +56,7 @@ import javax.print.attribute.PrintServiceAttribute;
* in the Java Print Service API. The IPP boolean value true corresponds
* to <code>SUPPORTED</code> and "false" to <code>NOT_SUPPORTED</code>.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class ColorSupported extends EnumSyntax
@@ -66,17 +66,17 @@ public final class ColorSupported extends EnumSyntax
/** The printer does not support printing in color. */
public static final ColorSupported NOT_SUPPORTED = new ColorSupported(0);
-
+
/** The printer supports printing in color. */
public static final ColorSupported SUPPORTED = new ColorSupported(1);
private static final String[] stringTable = { "not-supported", "supported" };
private static final ColorSupported[] enumValueTable = { NOT_SUPPORTED,
SUPPORTED };
-
+
/**
* Constructs a <code>ColorSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected ColorSupported(int value)
@@ -103,7 +103,7 @@ public final class ColorSupported extends EnumSyntax
{
return "color-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/Compression.java b/javax/print/attribute/standard/Compression.java
index f2f4f1cc1..412ed5af9 100644
--- a/javax/print/attribute/standard/Compression.java
+++ b/javax/print/attribute/standard/Compression.java
@@ -52,7 +52,7 @@ import javax.print.attribute.EnumSyntax;
* <p>
* <b>IPP Compatibility:</b> Compression is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class Compression extends EnumSyntax
@@ -62,24 +62,24 @@ public class Compression extends EnumSyntax
/** The print data is not compressed. */
public static final Compression NONE = new Compression(0);
-
+
/** The print data is ZIP compressed. */
public static final Compression DEFLATE = new Compression(1);
-
+
/** The print data is GNU Zip compressed. */
public static final Compression GZIP = new Compression(2);
-
+
/** The print data is UNIX compressed. */
public static final Compression COMPRESS = new Compression(3);
-
- private static final String[] stringTable = { "none", "deflate",
+
+ private static final String[] stringTable = { "none", "deflate",
"gzip", "compress" };
- private static final Compression[] enumValueTable = { NONE, DEFLATE,
+ private static final Compression[] enumValueTable = { NONE, DEFLATE,
GZIP, COMPRESS };
/**
* Constructs a <code>Compression</code> object.
- *
+ *
* @param value the enum value
*/
protected Compression(int value)
@@ -106,7 +106,7 @@ public class Compression extends EnumSyntax
{
return "compression";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/Copies.java b/javax/print/attribute/standard/Copies.java
index ea9a0990a..c4bc2496a 100644
--- a/javax/print/attribute/standard/Copies.java
+++ b/javax/print/attribute/standard/Copies.java
@@ -1,4 +1,4 @@
-/* Copies.java --
+/* Copies.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,22 +46,22 @@ import javax.print.attribute.PrintRequestAttribute;
* The <code>Copies</code> printing attribute specifies the number
* of copies to be printed.
* <p>
- * <b>Note:</b> The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * <b>Note:</b> The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
* </p>
* <p>
* <b>IPP Compatibility:</b> Copies is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.MultipleDocumentHandling
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class Copies extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -6426631521680023833L;
-
+
/**
* Creates a <code>Copies</code> object.
*
@@ -76,13 +76,13 @@ public final class Copies extends IntegerSyntax
if (value < 1)
throw new IllegalArgumentException("value may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/CopiesSupported.java b/javax/print/attribute/standard/CopiesSupported.java
index 1f62f48a8..d8af8eb57 100644
--- a/javax/print/attribute/standard/CopiesSupported.java
+++ b/javax/print/attribute/standard/CopiesSupported.java
@@ -44,12 +44,12 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
* The <code>CopiesSupported</code> attribute specifies the supported
- * value or range of values for the
- * {@link javax.print.attribute.standard.Copies} attribute.
+ * value or range of values for the
+ * {@link javax.print.attribute.standard.Copies} attribute.
* <p>
* <b>IPP Compatibility:</b> CopiesSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -60,25 +60,25 @@ public final class CopiesSupported extends SetOfIntegerSyntax
/**
* Constructs a <code>CopiesSupported</code> object with
- * the given value. This means that only this value is
+ * the given value. This means that only this value is
* supported for copies.
- *
+ *
* @param member the member value
* @exception IllegalArgumentException if member is &lt; 1
*/
public CopiesSupported(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
/**
* Constructs a <code>CopiesSupported</code> object with
- * the given range of values. This means that values for
+ * the given range of values. This means that values for
* copies are supported inside the specified range.
- *
+ *
* @param lowerBound the lower bound value
* @param upperBound the upper bound value
*
@@ -87,17 +87,17 @@ public final class CopiesSupported extends SetOfIntegerSyntax
public CopiesSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/DateTimeAtCompleted.java b/javax/print/attribute/standard/DateTimeAtCompleted.java
index 324bab73b..285fc0d3f 100644
--- a/javax/print/attribute/standard/DateTimeAtCompleted.java
+++ b/javax/print/attribute/standard/DateTimeAtCompleted.java
@@ -1,4 +1,4 @@
-/* DateTimeAtCompleted.java --
+/* DateTimeAtCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.DateTimeSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The <code>DateTimeAtCompleted</code> attribute specifies the date and
+ * The <code>DateTimeAtCompleted</code> attribute specifies the date and
* the time at which a print job completed (or was canceled or aborted).
* <p>
* <b>IPP Compatibility:</b> DateTimeAtCompleted is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.DateTimeAtCreation
* @see javax.print.attribute.standard.DateTimeAtProcessing
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtCompleted extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/DateTimeAtCreation.java b/javax/print/attribute/standard/DateTimeAtCreation.java
index 5e975b64a..60b885ad1 100644
--- a/javax/print/attribute/standard/DateTimeAtCreation.java
+++ b/javax/print/attribute/standard/DateTimeAtCreation.java
@@ -1,4 +1,4 @@
-/* DateTimeAtCreation.java --
+/* DateTimeAtCreation.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.DateTimeSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The <code>DateTimeAtCreation</code> attribute specifies the
+ * The <code>DateTimeAtCreation</code> attribute specifies the
* date and the time at which a print job was created.
* <p>
* <b>IPP Compatibility:</b> DateTimeAtCreation is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.DateTimeAtCompleted
* @see javax.print.attribute.standard.DateTimeAtProcessing
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtCreation extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/DateTimeAtProcessing.java b/javax/print/attribute/standard/DateTimeAtProcessing.java
index b407d2b2a..733c56589 100644
--- a/javax/print/attribute/standard/DateTimeAtProcessing.java
+++ b/javax/print/attribute/standard/DateTimeAtProcessing.java
@@ -1,4 +1,4 @@
-/* DateTimeAtProcessing.java --
+/* DateTimeAtProcessing.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import javax.print.attribute.PrintJobAttribute;
* </p>
* @see javax.print.attribute.standard.DateTimeAtCompleted
* @see javax.print.attribute.standard.DateTimeAtCreation
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtProcessing extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/Destination.java b/javax/print/attribute/standard/Destination.java
index a82aa4b36..d37340a9e 100644
--- a/javax/print/attribute/standard/Destination.java
+++ b/javax/print/attribute/standard/Destination.java
@@ -49,22 +49,22 @@ import javax.print.attribute.URISyntax;
* The <code>Destination</code> attribute provides a URI for an alternate
* destination of the printing output.
* <p>
- * As not an IPP attribute many print services will not support this
+ * As not an IPP attribute many print services will not support this
* attribute and only provide the printer device as a destination.
* An alternate output destination would be a file on the local harddisk
* given as a file scheme URI.
* </p>
- * <p>
- * If a print service does not support the destination attributes URI it
+ * <p>
+ * If a print service does not support the destination attributes URI it
* will throw a PrintException. This exception may further implement the
- * interface {@link javax.print.URIException}.
+ * interface {@link javax.print.URIException}.
* </p>
* <p>
* <b>IPP Compatibility:</b> Destination is not an IPP 1.1 attribute.
* </p>
* @see javax.print.PrintException
* @see javax.print.URIException
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,7 +75,7 @@ public final class Destination extends URISyntax
/**
* Constructs a <code>Destination</code> object.
- *
+ *
* @param uri the URI of the output destination.
* @throws NullPointerException if the given uri is null.
*/
@@ -83,13 +83,13 @@ public final class Destination extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/DocumentName.java b/javax/print/attribute/standard/DocumentName.java
index 6a377d5be..f6f792725 100644
--- a/javax/print/attribute/standard/DocumentName.java
+++ b/javax/print/attribute/standard/DocumentName.java
@@ -1,4 +1,4 @@
-/* DocumentName.java --
+/* DocumentName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,15 +48,15 @@ import javax.print.attribute.TextSyntax;
* The <code>DocumentName</code> printing attribute specifies a document name.
* <p>
* The document name may be different than the name of the job. It must not be
- * unique across multiple documents in the same print job. Normally, an
- * application provides the document name for the user by using e.g. the file
+ * unique across multiple documents in the same print job. Normally, an
+ * application provides the document name for the user by using e.g. the file
* name or a name generated automatically by the application.
* </p>
* <p>
* <b>IPP Compatibility:</b> DocumentName is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.JobName
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DocumentName extends TextSyntax
@@ -83,7 +83,7 @@ public final class DocumentName extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/Fidelity.java b/javax/print/attribute/standard/Fidelity.java
index 5e25f5b88..39d26a127 100644
--- a/javax/print/attribute/standard/Fidelity.java
+++ b/javax/print/attribute/standard/Fidelity.java
@@ -53,20 +53,20 @@ import javax.print.attribute.PrintRequestAttribute;
* through the client by providing this attribute to indicate the wanted
* conflict handling mechanism:
* <ul>
- * <li>{@link #FIDELITY_TRUE}: Reject the job since the job can not be
+ * <li>{@link #FIDELITY_TRUE}: Reject the job since the job can not be
* processed exactly as specified by the attributes of the client.</li>
- * <li>{@link #FIDELITY_FALSE}: The Printer may make any changes necessary
+ * <li>{@link #FIDELITY_FALSE}: The Printer may make any changes necessary
* to proceed with processing the Job as good as possible.</li>
* </ul>
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> Fidelity is an IPP 1.1 attribute. The IPP name
- * is "ipp-attribute-fidelity". The IPP specification treats Fidelity as a
+ * is "ipp-attribute-fidelity". The IPP specification treats Fidelity as a
* boolean type which is not available in the Java Print Service API. The IPP
- * boolean value "true" corresponds to <code>FIDELITY_TRUE</code> and "false"
+ * boolean value "true" corresponds to <code>FIDELITY_TRUE</code> and "false"
* to <code>FIDELITY_FALSE</code>.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,27 +75,27 @@ public final class Fidelity extends EnumSyntax
{
private static final long serialVersionUID = 6320827847329172308L;
- /**
- * Requests that the job is printed exactly as specified,
+ /**
+ * Requests that the job is printed exactly as specified,
* or rejected otherwise.
*/
public static final Fidelity FIDELITY_TRUE = new Fidelity(0);
-
- /**
+
+ /**
* Requests that the job is printed as exactly as reasonable. This means
- * that the print service may choose to substitute the default value
- * associated with that attribute, or use some other supported value that
- * is similar to the unsupported requested value.
+ * that the print service may choose to substitute the default value
+ * associated with that attribute, or use some other supported value that
+ * is similar to the unsupported requested value.
*/
public static final Fidelity FIDELITY_FALSE = new Fidelity(1);
-
+
private static final String[] stringTable = { "true", "false" };
private static final Fidelity[] enumValueTable = { FIDELITY_TRUE,
FIDELITY_FALSE };
/**
* Constructs a <code>Fidelity</code> object.
- *
+ *
* @param value the value
*/
protected Fidelity(int value)
@@ -122,7 +122,7 @@ public final class Fidelity extends EnumSyntax
{
return "ipp-attribute-fidelity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/Finishings.java b/javax/print/attribute/standard/Finishings.java
index cd8f6753b..bb38cebc4 100644
--- a/javax/print/attribute/standard/Finishings.java
+++ b/javax/print/attribute/standard/Finishings.java
@@ -49,30 +49,30 @@ import javax.print.attribute.PrintRequestAttribute;
* The <code>Finishings</code> attribute specifies the finishing operations
* that the Printer applies to every copy of each printed document in the Job.
* <p>
- * Standard enum values are: <code>NONE</code>, <code>STAPLE</code>,
+ * Standard enum values are: <code>NONE</code>, <code>STAPLE</code>,
* <code>COVER</code>, <code>BIND</code>, <code>SADDLE_STITCH</code>,
* <code>EDGE_STITCH</code>.
* <br><br>
- * The following values are more specific:
- * <code>STAPLE_TOP_LEFT</code>, <code>STAPLE_BOTTOM_LEFT</code>,
- * <code>STAPLE_TOP_RIGHT</code>, <code>STAPLE_BOTTOM_RIGHT</code>,
- * <code>EDGE_STITCH_LEFT</code>, <code>EDGE_STITCH_TOP</code>,
- * <code>EDGE_STITCH_RIGHT</code>, <code>EDGE_STITCH_BOTTOM</code>,
- * <code>STAPLE_DUAL_LEFT</code>, <code>STAPLE_DUAL_TOP</code>,
+ * The following values are more specific:
+ * <code>STAPLE_TOP_LEFT</code>, <code>STAPLE_BOTTOM_LEFT</code>,
+ * <code>STAPLE_TOP_RIGHT</code>, <code>STAPLE_BOTTOM_RIGHT</code>,
+ * <code>EDGE_STITCH_LEFT</code>, <code>EDGE_STITCH_TOP</code>,
+ * <code>EDGE_STITCH_RIGHT</code>, <code>EDGE_STITCH_BOTTOM</code>,
+ * <code>STAPLE_DUAL_LEFT</code>, <code>STAPLE_DUAL_TOP</code>,
* <code>STAPLE_DUAL_RIGHT</code>, <code>STAPLE_DUAL_BOTTOM</code>.
- * </p>
+ * </p>
* <p>
- * <b>Note:</b> The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * <b>Note:</b> The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
* </p>
* <p>
- * <b>IPP Compatibility:</b> Finishings is an IPP 1.1 attribute. Differences
- * to the IPP specification are that in the Java Print Service API only one
- * enum value is supported (in IPP a set of enums). Further the enum
+ * <b>IPP Compatibility:</b> Finishings is an IPP 1.1 attribute. Differences
+ * to the IPP specification are that in the Java Print Service API only one
+ * enum value is supported (in IPP a set of enums). Further the enum
* <code>punch</code> is not supported.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -81,119 +81,119 @@ public class Finishings extends EnumSyntax
{
private static final long serialVersionUID = -627840419548391754L;
- /**
+ /**
* Perform no finishings of the documents.
*/
public static final Finishings NONE = new Finishings(3);
-
- /**
- * Selects binding of the documents with one or more staples.
+
+ /**
+ * Selects binding of the documents with one or more staples.
*/
public static final Finishings STAPLE = new Finishings(4);
-
+
/**
- * Selects the use of a non-printed (or pre-printed) cover for
+ * Selects the use of a non-printed (or pre-printed) cover for
* the document.
*/
public static final Finishings COVER = new Finishings(6);
-
+
/**
* Selects that a binding is to be applied to the document.
* The type and placement of the binding is site-defined.
*/
public static final Finishings BIND = new Finishings(7);
-
+
/**
* Selects binding of the documents with one or more staples
- * along the middle fold.
+ * along the middle fold.
*/
public static final Finishings SADDLE_STITCH = new Finishings(8);
-
+
/**
- * Selects binding of the documents with one or more staples
- * along one edge.
+ * Selects binding of the documents with one or more staples
+ * along one edge.
*/
public static final Finishings EDGE_STITCH = new Finishings(9);
-
- /**
- * Selects binding of the documents with one or more staples
- * in the top left corner.
+
+ /**
+ * Selects binding of the documents with one or more staples
+ * in the top left corner.
*/
public static final Finishings STAPLE_TOP_LEFT = new Finishings(20);
-
- /**
- * Selects binding of the documents with one or more staples in the bottom
- * left corner.
+
+ /**
+ * Selects binding of the documents with one or more staples in the bottom
+ * left corner.
*/
public static final Finishings STAPLE_BOTTOM_LEFT = new Finishings(21);
-
+
/**
- * Selects binding of the documents with one or more staples in
+ * Selects binding of the documents with one or more staples in
* the top right corner.
*/
public static final Finishings STAPLE_TOP_RIGHT = new Finishings(22);
-
+
/**
- * Selects binding of the documents with one or more staples in
+ * Selects binding of the documents with one or more staples in
* the bottom right corner.
*/
public static final Finishings STAPLE_BOTTOM_RIGHT = new Finishings(23);
-
+
/**
* Selects binding of the documents with one or more staples
* along the left edge.
*/
public static final Finishings EDGE_STITCH_LEFT = new Finishings(24);
-
+
/**
- * Selects binding of the documents with one or more staples along
+ * Selects binding of the documents with one or more staples along
* the top edge.
*/
public static final Finishings EDGE_STITCH_TOP = new Finishings(25);
-
+
/**
- * Selects binding of the documents with one or more staples along
+ * Selects binding of the documents with one or more staples along
* the right edge.
*/
public static final Finishings EDGE_STITCH_RIGHT = new Finishings(26);
-
+
/**
* Selects binding of the documents with one or more staples along
- * the bottom edge.
+ * the bottom edge.
*/
public static final Finishings EDGE_STITCH_BOTTOM = new Finishings(27);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* left edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_LEFT = new Finishings(28);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* top edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_TOP = new Finishings(29);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* right edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_RIGHT = new Finishings(30);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* bottom edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_BOTTOM = new Finishings(31);
- private static final String[] stringTable = { "none", "staple", null,
+ private static final String[] stringTable = { "none", "staple", null,
"cover", "bind", "saddle-stitch",
"edge-stitch", null, null, null,
null, null, null, null, null,
null, null, "staple-top-left",
- "staple-bottom-left",
- "staple-top-right",
+ "staple-bottom-left",
+ "staple-top-right",
"staple-bottom-right",
"edge-stitch-left",
"edge-stitch-top",
@@ -203,14 +203,14 @@ public class Finishings extends EnumSyntax
"staple-dual-top",
"staple-dual-right",
"staple-dual-bottom" };
-
- private static final Finishings[] enumValueTable = { NONE, STAPLE, null,
- COVER, BIND,
+
+ private static final Finishings[] enumValueTable = { NONE, STAPLE, null,
+ COVER, BIND,
SADDLE_STITCH,
- EDGE_STITCH, null,
- null, null, null,
- null, null, null,
- null, null, null,
+ EDGE_STITCH, null,
+ null, null, null,
+ null, null, null,
+ null, null, null,
STAPLE_TOP_LEFT,
STAPLE_BOTTOM_LEFT,
STAPLE_TOP_RIGHT,
@@ -223,10 +223,10 @@ public class Finishings extends EnumSyntax
STAPLE_DUAL_TOP,
STAPLE_DUAL_RIGHT,
STAPLE_DUAL_BOTTOM };
-
+
/**
* Constructs a <code>Finishings</code> object.
- *
+ *
* @param value the value
*/
protected Finishings(int value)
@@ -253,7 +253,7 @@ public class Finishings extends EnumSyntax
{
return "finishings";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -283,5 +283,5 @@ public class Finishings extends EnumSyntax
protected int getOffset()
{
return 3;
- }
+ }
}
diff --git a/javax/print/attribute/standard/JobHoldUntil.java b/javax/print/attribute/standard/JobHoldUntil.java
index 7c137ccd1..97d3c15ad 100644
--- a/javax/print/attribute/standard/JobHoldUntil.java
+++ b/javax/print/attribute/standard/JobHoldUntil.java
@@ -1,4 +1,4 @@
-/* JobHoldUntil.java --
+/* JobHoldUntil.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,17 +48,17 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>JobHoldUntil</code> attribute specifies the date
* and the time at which a print job must become a candidate
- * for printing.
+ * for printing.
* <p>
* <b>IPP Compatibility:</b> JobHoldUntil is an IPP 1.1 attribute.
* However the attribute in IPP is based on keywords of named
* time periods like day-time or evening. It will depend on the
- * concrete implementation of a print service how a mapping of the
+ * concrete implementation of a print service how a mapping of the
* detailed provided date and time of this attribute to the named
* keyword or an alternate extension attribute will be done. E.g.
* CUPS supports also a HH:MM format as extension to the keywords.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobHoldUntil extends DateTimeSyntax
@@ -83,7 +83,7 @@ public final class JobHoldUntil extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobImpressions.java b/javax/print/attribute/standard/JobImpressions.java
index a2c7d4dd6..11d51cac8 100644
--- a/javax/print/attribute/standard/JobImpressions.java
+++ b/javax/print/attribute/standard/JobImpressions.java
@@ -1,4 +1,4 @@
-/* JobImpressions.java --
+/* JobImpressions.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,16 +45,16 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>JobImpressions</code> printing attribute specifies
* the total size in number of impressions of the documents
- * of a a print job.
+ * of a a print job.
* <p>
- * An impression is specified by the IPP specification as the image
- * (possibly many print-stream pages in different configurations)
+ * An impression is specified by the IPP specification as the image
+ * (possibly many print-stream pages in different configurations)
* imposed onto a single media sheet. This attribute must not include
* a multiplication factor from the number of copies which maybe specified
* in a Copies attribute.
* </p>
* <p>
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -67,14 +67,14 @@ import javax.print.attribute.PrintRequestAttribute;
* </p>
* @see javax.print.attribute.standard.JobKOctets
* @see javax.print.attribute.standard.JobMediaSheets
- *
+ *
* @author Michael Koch
*/
public final class JobImpressions extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = 8225537206784322464L;
-
+
/**
* Creates a <code>JobImpressions</code> object.
*
@@ -89,13 +89,13 @@ public final class JobImpressions extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobImpressionsCompleted.java b/javax/print/attribute/standard/JobImpressionsCompleted.java
index 55d3fd6b9..d1594ea02 100644
--- a/javax/print/attribute/standard/JobImpressionsCompleted.java
+++ b/javax/print/attribute/standard/JobImpressionsCompleted.java
@@ -1,4 +1,4 @@
-/* JobImpressionsCompleted.java --
+/* JobImpressionsCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintJobAttribute;
* The <code>JobImpressionsCompleted</code> printing attribute reports
* the number of impressions already processed.
* <p>
- * An impression is specified by the IPP specification as the image imposed
- * onto a single media sheet. This attribute will not include a multiplication
+ * An impression is specified by the IPP specification as the image imposed
+ * onto a single media sheet. This attribute will not include a multiplication
* factor from the number of copies.
* </p>
* <p>
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
* </p>
* <p>
@@ -58,14 +58,14 @@ import javax.print.attribute.PrintJobAttribute;
* </p>
* @see javax.print.attribute.standard.JobMediaSheetsCompleted
* @see javax.print.attribute.standard.JobKOctetsProcessed
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobImpressionsCompleted extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 6722648442432393294L;
-
+
/**
* Creates a <code>JobImpressionsCompleted</code> object.
*
@@ -80,13 +80,13 @@ public final class JobImpressionsCompleted extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobImpressionsSupported.java b/javax/print/attribute/standard/JobImpressionsSupported.java
index 5be3fc0a6..583db4e24 100644
--- a/javax/print/attribute/standard/JobImpressionsSupported.java
+++ b/javax/print/attribute/standard/JobImpressionsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The <code>JobImpressionsSupported</code> printing attribute specifies the
- * supported range of values for the
+ * The <code>JobImpressionsSupported</code> printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobImpressions} attribute.
* <p>
* <b>IPP Compatibility:</b> JobImpressionsSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,7 +59,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
private static final long serialVersionUID = -4887354803843173692L;
/**
- * Constructs a <code>JobImpressionsSupported</code> object with the
+ * Constructs a <code>JobImpressionsSupported</code> object with the
* given range of supported job impressions values.
*
* @param lowerBound the lower bound value
@@ -71,24 +71,24 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
public JobImpressionsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobImpressionsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/JobKOctets.java b/javax/print/attribute/standard/JobKOctets.java
index ac9a7eff6..c4427eaa5 100644
--- a/javax/print/attribute/standard/JobKOctets.java
+++ b/javax/print/attribute/standard/JobKOctets.java
@@ -1,4 +1,4 @@
-/* JobKOctets.java --
+/* JobKOctets.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,12 +48,12 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* The supplied value has to be rounded up, so that a range between
* 1 and 1024 octects is specified as 1 and a range between 1025 and
- * 2048 octects as 2, etc. This attribute must not include a multiplication
- * factor from the number of copies which maybe specified in a Copies
+ * 2048 octects as 2, etc. This attribute must not include a multiplication
+ * factor from the number of copies which maybe specified in a Copies
* attribute.
* </p>
* <p>
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -66,17 +66,17 @@ import javax.print.attribute.PrintRequestAttribute;
* </p>
* @see javax.print.attribute.standard.JobMediaSheets
* @see javax.print.attribute.standard.JobImpressions
- *
+ *
* @author Michael Koch
*/
public final class JobKOctets extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -8959710146498202869L;
-
+
/**
* Creates a <code>JobKOctets</code> object.
- * The value is in units of K (1024) octets rounded up to the next highest K.
+ * The value is in units of K (1024) octets rounded up to the next highest K.
*
* @param value the number of K octets
*
@@ -89,13 +89,13 @@ public final class JobKOctets extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobKOctetsProcessed.java b/javax/print/attribute/standard/JobKOctetsProcessed.java
index 34616edfe..55bee6a05 100644
--- a/javax/print/attribute/standard/JobKOctetsProcessed.java
+++ b/javax/print/attribute/standard/JobKOctetsProcessed.java
@@ -1,4 +1,4 @@
-/* JobKOctetsProcessed.java --
+/* JobKOctetsProcessed.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,11 +46,11 @@ import javax.print.attribute.PrintJobAttribute;
* the total number of octets already processed in K octets units.
* <p>
* The supplied value will be rounded up to the next highest K octets.
- * This attribute will not include a multiplication factor from the number
+ * This attribute will not include a multiplication factor from the number
* of copies.
* </p>
* <p>
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
* </p>
* <p>
@@ -58,17 +58,17 @@ import javax.print.attribute.PrintJobAttribute;
* </p>
* @see javax.print.attribute.standard.JobMediaSheetsCompleted
* @see javax.print.attribute.standard.JobImpressionsCompleted
- *
+ *
* @author Michael Koch
*/
public final class JobKOctetsProcessed extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = -6265238509657881806L;
-
+
/**
* Creates a <code>JobKOctetsProcessed</code> object.
- * The value is in units of K (1024) octets rounded up to the next highest K.
+ * The value is in units of K (1024) octets rounded up to the next highest K.
*
* @param value the number of processed K octets
*
@@ -81,13 +81,13 @@ public final class JobKOctetsProcessed extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobKOctetsSupported.java b/javax/print/attribute/standard/JobKOctetsSupported.java
index 4936fd49f..6990a53ee 100644
--- a/javax/print/attribute/standard/JobKOctetsSupported.java
+++ b/javax/print/attribute/standard/JobKOctetsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The <code>JobKOctetsSupported</code> printing attribute specifies the
- * supported range of values for the
+ * The <code>JobKOctetsSupported</code> printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobKOctets} attribute.
* <p>
* <b>IPP Compatibility:</b> JobKOctetsSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -71,24 +71,24 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax
public JobKOctetsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobKOctetsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/JobMediaSheets.java b/javax/print/attribute/standard/JobMediaSheets.java
index 17cf96f33..c92cf3040 100644
--- a/javax/print/attribute/standard/JobMediaSheets.java
+++ b/javax/print/attribute/standard/JobMediaSheets.java
@@ -1,4 +1,4 @@
-/* JobMediaSheets.java --
+/* JobMediaSheets.java --
Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ import javax.print.attribute.PrintRequestAttribute;
* was specified for the job.
* </p>
* <p>
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -64,14 +64,14 @@ import javax.print.attribute.PrintRequestAttribute;
* </p>
* @see javax.print.attribute.standard.JobKOctets
* @see javax.print.attribute.standard.JobImpressions
- *
+ *
* @author Michael Koch
*/
public class JobMediaSheets extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = 408871131531979741L;
-
+
/**
* Creates a <code>JobMediaSheets</code> object.
*
@@ -86,13 +86,13 @@ public class JobMediaSheets extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobMediaSheetsCompleted.java b/javax/print/attribute/standard/JobMediaSheetsCompleted.java
index 353c044ec..5ec7d8d63 100644
--- a/javax/print/attribute/standard/JobMediaSheetsCompleted.java
+++ b/javax/print/attribute/standard/JobMediaSheetsCompleted.java
@@ -1,4 +1,4 @@
-/* JobMediaSheetsCompleted.java --
+/* JobMediaSheetsCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,9 +43,9 @@ import javax.print.attribute.PrintJobAttribute;
/**
* The <code>JobMediaSheetsCompleted</code> printing attribute reports
- * the number of media sheets already processed.
+ * the number of media sheets already processed.
* <p>
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
* </p>
* <p>
@@ -53,14 +53,14 @@ import javax.print.attribute.PrintJobAttribute;
* </p>
* @see javax.print.attribute.standard.JobImpressionsCompleted
* @see javax.print.attribute.standard.JobKOctetsProcessed
- *
+ *
* @author Michael Koch
*/
public final class JobMediaSheetsCompleted extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 1739595973810840475L;
-
+
/**
* Creates a <code>JobMediaSheetsCompleted</code> object.
*
@@ -75,13 +75,13 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobMediaSheetsSupported.java b/javax/print/attribute/standard/JobMediaSheetsSupported.java
index d9a0ed2df..32d6ac54d 100644
--- a/javax/print/attribute/standard/JobMediaSheetsSupported.java
+++ b/javax/print/attribute/standard/JobMediaSheetsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The <code>JobMediaSheetsSupported</code> printing attribute specifies the
- * supported range of values for the
+ * The <code>JobMediaSheetsSupported</code> printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobMediaSheets} attribute.
* <p>
* <b>IPP Compatibility:</b> JobMediaSheetsSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,7 +59,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
private static final long serialVersionUID = 2953685470388672940L;
/**
- * Constructs a <code>JobMediaSheetsSupported</code> object with the
+ * Constructs a <code>JobMediaSheetsSupported</code> object with the
* given range of supported job media sheets values.
*
* @param lowerBound the lower bound value
@@ -71,24 +71,24 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
public JobMediaSheetsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobMediaSheetsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/JobMessageFromOperator.java b/javax/print/attribute/standard/JobMessageFromOperator.java
index f2a589af4..bf1dedb96 100644
--- a/javax/print/attribute/standard/JobMessageFromOperator.java
+++ b/javax/print/attribute/standard/JobMessageFromOperator.java
@@ -1,4 +1,4 @@
-/* JobMessageFromOperator.java --
+/* JobMessageFromOperator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,15 +45,15 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>JobMessageFromOperator</code> printing attribute provides
+ * The <code>JobMessageFromOperator</code> printing attribute provides
* a message from an operator or a system administrator related to the
* print job. This may include information why a certain action has been
* taken on the print job like a modification.
* <p>
- * <b>IPP Compatibility:</b> JobMessageFromOperator is an IPP 1.1
+ * <b>IPP Compatibility:</b> JobMessageFromOperator is an IPP 1.1
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobMessageFromOperator extends TextSyntax
@@ -80,7 +80,7 @@ public final class JobMessageFromOperator extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobName.java b/javax/print/attribute/standard/JobName.java
index 5f5310e96..dc84cb61e 100644
--- a/javax/print/attribute/standard/JobName.java
+++ b/javax/print/attribute/standard/JobName.java
@@ -1,4 +1,4 @@
-/* JobName.java --
+/* JobName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,12 +46,12 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>JobName</code> printing attribute provides the name of a
+ * The <code>JobName</code> printing attribute provides the name of a
* print job for identification.
* <p>
* <b>IPP Compatibility:</b> JobName is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobName extends TextSyntax
@@ -78,7 +78,7 @@ public final class JobName extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobOriginatingUserName.java b/javax/print/attribute/standard/JobOriginatingUserName.java
index 62073daa6..c7246ddc5 100644
--- a/javax/print/attribute/standard/JobOriginatingUserName.java
+++ b/javax/print/attribute/standard/JobOriginatingUserName.java
@@ -1,4 +1,4 @@
-/* JobOriginatingUserName.java --
+/* JobOriginatingUserName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>JobOriginatingUserName</code> attribute specifies the name of
+ * The <code>JobOriginatingUserName</code> attribute specifies the name of
* the user which submitted the print job.
* <p>
* <b>IPP Compatibility:</b> JobOriginatingUserName is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobOriginatingUserName extends TextSyntax
@@ -77,7 +77,7 @@ public final class JobOriginatingUserName extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobPriority.java b/javax/print/attribute/standard/JobPriority.java
index 88fc685b8..0f669a06d 100644
--- a/javax/print/attribute/standard/JobPriority.java
+++ b/javax/print/attribute/standard/JobPriority.java
@@ -1,4 +1,4 @@
-/* JobPriority.java --
+/* JobPriority.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,14 +47,14 @@ import javax.print.attribute.PrintRequestAttribute;
* The <code>JobPriority</code> printing attribute specifies
* the priority for scheduling a job on the print service.
* <p>
- * A client may specify any value between 1 (lowest priority) and 100
+ * A client may specify any value between 1 (lowest priority) and 100
* (highest priority). A print service prints jobs with a priority
* value of n before those with a priority value of n-1.
* </p>
* <p>
* <b>IPP Compatibility:</b> JobPriority is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobPriority extends IntegerSyntax
@@ -82,7 +82,7 @@ public final class JobPriority extends IntegerSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobPrioritySupported.java b/javax/print/attribute/standard/JobPrioritySupported.java
index e7ebca2db..b2e577283 100644
--- a/javax/print/attribute/standard/JobPrioritySupported.java
+++ b/javax/print/attribute/standard/JobPrioritySupported.java
@@ -1,4 +1,4 @@
-/* JobPrioritySupported.java --
+/* JobPrioritySupported.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import javax.print.attribute.SupportedValuesAttribute;
* <p>
* A client may specify any JobPriority value between 1 and 100. If a
* print service supports fewer priority levels it indicates the maximum
- * levels through this attribute. The print service then automatically
+ * levels through this attribute. The print service then automatically
* maps the job priority value provided by the client in an even distribution
* over the whole range of 1 to 100.
* </p>
@@ -56,7 +56,7 @@ import javax.print.attribute.SupportedValuesAttribute;
* <b>IPP Compatibility:</b> JobPrioritySupported is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.JobPriority
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobPrioritySupported extends IntegerSyntax
@@ -84,7 +84,7 @@ public final class JobPrioritySupported extends IntegerSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/JobSheets.java b/javax/print/attribute/standard/JobSheets.java
index a930f63cf..7d20692b9 100644
--- a/javax/print/attribute/standard/JobSheets.java
+++ b/javax/print/attribute/standard/JobSheets.java
@@ -45,11 +45,11 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>JobSheets</code> printing attribute specifies if a
- * job start/end sheets should be printed.
+ * job start/end sheets should be printed.
* <p>
* <b>IPP Compatibility:</b> JobSheets is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,24 +59,24 @@ public class JobSheets extends EnumSyntax
private static final long serialVersionUID = -4735258056132519759L;
/**
- * No job sheet is printed.
+ * No job sheet is printed.
*/
public static final JobSheets NONE = new JobSheets(0);
-
+
/**
- * The standard job sheet is printed. The sheet and if it
+ * The standard job sheet is printed. The sheet and if it
* is printed only as start sheet or also as end sheet is
* site specific.
*/
public static final JobSheets STANDARD = new JobSheets(1);
private static final String[] stringTable = { "none", "standard" };
-
+
private static final JobSheets[] enumValueTable = { NONE, STANDARD };
-
+
/**
* Constructs a <code>JobSheets</code> object.
- *
+ *
* @param value the enum value.
*/
protected JobSheets(int value)
@@ -103,7 +103,7 @@ public class JobSheets extends EnumSyntax
{
return "job-sheets";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/JobState.java b/javax/print/attribute/standard/JobState.java
index fa769bbf3..5efbe08ea 100644
--- a/javax/print/attribute/standard/JobState.java
+++ b/javax/print/attribute/standard/JobState.java
@@ -50,11 +50,11 @@ import javax.print.attribute.PrintJobAttribute;
* attribute provides further detailed information about
* the given job state. Detailed information about the job
* state and job state reasons can be found in the RFC 2911.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> JobState is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -67,12 +67,12 @@ public class JobState extends EnumSyntax
* The job state is currently unknown.
*/
public static final JobState UNKNOWN = new JobState(0);
-
+
/**
* The job is pending processing.
*/
public static final JobState PENDING = new JobState(3);
-
+
/**
* The job is currently not a candidate for printing because
* of reasons reported by the job-state-reasons attribute. If
@@ -80,52 +80,52 @@ public class JobState extends EnumSyntax
* pending state.
*/
public static final JobState PENDING_HELD = new JobState(4);
-
+
/**
* The job is currently processed.
*/
public static final JobState PROCESSING = new JobState(5);
-
+
/**
* The job's processing has stopped. The job-state-reasons
* attribute may indicate the reason(s). The job will return
* to the processing state if the reasons are no longer present.
*/
public static final JobState PROCESSING_STOPPED = new JobState(6);
-
+
/**
* The job has been canceled by the client.
*/
public static final JobState CANCELED = new JobState(7);
-
+
/**
* The job has been aborted by the system.
*/
public static final JobState ABORTED = new JobState(8);
-
+
/**
* The job has completed successfully.
*/
public static final JobState COMPLETED = new JobState(9);
- private static final String[] stringTable = { "unknown", null, null,
+ private static final String[] stringTable = { "unknown", null, null,
"pending", "pending-held",
- "processing",
+ "processing",
"processing-stopped",
- "canceled", "aborted",
+ "canceled", "aborted",
"completed"};
-
+
private static final JobState[] enumValueTable = { UNKNOWN, null, null,
PENDING, PENDING_HELD,
PROCESSING,
PROCESSING_STOPPED,
CANCELED, ABORTED,
COMPLETED };
-
+
/**
* Constructs a <code>JobState</code> object.
- *
+ *
* @param value the enum value.
*/
protected JobState(int value)
@@ -152,7 +152,7 @@ public class JobState extends EnumSyntax
{
return "job-state";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/JobStateReason.java b/javax/print/attribute/standard/JobStateReason.java
index b8420b180..52aae1562 100644
--- a/javax/print/attribute/standard/JobStateReason.java
+++ b/javax/print/attribute/standard/JobStateReason.java
@@ -45,13 +45,13 @@ import javax.print.attribute.EnumSyntax;
* The <code>JobStateReason</code> attribute provides additional
* information about the current state of a job. Its always part
* of the {@link javax.print.attribute.standard.JobStateReasons}
- * printing attribute.
+ * printing attribute.
* <p>
- * <b>IPP Compatibility:</b> JobStateReason is not an IPP 1.1
+ * <b>IPP Compatibility:</b> JobStateReason is not an IPP 1.1
* attribute itself but used inside the <code>JobStateReasons</code>
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,179 +65,179 @@ public class JobStateReason extends EnumSyntax
* data for processing.
*/
public static final JobStateReason JOB_INCOMING = new JobStateReason(0);
-
+
/**
* The printer is expecting additional document data before it
* can move this job into the processing state.
*/
public static final JobStateReason JOB_DATA_INSUFFICIENT = new JobStateReason(1);
-
+
/**
* The printer is unable to access one or more documents provided
* by reference in the print job.
*/
public static final JobStateReason DOCUMENT_ACCESS_ERROR = new JobStateReason(2);
-
+
/**
* The printer has not received the whole job submission. This
* indicates no reason for the interruption.
*/
public static final JobStateReason SUBMISSION_INTERRUPTED = new JobStateReason(3);
-
+
/**
* The printer transfers the job to the actual output device.
*/
public static final JobStateReason JOB_OUTGOING = new JobStateReason(4);
-
+
/**
- * The job was submitted with a <code>JobHoldUntil</code> attribute which
- * specifies a time period still in the future and causes the job to
+ * The job was submitted with a <code>JobHoldUntil</code> attribute which
+ * specifies a time period still in the future and causes the job to
* be on hold.
*/
public static final JobStateReason JOB_HOLD_UNTIL_SPECIFIED = new JobStateReason(5);
-
+
/**
* One or more resources needed by the job are not ready. E.g. needed
* media type.
*/
public static final JobStateReason RESOURCES_ARE_NOT_READY = new JobStateReason(6);
-
+
/**
* The printer stopped partly.
*/
public static final JobStateReason PRINTER_STOPPED_PARTLY = new JobStateReason(7);
-
+
/**
* The printer stopped complete.
*/
public static final JobStateReason PRINTER_STOPPED = new JobStateReason(8);
-
+
/**
* The printer is currently interpreting the jobs document data.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_INTERPRETING = new JobStateReason(9);
-
+
/**
* The printer has queued the document data.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_QUEUED = new JobStateReason(10);
-
+
/**
* The printer is transforming the document data to another representation.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_TRANSFORMING = new JobStateReason(11);
-
+
/**
* The job is queued for marking.
*/
public static final JobStateReason JOB_QUEUED_FOR_MARKER = new JobStateReason(12);
-
+
/**
* The job is currently printing.
*/
public static final JobStateReason JOB_PRINTING = new JobStateReason(13);
-
+
/**
* The job was canceled by the user (the owner of the job).
*/
public static final JobStateReason JOB_CANCELED_BY_USER = new JobStateReason(14);
-
+
/**
* The job was canceled by the operator.
*/
public static final JobStateReason JOB_CANCELED_BY_OPERATOR = new JobStateReason(15);
-
+
/**
* The job was canceled by an unidentified local user at the device.
*/
public static final JobStateReason JOB_CANCELED_AT_DEVICE = new JobStateReason(16);
-
+
/**
* The job has been aborted by the system.
*/
public static final JobStateReason ABORTED_BY_SYSTEM = new JobStateReason(17);
-
+
/**
* The printer aborted the job because of an unsupported compression while
* trying to decompress the document data.
*/
public static final JobStateReason UNSUPPORTED_COMPRESSION = new JobStateReason(18);
-
+
/**
* The printer aborted the job because of a compression error while
* trying to decompress the document data. If this state is given the test
* for supported compression has already been passed.
*/
public static final JobStateReason COMPRESSION_ERROR = new JobStateReason(19);
-
+
/**
* The printer aborted the job because of the document format is not supported.
- * This may happen if a job is specified as application/octet-stream format.
+ * This may happen if a job is specified as application/octet-stream format.
*/
public static final JobStateReason UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(20);
-
+
/**
- * The printer aborted the job because of an error in the document data.
+ * The printer aborted the job because of an error in the document data.
*/
public static final JobStateReason DOCUMENT_FORMAT_ERROR = new JobStateReason(21);
-
+
/**
* The client has either canceled the job or the printer aborted the job.
- * However the printer still performs some action on the job e.g. to cleanup.
+ * However the printer still performs some action on the job e.g. to cleanup.
*/
public static final JobStateReason PROCESSING_TO_STOP_POINT = new JobStateReason(22);
-
+
/**
* The printer is offline and therefore is not accepting jobs.
*/
public static final JobStateReason SERVICE_OFF_LINE = new JobStateReason(23);
-
+
/**
- * The printer completed the job successfully.
+ * The printer completed the job successfully.
*/
public static final JobStateReason JOB_COMPLETED_SUCCESSFULLY = new JobStateReason(24);
-
+
/**
* The printer completed the job with warnings.
*/
public static final JobStateReason JOB_COMPLETED_WITH_WARNINGS = new JobStateReason(25);
-
+
/**
* The printer completed the job with errors.
*/
public static final JobStateReason JOB_COMPLETED_WITH_ERRORS = new JobStateReason(26);
-
+
/**
- * The job is retained and is able to be restared.
+ * The job is retained and is able to be restared.
*/
public static final JobStateReason JOB_RESTARTABLE = new JobStateReason(27);
-
+
/**
* The printer has forwarded the job to the actual output device. This device
* is not capable of reporting the state back so that the job state is set
- * to completed by the printer.
+ * to completed by the printer.
*/
public static final JobStateReason QUEUED_IN_DEVICE = new JobStateReason(28);
- private static final String[] stringTable =
- { "job-incoming", "job-data-insufficient", "document-access-error",
+ private static final String[] stringTable =
+ { "job-incoming", "job-data-insufficient", "document-access-error",
"submission-interrupted", "job-outgoing", "job-hold-until-specified",
"resources-are-not-ready", "printer-stopped-partly", "printer-stopped",
- "job-interpreting", "job-queued", "job-transforming",
+ "job-interpreting", "job-queued", "job-transforming",
"job-queued-for-marker", "job-printing", "job-canceled-by-user",
- "job-canceled-by-operator", "job-canceled-at-device",
+ "job-canceled-by-operator", "job-canceled-at-device",
"aborted-by-system", "unsupported-compression", "compression-error",
- "unsupported-document-format", "document-format-error",
- "processing-to-stop-point", "service-off-line",
- "job-completed-successfully", "job-completed-with-warnings",
+ "unsupported-document-format", "document-format-error",
+ "processing-to-stop-point", "service-off-line",
+ "job-completed-successfully", "job-completed-with-warnings",
"job-completed-with-errors", "job-restartable", "queued-in-device" };
-
- private static final JobStateReason[] enumValueTable =
- { JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
- SUBMISSION_INTERRUPTED, JOB_OUTGOING, JOB_HOLD_UNTIL_SPECIFIED,
+
+ private static final JobStateReason[] enumValueTable =
+ { JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
+ SUBMISSION_INTERRUPTED, JOB_OUTGOING, JOB_HOLD_UNTIL_SPECIFIED,
RESOURCES_ARE_NOT_READY, PRINTER_STOPPED_PARTLY, PRINTER_STOPPED,
JOB_INTERPRETING, JOB_QUEUED, JOB_TRANSFORMING, JOB_QUEUED_FOR_MARKER,
JOB_PRINTING, JOB_CANCELED_BY_USER, JOB_CANCELED_BY_OPERATOR,
@@ -246,10 +246,10 @@ public class JobStateReason extends EnumSyntax
PROCESSING_TO_STOP_POINT, SERVICE_OFF_LINE, JOB_COMPLETED_SUCCESSFULLY,
JOB_COMPLETED_WITH_WARNINGS, JOB_COMPLETED_WITH_ERRORS, JOB_RESTARTABLE,
QUEUED_IN_DEVICE };
-
+
/**
* Constructs a <code>JobStateReason</code> object.
- *
+ *
* @param value the enum value.
*/
protected JobStateReason(int value)
@@ -276,7 +276,7 @@ public class JobStateReason extends EnumSyntax
{
return "job-state-reason";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/JobStateReasons.java b/javax/print/attribute/standard/JobStateReasons.java
index 503c06c02..18c404eb7 100644
--- a/javax/print/attribute/standard/JobStateReasons.java
+++ b/javax/print/attribute/standard/JobStateReasons.java
@@ -44,14 +44,14 @@ import javax.print.attribute.Attribute;
import javax.print.attribute.PrintJobAttribute;
/**
- * The <code>JobStateReasons</code> attribute provides the set of
- * additional informations available about the current state of a print job.
+ * The <code>JobStateReasons</code> attribute provides the set of
+ * additional informations available about the current state of a print job.
* <p>
* <b>IPP Compatibility:</b> JobStateReasons is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.JobState
* @see javax.print.attribute.standard.JobStateReason
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -62,7 +62,7 @@ public final class JobStateReasons extends HashSet<JobStateReason>
/**
* Constructs an empty <code>JobStateReasons</code> attribute.
- */
+ */
public JobStateReasons()
{
super();
@@ -71,10 +71,10 @@ public final class JobStateReasons extends HashSet<JobStateReason>
/**
* Constructs an empty <code>JobStateReasons</code> attribute
* with the given initial capacity and load factor.
- *
+ *
* @param initialCapacity the intial capacity.
* @param loadFactor the load factor of the underlying HashSet.
- *
+ *
* @throws IllegalArgumentException if initialCapacity &lt; 0
* @throws IllegalArgumentException if initialCapacity or loadFactor &lt; 0
*/
@@ -86,9 +86,9 @@ public final class JobStateReasons extends HashSet<JobStateReason>
/**
* Constructs an empty <code>JobStateReasons</code> attribute
* with the given initial capacity and the default load factor.
- *
+ *
* @param initialCapacity the intial capacity.
- *
+ *
* @throws IllegalArgumentException if initialCapacity &lt; 0
*/
public JobStateReasons(int initialCapacity)
@@ -99,12 +99,12 @@ public final class JobStateReasons extends HashSet<JobStateReason>
/**
* Constructs a <code>JobStateReasons</code> attribute
* with the content of the given collection.
- *
+ *
* @param collection the collection for the initial values.
- *
- * @throws NullPointerException if collection or any value is
+ *
+ * @throws NullPointerException if collection or any value is
* <code>null</code>.
- * @throws ClassCastException if values of collection are not of type
+ * @throws ClassCastException if values of collection are not of type
* <code>JobStateReason</code>.
*/
public JobStateReasons(Collection<JobStateReason> collection)
@@ -116,10 +116,10 @@ public final class JobStateReasons extends HashSet<JobStateReason>
/**
* Adds the given job state reason object to the set.
- *
+ *
* @param o the reason of type <code>JobStateReason</code>.
* @return <code>true</code> if set changed, <code>false</code> otherwise.
- *
+ *
* @throws NullPointerException if given object is <code>null</code>.
* @throws ClassCastException if given object is not an instance of
* <code>JobStateReason</code>.
@@ -127,11 +127,11 @@ public final class JobStateReasons extends HashSet<JobStateReason>
public boolean add(JobStateReason o)
{
if (o == null)
- throw new NullPointerException("reason is null");
-
+ throw new NullPointerException("reason is null");
+
return add(o);
}
-
+
/**
* Returns category of this class.
*
diff --git a/javax/print/attribute/standard/Media.java b/javax/print/attribute/standard/Media.java
index 4c0af0ed1..dad8d35a0 100644
--- a/javax/print/attribute/standard/Media.java
+++ b/javax/print/attribute/standard/Media.java
@@ -50,7 +50,7 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* The media to be used can be specified in three ways represented
* by the media subclasses {@link javax.print.attribute.standard.MediaTray},
- * {@link javax.print.attribute.standard.MediaName} and
+ * {@link javax.print.attribute.standard.MediaName} and
* {@link javax.print.attribute.standard.MediaSizeName}:
* <ul>
* <li>Selection by paper source - selection of printer tray to be used.</li>
@@ -59,11 +59,11 @@ import javax.print.attribute.PrintRequestAttribute;
* </ul>
* Each of the sublcasses represents the IPP attribute <code>media</code>
* and provides predefined values to be used.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> Media is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -74,14 +74,14 @@ public abstract class Media extends EnumSyntax
/**
* Constructs a <code>Media</code> object.
- *
+ *
* @param value the enum value.
*/
protected Media(int value)
{
super(value);
}
-
+
/**
* Tests if the given object is equal to this object.
* The objects are considered equal if both are of the same
@@ -89,14 +89,14 @@ public abstract class Media extends EnumSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (obj == null)
return false;
-
+
return (obj.getClass() == this.getClass()
&& ((Media) obj).getValue() == this.getValue());
}
diff --git a/javax/print/attribute/standard/MediaName.java b/javax/print/attribute/standard/MediaName.java
index 2fa7cea09..78a052f06 100644
--- a/javax/print/attribute/standard/MediaName.java
+++ b/javax/print/attribute/standard/MediaName.java
@@ -40,53 +40,53 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * <code>MediaName</code> is a subclass of the <code>Media</code> printing
- * attribute and provides selection of media to be used by the means of
- * defined names. The class pre-defines commonly available media names.
- * This media type enumeration may be used in alternative to
+ * <code>MediaName</code> is a subclass of the <code>Media</code> printing
+ * attribute and provides selection of media to be used by the means of
+ * defined names. The class pre-defines commonly available media names.
+ * This media type enumeration may be used in alternative to
* MediaSizeName/MediaTray.
* <p>
* <b>IPP Compatibility:</b> MediaName is not an IPP 1.1 attribute on its own.
* It provides parts of the <code>media</code> attribute type values.
* </p>
- *
+ *
* @author Sven de Marothy
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaName extends Media
{
private static final long serialVersionUID = 4653117714524155448L;
-
+
/**
* The North American letter white medium.
*/
public static final MediaName NA_LETTER_WHITE = new MediaName(0);
-
+
/**
* The North American letter transparent medium.
*/
public static final MediaName NA_LETTER_TRANSPARENT = new MediaName(1);
-
+
/**
* The ISO A4 white medium.
*/
public static final MediaName ISO_A4_WHITE = new MediaName(2);
-
+
/**
- * The ISO A4 transparent medium.
+ * The ISO A4 transparent medium.
*/
public static final MediaName ISO_A4_TRANSPARENT = new MediaName(3);
- private static final String[] stringTable = { "na-letter-white",
- "na-letter-transparent",
+ private static final String[] stringTable = { "na-letter-white",
+ "na-letter-transparent",
"iso-a4-white",
"iso-a4-transparent" };
-
- private static final MediaName[] enumValueTable = { NA_LETTER_WHITE,
- NA_LETTER_TRANSPARENT,
- ISO_A4_WHITE,
- ISO_A4_TRANSPARENT };
-
+
+ private static final MediaName[] enumValueTable = { NA_LETTER_WHITE,
+ NA_LETTER_TRANSPARENT,
+ ISO_A4_WHITE,
+ ISO_A4_TRANSPARENT };
+
/**
* Creates a <code>MediaName</code> object.
*
@@ -96,7 +96,7 @@ public class MediaName extends Media
{
super( i );
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -118,4 +118,3 @@ public class MediaName extends Media
return enumValueTable;
}
}
-
diff --git a/javax/print/attribute/standard/MediaPrintableArea.java b/javax/print/attribute/standard/MediaPrintableArea.java
index 84ebd61ce..721999204 100644
--- a/javax/print/attribute/standard/MediaPrintableArea.java
+++ b/javax/print/attribute/standard/MediaPrintableArea.java
@@ -1,4 +1,4 @@
-/* MediaPrintableArea.java --
+/* MediaPrintableArea.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,10 +47,10 @@ import javax.print.attribute.PrintRequestAttribute;
* The <code>MediaPrintableArea</code> attribute specifies the area
* of a media sheet which is available for printing.
* <p>
- * Due to hardware limitation its not possible with most printers to use the
- * whole area of a media sheet for printing. This attribute defines the area
+ * Due to hardware limitation its not possible with most printers to use the
+ * whole area of a media sheet for printing. This attribute defines the area
* for printing through the values of the upper left corner position (x,y)
- * on the sheet and the available width and height of the area. The units of
+ * on the sheet and the available width and height of the area. The units of
* the values are determined by two defined constants:
* <ul>
* <li>INCH - defines an inch</li>
@@ -59,12 +59,12 @@ import javax.print.attribute.PrintRequestAttribute;
* </p>
* <p>
* <b>Internal storage:</b><br>
- * The values of x, y, width and height are stored internally in micrometers.
+ * The values of x, y, width and height are stored internally in micrometers.
* The values of the provided constants for inch (value 25400) and millimeters
* (value 1000) are used as conversion factors to the internal storage units.
* To get the internal micrometers values a multiplication of a given
* size value with its units constant value is done. Retrieving the size value
- * for specific units is done by dividing the internal stored value by the
+ * for specific units is done by dividing the internal stored value by the
* units constant value.
* </p>
* <p>
@@ -84,13 +84,13 @@ public final class MediaPrintableArea
* The actual value is the conversion factor to micrometers.
*/
public static final int INCH = 25400;
-
+
/**
* Constant for the units of millimeters.
* The actual value is the conversion factor to micrometers.
*/
public static final int MM = 1000;
-
+
/** x in micrometers. */
private int x;
/** y in micrometers. */
@@ -99,17 +99,17 @@ public final class MediaPrintableArea
private int w;
/** height in micrometers. */
private int h;
-
+
/**
* Creates a new <code>MediaPrintableArea</code> object with the given
* float values for the given units.
- *
+ *
* @param x start of the printable area on the sheet in x direction.
* @param y start of the printable area on the sheet in y direction.
* @param w the width of the printable area.
* @param h the height of the printable area.
* @param units the units of the given values.
- *
+ *
* @throws IllegalArgumentException if x i&lt; 0 or y i&lt; 0 or w i&lt;= 0
* or h i&lt;= 0 or units i&lt; 1
*/
@@ -127,13 +127,13 @@ public final class MediaPrintableArea
/**
* Creates a new <code>MediaPrintableArea</code> object with the given
* int values for the given units.
- *
+ *
* @param x start of the printable area on the sheet in x direction.
* @param y start of the printable area on the sheet in y direction.
* @param w the width of the printable area.
* @param h the height of the printable area.
* @param units the units of the given values.
- *
+ *
* @throws IllegalArgumentException if x i&lt; 0 or y i&lt; 0 or w i&lt;= 0
* or h i&lt;= 0 or units i&lt; 1
*/
@@ -170,10 +170,10 @@ public final class MediaPrintableArea
/**
* Returns the height of the printable area for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The height.
- *
+ *
* @throws IllegalArgumentException if <code>units</code> is &lt; 1
*/
public float getHeight(int units)
@@ -186,10 +186,10 @@ public final class MediaPrintableArea
/**
* Returns the width of the printable area for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The width.
- *
+ *
* @throws IllegalArgumentException if <code>units</code> is &lt; 1
*/
public float getWidth(int units)
@@ -201,12 +201,12 @@ public final class MediaPrintableArea
}
/**
- * Returns the position in x direction of the printable area
+ * Returns the position in x direction of the printable area
* for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The position in x direction.
- *
+ *
* @throws IllegalArgumentException if <code>units</code> is &lt; 1
*/
public float getX(int units)
@@ -218,12 +218,12 @@ public final class MediaPrintableArea
}
/**
- * Returns the position in y direction of the printable area
+ * Returns the position in y direction of the printable area
* for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The position in y direction.
- *
+ *
* @throws IllegalArgumentException if <code>units</code> is &lt; 1
*/
public float getY(int units)
@@ -233,7 +233,7 @@ public final class MediaPrintableArea
return y / ((float)units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
@@ -256,7 +256,7 @@ public final class MediaPrintableArea
* Returns the string representation for this object in units of millimeters..
* <p>
* The returned string is in the form "(x,y)->(width,height)mm".
- * </p>
+ * </p>
* @return The string representation in millimeters.
*/
public String toString()
@@ -273,7 +273,7 @@ public final class MediaPrintableArea
{
return x ^ y + w ^ h;
}
-
+
/**
* Returns the string representation for this object in units of millimeters..
* <p>
@@ -283,30 +283,30 @@ public final class MediaPrintableArea
* @param unitsName the name of the used units, appended to the resulting
* string if not <code>null</code>.
* @return The string representation in millimeters.
- *
+ *
* @throws IllegalArgumentException if <code>units</code> is &lt; 1
*/
public String toString(int units, String unitsName)
{
if (units < 1)
throw new IllegalArgumentException("units may not be less than 1");
-
+
String tmp = "(" + getX(units) + "," + getY(units) + ")->("
+ getWidth(units) + "," + getHeight(units) + ")";
-
+
return unitsName == null ? tmp : tmp + unitsName;
}
/**
- * Returns the printable area as an float[] with 4 values
+ * Returns the printable area as an float[] with 4 values
* (order x, y, width, height) in the given units.
- *
+ *
* @param units the units to use.
* @return The printable area as float array.
*/
public float[] getPrintableArea(int units)
{
- return new float[] { getX(units), getY(units),
+ return new float[] { getX(units), getY(units),
getWidth(units), getHeight(units) };
- }
+ }
}
diff --git a/javax/print/attribute/standard/MediaSize.java b/javax/print/attribute/standard/MediaSize.java
index f2fa100a0..7df22cd4c 100644
--- a/javax/print/attribute/standard/MediaSize.java
+++ b/javax/print/attribute/standard/MediaSize.java
@@ -1,4 +1,4 @@
-/* MediaSize.java --
+/* MediaSize.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,20 +45,20 @@ import javax.print.attribute.Size2DSyntax;
/**
* The <code>MediaSize</code> printing attribute class specifies the size
- * of a printing media. The size is defined in portrait orientation with
+ * of a printing media. The size is defined in portrait orientation with
* x at the bottom edge and y at the left edge.
* <p>
* There are several media sizes predefined through the nested classes. Further
* sizes may be provided by the application. <code>MediaSize</code> is not used
- * as a printing attribute currently. It may be used to get the actual sizes
+ * as a printing attribute currently. It may be used to get the actual sizes
* for a named media or to find a suitable <code>MediaSizeName</code> instance
* by querying with the needed sizes.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> MediaSize is not an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.MediaSizeName
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -66,9 +66,9 @@ public class MediaSize extends Size2DSyntax
implements Attribute
{
private static final long serialVersionUID = -1967958664615414771L;
-
+
private static ArrayList<MediaSize> mediaCache;
-
+
static
{
mediaCache = new ArrayList<MediaSize>();
@@ -76,10 +76,10 @@ public class MediaSize extends Size2DSyntax
// We call one instance of every container class to make sure it gets
// loaded during class initialization and therefore all other static
// fields of this container class also.
-
+
// This is needed to put all MediaSize instance into the mediaCache
// for use by the static methods in this class.
-
+
MediaSize tmp = MediaSize.ISO.A0;
tmp = MediaSize.JIS.B0;
tmp = MediaSize.Engineering.A;
@@ -88,10 +88,10 @@ public class MediaSize extends Size2DSyntax
}
private MediaSizeName mediaName;
-
+
/**
- * Creates a <code>MediaSize</code> object. The created object will be added
- * to an internal cache used in the static methods of this class for lookup
+ * Creates a <code>MediaSize</code> object. The created object will be added
+ * to an internal cache used in the static methods of this class for lookup
* of available <code>MediaSize</code> instances.
*
* @param x the size in x direction
@@ -99,7 +99,7 @@ public class MediaSize extends Size2DSyntax
* @param units the units to use for the sizes
*
* @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -108,11 +108,11 @@ public class MediaSize extends Size2DSyntax
super(x, y, units);
mediaCache.add(this);
}
-
+
/**
* Creates a <code>MediaSize</code> object associated with the given
- * media name. The created object will be added to an internal cache used
- * in the static methods of this class for lookup of available
+ * media name. The created object will be added to an internal cache used
+ * in the static methods of this class for lookup of available
* <code>MediaSize</code> instances.
*
* @param x the size in x direction
@@ -121,7 +121,7 @@ public class MediaSize extends Size2DSyntax
* @param media the media name to associate
*
* @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -131,10 +131,10 @@ public class MediaSize extends Size2DSyntax
mediaName = media;
mediaCache.add(this);
}
-
+
/**
- * Creates a <code>MediaSize</code> object. The created object will be added
- * to an internal cache used in the static methods of this class for lookup
+ * Creates a <code>MediaSize</code> object. The created object will be added
+ * to an internal cache used in the static methods of this class for lookup
* of available <code>MediaSize</code> instances.
*
* @param x the size in x direction
@@ -142,7 +142,7 @@ public class MediaSize extends Size2DSyntax
* @param units the units to use for the sizes
*
* @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -151,11 +151,11 @@ public class MediaSize extends Size2DSyntax
super(x, y, units);
mediaCache.add(this);
}
-
+
/**
* Creates a <code>MediaSize</code> object associated with the given
- * media name. The created object will be added to an internal cache used
- * in the static methods of this class for lookup of available
+ * media name. The created object will be added to an internal cache used
+ * in the static methods of this class for lookup of available
* <code>MediaSize</code> instances.
*
* @param x the size in x direction
@@ -164,7 +164,7 @@ public class MediaSize extends Size2DSyntax
* @param media the media name to associate
*
* @exception IllegalArgumentException if x or y &lt; 0 or units &lt; 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -174,7 +174,7 @@ public class MediaSize extends Size2DSyntax
mediaName = media;
mediaCache.add(this);
}
-
+
/**
* Returns category of this class.
*
@@ -185,13 +185,13 @@ public class MediaSize extends Size2DSyntax
return MediaSize.class;
}
-
+
/**
* Searches for a MediaSize object with the given dimensions.
* If none is found with exact dimensions, the closest match is used.
- * Afterwards the MediaSizeName of the found MediaSize object is
+ * Afterwards the MediaSizeName of the found MediaSize object is
* returned - which might be null if none is specified.
- *
+ *
* @param x the dimension for x
* @param y the dimension for y
* @param units the units to be used for comparison
@@ -202,7 +202,7 @@ public class MediaSize extends Size2DSyntax
if (x <= 0.0f || y <= 0.0f)
throw new IllegalArgumentException(
"x and/or y may not be less or equal 0");
-
+
if (units < 1)
throw new IllegalArgumentException("units may not be less then 1");
@@ -215,7 +215,7 @@ public class MediaSize extends Size2DSyntax
for (int i = 0; i < mediaCache.size(); i++)
{
MediaSize size = mediaCache.get(i);
- int dist = (Math.abs(size.getXMicrometers() - xMicro)
+ int dist = (Math.abs(size.getXMicrometers() - xMicro)
+ Math.abs(size.getYMicrometers() - yMicro));
if (dist < bestDistance)
@@ -227,34 +227,34 @@ public class MediaSize extends Size2DSyntax
return bestMatch.getMediaSizeName();
}
-
+
/**
- * Returns the associated <code>MediaSize</code> instance for the
+ * Returns the associated <code>MediaSize</code> instance for the
* given named media <code>MediaSizeName</code> instance.
- *
+ *
* @param media the named media to search for.
- * @return The corresponding <code>MediaSize</code> instance or
+ * @return The corresponding <code>MediaSize</code> instance or
* <code>null</code> if none found.
*/
public static MediaSize getMediaSizeForName(MediaSizeName media)
{
for (int i = 0; i < mediaCache.size(); i++)
{
- MediaSize size = mediaCache.get(i);
-
- if (size.getMediaSizeName().equals(media))
- return size;
+ MediaSize size = mediaCache.get(i);
+
+ if (size.getMediaSizeName().equals(media))
+ return size;
}
return null;
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
@@ -266,10 +266,10 @@ public class MediaSize extends Size2DSyntax
return (tmp.getXMicrometers() == this.getXMicrometers()
&& tmp.getYMicrometers() == this.getYMicrometers());
}
-
+
/**
* Returns the media name of this size.
- *
+ *
* @return The media name.
*/
public MediaSizeName getMediaSizeName()
@@ -289,28 +289,28 @@ public class MediaSize extends Size2DSyntax
/**
* Container class for predefined ISO media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class ISO
+ public static final class ISO
{
private ISO()
{
// prevent instantiation
}
-
+
/**
* ISO A0 paper, 841 mm x 1189 mm.
*/
- public static final MediaSize A0 = new MediaSize(841, 1189,
- MediaSize.MM,
- MediaSizeName.ISO_A0);
+ public static final MediaSize A0 = new MediaSize(841, 1189,
+ MediaSize.MM,
+ MediaSizeName.ISO_A0);
/**
* ISO A1 paper, 594 mm x 841 mm
*/
- public static final MediaSize A1 = new MediaSize(594, 841, MediaSize.MM,
- MediaSizeName.ISO_A1);
+ public static final MediaSize A1 = new MediaSize(594, 841, MediaSize.MM,
+ MediaSizeName.ISO_A1);
/**
* ISO A2 paper, 420 mm x 594 mm
@@ -412,7 +412,7 @@ public class MediaSize extends Size2DSyntax
* ISO B10 paper, 31 mm x 44 mm
*/
public static final MediaSize B10 = new MediaSize(31, 44, MediaSize.MM, MediaSizeName.ISO_B10);
-
+
/**
* ISO C3 envelope, 324 mm x 458 mm
*/
@@ -436,13 +436,13 @@ public class MediaSize extends Size2DSyntax
/**
* ISO ISO Designated Long paper, 324 mm x 458 mm
*/
- public static final MediaSize DESIGNATED_LONG =
+ public static final MediaSize DESIGNATED_LONG =
new MediaSize(324, 458, MediaSize.MM, MediaSizeName.ISO_DESIGNATED_LONG);
- }
+ }
/**
* Container class for predefined North American media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
public static final class NA
@@ -451,170 +451,170 @@ public class MediaSize extends Size2DSyntax
{
// prevent instantiation
}
-
+
/**
* US Legal paper size, 8.5 inch x 14 inch
*/
- public static final MediaSize LEGAL = new MediaSize(8.5f, 14f, MediaSize.INCH,
- MediaSizeName.NA_LEGAL);
+ public static final MediaSize LEGAL = new MediaSize(8.5f, 14f, MediaSize.INCH,
+ MediaSizeName.NA_LEGAL);
/**
* US Letter paper size, 8.5 inch x 11 inch
*/
public static final MediaSize LETTER = new MediaSize(8.5f, 11f, MediaSize.INCH,
- MediaSizeName.NA_LETTER);
+ MediaSizeName.NA_LETTER);
/**
* 5 inch x 7 inch paper size.
*/
public static final MediaSize NA_5X7 = new MediaSize(5, 7, MediaSize.INCH,
- MediaSizeName.NA_5X7);
+ MediaSizeName.NA_5X7);
/**
* 8 inch x 10 inch paper size.
*/
public static final MediaSize NA_8X10 = new MediaSize(8, 10, MediaSize.INCH,
- MediaSizeName.NA_8X10);
+ MediaSizeName.NA_8X10);
/**
* 6 inch x 9 inch envelope size.
*/
- public static final MediaSize NA_6X9_ENVELOPE = new MediaSize(6f, 9f,
- MediaSize.INCH,
- MediaSizeName.NA_6X9_ENVELOPE);
+ public static final MediaSize NA_6X9_ENVELOPE = new MediaSize(6f, 9f,
+ MediaSize.INCH,
+ MediaSizeName.NA_6X9_ENVELOPE);
/**
* 7 inch x 9 inch envelope size.
*/
- public static final MediaSize NA_7X9_ENVELOPE = new MediaSize(7f, 9f,
- MediaSize.INCH,
- MediaSizeName.NA_7X9_ENVELOPE);
+ public static final MediaSize NA_7X9_ENVELOPE = new MediaSize(7f, 9f,
+ MediaSize.INCH,
+ MediaSizeName.NA_7X9_ENVELOPE);
/**
* 9 inch x 11 inch envelope size.
*/
- public static final MediaSize NA_9x11_ENVELOPE = new MediaSize(9f, 11f,
- MediaSize.INCH,
- MediaSizeName.NA_9X11_ENVELOPE);
+ public static final MediaSize NA_9x11_ENVELOPE = new MediaSize(9f, 11f,
+ MediaSize.INCH,
+ MediaSizeName.NA_9X11_ENVELOPE);
/**
* 9 inch x 12 inch envelope size.
*/
- public static final MediaSize NA_9x12_ENVELOPE = new MediaSize(9f, 12f,
- MediaSize.INCH,
- MediaSizeName.NA_9X12_ENVELOPE);
+ public static final MediaSize NA_9x12_ENVELOPE = new MediaSize(9f, 12f,
+ MediaSize.INCH,
+ MediaSizeName.NA_9X12_ENVELOPE);
/**
* 10 inch x 13 inch envelope size.
*/
- public static final MediaSize NA_10x13_ENVELOPE = new MediaSize(10f, 13f,
- MediaSize.INCH,
- MediaSizeName.NA_10X13_ENVELOPE);
+ public static final MediaSize NA_10x13_ENVELOPE = new MediaSize(10f, 13f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X13_ENVELOPE);
/**
* 10 inch x 14 inch envelope size.
*/
- public static final MediaSize NA_10x14_ENVELOPE = new MediaSize(10f, 14f,
- MediaSize.INCH,
- MediaSizeName.NA_10X14_ENVELOPE);
+ public static final MediaSize NA_10x14_ENVELOPE = new MediaSize(10f, 14f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X14_ENVELOPE);
/**
* 10 inch x 15 inch envelope size.
*/
- public static final MediaSize NA_10X15_ENVELOPE = new MediaSize(10f, 15f,
- MediaSize.INCH,
- MediaSizeName.NA_10X15_ENVELOPE);
+ public static final MediaSize NA_10X15_ENVELOPE = new MediaSize(10f, 15f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X15_ENVELOPE);
/**
* Number 9 envelope size. 4.5 inch x 10.375 inch
*/
public static final MediaSize NA_NUMBER_9_ENVELOPE = new MediaSize(3.875f, 8.875f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_9_ENVELOPE);
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_9_ENVELOPE);
/**
* Number 10 envelope size. 4.125 inch x 9.5 inch
*/
- public static final MediaSize NA_NUMBER_10_ENVELOPE =
+ public static final MediaSize NA_NUMBER_10_ENVELOPE =
new MediaSize(4.125f, 9.5f, MediaSize.INCH, MediaSizeName.NA_NUMBER_10_ENVELOPE);
/**
* Number 11 envelope size. 4.5 inch x 10.375 inch
*/
public static final MediaSize NA_NUMBER_11_ENVELOPE = new MediaSize(4.5f, 10.375f, MediaSize.INCH,
- MediaSizeName.NA_NUMBER_11_ENVELOPE);
-
+ MediaSizeName.NA_NUMBER_11_ENVELOPE);
+
/**
* Number 12 envelope size. 4.75 inch x 11 inch
*/
- public static final MediaSize NA_NUMBER_12_ENVELOPE = new MediaSize(4.75f, 11f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_12_ENVELOPE);
+ public static final MediaSize NA_NUMBER_12_ENVELOPE = new MediaSize(4.75f, 11f,
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_12_ENVELOPE);
/**
* Number 14 envelope size. 5 inch x 11.5 inch
*/
- public static final MediaSize NA_NUMBER_14_ENVELOPE = new MediaSize(5f, 11.5f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_14_ENVELOPE);
+ public static final MediaSize NA_NUMBER_14_ENVELOPE = new MediaSize(5f, 11.5f,
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_14_ENVELOPE);
}
/**
* Container class for predefined US Engineering media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class Engineering
+ public static final class Engineering
{
private Engineering()
{
// prevent instantiation
}
-
+
/**
* ANSI A paper size. 8.5 inch x 11 inch
*/
- public static final MediaSize A = new MediaSize(8.5f, 11f,
- MediaSize.INCH, MediaSizeName.A);
+ public static final MediaSize A = new MediaSize(8.5f, 11f,
+ MediaSize.INCH, MediaSizeName.A);
/**
* ANSI B paper size. 11 inch x 17 inch
*/
- public static final MediaSize B = new MediaSize(11f, 17f,
- MediaSize.INCH, MediaSizeName.B);
+ public static final MediaSize B = new MediaSize(11f, 17f,
+ MediaSize.INCH, MediaSizeName.B);
/**
* ANSI C paper size. 17 inch x 22 inch
*/
- public static final MediaSize C = new MediaSize(17f, 22f,
- MediaSize.INCH, MediaSizeName.C);
+ public static final MediaSize C = new MediaSize(17f, 22f,
+ MediaSize.INCH, MediaSizeName.C);
/**
* ANSI D paper size. 22 inch x 34 inch
*/
- public static final MediaSize D = new MediaSize(22f, 34f,
- MediaSize.INCH, MediaSizeName.D);
+ public static final MediaSize D = new MediaSize(22f, 34f,
+ MediaSize.INCH, MediaSizeName.D);
/**
* ANSI E paper size. 33 inch x 44 inch
*/
- public static final MediaSize E = new MediaSize(34f, 44f,
- MediaSize.INCH, MediaSizeName.E);
+ public static final MediaSize E = new MediaSize(34f, 44f,
+ MediaSize.INCH, MediaSizeName.E);
}
/**
* Container class for predefined Japanese JIS media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class JIS
+ public static final class JIS
{
private JIS()
{
// prevent instantiation
}
-
+
/**
* JIS B0 paper. 1030 mm x 1456 mm
* Note: The JIS B-series is not identical to the ISO B-series.
@@ -804,7 +804,7 @@ public class MediaSize extends Size2DSyntax
/**
* Container class for miscellaneous media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
public static final class Other
@@ -813,12 +813,12 @@ public class MediaSize extends Size2DSyntax
{
// prevent instantiation
}
-
+
/**
* US Executive paper size, 7.25 inch x 10.5 inch
*/
- public static final MediaSize EXECUTIVE = new MediaSize(7.25f, 10.5f,
- MediaSize.INCH, MediaSizeName.EXECUTIVE);
+ public static final MediaSize EXECUTIVE = new MediaSize(7.25f, 10.5f,
+ MediaSize.INCH, MediaSizeName.EXECUTIVE);
/**
* US Folio paper size, 8.5 inch x 13 inch
@@ -829,39 +829,39 @@ public class MediaSize extends Size2DSyntax
* US Quarto paper size, 8.5 inches by 10.83 inches.
*/
public static final MediaSize QUARTO = new MediaSize(8.5f, 10.83f, MediaSize.INCH,
- MediaSizeName.QUARTO);
+ MediaSizeName.QUARTO);
/**
* US Invoice size, 5.5 inch x 8.5 inch
*/
- public static final MediaSize INVOICE = new MediaSize(5.5f, 8.5f,
- MediaSize.INCH, MediaSizeName.INVOICE);
+ public static final MediaSize INVOICE = new MediaSize(5.5f, 8.5f,
+ MediaSize.INCH, MediaSizeName.INVOICE);
/**
* US Ledger size, 11 inch x 17 inch
*/
- public static final MediaSize LEDGER = new MediaSize(11, 17, MediaSize.INCH,
- MediaSizeName.LEDGER);
+ public static final MediaSize LEDGER = new MediaSize(11, 17, MediaSize.INCH,
+ MediaSizeName.LEDGER);
/**
* Monarch (7 3/4) envelope size, 3.87 inch x 7.5 inch
*/
- public static final MediaSize MONARCH_ENVELOPE = new MediaSize(3.87f, 7.5f,
- MediaSize.INCH,
- MediaSizeName.MONARCH_ENVELOPE);
+ public static final MediaSize MONARCH_ENVELOPE = new MediaSize(3.87f, 7.5f,
+ MediaSize.INCH,
+ MediaSizeName.MONARCH_ENVELOPE);
/**
* Personal envelope size, 3.625 inch x 6.5 inch.
*/
public static final MediaSize PERSONAL_ENVELOPE = new MediaSize(3.625f, 6.5f, MediaSize.INCH,
- MediaSizeName.PERSONAL_ENVELOPE);
+ MediaSizeName.PERSONAL_ENVELOPE);
/**
* Italian envelope size, 110 mm x 230 mm
*/
- public static final MediaSize ITALY_ENVELOPE = new MediaSize(110, 230,
- MediaSize.MM,
- MediaSizeName.ITALY_ENVELOPE);
+ public static final MediaSize ITALY_ENVELOPE = new MediaSize(110, 230,
+ MediaSize.MM,
+ MediaSizeName.ITALY_ENVELOPE);
/**
* Japanese postcard, 100 mm x 148 mm
@@ -872,13 +872,12 @@ public class MediaSize extends Size2DSyntax
* Japanese double postcard, 148 mm x 200 mm
*/
public static final MediaSize JAPANESE_DOUBLE_POSTCARD = new MediaSize(148, 200, MediaSize.MM, MediaSizeName.JAPANESE_DOUBLE_POSTCARD);
-
+
/**
* Tabloid size, 11 inch x 17 inch.
* @since 1.5
*/
- public static final MediaSize TABLOID =
+ public static final MediaSize TABLOID =
new MediaSize(11, 17, Size2DSyntax.INCH, MediaSizeName.TABLOID);
}
}
-
diff --git a/javax/print/attribute/standard/MediaSizeName.java b/javax/print/attribute/standard/MediaSizeName.java
index e29b1ae34..a6b26b1d5 100644
--- a/javax/print/attribute/standard/MediaSizeName.java
+++ b/javax/print/attribute/standard/MediaSizeName.java
@@ -40,16 +40,16 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * <code>MediaSizeName</code> is a subclass of the <code>Media</code> printing
- * attribute and provides selection of media to be used by the means of
- * defined size names. The class pre-defines commonly available media sizes.
- * This media type enumeration may be used in alternative to
+ * <code>MediaSizeName</code> is a subclass of the <code>Media</code> printing
+ * attribute and provides selection of media to be used by the means of
+ * defined size names. The class pre-defines commonly available media sizes.
+ * This media type enumeration may be used in alternative to
* MediaName/MediaTray.
* <p>
- * <b>IPP Compatibility:</b> MediaSizeName is not an IPP 1.1 attribute on its
+ * <b>IPP Compatibility:</b> MediaSizeName is not an IPP 1.1 attribute on its
* own. It provides parts of the <code>media</code> attribute type values.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -61,412 +61,412 @@ public class MediaSizeName extends Media
* The ISO A0 size: 841 mm by 1189 mm.
*/
public static final MediaSizeName ISO_A0 = new MediaSizeName(0);
-
+
/**
* The ISO A1 size: 594 mm by 841 mm.
*/
public static final MediaSizeName ISO_A1 = new MediaSizeName(1);
-
+
/**
* The ISO A2 size: 420 mm by 594 mm.
*/
public static final MediaSizeName ISO_A2 = new MediaSizeName(2);
-
+
/**
* The ISO A3 size: 297 mm by 420 mm.
*/
public static final MediaSizeName ISO_A3 = new MediaSizeName(3);
-
+
/**
* The ISO A4 size: 210 mm by 297 mm.
*/
public static final MediaSizeName ISO_A4 = new MediaSizeName(4);
-
+
/**
* The ISO A5 size: 148 mm by 210 mm.
*/
public static final MediaSizeName ISO_A5 = new MediaSizeName(5);
-
+
/**
* The ISO A6 size: 105 mm by 148 mm.
*/
public static final MediaSizeName ISO_A6 = new MediaSizeName(6);
-
+
/**
* The ISO A7 size: 74 mm by 105 mm.
*/
public static final MediaSizeName ISO_A7 = new MediaSizeName(7);
-
+
/**
* The ISO A8 size: 52 mm by 74 mm.
*/
public static final MediaSizeName ISO_A8 = new MediaSizeName(8);
-
+
/**
* The ISO A9 size: 37 mm by 52 mm.
*/
public static final MediaSizeName ISO_A9 = new MediaSizeName(9);
-
+
/**
* The ISO A10 size: 26 mm by 37 mm.
*/
public static final MediaSizeName ISO_A10 = new MediaSizeName(10);
-
+
/**
* The ISO B0 size: 1000 mm by 1414 mm.
*/
public static final MediaSizeName ISO_B0 = new MediaSizeName(11);
-
+
/**
* The ISO B1 size: 707 mm by 1000 mm.
*/
public static final MediaSizeName ISO_B1 = new MediaSizeName(12);
-
+
/**
* The ISO B2 size: 500 mm by 707 mm.
*/
public static final MediaSizeName ISO_B2 = new MediaSizeName(13);
-
+
/**
* The ISO B3 size: 353 mm by 500 mm.
*/
public static final MediaSizeName ISO_B3 = new MediaSizeName(14);
-
+
/**
* The ISO B4 size: 250 mm by 353 mm.
*/
public static final MediaSizeName ISO_B4 = new MediaSizeName(15);
-
+
/**
* The ISO B5 size: 176 mm by 250 mm.
*/
public static final MediaSizeName ISO_B5 = new MediaSizeName(16);
-
+
/**
* The ISO B6 size: 125 mm by 176 mm.
*/
public static final MediaSizeName ISO_B6 = new MediaSizeName(17);
-
+
/**
* The ISO B7 size: 88 mm by 125 mm.
*/
public static final MediaSizeName ISO_B7 = new MediaSizeName(18);
-
+
/**
* The ISO B8 size: 62 mm by 88 mm.
*/
public static final MediaSizeName ISO_B8 = new MediaSizeName(19);
-
+
/**
* The ISO B9 size: 44 mm by 62 mm.
*/
public static final MediaSizeName ISO_B9 = new MediaSizeName(20);
-
+
/**
* The ISO B10 size: 31 mm by 44 mm.
*/
public static final MediaSizeName ISO_B10 = new MediaSizeName(21);
-
+
/**
* The JIS B0 size: 1030mm x 1456mm.
*/
public static final MediaSizeName JIS_B0 = new MediaSizeName(22);
-
+
/**
* The JIS B1 size: 728mm x 1030mm.
*/
public static final MediaSizeName JIS_B1 = new MediaSizeName(23);
-
+
/**
* The JIS B2 size: 515mm x 728mm.
*/
public static final MediaSizeName JIS_B2 = new MediaSizeName(24);
-
+
/**
* The JIS B3 size: 364mm x 515mm.
*/
public static final MediaSizeName JIS_B3 = new MediaSizeName(25);
-
+
/**
* The JIS B4 size: 257mm x 364mm.
*/
public static final MediaSizeName JIS_B4 = new MediaSizeName(26);
-
+
/**
* The JIS B5 size: 182mm x 257mm.
*/
public static final MediaSizeName JIS_B5 = new MediaSizeName(27);
-
+
/**
* The JIS B6 size: 128mm x 182mm.
*/
public static final MediaSizeName JIS_B6 = new MediaSizeName(28);
-
+
/**
* The JIS B7 size: 91mm x 128mm.
*/
public static final MediaSizeName JIS_B7 = new MediaSizeName(29);
-
+
/**
* The JIS B8 size: 64mm x 91mm.
*/
public static final MediaSizeName JIS_B8 = new MediaSizeName(30);
-
+
/**
* The JIS B9 size: 45mm x 64mm.
*/
public static final MediaSizeName JIS_B9 = new MediaSizeName(31);
-
+
/**
* The JIS B10 size: 32mm x 45mm.
*/
public static final MediaSizeName JIS_B10 = new MediaSizeName(32);
-
+
/**
* The ISO C0 size: 917 mm by 1297 mm.
*/
public static final MediaSizeName ISO_C0 = new MediaSizeName(33);
-
+
/**
* The ISO C1 size: 648 mm by 917 mm.
*/
public static final MediaSizeName ISO_C1 = new MediaSizeName(34);
-
+
/**
* The ISO C2 size: 458 mm by 648 mm.
*/
public static final MediaSizeName ISO_C2 = new MediaSizeName(35);
-
+
/**
* The ISO C3 size: 324 mm by 458 mm.
*/
public static final MediaSizeName ISO_C3 = new MediaSizeName(36);
-
+
/**
* The ISO C4 size: 229 mm by 324 mm.
*/
public static final MediaSizeName ISO_C4 = new MediaSizeName(37);
-
+
/**
* The ISO C5 size: 162 mm by 229 mm.
*/
public static final MediaSizeName ISO_C5 = new MediaSizeName(38);
-
+
/**
* The ISO C6 size: 114 mm by 162 mm.
*/
public static final MediaSizeName ISO_C6 = new MediaSizeName(39);
-
+
/**
* The North American letter size: 8.5 inches by 11 inches.
*/
public static final MediaSizeName NA_LETTER = new MediaSizeName(40);
-
+
/**
* The North American legal size: 8.5 inches by 14 inches.
*/
public static final MediaSizeName NA_LEGAL = new MediaSizeName(41);
-
+
/**
* The executive size: 7.25 inches by 10.5 inches.
*/
public static final MediaSizeName EXECUTIVE = new MediaSizeName(42);
-
+
/**
* The ledger size: 11 inches by 17 inches.
*/
public static final MediaSizeName LEDGER = new MediaSizeName(43);
-
+
/**
* The tabloid size: 11 inches by 17 inches.
*/
public static final MediaSizeName TABLOID = new MediaSizeName(44);
-
+
/**
* The invoice size: 5.5 inches by 8.5 inches.
*/
public static final MediaSizeName INVOICE = new MediaSizeName(45);
-
+
/**
* The folio size: 8.5 inches by 13 inches.
*/
public static final MediaSizeName FOLIO = new MediaSizeName(46);
-
+
/**
* The quarto size: 8.5 inches by 10.83 inches.
*/
public static final MediaSizeName QUARTO = new MediaSizeName(47);
-
+
/**
* The Japanese postcard size, 100 mm by 148 mm.
*/
public static final MediaSizeName JAPANESE_POSTCARD = new MediaSizeName(48);
-
+
/**
* The Japanese Double postcard size: 148 mm by 200 mm.
*/
public static final MediaSizeName JAPANESE_DOUBLE_POSTCARD =
new MediaSizeName(49);
-
+
/**
* The engineering ANSI A size medium: 8.5 inches x 11 inches.
*/
public static final MediaSizeName A = new MediaSizeName(50);
-
+
/**
* The engineering ANSI B size medium: 11 inches x 17 inches.
*/
public static final MediaSizeName B = new MediaSizeName(51);
-
+
/**
* The engineering ANSI C size medium: 17 inches x 22 inches.
*/
public static final MediaSizeName C = new MediaSizeName(52);
-
+
/**
* The engineering ANSI D size medium: 22 inches x 34 inches.
*/
public static final MediaSizeName D = new MediaSizeName(53);
-
+
/**
* The engineering ANSI E size medium: 34 inches x 44 inches.
*/
public static final MediaSizeName E = new MediaSizeName(54);
-
+
/**
* The ISO Designated Long size: 110 mm by 220 mm.
*/
public static final MediaSizeName ISO_DESIGNATED_LONG =
new MediaSizeName(55);
-
+
/**
* The Italy envelope size: 110 mm by 230 mm.
*/
public static final MediaSizeName ITALY_ENVELOPE = new MediaSizeName(56);
-
+
/**
* The Monarch envelope size: 3.87 inch by 7.5 inch.
*/
public static final MediaSizeName MONARCH_ENVELOPE = new MediaSizeName(57);
-
+
/**
* The Personal envelope size: 3.625 inch by 6.5 inch.
*/
public static final MediaSizeName PERSONAL_ENVELOPE = new MediaSizeName(58);
-
+
/**
- * The North American number 9 business envelope size:
+ * The North American number 9 business envelope size:
* 3.875 inches by 8.875 inches.
*/
public static final MediaSizeName NA_NUMBER_9_ENVELOPE =
new MediaSizeName(59);
-
+
/**
- * The North American number 10 business envelope size:
+ * The North American number 10 business envelope size:
* 4.125 inches by 9.5 inches.
*/
public static final MediaSizeName NA_NUMBER_10_ENVELOPE =
new MediaSizeName(60);
-
+
/**
- * The North American number 11 business envelope size:
+ * The North American number 11 business envelope size:
* 4.5 inches by 10.375 inches.
*/
public static final MediaSizeName NA_NUMBER_11_ENVELOPE =
new MediaSizeName(61);
-
+
/**
- * The North American number 12 business envelope size:
+ * The North American number 12 business envelope size:
* 4.75 inches by 11 inches.
*/
public static final MediaSizeName NA_NUMBER_12_ENVELOPE =
new MediaSizeName(62);
-
+
/**
- * The North American number 14 business envelope size:
+ * The North American number 14 business envelope size:
* 5 inches by 11.5 inches.
*/
public static final MediaSizeName NA_NUMBER_14_ENVELOPE =
new MediaSizeName(63);
-
+
/**
* The North American 6x9 inch envelope size.
*/
public static final MediaSizeName NA_6X9_ENVELOPE = new MediaSizeName(64);
-
+
/**
* The North American 7x9 inch envelope size.
*/
public static final MediaSizeName NA_7X9_ENVELOPE = new MediaSizeName(65);
-
+
/**
* The North American 9x11 inch envelope size.
*/
public static final MediaSizeName NA_9X11_ENVELOPE = new MediaSizeName(66);
-
+
/**
* The North American 9x12 inch envelope size.
*/
public static final MediaSizeName NA_9X12_ENVELOPE = new MediaSizeName(67);
-
+
/**
* The North American 10x13 inch envelope size.
*/
public static final MediaSizeName NA_10X13_ENVELOPE = new MediaSizeName(68);
-
+
/**
* The North American 10x14 inch envelope size.
*/
public static final MediaSizeName NA_10X14_ENVELOPE = new MediaSizeName(69);
-
+
/**
* The North American 10x15 inch envelope size.
*/
public static final MediaSizeName NA_10X15_ENVELOPE = new MediaSizeName(70);
-
+
/**
* The North American 5 inches by 7 inches.
*/
public static final MediaSizeName NA_5X7 = new MediaSizeName(71);
-
+
/**
* The North American 8 inches by 10 inches.
*/
public static final MediaSizeName NA_8X10 = new MediaSizeName(72);
- private static final String[] stringTable =
- { "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6",
- "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b0", "iso-b1", "iso-b2",
- "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9",
- "iso-b10", "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
- "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0", "iso-c1",
- "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "na-letter",
- "na-legal", "executive", "ledger", "tabloid", "invoice", "folio",
- "quarto", "japanese-postcard", "oufuko-postcard", "a", "b", "c", "d",
- "e", "iso-designated-long", "italian-envelope", "monarch-envelope",
- "personal-envelope", "na-number-9-envelope", "na-number-10-envelope",
- "na-number-11-envelope", "na-number-12-envelope",
- "na-number-14-envelope", "na-6x9-envelope", "na-7x9-envelope",
- "na-9x11-envelope", "na-9x12-envelope", "na-10x13-envelope",
+ private static final String[] stringTable =
+ { "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6",
+ "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b0", "iso-b1", "iso-b2",
+ "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9",
+ "iso-b10", "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
+ "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0", "iso-c1",
+ "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "na-letter",
+ "na-legal", "executive", "ledger", "tabloid", "invoice", "folio",
+ "quarto", "japanese-postcard", "oufuko-postcard", "a", "b", "c", "d",
+ "e", "iso-designated-long", "italian-envelope", "monarch-envelope",
+ "personal-envelope", "na-number-9-envelope", "na-number-10-envelope",
+ "na-number-11-envelope", "na-number-12-envelope",
+ "na-number-14-envelope", "na-6x9-envelope", "na-7x9-envelope",
+ "na-9x11-envelope", "na-9x12-envelope", "na-10x13-envelope",
"na-10x14-envelope", "na-10x15-envelope", "na-5x7", "na-8x10" };
-
- private static final MediaSizeName[] enumValueTable =
- { ISO_A0, ISO_A1, ISO_A2, ISO_A3, ISO_A4, ISO_A5, ISO_A6, ISO_A7, ISO_A8,
+
+ private static final MediaSizeName[] enumValueTable =
+ { ISO_A0, ISO_A1, ISO_A2, ISO_A3, ISO_A4, ISO_A5, ISO_A6, ISO_A7, ISO_A8,
ISO_A9, ISO_A10, ISO_B0, ISO_B1, ISO_B2, ISO_B3, ISO_B4, ISO_B5, ISO_B6,
- ISO_B7, ISO_B8, ISO_B9, ISO_B10, JIS_B0, JIS_B1, JIS_B2, JIS_B3, JIS_B4,
+ ISO_B7, ISO_B8, ISO_B9, ISO_B10, JIS_B0, JIS_B1, JIS_B2, JIS_B3, JIS_B4,
JIS_B5, JIS_B6, JIS_B7, JIS_B8, JIS_B9, JIS_B10, ISO_C0, ISO_C1, ISO_C2,
- ISO_C3, ISO_C4, ISO_C5, ISO_C6, NA_LETTER, NA_LEGAL, EXECUTIVE, LEDGER,
- TABLOID, INVOICE, FOLIO, QUARTO, JAPANESE_POSTCARD,
- JAPANESE_DOUBLE_POSTCARD, A, B, C, D, E, ISO_DESIGNATED_LONG,
- ITALY_ENVELOPE, MONARCH_ENVELOPE, PERSONAL_ENVELOPE,
+ ISO_C3, ISO_C4, ISO_C5, ISO_C6, NA_LETTER, NA_LEGAL, EXECUTIVE, LEDGER,
+ TABLOID, INVOICE, FOLIO, QUARTO, JAPANESE_POSTCARD,
+ JAPANESE_DOUBLE_POSTCARD, A, B, C, D, E, ISO_DESIGNATED_LONG,
+ ITALY_ENVELOPE, MONARCH_ENVELOPE, PERSONAL_ENVELOPE,
NA_NUMBER_9_ENVELOPE, NA_NUMBER_10_ENVELOPE, NA_NUMBER_11_ENVELOPE,
NA_NUMBER_12_ENVELOPE, NA_NUMBER_14_ENVELOPE, NA_6X9_ENVELOPE,
NA_7X9_ENVELOPE, NA_9X11_ENVELOPE, NA_9X12_ENVELOPE, NA_10X13_ENVELOPE,
- NA_10X14_ENVELOPE, NA_10X15_ENVELOPE, NA_5X7, NA_8X10 };
-
+ NA_10X14_ENVELOPE, NA_10X15_ENVELOPE, NA_5X7, NA_8X10 };
+
/**
* Constructs a <code>MediaSizeName</code> object.
- *
+ *
* @param value the enum value.
*/
protected MediaSizeName(int value)
diff --git a/javax/print/attribute/standard/MediaTray.java b/javax/print/attribute/standard/MediaTray.java
index 23811a0a4..836640c81 100644
--- a/javax/print/attribute/standard/MediaTray.java
+++ b/javax/print/attribute/standard/MediaTray.java
@@ -40,7 +40,7 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * <code>MediaTray</code> is a subclass of the <code>Media</code> printing
+ * <code>MediaTray</code> is a subclass of the <code>Media</code> printing
* attribute and provides selection of media to be used by the means of the
* input tray of the printer. The class pre-defines commonly available types
* of input trays in printers. This media type enumeration may be used in
@@ -49,25 +49,25 @@ import javax.print.attribute.EnumSyntax;
* <b>IPP Compatibility:</b> MediaTray is not an IPP 1.1 attribute on its own.
* It provides parts of the <code>media</code> attribute type values.
* </p>
- *
+ *
* @author Sven de Marothy
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaTray extends Media
{
-
+
private static final long serialVersionUID = -982503611095214703L;
-
+
/**
* Top tray
*/
public static final MediaTray TOP = new MediaTray(0);
-
+
/**
* Middle tray
*/
public static final MediaTray MIDDLE = new MediaTray(1);
-
+
/**
* Bottom tray
*/
@@ -80,9 +80,9 @@ public class MediaTray extends Media
/**
* Manual-feed tray
- */
+ */
public static final MediaTray MANUAL = new MediaTray(4);
-
+
/**
* Large capacity tray
*/
@@ -92,22 +92,22 @@ public class MediaTray extends Media
* Main tray
*/
public static final MediaTray MAIN = new MediaTray(6);
-
+
/**
* Side tray
*/
- public static final MediaTray SIDE = new MediaTray(7);
-
+ public static final MediaTray SIDE = new MediaTray(7);
+
private static final String[] stringTable = { "top", "middle", "bottom",
- "envelope", "manual",
- "large-capacity", "main",
+ "envelope", "manual",
+ "large-capacity", "main",
"side" };
-
- private static final MediaTray[] enumValueTable = { TOP, MIDDLE, BOTTOM,
+
+ private static final MediaTray[] enumValueTable = { TOP, MIDDLE, BOTTOM,
ENVELOPE, MANUAL,
LARGE_CAPACITY, MAIN,
- SIDE };
-
+ SIDE };
+
/**
* Creates a <code>MediaTray</code> object.
*
@@ -117,7 +117,7 @@ public class MediaTray extends Media
{
super( i );
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -139,4 +139,3 @@ public class MediaTray extends Media
return enumValueTable;
}
}
-
diff --git a/javax/print/attribute/standard/MultipleDocumentHandling.java b/javax/print/attribute/standard/MultipleDocumentHandling.java
index 3ee1b4126..feb01ea4c 100644
--- a/javax/print/attribute/standard/MultipleDocumentHandling.java
+++ b/javax/print/attribute/standard/MultipleDocumentHandling.java
@@ -45,13 +45,13 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>MultipleDocumentHandling</code> printing attribute controls
- * how certain printing attributes affect printing in case of multiple
- * documents in a print job. This attribute is only relevant if a job
+ * how certain printing attributes affect printing in case of multiple
+ * documents in a print job. This attribute is only relevant if a job
* has multiple documents.
* <p>
* <b>IPP Compatibility:</b> MultipleDocumentHandling is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -60,43 +60,43 @@ public class MultipleDocumentHandling extends EnumSyntax
{
private static final long serialVersionUID = 8098326460746413466L;
- /**
+ /**
* Multiple documents are treated as a single document.
*/
public static final MultipleDocumentHandling SINGLE_DOCUMENT =
new MultipleDocumentHandling(0);
-
- /**
+
+ /**
* Multiple documents are treated as uncollated copies.
*/
public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_UNCOLLATED_COPIES =
new MultipleDocumentHandling(1);
-
- /**
- * Multiple documents are treated as collated copies.
+
+ /**
+ * Multiple documents are treated as collated copies.
*/
public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_COLLATED_COPIES =
new MultipleDocumentHandling(2);
-
- /**
+
+ /**
* Multiple documents are treated so that every single document starts
- * with a new sheet.
+ * with a new sheet.
*/
public static final MultipleDocumentHandling SINGLE_DOCUMENT_NEW_SHEET =
new MultipleDocumentHandling(3);
-
- private static final String[] stringTable = { "single-document",
+
+ private static final String[] stringTable = { "single-document",
"separate-documents-uncollated-copies",
"separate-documents-collated-copies",
"single-document-new-sheet" };
-
- private static final MultipleDocumentHandling[] enumValueTable =
+
+ private static final MultipleDocumentHandling[] enumValueTable =
{ SINGLE_DOCUMENT, SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
SEPARATE_DOCUMENTS_COLLATED_COPIES, SINGLE_DOCUMENT_NEW_SHEET};
/**
* Constructs a <code>MultipleDocumentHandling</code> object.
- *
+ *
* @param value the enum value
*/
protected MultipleDocumentHandling(int value)
@@ -123,7 +123,7 @@ public class MultipleDocumentHandling extends EnumSyntax
{
return "multiple-document-handling";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/NumberOfDocuments.java b/javax/print/attribute/standard/NumberOfDocuments.java
index 1121a1f0f..217df0d87 100644
--- a/javax/print/attribute/standard/NumberOfDocuments.java
+++ b/javax/print/attribute/standard/NumberOfDocuments.java
@@ -1,4 +1,4 @@
-/* NumberOfDocuments.java --
+/* NumberOfDocuments.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The <code>NumberOfDocuments</code> printing attribute specifies
+ * The <code>NumberOfDocuments</code> printing attribute specifies
* the number of documents in a job.
* <p>
* <b>IPP Compatibility:</b> NumberOfDocuments is an IPP 1.1 attribute.
@@ -54,7 +54,7 @@ public final class NumberOfDocuments extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 7891881310684461097L;
-
+
/**
* Creates a <code>NumberOfDocuments</code> object.
*
@@ -69,13 +69,13 @@ public final class NumberOfDocuments extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/NumberOfInterveningJobs.java b/javax/print/attribute/standard/NumberOfInterveningJobs.java
index b968f9a7b..d33d826c8 100644
--- a/javax/print/attribute/standard/NumberOfInterveningJobs.java
+++ b/javax/print/attribute/standard/NumberOfInterveningJobs.java
@@ -1,4 +1,4 @@
-/* NumberOfInterveningJobs.java --
+/* NumberOfInterveningJobs.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,19 +43,19 @@ import javax.print.attribute.PrintJobAttribute;
/**
* The <code>NumberOfInterveningJobs</code> printing attribute provides
- * the number of jobs ahead in the print service queue before the
+ * the number of jobs ahead in the print service queue before the
* requested job.
* <p>
* <b>IPP Compatibility:</b> NumberOfInterveningJobs is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch
*/
public final class NumberOfInterveningJobs extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 2568141124844982746L;
-
+
/**
* Creates a <code>NumberOfInterveningJobs</code> object.
*
@@ -70,13 +70,13 @@ public final class NumberOfInterveningJobs extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/NumberUp.java b/javax/print/attribute/standard/NumberUp.java
index 219a1c1a8..82779070e 100644
--- a/javax/print/attribute/standard/NumberUp.java
+++ b/javax/print/attribute/standard/NumberUp.java
@@ -1,4 +1,4 @@
-/* NumberUp.java --
+/* NumberUp.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,24 +44,24 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.PrintRequestAttribute;
/**
- * The <code>NumberUp</code> printing attribute specifies the number of pages
+ * The <code>NumberUp</code> printing attribute specifies the number of pages
* to be arranged upon a single media sheet.
* <p>
- * <b>Note:</b> The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * <b>Note:</b> The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
* </p>
* <p>
* <b>IPP Compatibility:</b> NumberUp is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch
*/
public final class NumberUp extends IntegerSyntax
implements DocAttribute, PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -3040436486786527811L;
-
+
/**
* Creates a <code>NumberUp</code> object.
*
@@ -74,13 +74,13 @@ public final class NumberUp extends IntegerSyntax
{
super(value);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/NumberUpSupported.java b/javax/print/attribute/standard/NumberUpSupported.java
index 20bd9c93b..62f417b89 100644
--- a/javax/print/attribute/standard/NumberUpSupported.java
+++ b/javax/print/attribute/standard/NumberUpSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The <code>NumberUpSupported</code> printing attribute specifies the
- * supported value or range of values for the
+ * The <code>NumberUpSupported</code> printing attribute specifies the
+ * supported value or range of values for the
* {@link javax.print.attribute.standard.NumberUp} attribute.
* <p>
* <b>IPP Compatibility:</b> NumberUpSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -68,7 +68,7 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
public NumberUpSupported(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
@@ -79,13 +79,13 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
* @param members the members supported for number up.
*
* @exception IllegalArgumentException if any element is invalid
- * @exception NullPointerException if members is <code>null</code> or any
+ * @exception NullPointerException if members is <code>null</code> or any
* element of members is <code>null</code>.
*/
public NumberUpSupported(int[][] members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
@@ -103,24 +103,24 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
public NumberUpSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof NumberUpSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/OrientationRequested.java b/javax/print/attribute/standard/OrientationRequested.java
index 8d3468556..c24fab458 100644
--- a/javax/print/attribute/standard/OrientationRequested.java
+++ b/javax/print/attribute/standard/OrientationRequested.java
@@ -56,7 +56,7 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* <b>IPP Compatibility:</b> OrientationRequested is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,42 +65,42 @@ public final class OrientationRequested extends EnumSyntax
{
private static final long serialVersionUID = -4447437289862822276L;
- /**
- * Orientation as portrait.
+ /**
+ * Orientation as portrait.
*/
public static final OrientationRequested PORTRAIT =
new OrientationRequested(3);
-
- /**
- * Orientation as landscape.
+
+ /**
+ * Orientation as landscape.
*/
public static final OrientationRequested LANDSCAPE =
new OrientationRequested(4);
-
- /**
- * Orientation as reversed landscape.
+
+ /**
+ * Orientation as reversed landscape.
*/
public static final OrientationRequested REVERSE_LANDSCAPE =
new OrientationRequested(5);
-
- /**
- * Orientation as reversed portrait.
+
+ /**
+ * Orientation as reversed portrait.
*/
public static final OrientationRequested REVERSE_PORTRAIT =
new OrientationRequested(6);
-
+
private static final String[] stringTable = { "portrait", "landscape",
"reverse-landscape",
"reverse-portrait" };
-
- private static final OrientationRequested[]
- enumValueTable = { PORTRAIT, LANDSCAPE,
+
+ private static final OrientationRequested[]
+ enumValueTable = { PORTRAIT, LANDSCAPE,
REVERSE_LANDSCAPE, REVERSE_PORTRAIT };
/**
* Constructs a <code>OrientationRequested</code> object.
- *
+ *
* @param value the value
*/
protected OrientationRequested(int value)
@@ -127,7 +127,7 @@ public final class OrientationRequested extends EnumSyntax
{
return "orientation-requested";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -148,7 +148,7 @@ public final class OrientationRequested extends EnumSyntax
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
@@ -157,5 +157,5 @@ public final class OrientationRequested extends EnumSyntax
protected int getOffset()
{
return 3;
- }
+ }
}
diff --git a/javax/print/attribute/standard/OutputDeviceAssigned.java b/javax/print/attribute/standard/OutputDeviceAssigned.java
index df8a5453f..769cef1e8 100644
--- a/javax/print/attribute/standard/OutputDeviceAssigned.java
+++ b/javax/print/attribute/standard/OutputDeviceAssigned.java
@@ -1,4 +1,4 @@
-/* OutputDeviceAssigned.java --
+/* OutputDeviceAssigned.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,17 +46,17 @@ import javax.print.attribute.TextSyntax;
/**
* The <code>OutputDeviceAssigned</code> printing attribute specifies the
- * output printer device assigned by a print service to a print job.
+ * output printer device assigned by a print service to a print job.
* <p>
* This may be empty if a print service is embedded in a printer, e.g. is the
- * output device. However there exist print services with several physical
+ * output device. However there exist print services with several physical
* output devices (e.g. CUPS classes) where this attribute provides the actual
* output device.
* </p>
* <p>
* <b>IPP Compatibility:</b> OutputDeviceAssigned is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class OutputDeviceAssigned extends TextSyntax
@@ -83,7 +83,7 @@ public final class OutputDeviceAssigned extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PDLOverrideSupported.java b/javax/print/attribute/standard/PDLOverrideSupported.java
index 02c9c198c..310264a0c 100644
--- a/javax/print/attribute/standard/PDLOverrideSupported.java
+++ b/javax/print/attribute/standard/PDLOverrideSupported.java
@@ -49,7 +49,7 @@ import javax.print.attribute.PrintServiceAttribute;
* <p>
* <b>IPP Compatibility:</b> PDLOverrideSupported is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -64,22 +64,22 @@ public class PDLOverrideSupported extends EnumSyntax
*/
public static final PDLOverrideSupported NOT_ATTEMPTED =
new PDLOverrideSupported(0);
-
+
/**
* Indicates that the print service is capable of
* attempting to override document data instructions.
*/
public static final PDLOverrideSupported ATTEMPTED =
new PDLOverrideSupported(1);
-
+
private static final String[] stringTable = { "not-attempted", "attempted" };
-
+
private static final PDLOverrideSupported[] enumValueTable = { NOT_ATTEMPTED,
ATTEMPTED};
/**
* Constructs a <code>PDLOverrideSupported</code> object.
- *
+ *
* @param value the enum value
*/
protected PDLOverrideSupported(int value)
@@ -106,7 +106,7 @@ public class PDLOverrideSupported extends EnumSyntax
{
return "pdl-override-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/PageRanges.java b/javax/print/attribute/standard/PageRanges.java
index 9637a917f..2250868d7 100644
--- a/javax/print/attribute/standard/PageRanges.java
+++ b/javax/print/attribute/standard/PageRanges.java
@@ -45,17 +45,17 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.SetOfIntegerSyntax;
/**
- * The <code>PageRanges</code> printing attribute specifies the
+ * The <code>PageRanges</code> printing attribute specifies the
* range(s) of pages to be printed in a print job.
* <p>
- * <b>Note:</b> The effect of this attribute on jobs with multiple
- * documents is controlled by the job attribute
+ * <b>Note:</b> The effect of this attribute on jobs with multiple
+ * documents is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
* </p>
* <p>
* <b>IPP Compatibility:</b> PageRanges is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,7 +75,7 @@ public final class PageRanges extends SetOfIntegerSyntax
public PageRanges(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
@@ -87,13 +87,13 @@ public final class PageRanges extends SetOfIntegerSyntax
* @param members the page ranges to be printed.
*
* @exception IllegalArgumentException if any element is invalid
- * @exception NullPointerException if members is <code>null</code> or any
+ * @exception NullPointerException if members is <code>null</code> or any
* element of members is <code>null</code>.
*/
public PageRanges(int[][] members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
@@ -111,11 +111,11 @@ public final class PageRanges extends SetOfIntegerSyntax
public PageRanges(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerbound may not be less than 1");
}
-
+
/**
* Constructs a <code>PageRanges</code> object with a set
* of ranges to be printed in string array form.
@@ -123,30 +123,30 @@ public final class PageRanges extends SetOfIntegerSyntax
* @param members the page ranges to be printed in string form.
*
* @exception IllegalArgumentException if any element is invalid.
- * @exception NullPointerException if members is <code>null</code> or any
+ * @exception NullPointerException if members is <code>null</code> or any
* element of members is <code>null</code>.
*/
public PageRanges(String members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof PageRanges))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/PagesPerMinute.java b/javax/print/attribute/standard/PagesPerMinute.java
index 6305842c0..bd086817a 100644
--- a/javax/print/attribute/standard/PagesPerMinute.java
+++ b/javax/print/attribute/standard/PagesPerMinute.java
@@ -1,4 +1,4 @@
-/* PagesPerMinute.java --
+/* PagesPerMinute.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,20 +43,20 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>PagesPerMinute</code> printing attribute specifies
+ * The <code>PagesPerMinute</code> printing attribute specifies
* the nominal number of pages per minute which may be printed
- * by the printer.
+ * by the printer.
* <p>
* <b>IPP Compatibility:</b> PagesPerMinute is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PagesPerMinute extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = -6366403993072862015L;
-
+
/**
* Creates a <code>PagesPerMinute</code> object.
*
@@ -71,13 +71,13 @@ public final class PagesPerMinute extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PagesPerMinuteColor.java b/javax/print/attribute/standard/PagesPerMinuteColor.java
index 3d5fa2ca5..f32bbdb19 100644
--- a/javax/print/attribute/standard/PagesPerMinuteColor.java
+++ b/javax/print/attribute/standard/PagesPerMinuteColor.java
@@ -1,4 +1,4 @@
-/* PagesPerMinuteColor.java --
+/* PagesPerMinuteColor.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,20 +42,20 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>PagesPerMinuteColor</code> printing attribute specifies
+ * The <code>PagesPerMinuteColor</code> printing attribute specifies
* the nominal number of pages per minute which may be printed in
- * color by the printer.
+ * color by the printer.
* <p>
* <b>IPP Compatibility:</b> PagesPerMinuteColor is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch
*/
public final class PagesPerMinuteColor extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = 1684993151687470944L;
-
+
/**
* Creates a <code>PagesPerMinuteColor</code> object.
*
@@ -70,13 +70,13 @@ public final class PagesPerMinuteColor extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PresentationDirection.java b/javax/print/attribute/standard/PresentationDirection.java
index 14d560533..62c19b241 100644
--- a/javax/print/attribute/standard/PresentationDirection.java
+++ b/javax/print/attribute/standard/PresentationDirection.java
@@ -45,13 +45,13 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>PresentationDirection</code> attribute specifies
- * a value to be used together with the <code>NumberUp</code> attribute
+ * a value to be used together with the <code>NumberUp</code> attribute
* to indicate the layout of multiple pages on a single media sheet.
* <p>
- * <b>IPP Compatibility:</b> PresentationDirection is not an IPP 1.1
+ * <b>IPP Compatibility:</b> PresentationDirection is not an IPP 1.1
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -61,72 +61,72 @@ public final class PresentationDirection extends EnumSyntax
private static final long serialVersionUID = 8294728067230931780L;
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the top left towards the bottom left.
*/
public static final PresentationDirection TOBOTTOM_TORIGHT =
new PresentationDirection(0);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the top right towards the bottom left.
*/
public static final PresentationDirection TOBOTTOM_TOLEFT =
new PresentationDirection(1);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the bottom left towards the top right.
*/
public static final PresentationDirection TOTOP_TORIGHT =
new PresentationDirection(2);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the bottom right towards the top left.
*/
public static final PresentationDirection TOTOP_TOLEFT =
new PresentationDirection(3);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the top left towards the right bottom.
*/
public static final PresentationDirection TORIGHT_TOBOTTOM =
new PresentationDirection(4);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the bottom left towards the right top.
*/
public static final PresentationDirection TORIGHT_TOTOP =
new PresentationDirection(5);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the top right towards the left bottom.
*/
public static final PresentationDirection TOLEFT_TOBOTTOM =
new PresentationDirection(6);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the bottom right towards the left top.
*/
public static final PresentationDirection TOLEFT_TOTOP =
new PresentationDirection(7);
- private static final String[] stringTable = { "tobottom-toright",
- "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
+ private static final String[] stringTable = { "tobottom-toright",
+ "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
"toright-totop", "toleft-tobottom", "toleft-totop" };
- private static final PresentationDirection[] enumValueTable =
- { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
+ private static final PresentationDirection[] enumValueTable =
+ { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
TORIGHT_TOBOTTOM, TORIGHT_TOTOP, TOLEFT_TOBOTTOM, TOLEFT_TOTOP };
-
+
/**
* Constructs a <code>PresentationDirection</code> object.
- *
+ *
* @param value the enum value.
*/
private PresentationDirection(int value)
@@ -153,7 +153,7 @@ public final class PresentationDirection extends EnumSyntax
{
return "presentation-direction";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/PrintQuality.java b/javax/print/attribute/standard/PrintQuality.java
index bc94d532b..aa65e89a7 100644
--- a/javax/print/attribute/standard/PrintQuality.java
+++ b/javax/print/attribute/standard/PrintQuality.java
@@ -50,7 +50,7 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* <b>IPP Compatibility:</b> PrintQuality is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,28 +59,28 @@ public class PrintQuality extends EnumSyntax
{
private static final long serialVersionUID = -3072341285225858365L;
- /**
- * Draft quality of the printer.
+ /**
+ * Draft quality of the printer.
*/
public static final PrintQuality DRAFT = new PrintQuality(3);
-
- /**
- * Normal quality of the printer.
+
+ /**
+ * Normal quality of the printer.
*/
public static final PrintQuality NORMAL = new PrintQuality(4);
-
- /**
- * High quality of the printer.
+
+ /**
+ * High quality of the printer.
*/
public static final PrintQuality HIGH = new PrintQuality(5);
private static final String[] stringTable = { "draft", "normal", "high" };
-
+
private static final PrintQuality[] enumValueTable = { DRAFT, NORMAL, HIGH };
-
+
/**
* Constructs a <code>PrintQuality</code> object.
- *
+ *
* @param value the value of the enum
*/
protected PrintQuality(int value)
@@ -107,7 +107,7 @@ public class PrintQuality extends EnumSyntax
{
return "print-quality";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -127,7 +127,7 @@ public class PrintQuality extends EnumSyntax
protected EnumSyntax[] getEnumValueTable()
{
return enumValueTable;
- }
+ }
/**
* Returns the lowest used value by the enumerations of this class.
diff --git a/javax/print/attribute/standard/PrinterInfo.java b/javax/print/attribute/standard/PrinterInfo.java
index e287f8ce9..01d2065bf 100644
--- a/javax/print/attribute/standard/PrinterInfo.java
+++ b/javax/print/attribute/standard/PrinterInfo.java
@@ -1,4 +1,4 @@
-/* PrinterInfo.java --
+/* PrinterInfo.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>PrinterInfo</code> printing attribute provides
+ * The <code>PrinterInfo</code> printing attribute provides
* informations about a printer device.
* <p>
* <b>IPP Compatibility:</b> PrinterInfo is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterInfo extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterInfo extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterIsAcceptingJobs.java b/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
index 1c9c39930..5ac6bf71d 100644
--- a/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
+++ b/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
@@ -43,16 +43,16 @@ import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>PrinterIsAcceptingJobs</code> printing attribute signals
+ * The <code>PrinterIsAcceptingJobs</code> printing attribute signals
* if a print services is currently accepting jobs.
* <p>
* <b>IPP Compatibility:</b> PrinterIsAcceptingJobs is an IPP 1.1 attribute.
- * The IPP specification treats PrinterIsAcceptingJobs as boolean type which
- * is not available in the Java Print Service API. The IPP boolean value "true"
- * corresponds to <code>ACCEPTING_JOBS</code> and "false"
+ * The IPP specification treats PrinterIsAcceptingJobs as boolean type which
+ * is not available in the Java Print Service API. The IPP boolean value "true"
+ * corresponds to <code>ACCEPTING_JOBS</code> and "false"
* to <code>NOT_ACCEPTING_JOBS</code>.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -66,22 +66,22 @@ public final class PrinterIsAcceptingJobs extends EnumSyntax
*/
public static final PrinterIsAcceptingJobs NOT_ACCEPTING_JOBS =
new PrinterIsAcceptingJobs(0);
-
+
/**
* The printer is accepting jobs.
*/
public static final PrinterIsAcceptingJobs ACCEPTING_JOBS =
new PrinterIsAcceptingJobs(1);
- private static final String[] stringTable = { "not-accepting-jobs",
+ private static final String[] stringTable = { "not-accepting-jobs",
"accepting-jobs" };
-
- private static final PrinterIsAcceptingJobs[] enumValueTable =
+
+ private static final PrinterIsAcceptingJobs[] enumValueTable =
{ NOT_ACCEPTING_JOBS, ACCEPTING_JOBS };
-
+
/**
* Constructs a <code>PrinterIsAcceptingJobs</code> object.
- *
+ *
* @param value the enum value.
*/
protected PrinterIsAcceptingJobs(int value)
@@ -108,7 +108,7 @@ public final class PrinterIsAcceptingJobs extends EnumSyntax
{
return "printer-is-accepting-jobs";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/PrinterLocation.java b/javax/print/attribute/standard/PrinterLocation.java
index 7a446adcb..934f1bdd3 100644
--- a/javax/print/attribute/standard/PrinterLocation.java
+++ b/javax/print/attribute/standard/PrinterLocation.java
@@ -1,4 +1,4 @@
-/* PrinterLocation.java --
+/* PrinterLocation.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>PrinterLocation</code> printing attribute provides the location
+ * The <code>PrinterLocation</code> printing attribute provides the location
* of a printer device. This may be a room and building name for example.
* <p>
* <b>IPP Compatibility:</b> PrinterLocation is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterLocation extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterLocation extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterMakeAndModel.java b/javax/print/attribute/standard/PrinterMakeAndModel.java
index 77fd84b4a..a78fe1472 100644
--- a/javax/print/attribute/standard/PrinterMakeAndModel.java
+++ b/javax/print/attribute/standard/PrinterMakeAndModel.java
@@ -1,4 +1,4 @@
-/* PrinterMakeAndModel.java --
+/* PrinterMakeAndModel.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import javax.print.attribute.TextSyntax;
* <p>
* <b>IPP Compatibility:</b> PrinterMakeAndModel is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterMakeAndModel extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterMakeAndModel extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterMessageFromOperator.java b/javax/print/attribute/standard/PrinterMessageFromOperator.java
index 55bc7406a..3bd3ee41c 100644
--- a/javax/print/attribute/standard/PrinterMessageFromOperator.java
+++ b/javax/print/attribute/standard/PrinterMessageFromOperator.java
@@ -1,4 +1,4 @@
-/* PrinterMessageFromOperator.java --
+/* PrinterMessageFromOperator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,15 +45,15 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>PrinterMessageFromOperator</code> printing attribute provides
- * a message from an operator or a system administrator related to the
+ * The <code>PrinterMessageFromOperator</code> printing attribute provides
+ * a message from an operator or a system administrator related to the
* printer. This may include informations about the status of the printer
* or expected downtimes, etc.
* <p>
- * <b>IPP Compatibility:</b> PrinterMessageFromOperator is an IPP 1.1
+ * <b>IPP Compatibility:</b> PrinterMessageFromOperator is an IPP 1.1
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterMessageFromOperator extends TextSyntax
@@ -80,7 +80,7 @@ public final class PrinterMessageFromOperator extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterMoreInfo.java b/javax/print/attribute/standard/PrinterMoreInfo.java
index de330fe0b..4af33c664 100644
--- a/javax/print/attribute/standard/PrinterMoreInfo.java
+++ b/javax/print/attribute/standard/PrinterMoreInfo.java
@@ -50,11 +50,11 @@ import javax.print.attribute.URISyntax;
* <p>
* The URI may for example contain a reference to a HTML page with information.
* The information is normally intended for end users.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> PrinterMoreInfo is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,7 +65,7 @@ public final class PrinterMoreInfo extends URISyntax
/**
* Constructs a <code>PrinterMoreInfo</code> object.
- *
+ *
* @param uri the URI of the information.
* @throws NullPointerException if the given uri is null.
*/
@@ -73,13 +73,13 @@ public final class PrinterMoreInfo extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
index 73a627eb3..a0425d3a7 100644
--- a/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
+++ b/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
@@ -45,20 +45,20 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.URISyntax;
/**
- * The <code>PrinterMoreInfoManufacturer</code> attribute provides a URI that
+ * The <code>PrinterMoreInfoManufacturer</code> attribute provides a URI that
* can be used to obtain more information about the printer device type and
* its manufacturer.
* <p>
- * The URI may for example contain a reference to a website of the
- * manufacturer, containing informations and links to the latest firmware,
- * printer drivers, manual etc. The information is normally intended for
+ * The URI may for example contain a reference to a website of the
+ * manufacturer, containing informations and links to the latest firmware,
+ * printer drivers, manual etc. The information is normally intended for
* end users.
- * </p>
+ * </p>
* <p>
- * <b>IPP Compatibility:</b> PrinterMoreInfoManufacturer is an IPP 1.1
+ * <b>IPP Compatibility:</b> PrinterMoreInfoManufacturer is an IPP 1.1
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -69,7 +69,7 @@ public final class PrinterMoreInfoManufacturer extends URISyntax
/**
* Constructs a <code>PrinterMoreInfoManufacturer</code> object.
- *
+ *
* @param uri the URI of the information..
* @throws NullPointerException if the given uri is null.
*/
@@ -77,13 +77,13 @@ public final class PrinterMoreInfoManufacturer extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterName.java b/javax/print/attribute/standard/PrinterName.java
index b084c2c0f..854826c67 100644
--- a/javax/print/attribute/standard/PrinterName.java
+++ b/javax/print/attribute/standard/PrinterName.java
@@ -1,4 +1,4 @@
-/* PrinterName.java --
+/* PrinterName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>PrinterName</code> printing attribute provides the name of a
+ * The <code>PrinterName</code> printing attribute provides the name of a
* print service. The name may but must not be related to parts of the
* printer URI.
* <p>
* <b>IPP Compatibility:</b> PrinterName is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.PrinterURI
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterName extends TextSyntax
@@ -79,7 +79,7 @@ public final class PrinterName extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/PrinterResolution.java b/javax/print/attribute/standard/PrinterResolution.java
index 7b60a0cad..acf3a63dc 100644
--- a/javax/print/attribute/standard/PrinterResolution.java
+++ b/javax/print/attribute/standard/PrinterResolution.java
@@ -45,12 +45,12 @@ import javax.print.attribute.ResolutionSyntax;
/**
- * The <code>PrinterResolution</code> printing attribute specifies a
- * resolution supported by a print service or to be used by a print job.
+ * The <code>PrinterResolution</code> printing attribute specifies a
+ * resolution supported by a print service or to be used by a print job.
* <p>
* <b>IPP Compatibility:</b> PrinterResolution is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -74,20 +74,20 @@ public final class PrinterResolution extends ResolutionSyntax
{
super(crossFeedResolution, feedResolution, units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
if(! (obj instanceof PrinterResolution))
return false;
-
+
return super.equals(obj);
}
diff --git a/javax/print/attribute/standard/PrinterState.java b/javax/print/attribute/standard/PrinterState.java
index 4b85c0189..7670e144c 100644
--- a/javax/print/attribute/standard/PrinterState.java
+++ b/javax/print/attribute/standard/PrinterState.java
@@ -49,13 +49,13 @@ import javax.print.attribute.PrintServiceAttribute;
* The {@link javax.print.attribute.standard.PrinterStateReasons}
* attribute provides further detailed information about
* the given printer state. Detailed information about the printer
- * state and printer state reasons attributes can be found in the
+ * state and printer state reasons attributes can be found in the
* RFC 2911.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> PrinterState is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -68,35 +68,35 @@ public final class PrinterState extends EnumSyntax
* The state is unknown currently.
*/
public static final PrinterState UNKNOWN = new PrinterState(0);
-
+
/**
* The printer device is in idle state. New jobs can start
* processing without waiting.
*/
public static final PrinterState IDLE = new PrinterState(3);
-
+
/**
* The printer device is in processing state.
*/
public static final PrinterState PROCESSING = new PrinterState(4);
-
+
/**
* The printer device has stopped. No jobs can be processed and
* normally manual intervention is needed.
*/
public static final PrinterState STOPPED = new PrinterState(5);
- private static final String[] stringTable = { "unknown", null, null,
- "idle", "processing",
+ private static final String[] stringTable = { "unknown", null, null,
+ "idle", "processing",
"stopped" };
-
+
private static final PrinterState[] enumValueTable = { UNKNOWN, null, null,
- IDLE, PROCESSING,
+ IDLE, PROCESSING,
STOPPED };
-
+
/**
* Constructs a <code>PrinterState</code> object.
- *
+ *
* @param value the enum value.
*/
protected PrinterState(int value)
@@ -123,7 +123,7 @@ public final class PrinterState extends EnumSyntax
{
return "printer-state";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/PrinterStateReason.java b/javax/print/attribute/standard/PrinterStateReason.java
index 1abb7c6aa..c3838b265 100644
--- a/javax/print/attribute/standard/PrinterStateReason.java
+++ b/javax/print/attribute/standard/PrinterStateReason.java
@@ -45,13 +45,13 @@ import javax.print.attribute.EnumSyntax;
* The <code>PrinterStateReason</code> attribute provides additional
* information about the current state of the printer device. Its always part
* of the {@link javax.print.attribute.standard.PrinterStateReasons}
- * printing attribute.
+ * printing attribute.
* <p>
- * <b>IPP Compatibility:</b> PrinterStateReason is not an IPP 1.1
+ * <b>IPP Compatibility:</b> PrinterStateReason is not an IPP 1.1
* attribute itself but used inside the <code>PrinterStateReasons</code>
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -64,52 +64,52 @@ public class PrinterStateReason extends EnumSyntax
* Any state other state not listed here.
*/
public static final PrinterStateReason OTHER = new PrinterStateReason(0);
-
+
/**
* A media tray has run out of media.
*/
public static final PrinterStateReason MEDIA_NEEDED =
new PrinterStateReason(1);
-
+
/**
* A media jam occured in the printer device.
*/
public static final PrinterStateReason MEDIA_JAM = new PrinterStateReason(2);
-
+
/**
* Indicates that the printer has been paused by the pause printer
* operation and is currently moving to the pause state.
*/
public static final PrinterStateReason MOVING_TO_PAUSED =
new PrinterStateReason(3);
-
+
/**
* The printer device has be paused by the pause printer operation.
*/
public static final PrinterStateReason PAUSED = new PrinterStateReason(4);
-
+
/**
* The printer device has been shutdown or removed from service.
*/
public static final PrinterStateReason SHUTDOWN = new PrinterStateReason(5);
-
+
/**
* The printer object is connecting to the device. If a printer
- * device is on the network the printer object may be unable to connect.
+ * device is on the network the printer object may be unable to connect.
*/
public static final PrinterStateReason CONNECTING_TO_DEVICE =
new PrinterStateReason(6);
-
+
/**
- * The connection to the device has timed out.
+ * The connection to the device has timed out.
*/
public static final PrinterStateReason TIMED_OUT = new PrinterStateReason(7);
-
+
/**
* The printer object is stopping the printer device.
*/
public static final PrinterStateReason STOPPING = new PrinterStateReason(8);
-
+
/**
* The printer object has stopped partly. A printer object may control
* several physical output devices (e.g. a printer class in CUPS) and
@@ -117,170 +117,170 @@ public class PrinterStateReason extends EnumSyntax
*/
public static final PrinterStateReason STOPPED_PARTLY =
new PrinterStateReason(9);
-
+
/**
* The printer device is low on toner.
*/
public static final PrinterStateReason TONER_LOW =
new PrinterStateReason(10);
-
+
/**
* The printer device is out of toner.
*/
public static final PrinterStateReason TONER_EMPTY =
new PrinterStateReason(11);
-
+
/**
* The printers spool area is currently full. The printer is
* currently not able to accept jobs.
*/
public static final PrinterStateReason SPOOL_AREA_FULL =
new PrinterStateReason(12);
-
+
/**
* One or more covers of the printer device are open.
*/
public static final PrinterStateReason COVER_OPEN =
new PrinterStateReason(13);
-
+
/**
* One or more interlocks of the printer device are open.
*/
public static final PrinterStateReason INTERLOCK_OPEN =
new PrinterStateReason(14);
-
+
/**
* One or more doors of the printer device are open.
*/
public static final PrinterStateReason DOOR_OPEN =
new PrinterStateReason(15);
-
+
/**
* One or more input trays are missing in the printer device.
*/
public static final PrinterStateReason INPUT_TRAY_MISSING =
new PrinterStateReason(16);
-
+
/**
* The printer device is low on media.
*/
public static final PrinterStateReason MEDIA_LOW =
new PrinterStateReason(17);
-
+
/**
* The printer device is out of media.
*/
public static final PrinterStateReason MEDIA_EMPTY =
new PrinterStateReason(18);
-
+
/**
* One or more output trays are missing in the printer device.
*/
public static final PrinterStateReason OUTPUT_TRAY_MISSING =
new PrinterStateReason(19);
-
+
/**
* One or more output areas of the printer device are almost full.
*/
public static final PrinterStateReason OUTPUT_AREA_ALMOST_FULL =
new PrinterStateReason(20);
-
+
/**
* One or more output areas of the printer device are full.
*/
public static final PrinterStateReason OUTPUT_AREA_FULL =
new PrinterStateReason(21);
-
+
/**
* The printer device is low on marker supply.
*/
public static final PrinterStateReason MARKER_SUPPLY_LOW =
new PrinterStateReason(22);
-
+
/**
* The printer device is out of marker supply.
*/
public static final PrinterStateReason MARKER_SUPPLY_EMPTY =
new PrinterStateReason(23);
-
+
/**
* The marker waste bin of the printer device is almost full.
*/
public static final PrinterStateReason MARKER_WASTE_ALMOST_FULL =
new PrinterStateReason(24);
-
+
/**
* The marker waste bin of the printer device is full.
*/
public static final PrinterStateReason MARKER_WASTE_FULL =
new PrinterStateReason(25);
-
+
/**
* The fuser of the printer device is over temperature.
*/
public static final PrinterStateReason FUSER_OVER_TEMP =
new PrinterStateReason(26);
-
+
/**
* The fuser of the printer device is under the needed temperature.
*/
public static final PrinterStateReason FUSER_UNDER_TEMP =
new PrinterStateReason(27);
-
+
/**
* The optical photo conductor is near its end of life (EOL).
*/
public static final PrinterStateReason OPC_NEAR_EOL =
new PrinterStateReason(28);
-
+
/**
* The optical photo conductor has reached its end of life.
*/
public static final PrinterStateReason OPC_LIFE_OVER =
new PrinterStateReason(29);
-
+
/**
* The printer device is low on developer.
*/
public static final PrinterStateReason DEVELOPER_LOW =
new PrinterStateReason(30);
-
+
/**
* The printer device is out of developer.
*/
public static final PrinterStateReason DEVELOPER_EMPTY =
new PrinterStateReason(31);
-
+
/**
* An interpreter resource (e.g. font) is unavailable.
*/
public static final PrinterStateReason INTERPRETER_RESOURCE_UNAVAILABLE =
new PrinterStateReason(32);
- private static final String[] stringTable =
- { "other", "media-needed", "media-jam", "moving-to-paused", "paused",
- "shutdown", "connecting-to-device", "timed-out", "stopping",
- "stopped-partly", "toner-low", "toner-empty", "spool-area-full",
- "cover-open", "interlock-open", "door-open", "input-tray-missing",
+ private static final String[] stringTable =
+ { "other", "media-needed", "media-jam", "moving-to-paused", "paused",
+ "shutdown", "connecting-to-device", "timed-out", "stopping",
+ "stopped-partly", "toner-low", "toner-empty", "spool-area-full",
+ "cover-open", "interlock-open", "door-open", "input-tray-missing",
"media-low", "media-empty", "output-tray-missing", "output-area-almost-full",
- "output-area-full", "marker-supply-low", "marker-supply-empty",
- "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp",
- "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low",
+ "output-area-full", "marker-supply-low", "marker-supply-empty",
+ "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp",
+ "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low",
"developer-empty", "interpreter-resource-unavailable" };
- private static final PrinterStateReason[] enumValueTable =
+ private static final PrinterStateReason[] enumValueTable =
{ OTHER, MEDIA_NEEDED, MEDIA_JAM, MOVING_TO_PAUSED, PAUSED, SHUTDOWN,
CONNECTING_TO_DEVICE, TIMED_OUT, STOPPING, STOPPED_PARTLY, TONER_LOW,
TONER_EMPTY, SPOOL_AREA_FULL, COVER_OPEN, INTERLOCK_OPEN, DOOR_OPEN,
INPUT_TRAY_MISSING, MEDIA_LOW, MEDIA_EMPTY, OUTPUT_TRAY_MISSING,
OUTPUT_AREA_ALMOST_FULL, OUTPUT_AREA_FULL, MARKER_SUPPLY_LOW,
MARKER_SUPPLY_EMPTY, MARKER_WASTE_ALMOST_FULL, MARKER_WASTE_FULL,
- FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER,
+ FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER,
DEVELOPER_LOW, DEVELOPER_EMPTY, INTERPRETER_RESOURCE_UNAVAILABLE };
/**
* Constructs a <code>PrinterStateReason</code> object.
- *
+ *
* @param value the enum value.
*/
protected PrinterStateReason(int value)
@@ -307,7 +307,7 @@ public class PrinterStateReason extends EnumSyntax
{
return "printer-state-reason";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/PrinterStateReasons.java b/javax/print/attribute/standard/PrinterStateReasons.java
index 3e77e181e..5a52b8a30 100644
--- a/javax/print/attribute/standard/PrinterStateReasons.java
+++ b/javax/print/attribute/standard/PrinterStateReasons.java
@@ -49,15 +49,15 @@ import javax.print.attribute.Attribute;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>PrinterStateReasons</code> attribute provides the set of
- * additional informations available about the current state of the printer
+ * The <code>PrinterStateReasons</code> attribute provides the set of
+ * additional informations available about the current state of the printer
* device.
* <p>
* The attribute is basically a map with <code>PrinterStateReason</code>
- * objects as keys associated with their severity level as
- * <code>Severity</code> instances. The IPP keyword value can be
+ * objects as keys associated with their severity level as
+ * <code>Severity</code> instances. The IPP keyword value can be
* constructed as follows: <br>
- * <code>reason.toString() + '-' + severity.toString()</code>
+ * <code>reason.toString() + '-' + severity.toString()</code>
* </p>
* <p>
* <b>IPP Compatibility:</b> PrinterStateReasons is an IPP 1.1 attribute.
@@ -65,7 +65,7 @@ import javax.print.attribute.PrintServiceAttribute;
* @see javax.print.attribute.standard.PrinterState
* @see javax.print.attribute.standard.PrinterStateReason
* @see javax.print.attribute.standard.Severity
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -77,7 +77,7 @@ public final class PrinterStateReasons
/**
* Constructs an empty <code>PrinterStateReasons</code> attribute.
- */
+ */
public PrinterStateReasons()
{
super();
@@ -86,10 +86,10 @@ public final class PrinterStateReasons
/**
* Constructs an empty <code>PrinterStateReasons</code> attribute
* with the given initial capacity and load factor.
- *
+ *
* @param initialCapacity the intial capacity.
* @param loadFactor the load factor of the underlying HashMap.
- *
+ *
* @throws IllegalArgumentException if initialCapacity &lt; 0
* @throws IllegalArgumentException if initialCapacity or loadFactor &lt; 0
*/
@@ -101,9 +101,9 @@ public final class PrinterStateReasons
/**
* Constructs an empty <code>PrinterStateReasons</code> attribute
* with the given initial capacity and the default load factor.
- *
+ *
* @param initialCapacity the intial capacity.
- *
+ *
* @throws IllegalArgumentException if initialCapacity &lt; 0
*/
public PrinterStateReasons(int initialCapacity)
@@ -114,13 +114,13 @@ public final class PrinterStateReasons
/**
* Constructs a <code>PrinterStateReasons</code> attribute
* with the given content of the map.
- *
- * @param map the map for the initial values with the same
+ *
+ * @param map the map for the initial values with the same
* <code>PrinterStateReason</code> to <code>Severity</code> mappings.
- *
+ *
* @throws NullPointerException if map or any key/value is <code>null</code>.
- * @throws ClassCastException if values of map are not of type
- * <code>PrinterStateReason</code> and keys are not of type
+ * @throws ClassCastException if values of map are not of type
+ * <code>PrinterStateReason</code> and keys are not of type
* <code>Severity</code>.
*/
public PrinterStateReasons(Map<PrinterStateReason,Severity> map)
@@ -135,7 +135,7 @@ public final class PrinterStateReasons
/**
* Constructs an unmodifiable view of the contained printer state reasons
* associated with the given severity level.
- *
+ *
* @param severity the severity level for the constructed set.
* @return The set of printer state reasons.
*/
@@ -143,7 +143,7 @@ public final class PrinterStateReasons
{
if (severity == null)
throw new NullPointerException("severity is null");
-
+
HashSet set = new HashSet();
Iterator it = entrySet().iterator();
while (it.hasNext())
@@ -152,35 +152,35 @@ public final class PrinterStateReasons
if (entry.getValue().equals(severity))
set.add(entry.getKey());
}
-
+
return Collections.unmodifiableSet(set);
}
-
+
/**
* Puts the given reason object associated with the given severity object
* into the set.
- *
+ *
* @param reason the reason of type <code>PrinterStateReason</code>.
* @param severity the severity of the reason of type <code>Severity</code>.
- *
- * @return The previously associated severity of the reason or
+ *
+ * @return The previously associated severity of the reason or
* <code>null</code> if the reason object was not in the map before.
- *
+ *
* @throws NullPointerException if any of the values is <code>null</code>.
- * @throws ClassCastException if reason is not a
- * <code>PrinterStateReason</code> and severity is not a
+ * @throws ClassCastException if reason is not a
+ * <code>PrinterStateReason</code> and severity is not a
* <code>Severity</code> instance.
*/
public Severity put(PrinterStateReason reason,Severity severity)
{
if (reason == null)
- throw new NullPointerException("reason is null");
+ throw new NullPointerException("reason is null");
if (severity == null)
throw new NullPointerException("severity is null");
-
+
return super.put(reason, severity);
- }
-
+ }
+
/**
* Returns category of this class.
*
diff --git a/javax/print/attribute/standard/PrinterURI.java b/javax/print/attribute/standard/PrinterURI.java
index 017e6b85a..8127a4901 100644
--- a/javax/print/attribute/standard/PrinterURI.java
+++ b/javax/print/attribute/standard/PrinterURI.java
@@ -45,16 +45,16 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.URISyntax;
/**
- * The <code>PrinterURI</code> attribute provides the URI of a printer.
+ * The <code>PrinterURI</code> attribute provides the URI of a printer.
* <p>
- * The URI identifies the printer against all the other print services
- * available. This attribute is used to direct a print service request
+ * The URI identifies the printer against all the other print services
+ * available. This attribute is used to direct a print service request
* to this specific printer.
- * </p>
+ * </p>
* <p>
* <b>IPP Compatibility:</b> PrinterURI is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,7 +65,7 @@ public final class PrinterURI extends URISyntax
/**
* Constructs a <code>PrinterURI</code> object.
- *
+ *
* @param uri the URI of the print service.
* @throws NullPointerException if the given uri is null.
*/
@@ -73,13 +73,13 @@ public final class PrinterURI extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/QueuedJobCount.java b/javax/print/attribute/standard/QueuedJobCount.java
index d024b3dcc..90d4d4b1a 100644
--- a/javax/print/attribute/standard/QueuedJobCount.java
+++ b/javax/print/attribute/standard/QueuedJobCount.java
@@ -1,4 +1,4 @@
-/* QueuedJobCount.java --
+/* QueuedJobCount.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,22 +42,22 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The <code>QueuedJobCount</code> printing attribute reports
+ * The <code>QueuedJobCount</code> printing attribute reports
* the number of jobs currently in the queue. These are jobs
* that are in 'pending', 'processing', 'pending-held' or
- * 'processing-stopped' state.
+ * 'processing-stopped' state.
* <p>
* <b>IPP Compatibility:</b> QueuedJobCount is an IPP 1.1 attribute.
* </p>
* @see javax.print.attribute.standard.JobState
- *
+ *
* @author Michael Koch
*/
public final class QueuedJobCount extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = 7499723077864047742L;
-
+
/**
* Creates a <code>QueuedJobCount</code> object.
*
@@ -72,13 +72,13 @@ public final class QueuedJobCount extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
index 9d2354bd6..2d47c77c3 100644
--- a/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
+++ b/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
@@ -42,14 +42,14 @@ import javax.print.attribute.EnumSyntax;
/**
- * The <code>ReferenceUriSchemesSupported</code> attribute provides
+ * The <code>ReferenceUriSchemesSupported</code> attribute provides
* the supported URI schemes (e.g. ftp) which are supported by the
* printer service to be used as uri reference for document data.
* <p>
- * <b>IPP Compatibility:</b> ReferenceUriSchemesSupported is an IPP 1.1
+ * <b>IPP Compatibility:</b> ReferenceUriSchemesSupported is an IPP 1.1
* attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -63,59 +63,59 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
*/
public static final ReferenceUriSchemesSupported FTP =
new ReferenceUriSchemesSupported(0);
-
+
/**
* The hyper text transfer protocol (HTTP).
*/
public static final ReferenceUriSchemesSupported HTTP =
new ReferenceUriSchemesSupported(1);
-
+
/**
* The secure hyper text transfer protocol (HTTPS).
*/
public static final ReferenceUriSchemesSupported HTTPS =
new ReferenceUriSchemesSupported(2);
-
+
/**
* The gopher protocol.
*/
public static final ReferenceUriSchemesSupported GOPHER =
new ReferenceUriSchemesSupported(3);
-
+
/**
* The USENET news - RFC 1738.
*/
public static final ReferenceUriSchemesSupported NEWS =
new ReferenceUriSchemesSupported(4);
-
+
/**
* The network news transfer protocol (NNTP) - RFC 1738.
*/
public static final ReferenceUriSchemesSupported NNTP =
new ReferenceUriSchemesSupported(5);
-
+
/**
* The wide area information server protocol (WAIS) - RFC 4156.
*/
public static final ReferenceUriSchemesSupported WAIS =
new ReferenceUriSchemesSupported(6);
-
+
/**
* A filename specific to the host.
*/
public static final ReferenceUriSchemesSupported FILE =
new ReferenceUriSchemesSupported(7);
- private static final String[] stringTable = { "ftp", "http", "https",
- "gopher", "news", "nntp",
+ private static final String[] stringTable = { "ftp", "http", "https",
+ "gopher", "news", "nntp",
"wais", "file" };
- private static final ReferenceUriSchemesSupported[] enumValueTable =
+ private static final ReferenceUriSchemesSupported[] enumValueTable =
{ FTP, HTTP, HTTPS, GOPHER, NEWS, NNTP, WAIS, FILE };
/**
* Constructs a <code>ReferenceUriSchemeSupported</code> object.
- *
+ *
* @param value the enum value.
*/
protected ReferenceUriSchemesSupported(int value)
@@ -142,7 +142,7 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
{
return "reference-uri-schemes-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/RequestingUserName.java b/javax/print/attribute/standard/RequestingUserName.java
index b7b85abbd..52a13a8c0 100644
--- a/javax/print/attribute/standard/RequestingUserName.java
+++ b/javax/print/attribute/standard/RequestingUserName.java
@@ -1,4 +1,4 @@
-/* RequestingUserName.java --
+/* RequestingUserName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The <code>RequestingUserName</code> attribute provides the name of
+ * The <code>RequestingUserName</code> attribute provides the name of
* the user which requests the printing of the given job.
* <p>
* <b>IPP Compatibility:</b> RequestingUserName is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class RequestingUserName extends TextSyntax
@@ -77,7 +77,7 @@ public final class RequestingUserName extends TextSyntax
*
* @param obj the object to test
*
- * @return <code>true</code> if both objects are equal,
+ * @return <code>true</code> if both objects are equal,
* <code>false</code> otherwise.
*/
public boolean equals(Object obj)
diff --git a/javax/print/attribute/standard/Severity.java b/javax/print/attribute/standard/Severity.java
index 019c8c6fc..ee0e6a17f 100644
--- a/javax/print/attribute/standard/Severity.java
+++ b/javax/print/attribute/standard/Severity.java
@@ -45,16 +45,16 @@ import javax.print.attribute.EnumSyntax;
* The <code>Severity</code> printing attribute specifies the severity
* for a <code>PrinterStateReason</code> attribute.
* <p>
- * This attribute does not appear in the attribute set of a print service
- * itself. Its used inside the <code>PrinterStateReasons</code>
- * attribute which contains <code>PrinterStateReason</code> objects which
+ * This attribute does not appear in the attribute set of a print service
+ * itself. Its used inside the <code>PrinterStateReasons</code>
+ * attribute which contains <code>PrinterStateReason</code> objects which
* informs about the print service's status.
* </p>
* <p>
* <b>IPP Compatibility:</b> Severity is not an IPP attribute on its own
* but used in the PrinterStateReason attribute to indicate the severity.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -67,21 +67,21 @@ public final class Severity extends EnumSyntax
* Indicates that the reason is a report.
*/
public static final Severity REPORT = new Severity(0);
-
+
/**
* Indicates that the reason is a warning.
*/
public static final Severity WARNING = new Severity(1);
-
+
/**
* Indicates that the reason is an error.
*/
public static final Severity ERROR = new Severity(2);
private static final String[] stringTable = { "report", "warning", "error" };
-
+
private static final Severity[] enumValueTable = { REPORT, WARNING, ERROR };
-
+
/**
* Constructs a <code>Severity</code> object.
*
@@ -111,7 +111,7 @@ public final class Severity extends EnumSyntax
{
return "severity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/SheetCollate.java b/javax/print/attribute/standard/SheetCollate.java
index 886b8d6c9..008a6e845 100644
--- a/javax/print/attribute/standard/SheetCollate.java
+++ b/javax/print/attribute/standard/SheetCollate.java
@@ -45,7 +45,7 @@ import javax.print.attribute.PrintRequestAttribute;
/**
- * The <code>SheetCollate</code> printing attribute specifies
+ * The <code>SheetCollate</code> printing attribute specifies
* whether or not the sheets of each copy in a print job have to be
* in sequence.
* <p>
@@ -58,7 +58,7 @@ import javax.print.attribute.PrintRequestAttribute;
* <p>
* <b>IPP Compatibility:</b> SheetCollate is not an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -71,7 +71,7 @@ public final class SheetCollate extends EnumSyntax
* The sheets of the different copies are uncollated.
*/
public static final SheetCollate UNCOLLATED = new SheetCollate(0);
-
+
/**
* The sheets of the different copies are collated.
*/
@@ -79,10 +79,10 @@ public final class SheetCollate extends EnumSyntax
private static final String[] stringTable = { "uncollated", "collated" };
-
- private static final SheetCollate[] enumValueTable = { UNCOLLATED,
- COLLATED };
-
+
+ private static final SheetCollate[] enumValueTable = { UNCOLLATED,
+ COLLATED };
+
/**
* Creates a <code>SheetCollate</code> object.
*
@@ -112,7 +112,7 @@ public final class SheetCollate extends EnumSyntax
{
return "sheet-collate";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/attribute/standard/Sides.java b/javax/print/attribute/standard/Sides.java
index 02fe4a1e5..ca2a60fc7 100644
--- a/javax/print/attribute/standard/Sides.java
+++ b/javax/print/attribute/standard/Sides.java
@@ -46,11 +46,11 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The <code>Sides</code> printing attribute specifies how consecutive
- * printing pages are arranged on the media sheet.
+ * printing pages are arranged on the media sheet.
* <p>
* <b>IPP Compatibility:</b> Sides is an IPP 1.1 attribute.
* </p>
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,41 +59,41 @@ public final class Sides extends EnumSyntax
{
private static final long serialVersionUID = -6890309414893262822L;
- /**
- * Specifies that each page should be printed on one sheet.
+ /**
+ * Specifies that each page should be printed on one sheet.
*/
public static final Sides ONE_SIDED = new Sides(0);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the long edge.
*/
public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the short edge.
*/
public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2);
-
- /**
- * An alias constant for "two sided long edge".
+
+ /**
+ * An alias constant for "two sided long edge".
*/
public static final Sides DUPLEX = new Sides(1);
-
- /**
- * An alias constant for "two sided short edge".
+
+ /**
+ * An alias constant for "two sided short edge".
*/
public static final Sides TUMBLE = new Sides(2);
- private static final String[] stringTable = { "one-sided",
+ private static final String[] stringTable = { "one-sided",
"two-sided-long-edge",
"two-sided-short-edge" };
-
- private static final Sides[] enumValueTable = { ONE_SIDED,
- TWO_SIDED_LONG_EDGE,
- TWO_SIDED_SHORT_EDGE };
-
+
+ private static final Sides[] enumValueTable = { ONE_SIDED,
+ TWO_SIDED_LONG_EDGE,
+ TWO_SIDED_SHORT_EDGE };
+
/**
* Creates a <code>Sides</code> object.
*
@@ -123,7 +123,7 @@ public final class Sides extends EnumSyntax
{
return "sides";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/javax/print/event/PrintEvent.java b/javax/print/event/PrintEvent.java
index d44c20668..4eaedceb6 100644
--- a/javax/print/event/PrintEvent.java
+++ b/javax/print/event/PrintEvent.java
@@ -1,4 +1,4 @@
-/* PrintEvent.java --
+/* PrintEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,14 +42,14 @@ import java.util.EventObject;
/**
* Superclass of all events in the Java Print Service API.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintEvent extends EventObject
{
/**
* Constructs a <code>PrintEvent</code> object.
- *
+ *
* @param source the source of this event
*/
public PrintEvent(Object source)
@@ -59,7 +59,7 @@ public class PrintEvent extends EventObject
/**
* Returns a string representation of this object.
- *
+ *
* @return The string representation
*/
public String toString()
diff --git a/javax/print/event/PrintJobAdapter.java b/javax/print/event/PrintJobAdapter.java
index 9229d195f..e8e71008e 100644
--- a/javax/print/event/PrintJobAdapter.java
+++ b/javax/print/event/PrintJobAdapter.java
@@ -1,4 +1,4 @@
-/* PrintJobAdapter.java --
+/* PrintJobAdapter.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@ package javax.print.event;
* classes. The methods in this class do nothing by default. Subclasses may
* only implement the methods for the {@link javax.print.event.PrintJobEvent}s
* they are interested in.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class PrintJobAdapter
@@ -56,13 +56,13 @@ public abstract class PrintJobAdapter
{
// Do nothing here.
}
-
+
/**
* Called to notify the client that all data has been successfully transferred
* to the print service.
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printDataTransferCompleted(PrintJobEvent event)
{
@@ -70,10 +70,10 @@ public abstract class PrintJobAdapter
}
/**
- * Called to notify the client that a print job was canceled.
+ * Called to notify the client that a print job was canceled.
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobCanceled(PrintJobEvent event)
{
@@ -83,8 +83,8 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a print job was successfully completed.
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobCompleted(PrintJobEvent event)
{
@@ -95,8 +95,8 @@ public abstract class PrintJobAdapter
* Called to notify the client that a print job failed to complete
* successfully.
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobFailed(PrintJobEvent event)
{
@@ -106,8 +106,8 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that no more job events will be send.
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobNoMoreEvents(PrintJobEvent event)
{
@@ -116,11 +116,11 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a problem occured during printing.
- * This event signals problems a user might be able to fix
+ * This event signals problems a user might be able to fix
* (e.g. out of paper or paper jam).
* <p>The default implementation does nothing.</p>
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobRequiresAttention(PrintJobEvent event)
{
diff --git a/javax/print/event/PrintJobAttributeEvent.java b/javax/print/event/PrintJobAttributeEvent.java
index d401ab151..dd242e8e6 100644
--- a/javax/print/event/PrintJobAttributeEvent.java
+++ b/javax/print/event/PrintJobAttributeEvent.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeEvent.java --
+/* PrintJobAttributeEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,21 +42,21 @@ import javax.print.attribute.PrintJobAttributeSet;
/**
- * <code>PrintJobAttributeEvent</code>s are generated by a
+ * <code>PrintJobAttributeEvent</code>s are generated by a
* <code>PrintService</code> to inform registered listeners that attributes
* associated with a {@link javax.print.DocPrintJob} instance have changed.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobAttributeEvent extends PrintEvent
{
private static final long serialVersionUID = -6534469883874742101L;
-
+
private PrintJobAttributeSet attributes;
-
+
/**
* Constructs a <code>PrintJobAttributeEvent</code> object.
- *
+ *
* @param source the source of this event
* @param attributes the attribute changes being reported
*/
@@ -69,7 +69,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the print job generating this event.
- *
+ *
* @return The print job.
*/
public DocPrintJob getPrintJob()
@@ -79,7 +79,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the attributes that changed and their new values.
- *
+ *
* @return The changed attributes.
*/
public PrintJobAttributeSet getAttributes()
diff --git a/javax/print/event/PrintJobAttributeListener.java b/javax/print/event/PrintJobAttributeListener.java
index 9f96d267e..bd2ea2695 100644
--- a/javax/print/event/PrintJobAttributeListener.java
+++ b/javax/print/event/PrintJobAttributeListener.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeListener.java --
+/* PrintJobAttributeListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,16 +40,16 @@ package javax.print.event;
/**
* Listener interface to receive attribute changes from a print job.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.DocPrintJob} instance.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeListener
{
/**
* Notifies the listener of an attribute change.
- *
+ *
* @param event the event
*/
void attributeUpdate(PrintJobAttributeEvent event);
diff --git a/javax/print/event/PrintJobEvent.java b/javax/print/event/PrintJobEvent.java
index cc15f9753..db885648c 100644
--- a/javax/print/event/PrintJobEvent.java
+++ b/javax/print/event/PrintJobEvent.java
@@ -1,4 +1,4 @@
-/* PrintEvent.java --
+/* PrintEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,40 +44,40 @@ import javax.print.DocPrintJob;
* <code>PrintJobEvent</code>s are generated by a print job during
* print job processing to inform registered listeners about the state
* of processing.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobEvent extends PrintEvent
{
private static final long serialVersionUID = -1711656903622072997L;
-
+
/** Indicates that the data transfer to the print service has completed. */
public static final int DATA_TRANSFER_COMPLETE = 106;
-
+
/** Indicates that the print job was canceled. */
public static final int JOB_CANCELED = 101;
-
+
/** Indicates that the print job was completed (=printed). */
public static final int JOB_COMPLETE = 102;
-
+
/** Indicates that the print job failed to complete. */
public static final int JOB_FAILED = 103;
-
+
/** Indicates that no more job events will be send.*/
public static final int NO_MORE_EVENTS = 105;
-
- /**
+
+ /**
* Indicates a situation where human intervention might be needed.
* E.g. the printer run out of paper or a paper jam occured.
*/
public static final int REQUIRES_ATTENTION = 104;
-
+
/** The reason (one of the defined constants). */
private int reason;
-
+
/**
* Constructs a <code>PrintJobEvent</code> object.
- *
+ *
* @param source the source generating this event
* @param reason the reason for this event
*/
@@ -89,7 +89,7 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the reason for this event.
- *
+ *
* @return The reason.
*/
public int getPrintEventType()
@@ -99,9 +99,9 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the print job that generated this event.
- *
+ *
* @return The print job.
- */
+ */
public DocPrintJob getPrintJob()
{
return (DocPrintJob) getSource();
diff --git a/javax/print/event/PrintJobListener.java b/javax/print/event/PrintJobListener.java
index 96c6d411d..8ac1a0143 100644
--- a/javax/print/event/PrintJobListener.java
+++ b/javax/print/event/PrintJobListener.java
@@ -1,4 +1,4 @@
-/* PrintJobListener.java --
+/* PrintJobListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,56 +40,56 @@ package javax.print.event;
/**
* Listener interface to receive processing events from a print job.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.DocPrintJob} instance.
- *
+ *
* @see javax.print.event.PrintJobAdapter
- *
- * @author Michael Koch (konqueror@gmx.de)
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobListener
{
/**
* Notifies the listener that all data has been successfully transferred
* to the print service.
- *
+ *
* @param event the event
*/
void printDataTransferCompleted(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job got canceled.
- *
+ *
* @param event the event
*/
void printJobCanceled(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job has completed.
- *
+ *
* @param event the event
*/
void printJobCompleted(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job has failed to complete.
- *
+ *
* @param event the event.
*/
void printJobFailed(PrintJobEvent event);
-
+
/**
* Notifies the listener that no more events will be delivered.
- *
+ *
* @param event the event
*/
void printJobNoMoreEvents(PrintJobEvent event);
-
+
/**
* Notifies the listener that a problem occured during printing.
- * This event signals problems a user might be able to fix
+ * This event signals problems a user might be able to fix
* (e.g. out of paper or paper jam).
- *
+ *
* @param event the event
*/
void printJobRequiresAttention(PrintJobEvent event);
diff --git a/javax/print/event/PrintServiceAttributeEvent.java b/javax/print/event/PrintServiceAttributeEvent.java
index a41e213ff..665db52bf 100644
--- a/javax/print/event/PrintServiceAttributeEvent.java
+++ b/javax/print/event/PrintServiceAttributeEvent.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeEvent.java --
+/* PrintServiceAttributeEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,19 @@ import javax.print.attribute.PrintServiceAttributeSet;
/**
- * <code>PrintServiceAttributeEvent</code>s are generated by a
+ * <code>PrintServiceAttributeEvent</code>s are generated by a
* <code>PrintService</code> to inform registered listeners that
* its associated attributes have changed.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintServiceAttributeEvent extends PrintEvent
{
private PrintServiceAttributeSet attributes;
-
+
/**
* Constructs a <code>PrintServiceAttributeEvent</code> object.
- *
+ *
* @param source the source of this event
* @param attributes the attribute changes being reported
*/
@@ -67,7 +67,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the print service that generated this event.
- *
+ *
* @return The print service.
*/
public PrintService getPrintService()
@@ -77,7 +77,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the changed attributes this event reports.
- *
+ *
* @return The changed attributes.
*/
public PrintServiceAttributeSet getAttributes()
diff --git a/javax/print/event/PrintServiceAttributeListener.java b/javax/print/event/PrintServiceAttributeListener.java
index b46bf3b69..596d1675e 100644
--- a/javax/print/event/PrintServiceAttributeListener.java
+++ b/javax/print/event/PrintServiceAttributeListener.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeListener.java --
+/* PrintServiceAttributeListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,16 +40,16 @@ package javax.print.event;
/**
* Listener interface to receive attribute changes from a print service.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.PrintService} instance.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttributeListener
{
/**
* Notifies the listener that some attributes have changed.
- *
+ *
* @param event the event
*/
void attributeUpdate(PrintServiceAttributeEvent event);
diff --git a/javax/rmi/CORBA/ClassDesc.java b/javax/rmi/CORBA/ClassDesc.java
index c8b38ead0..831cdbe48 100644
--- a/javax/rmi/CORBA/ClassDesc.java
+++ b/javax/rmi/CORBA/ClassDesc.java
@@ -49,8 +49,8 @@ import java.io.Serializable;
*/
public class ClassDesc implements Serializable
{
- /**
- * Use serialVersionUID (V1.4) for interoperability.
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
*/
private static final long serialVersionUID = -3477057297839810709L;
@@ -58,7 +58,7 @@ public class ClassDesc implements Serializable
* The class repository Id.
*/
String repid;
-
+
/**
* Space separeted list of URL's from where the code can be downloaded.
*/
diff --git a/javax/rmi/CORBA/PortableRemoteObjectDelegate.java b/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
index f376bedfe..b8f1d06da 100644
--- a/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
+++ b/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
@@ -45,11 +45,11 @@ import java.rmi.RemoteException;
/**
* A delegate, implementing the functionality, provided by the
* {@link PortableRemoteObject}.
- *
+ *
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.PortableRemoteObjectClass" to the name of the alternative
* class that must implement {@link PortableRemoteObjectDelegate}.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface PortableRemoteObjectDelegate
@@ -66,12 +66,12 @@ public interface PortableRemoteObjectDelegate
* {@link Stub#connect} if it is a stub or by associating its tie with an ORB
* if it is an implementation object.
* </p>
- *
+ *
* @param target the target object that may be either an RMI/IDL stub or an
* exported RMI/IDL implementation object
* @param source the source object may also be either an RMI/IDL stub or an
* exported RMI/IDL implementation object.
- *
+ *
* @throws RemoteException if the target is already connected to another ORB.
*/
void connect(Remote target, Remote source)
@@ -83,9 +83,9 @@ public interface PortableRemoteObjectDelegate
* non-daemon thread that prevents jre from terminating until all objects are
* unexported. Also, such object cannot be collected by garbage collector.
* This is usually impemented via {@link Util#unexportObject}
- *
+ *
* @param obj the object to export.
- *
+ *
* @throws RemoteException
*/
void exportObject(Remote obj)
@@ -95,13 +95,13 @@ public interface PortableRemoteObjectDelegate
* Narrows the passed object to conform to the given interface or IDL type.
* This method may return different instance and cannot be replaced by the
* direct cast.
- *
+ *
* @param narrowFrom an object to narrow.
* @param narrowTo a type to that the object must be narrowed.
- *
+ *
* @return On success, an object of type narrowTo or null, if narrowFrom =
* null.
- *
+ *
* @throws ClassCastException if no narrowing is possible.
*/
Object narrow(Object narrowFrom, Class narrowTo)
@@ -112,10 +112,10 @@ public interface PortableRemoteObjectDelegate
* used to access that server object (target). If the target is connected, the
* returned stub is also connected to the same ORB. If the target is
* unconnected, the returned stub is unconnected.
- *
+ *
* @param obj a server side object.
* @return a stub object that can be used to access that server object.
- *
+ *
* @throws NoSuchObjectException if a stub cannot be located for the given
* target.
*/
@@ -126,9 +126,9 @@ public interface PortableRemoteObjectDelegate
* Deregister a currently exported server object from the ORB runtimes. The
* object to becomes available for garbage collection. This is usually
* impemented via {@link Util#unexportObject}
- *
+ *
* @param obj the object to unexport.
- *
+ *
* @throws NoSuchObjectException if the passed object is not currently
* exported.
*/
diff --git a/javax/rmi/CORBA/Stub.java b/javax/rmi/CORBA/Stub.java
index 190b10dad..d9b45f77b 100644
--- a/javax/rmi/CORBA/Stub.java
+++ b/javax/rmi/CORBA/Stub.java
@@ -60,10 +60,10 @@ import org.omg.CORBA_2_3.portable.ObjectImpl;
* "javax.rmi.CORBA.StubClass" to the name of the alternative class that must
* implement {@link StubDelegate}. Hence Stub contains two delegates, one for
* Stub-related operations and another inherited from the ObjectImpl.
- *
+ *
* @specnote GNU Classpath uses separate delegate per each Stub. The delegate
* holds information about the ORB and other data, specific for the each Stub.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class Stub
@@ -118,7 +118,7 @@ public abstract class Stub
/**
* Get the string representation of this Stub.
- *
+ *
* @return the CORBA IOR reference.
*/
public String toString()
@@ -149,13 +149,13 @@ public abstract class Stub
* It is frequently easier to call {@link PortableRemoteObject#connect} rather
* than this method.
* </p>
- *
+ *
* @param orb the ORB where the Stub must be connected.
- *
+ *
* @throws RemoteException if the stub is already connected to some other ORB.
* If the stub is already connected to the ORB that was passed as parameter,
* the method returns without action.
- *
+ *
* @throws BAD_PARAM if the name of this stub does not match the stub name
* pattern, "_*_Stub" or if the Tie class, "_*Impl_Tie", does not exists or an
* instance of this class cannot be instantiated.
@@ -200,4 +200,4 @@ public abstract class Stub
delegate.writeObject(this, output);
}
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/StubDelegate.java b/javax/rmi/CORBA/StubDelegate.java
index cdf76e841..a191eb446 100644
--- a/javax/rmi/CORBA/StubDelegate.java
+++ b/javax/rmi/CORBA/StubDelegate.java
@@ -51,7 +51,7 @@ import java.rmi.RemoteException;
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.StubClass" to the name of the alternative class that must
* implement StubDelegate.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface StubDelegate
@@ -64,9 +64,9 @@ public interface StubDelegate
* It is frequently easier to call {@link PortableRemoteObject#connect} rather
* than this method.
* </p>
- *
+ *
* @param orb the ORB where the Stub must be connected.
- *
+ *
* @throws RemoteException if the stub is already connected to some other ORB.
* If the stub is already connected to the ORB that was passed as parameter,
* the method returns without action.
@@ -100,4 +100,4 @@ public interface StubDelegate
* Get the string representation of this stub.
*/
String toString(Stub self);
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/Tie.java b/javax/rmi/CORBA/Tie.java
index af9ddd3d4..90a82511e 100644
--- a/javax/rmi/CORBA/Tie.java
+++ b/javax/rmi/CORBA/Tie.java
@@ -61,7 +61,7 @@ import org.omg.CORBA.portable.InvokeHandler;
* <code>rmic</code> compiler using <code>-poa</code> key. Ties can be also
* derived from {@link org.omg.CORBA_2_3.portable.ObjectImpl}.
* </p>
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface Tie
@@ -69,7 +69,7 @@ public interface Tie
{
/**
* Get the invocation target, where all method calls should be delegated.
- *
+ *
* @return the object, implementing methods, defined in the interface being
* served by this Tie.
*/
@@ -77,12 +77,12 @@ public interface Tie
/**
* Set the invocation target, where all method calls should be delegated.
- *
+ *
* @param target the object, implementing methods, defined in the interface
* being served by this Tie. The code, produced by a typical rmic compiler
* usually requires the target to be an instance of the implementation from
* that the Tie was generated.
- *
+ *
* @throws ClassCastException if the passed parameter is not an instance of
* the implementation from that the Tie was generated.
*/
@@ -90,7 +90,7 @@ public interface Tie
/**
* Get the ORB to that this Tie is connected.
- *
+ *
* @see org.omg.PortableServer.Servant#_orb
*/
ORB orb();
@@ -102,7 +102,7 @@ public interface Tie
/**
* Get the object that delegates calls to this tie.
- *
+ *
* @see org.omg.PortableServer.Servant#_this_object()
*/
org.omg.CORBA.Object thisObject();
@@ -113,13 +113,13 @@ public interface Tie
* again. The ties that are not derived from
* {@link org.omg.PortableServer.Servant} deactivate themselves by
* {@link ORB#disconnect}.
- *
+ *
* @throws NoSuchObjectException if there are no objects served by this Tie,
* or if the these objects are already deactivated.
- *
+ *
* @see org.omg.PortableServer.POAOperations#deactivate_object
*/
void deactivate()
throws NoSuchObjectException;
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/Util.java b/javax/rmi/CORBA/Util.java
index 04b6f63a6..9c6df60a8 100644
--- a/javax/rmi/CORBA/Util.java
+++ b/javax/rmi/CORBA/Util.java
@@ -77,7 +77,7 @@ import javax.transaction.TransactionRolledbackException;
* The functionality is forwarded to the enclosed UtilDelegate. This delegate
* can be altered by setting the system property "javax.rmi.CORBA.UtilClass" to
* the name of the alternative class that must implement {@link UtilDelegate}.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class Util
@@ -119,7 +119,7 @@ public class Util
/**
* Get the value handler that Serializes Java objects to and from CDR (GIOP)
* streams.
- *
+ *
* When using the default Util implementation, the class of the returned
* handler can be altered by setting by setting the system property
* "javax.rmi.CORBA.ValueHandlerClass" to the name of the alternative class
@@ -143,7 +143,7 @@ public class Util
* pair has not been previously registered using {@link #registerTarget},
* this method tries to locate a tie class by the name pattern. If this
* succeeds, the tie-target pair is also registered.
- *
+ *
* @return the Tie.
*/
public static Tie getTie(Remote target)
@@ -154,10 +154,10 @@ public class Util
/**
* Checks if the given stub is local. The implementation it delegates call to
* {@link ObjectImpl#_is_local().
- *
+ *
* @param stub a stub to check.
* @return true if the stub is local, false otherwise.
- *
+ *
* @throws RemoteException if the {@link ObjectImpl#_is_local()} throws a
* {@link org.omg.CORBA.SystemException}.
*/
@@ -171,7 +171,7 @@ public class Util
* Load the class. The method uses class loaders from the call stact first. If
* this fails, the further behaviour depends on the System Property
* "java.rmi.server.useCodebaseOnly" with default value "false".
- *
+ *
* <ul>
* <li>If remoteCodebase is non-null and useCodebaseOnly is "false" then call
* java.rmi.server.RMIClassLoader.loadClass (remoteCodebase, className)</li>
@@ -180,12 +180,12 @@ public class Util
* <li>If a class is still not successfully loaded and the loader != null
* then try Class.forName(className, false, loader). </li>
* </ul>
- *
+ *
* @param className the name of the class.
* @param remoteCodebase the codebase.
* @param loader the class loader.
* @return the loaded class.
- *
+ *
* @throws ClassNotFoundException of the class cannot be loaded.
*/
public static Class loadClass(String className, String remoteCodebase,
@@ -331,14 +331,14 @@ public class Util
* <td>{@link UnexpectedException}</td>
* </tr>
* </table>
- *
+ *
* @param exception an exception that was thrown on a server side implementation.
- *
+ *
* @return the corresponding RemoteException unless it is a RuntimeException.
- *
+ *
* @throws RuntimeException the passed exception if it is an instance of
* RuntimeException.
- *
+ *
* @specnote It is the same behavior, as in Suns implementations 1.4.0-1.5.0.
*/
public static RemoteException wrapException(Throwable exception)
@@ -354,10 +354,10 @@ public class Util
* {@link #writeRemoteObject}. The written data contains discriminator,
* defining, that was written. Another method that writes the same content is
* {@link org.omg.CORBA_2_3.portable.OutputStream#write_abstract_interface(java.lang.Object)}.
- *
+ *
* @param output a stream to write to, must be
* {@link org.omg.CORBA_2_3.portable.OutputStream}.
- *
+ *
* @param object an object to write, must be CORBA object, Remote
*/
public static void writeAbstractObject(OutputStream output,
@@ -375,7 +375,7 @@ public class Util
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
- *
+ *
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
@@ -384,9 +384,9 @@ public class Util
{
delegate.writeAny(output, object);
}
-
+
/**
- * Read Any from the input stream.
+ * Read Any from the input stream.
*/
public static java.lang.Object readAny(InputStream input)
{
@@ -403,7 +403,7 @@ public class Util
* used in write_value(..) method group in
* {@link org.omg.CORBA_2_3.portable.OutputStream} and also may be called
* directly from generated Stubs and Ties.
- *
+ *
* @param output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param object an object to write.
@@ -413,4 +413,4 @@ public class Util
{
delegate.writeRemoteObject(output, object);
}
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/UtilDelegate.java b/javax/rmi/CORBA/UtilDelegate.java
index 79d740e7b..2454f5348 100644
--- a/javax/rmi/CORBA/UtilDelegate.java
+++ b/javax/rmi/CORBA/UtilDelegate.java
@@ -71,11 +71,11 @@ import javax.transaction.TransactionRolledbackException;
/**
* A delegate, implementing the functionality, provided by the {@link Util}.
- *
+ *
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.UtilClass" to the name of the alternative class that must
* implement this interface.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface UtilDelegate
@@ -195,7 +195,7 @@ public interface UtilDelegate
/**
* Get the Tie that handles invocations on the given target. The target/Tie
* pair must be previously registered using {@link #registerTarget}.
- *
+ *
* @return the Tie, or null if no such is known.
*/
Tie getTie(Remote target);
@@ -242,14 +242,14 @@ public interface UtilDelegate
* <td>{@link UnexpectedException}</td>
* </tr>
* </table>
- *
+ *
* @param e an exception that was thrown on a server side implementation.
- *
+ *
* @return the corresponding RemoteException unless it is a RuntimeException.
- *
+ *
* @throws RuntimeException the passed exception if it is an instance of
* RuntimeException.
- *
+ *
* @specnote It is the same behavior, as in Suns implementations 1.4.0-1.5.0.
*/
RemoteException wrapException(Throwable orig);
@@ -263,7 +263,7 @@ public interface UtilDelegate
* possible. This method is used in write_value(..) method group in
* {@link org.omg.CORBA_2_3.portable.OutputStream} and also may be called
* directly from generated Stubs and Ties.
- *
+ *
* @param output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param obj an object to write.
@@ -278,10 +278,10 @@ public interface UtilDelegate
* {@link #writeRemoteObject}. The written data contains discriminator,
* defining, that was written. Another method that writes the same content is
* {@link org.omg.CORBA_2_3.portable.OutputStream#write_abstract_interface(java.lang.Object)}.
- *
+ *
* @param output a stream to write to, must be
* {@link org.omg.CORBA_2_3.portable.OutputStream}.
- *
+ *
* @param object an object to write, must be CORBA object, Remote
*/
void writeAbstractObject(OutputStream output, Object object);
@@ -295,7 +295,7 @@ public interface UtilDelegate
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
- *
+ *
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
@@ -303,8 +303,8 @@ public interface UtilDelegate
void writeAny(OutputStream output, Object object);
/**
- * Read Any from the input stream.
+ * Read Any from the input stream.
*/
Object readAny(InputStream input);
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/ValueHandler.java b/javax/rmi/CORBA/ValueHandler.java
index acc44aa2f..cc855b808 100644
--- a/javax/rmi/CORBA/ValueHandler.java
+++ b/javax/rmi/CORBA/ValueHandler.java
@@ -51,32 +51,32 @@ import org.omg.SendingContext.RunTime;
* of the value handler is returned by {@link Util#createValueHandler} and can
* be altered by setting the system property "javax.rmi.CORBA.ValueHandlerClass"
* to the name of the alternative class that must implement ValueHandler.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface ValueHandler
{
/**
* Get CORBA repository Id for the given java class.
- *
+ *
* The syntax of the repository ID is the initial ?RMI:?, followed by the Java
* class name, followed by name, followed by a hash code string, followed
* optionally by a serialization version UID string.
- *
+ *
* For Java identifiers that contain illegal OMG IDL identifier characters
* such as ?$?, any such illegal characters are replaced by ?\U? followed by
* the 4 hexadecimal characters (in upper case) representing the Unicode
* value.
- *
+ *
* @param clz a class for that the repository Id is required.
- *
+ *
* @return the class repository id.
*/
String getRMIRepositoryID(Class clz);
/**
* Returns the CodeBase for this ValueHandler.
- *
+ *
* @return the codebase.
*/
RunTime getRunTimeCodeBase();
@@ -86,7 +86,7 @@ public interface ValueHandler
* content to the stream. Such classes implement either {@link Streamable}
* (default marshalling, generated by IDL-to-java compiler) or
* {@link CustomMarshal} (the user-programmed marshalling).
- *
+ *
* @param clz the class being checked.
* @return true if the class supports custom or default marshalling, false
* otherwise.
@@ -97,14 +97,14 @@ public interface ValueHandler
* Read value from the CORBA input stream in the case when the value is not
* Streamable or CustomMarshall'ed. The fields of the class being written will
* be accessed using reflection.
- *
+ *
* @param in a CORBA stream to read.
* @param offset the current position in the input stream.
* @param clz the type of value being read.
* @param repositoryID the repository Id of the value being read.
* @param sender the sending context that should provide data about the
* message originator.
- *
+ *
* @return the object, extracted from the stream.
*/
Serializable readValue(InputStream in, int offset, Class clz,
@@ -113,18 +113,18 @@ public interface ValueHandler
/**
* When the value provides the writeReplace method, the result of this method
* is written. Otherwise, the value itself is written.
- *
+ *
* @param value the value that should be written to the stream.
- *
+ *
* @return the value that will be actually written to the stream.
*/
Serializable writeReplace(Serializable value);
/**
* Write value to CORBA output stream using java senmatics.
- *
+ *
* @param out a stream to write into.
* @param value a java object to write.
*/
void writeValue(OutputStream out, Serializable value);
-} \ No newline at end of file
+}
diff --git a/javax/rmi/CORBA/ValueHandlerMultiFormat.java b/javax/rmi/CORBA/ValueHandlerMultiFormat.java
index 4db65c1db..6bc6ad0af 100644
--- a/javax/rmi/CORBA/ValueHandlerMultiFormat.java
+++ b/javax/rmi/CORBA/ValueHandlerMultiFormat.java
@@ -46,9 +46,9 @@ import java.io.Serializable;
* This interface extends the previous ValueHandler, supporting various stream
* format versions. The {@link ValueHandler} can be casted into this interface
* to access additional features.
- *
+ *
* @since 1.5
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface ValueHandlerMultiFormat
@@ -58,7 +58,7 @@ public interface ValueHandlerMultiFormat
* Get the maximal supported version for the value types, supported by
* this value handler. The versions are integer numbers, the currently valid
* values being 1 and 2.
- *
+ *
* These two versions differ in how the additional data, stored by the
* writeObject method, are encoded.
* <ul>
@@ -72,7 +72,7 @@ public interface ValueHandlerMultiFormat
* </ul>
* As the version number is part of the value type record, there is no need
* to the format control during the reading.
- *
+ *
* @return the maximal supported version.
*/
byte getMaximumStreamFormatVersion();
@@ -80,13 +80,13 @@ public interface ValueHandlerMultiFormat
/**
* Write the value type to the output stream using the given format version.
* The older method {@link ValueHandler#writeValue} always uses the version 1.
- *
+ *
* @param output the stream, where the value should be written, must implement
* {@link ValueOutputStream}.
* @param value the value that should be written.
* @param version the version of the format that must be used to write the
* value.
- *
+ *
* @throws BAD_PARAM if the version number is less than 1 or greater than the
* maximal supported version.
*/
diff --git a/javax/rmi/PortableRemoteObject.java b/javax/rmi/PortableRemoteObject.java
index db2ea6b80..aa7e530ec 100644
--- a/javax/rmi/PortableRemoteObject.java
+++ b/javax/rmi/PortableRemoteObject.java
@@ -69,7 +69,7 @@ import javax.rmi.CORBA.Util;
* the alternative class that must implement
* {@link PortableRemoteObjectDelegate}.
* </p>
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class PortableRemoteObject
@@ -81,7 +81,7 @@ public class PortableRemoteObject
/**
* The protected constructor calls {@link exportObject} (this).
- *
+ *
* @throws RemoteException if the exportObject(this) throws one.
*/
protected PortableRemoteObject()
@@ -96,14 +96,14 @@ public class PortableRemoteObject
* communication using the same communications runtime as for the passed
* <code>a_source</code> parameter. The a_target is connected to the same
* ORB (and, if applicable, to the same {@link POA}) as the a_source.
- *
+ *
* @param target the target to connect to ORB, must be an instance of either
* {@link ObjectImpl} (Stubs and old-style ties) or {@link Tie}.
- *
+ *
* @param source the object, providing the connection information, must be
* an instance of either {@link ObjectImpl} (Stubs and old-style ties) or
* {@link Servant} (the next-generation Ties supporting {@link POA}).
- *
+ *
* @throws RemoteException if the target is already connected to another ORB.
*/
public static void connect(Remote target, Remote source)
@@ -122,9 +122,9 @@ public class PortableRemoteObject
* This method only creates a tie object and caches it for future usage. The
* created tie does not have a delegate or an ORB associated.
* </p>
- *
+ *
* @param object the object to export.
- *
+ *
* @throws RemoteException if export fails due any reason.
*/
public static void exportObject(Remote object)
@@ -160,16 +160,16 @@ public class PortableRemoteObject
* <li>A {@link Tie} can be narrowed into Remote, representing the
* implementation for this Tie (if one is set).</li>
* </ul>
- *
+ *
* @param object the object like CORBA Object, Stub or Remote that must be
* narrowed to the given interface.
- *
+ *
* @param narrowToInstaceOf the class of the interface to that the object must
* be narrowed.
- *
+ *
* @return On success, an object of type narrowTo or null, if narrowFrom =
* null.
- *
+ *
* @throws ClassCastException if no narrowing is possible.
*/
public static Object narrow(Object object, Class narrowToInstaceOf)
@@ -183,7 +183,7 @@ public class PortableRemoteObject
* Takes a server implementation object (name pattern *imp) and returns a stub
* object that can be used to access that server object (target), name
* (pattern _*_Stub).
- *
+ *
* The returned stub is not connected to any ORB and must be explicitly
* connected using {@link #connect}.
* </p>
@@ -191,16 +191,16 @@ public class PortableRemoteObject
* The method signature prevents it from returning stubs that does not
* implement Remote (ClassCastException will be thrown).
* </p>
- *
+ *
* @param target a server side object implementation.
* @return a stub object that can be used to access that server object.
- *
+ *
* @throws NoSuchObjectException if a stub class cannot be located by supposed
* name pattern, or an instance of stub fails to be instantiated.
- *
+ *
* @throws ClassCastException if the stub class can be located, but it does
* not inherit from Remote.
- *
+ *
* @throws BAD_PARAM if the name of the passed class does not match the
* implementation name pattern (does not end by 'Impl').
*/
@@ -214,9 +214,9 @@ public class PortableRemoteObject
* Deregister a currently exported server object from the ORB runtimes. The
* object to becomes available for garbage collection. This is usually
* impemented via {@link Util#unexportObject}
- *
+ *
* @param object the object to unexport.
- *
+ *
* @throws NoSuchObjectException if the passed object is not currently
* exported.
*/
@@ -225,4 +225,4 @@ public class PortableRemoteObject
{
delegate.unexportObject(object);
}
-} \ No newline at end of file
+}
diff --git a/javax/rmi/ssl/SslRMIClientSocketFactory.java b/javax/rmi/ssl/SslRMIClientSocketFactory.java
index 3a4c6cebe..122264514 100644
--- a/javax/rmi/ssl/SslRMIClientSocketFactory.java
+++ b/javax/rmi/ssl/SslRMIClientSocketFactory.java
@@ -1,4 +1,4 @@
-/* SslRMIClientSocketFactory.java --
+/* SslRMIClientSocketFactory.java --
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -52,19 +52,19 @@ import java.rmi.server.RMIClientSocketFactory;
* This class implements an RMIClientSocketFactory for SSL sockets.
* it uses the default SSLClientSocketFactory.
*
- * This class can optionally use the following system properties, if set:
+ * This class can optionally use the following system properties, if set:
* <code>javax.rmi.ssl.client.enabledCipherSuites</code>
* <code>javax.rmi.ssl.client.enabledProtocols</code>
*
* These properties will specify a list of SSL/TLS cipher suites and protocols,
- * respectively, to enable on the created sockets.
+ * respectively, to enable on the created sockets.
*
* Both properties should consist of a comma-separated list.
*
* @author Sven de Marothy
* @since 1.5
*/
-public class SslRMIClientSocketFactory
+public class SslRMIClientSocketFactory
implements RMIClientSocketFactory, Serializable
{
@@ -78,11 +78,11 @@ public class SslRMIClientSocketFactory
/**
* The SSL Socket factory.
*/
- private static SSLSocketFactory socketFactory =
+ private static SSLSocketFactory socketFactory =
(SSLSocketFactory)SSLSocketFactory.getDefault();
/**
- * Creates a new SslRMIClientSocketFactory
+ * Creates a new SslRMIClientSocketFactory
*/
public SslRMIClientSocketFactory()
{
@@ -95,11 +95,11 @@ public class SslRMIClientSocketFactory
String o;
try
{
- o = System.getProperty(p);
+ o = System.getProperty(p);
}
catch(SecurityException se)
{
- return null;
+ return null;
}
if (o == null)
@@ -116,7 +116,7 @@ public class SslRMIClientSocketFactory
}
/**
- * Creates an SSLSocket on a given port
+ * Creates an SSLSocket on a given port
*
* @throws IOException if an error occurs on socket creation.
*/
@@ -133,13 +133,13 @@ public class SslRMIClientSocketFactory
/**
* Compare two SslRMIServerSocketFactor instances
- */
+ */
public boolean equals(Object obj)
{
if( !(obj instanceof SslRMIClientSocketFactory) )
return false;
SslRMIClientSocketFactory s = (SslRMIClientSocketFactory)obj;
-
+
if(!SslRMIServerSocketFactory.
cmpStrArray(enabledCipherSuites, s.enabledCipherSuites))
return false;
@@ -159,10 +159,10 @@ public class SslRMIClientSocketFactory
int hash = 0;
if( enabledCipherSuites != null )
for(int i = 0; i < enabledCipherSuites.length; i++ )
- hash = hash ^ enabledCipherSuites[i].hashCode();
+ hash = hash ^ enabledCipherSuites[i].hashCode();
if( enabledProtocols != null )
for(int i = 0; i < enabledProtocols.length; i++ )
- hash = hash ^ enabledProtocols[i].hashCode();
+ hash = hash ^ enabledProtocols[i].hashCode();
return hash;
}
}
diff --git a/javax/rmi/ssl/SslRMIServerSocketFactory.java b/javax/rmi/ssl/SslRMIServerSocketFactory.java
index 56f6de11c..d5c5398be 100644
--- a/javax/rmi/ssl/SslRMIServerSocketFactory.java
+++ b/javax/rmi/ssl/SslRMIServerSocketFactory.java
@@ -1,4 +1,4 @@
-/* SslRMIServerSocketFactory.java --
+/* SslRMIServerSocketFactory.java --
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -60,7 +60,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
/**
* The SSL ServerSocket factory.
*/
- private static SSLServerSocketFactory socketFactory =
+ private static SSLServerSocketFactory socketFactory =
(SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
/**
@@ -80,33 +80,33 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
*
* @param enabledCipherSuites - the cypher suites to enable
* or <code>null</code> for the defauls.
- * @param enabledCipherSuites - the protocols to enable,
+ * @param enabledCipherSuites - the protocols to enable,
* or <code>null</code> for the defauls.
* @param needClientAuth - specify client authorization requirement.
* @throws IllegalArgumentException if any of the ciphers or protocols
* specified are not available.
*/
- public SslRMIServerSocketFactory(String[] enabledCipherSuites,
- String[] enabledProtocols,
- boolean needClientAuth)
+ public SslRMIServerSocketFactory(String[] enabledCipherSuites,
+ String[] enabledProtocols,
+ boolean needClientAuth)
{
this.enabledCipherSuites = enabledCipherSuites;
- this.enabledProtocols = enabledProtocols;
+ this.enabledProtocols = enabledProtocols;
this.needClientAuth = needClientAuth;
- try
+ try
{
- if( enabledProtocols != null || enabledCipherSuites != null )
- createServerSocket( 0 ); // stupid way to test the parameters
+ if( enabledProtocols != null || enabledCipherSuites != null )
+ createServerSocket( 0 ); // stupid way to test the parameters
}
catch(IOException e)
{
- // Can this happen? FIXME.
- throw new IllegalArgumentException();
+ // Can this happen? FIXME.
+ throw new IllegalArgumentException();
}
}
/**
- * Creates an SSLServerSocket on a given port
+ * Creates an SSLServerSocket on a given port
*
* @throws IOException if an error occurs on socket creation.
*/
@@ -124,7 +124,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
/**
* Compare two SslRMIServerSocketFactor instances
- */
+ */
public boolean equals(Object obj)
{
if( !(obj instanceof SslRMIServerSocketFactory) )
@@ -132,7 +132,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
SslRMIServerSocketFactory s = (SslRMIServerSocketFactory)obj;
if( needClientAuth != s.needClientAuth )
return false;
-
+
if(!cmpStrArray(enabledCipherSuites, s.enabledCipherSuites))
return false;
@@ -152,23 +152,23 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
if( a != null )
{
- if( a.length != b.length )
- return false;
- for( int i = 0; i < a.length; i++ )
- if(!a[i].equals(b[i]))
- return false;
+ if( a.length != b.length )
+ return false;
+ for( int i = 0; i < a.length; i++ )
+ if(!a[i].equals(b[i]))
+ return false;
}
return true;
}
/**
- * Returns the enabled cipher suites, or <code>null</code>
+ * Returns the enabled cipher suites, or <code>null</code>
* if the defaults are to be used.
* @returns a string array of cipher suite names
*/
public String[] getEnabledCipherSuites()
- {
+ {
if( enabledCipherSuites == null )
return null;
return (String[])enabledCipherSuites.clone();
@@ -203,11 +203,11 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
int hash = 0;
if( enabledCipherSuites != null )
for(int i = 0; i < enabledCipherSuites.length; i++ )
- hash = hash ^ enabledCipherSuites[i].hashCode();
+ hash = hash ^ enabledCipherSuites[i].hashCode();
if( enabledProtocols != null )
for(int i = 0; i < enabledProtocols.length; i++ )
- hash = hash ^ enabledProtocols[i].hashCode();
+ hash = hash ^ enabledProtocols[i].hashCode();
hash = ( needClientAuth ) ? (hash^0xFFFF) : hash;
return hash;
}
-} \ No newline at end of file
+}
diff --git a/javax/security/auth/Subject.java b/javax/security/auth/Subject.java
index 038363458..e9b0804a5 100644
--- a/javax/security/auth/Subject.java
+++ b/javax/security/auth/Subject.java
@@ -236,7 +236,7 @@ public final class Subject implements Serializable
*/
public static Object doAsPrivileged (final Subject subject,
final PrivilegedExceptionAction action,
- AccessControlContext acc)
+ AccessControlContext acc)
throws PrivilegedActionException
{
final SecurityManager sm = System.getSecurityManager();
diff --git a/javax/security/auth/callback/ChoiceCallback.java b/javax/security/auth/callback/ChoiceCallback.java
index ec12a6685..30bddd559 100644
--- a/javax/security/auth/callback/ChoiceCallback.java
+++ b/javax/security/auth/callback/ChoiceCallback.java
@@ -108,7 +108,7 @@ public class ChoiceCallback implements Callback, Serializable
* <code>choices</code>.
*/
public ChoiceCallback(String prompt, String[] choices, int defaultChoice,
- boolean multipleSelectionsAllowed)
+ boolean multipleSelectionsAllowed)
{
super();
@@ -116,7 +116,7 @@ public class ChoiceCallback implements Callback, Serializable
setChoices(choices);
if (defaultChoice < 0 || defaultChoice >= this.choices.length)
{
- throw new IllegalArgumentException("default choice is out of bounds");
+ throw new IllegalArgumentException("default choice is out of bounds");
}
this.defaultChoice = defaultChoice;
this.multipleSelectionsAllowed = multipleSelectionsAllowed;
@@ -192,7 +192,7 @@ public class ChoiceCallback implements Callback, Serializable
{
if (!multipleSelectionsAllowed)
{
- throw new UnsupportedOperationException("not allowed");
+ throw new UnsupportedOperationException("not allowed");
}
this.selections = selections;
@@ -213,7 +213,7 @@ public class ChoiceCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -222,14 +222,14 @@ public class ChoiceCallback implements Callback, Serializable
{
if (choices == null || choices.length == 0)
{
- throw new IllegalArgumentException("invalid choices");
+ throw new IllegalArgumentException("invalid choices");
}
for (int i = 0; i < choices.length; i++)
{
- if (choices[i] == null || choices[i].length() == 0)
- {
- throw new IllegalArgumentException("invalid choice at index #"+i);
- }
+ if (choices[i] == null || choices[i].length() == 0)
+ {
+ throw new IllegalArgumentException("invalid choice at index #"+i);
+ }
}
this.choices = choices;
}
diff --git a/javax/security/auth/callback/ConfirmationCallback.java b/javax/security/auth/callback/ConfirmationCallback.java
index 938b30173..8f89bf5fa 100644
--- a/javax/security/auth/callback/ConfirmationCallback.java
+++ b/javax/security/auth/callback/ConfirmationCallback.java
@@ -260,7 +260,7 @@ public class ConfirmationCallback implements Callback, Serializable
* not correspond to one of the options in <code>optionType</code>.
*/
public ConfirmationCallback(String prompt, int messageType, int optionType,
- int defaultOption)
+ int defaultOption)
{
super();
@@ -297,7 +297,7 @@ public class ConfirmationCallback implements Callback, Serializable
* <code>options</code>.
*/
public ConfirmationCallback(String prompt, int messageType, String[] options,
- int defaultOption)
+ int defaultOption)
{
super();
@@ -352,7 +352,7 @@ public class ConfirmationCallback implements Callback, Serializable
{
if (options != null)
{
- return UNSPECIFIED_OPTION;
+ return UNSPECIFIED_OPTION;
}
return optionType;
}
@@ -399,11 +399,11 @@ public class ConfirmationCallback implements Callback, Serializable
{
if (options != null)
{
- setOptions(options, selection);
+ setOptions(options, selection);
}
else
{
- setOptionType(optionType, selection);
+ setOptionType(optionType, selection);
}
}
@@ -440,35 +440,35 @@ public class ConfirmationCallback implements Callback, Serializable
switch (optionType)
{
case YES_NO_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case YES:
- case NO: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case YES:
+ case NO: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
case YES_NO_CANCEL_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case YES:
- case NO:
- case CANCEL: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case YES:
+ case NO:
+ case CANCEL: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
case OK_CANCEL_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case OK:
- case CANCEL: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case OK:
+ case CANCEL: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
default:
- throw new IllegalArgumentException("illegal option type");
+ throw new IllegalArgumentException("illegal option type");
}
}
@@ -477,18 +477,18 @@ public class ConfirmationCallback implements Callback, Serializable
{
if ((selectedOption < 0) || (selectedOption > options.length - 1))
{
- throw new IllegalArgumentException("invalid selection");
+ throw new IllegalArgumentException("invalid selection");
}
if ((options == null) || (options.length == 0))
{
- throw new IllegalArgumentException("options is null or empty");
+ throw new IllegalArgumentException("options is null or empty");
}
for (int i = 0; i < options.length; i++)
{
- if ((options[i] == null) || (options[i].length() == 0))
- {
- throw new IllegalArgumentException("options[" + i + "] is null or empty");
- }
+ if ((options[i] == null) || (options[i].length() == 0))
+ {
+ throw new IllegalArgumentException("options[" + i + "] is null or empty");
+ }
}
this.options = options;
this.selection = selectedOption;
@@ -498,7 +498,7 @@ public class ConfirmationCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("prompt is null or empty");
+ throw new IllegalArgumentException("prompt is null or empty");
}
this.prompt = prompt;
}
diff --git a/javax/security/auth/callback/NameCallback.java b/javax/security/auth/callback/NameCallback.java
index 0e281d1cc..4b8bf1c69 100644
--- a/javax/security/auth/callback/NameCallback.java
+++ b/javax/security/auth/callback/NameCallback.java
@@ -162,7 +162,7 @@ public class NameCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -171,7 +171,7 @@ public class NameCallback implements Callback, Serializable
{
if ((defaultName == null) || (defaultName.length() == 0))
{
- throw new IllegalArgumentException("invalid default name");
+ throw new IllegalArgumentException("invalid default name");
}
this.defaultName = defaultName;
}
diff --git a/javax/security/auth/callback/PasswordCallback.java b/javax/security/auth/callback/PasswordCallback.java
index e8c862aca..6309aacba 100644
--- a/javax/security/auth/callback/PasswordCallback.java
+++ b/javax/security/auth/callback/PasswordCallback.java
@@ -149,11 +149,11 @@ public class PasswordCallback implements Callback, Serializable
{
if (inputPassword != null)
{
- for (int i = 0; i < inputPassword.length; i++)
- {
- inputPassword[i] = '\0';
- }
- inputPassword = null;
+ for (int i = 0; i < inputPassword.length; i++)
+ {
+ inputPassword[i] = '\0';
+ }
+ inputPassword = null;
}
}
@@ -161,7 +161,7 @@ public class PasswordCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
diff --git a/javax/security/auth/callback/TextInputCallback.java b/javax/security/auth/callback/TextInputCallback.java
index 98b0ae3c1..1fe071327 100644
--- a/javax/security/auth/callback/TextInputCallback.java
+++ b/javax/security/auth/callback/TextInputCallback.java
@@ -161,7 +161,7 @@ public class TextInputCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -170,7 +170,7 @@ public class TextInputCallback implements Callback, Serializable
{
if ((defaultText == null) || (defaultText.length() == 0))
{
- throw new IllegalArgumentException("invalid default text");
+ throw new IllegalArgumentException("invalid default text");
}
this.defaultText = defaultText;
}
diff --git a/javax/security/auth/callback/TextOutputCallback.java b/javax/security/auth/callback/TextOutputCallback.java
index 197cece5f..0ab3a040f 100644
--- a/javax/security/auth/callback/TextOutputCallback.java
+++ b/javax/security/auth/callback/TextOutputCallback.java
@@ -133,7 +133,7 @@ public class TextOutputCallback implements Callback, Serializable
{
if ((message == null) || (message.length() == 0))
{
- throw new IllegalArgumentException("invalid message");
+ throw new IllegalArgumentException("invalid message");
}
this.message = message;
}
diff --git a/javax/security/auth/kerberos/DelegationPermission.java b/javax/security/auth/kerberos/DelegationPermission.java
index 33e1f9893..42bb9c73c 100644
--- a/javax/security/auth/kerberos/DelegationPermission.java
+++ b/javax/security/auth/kerberos/DelegationPermission.java
@@ -64,12 +64,12 @@ public final class DelegationPermission
/**
* Create a new instance with the given name and actions.
- *
+ *
* The name consists of two parts: first the subordinate
* service principal, then the target service principal.
* Each principal is surrounded by quotes; the two are separated
* by a space.
- *
+ *
* @param name the name
* @param actions the actions; this is ignored
*/
diff --git a/javax/security/auth/kerberos/KerberosKey.java b/javax/security/auth/kerberos/KerberosKey.java
index 3372a162f..e5735fbd5 100644
--- a/javax/security/auth/kerberos/KerberosKey.java
+++ b/javax/security/auth/kerberos/KerberosKey.java
@@ -50,7 +50,7 @@ import javax.security.auth.Destroyable;
* This class represents a Kerberos key. See the Kerberos
* authentication RFC for more information:
* <a href="http://www.ietf.org/rfc/rfc1510.txt">RFC 1510</a>.
- *
+ *
* @since 1.4
*/
public class KerberosKey
diff --git a/javax/security/auth/kerberos/KerberosPrincipal.java b/javax/security/auth/kerberos/KerberosPrincipal.java
index d52b5cf9e..4ba767226 100644
--- a/javax/security/auth/kerberos/KerberosPrincipal.java
+++ b/javax/security/auth/kerberos/KerberosPrincipal.java
@@ -107,7 +107,7 @@ public final class KerberosPrincipal
* Create a new instance with the given name and type. The name is
* parsed according to the rules in the RFC. If there is no realm,
* then the local realm is used instead.
- *
+ *
* @param name the principal's name
* @param type the principal's type
*/
@@ -202,6 +202,6 @@ public final class KerberosPrincipal
public String toString()
{
// This is what came to mind.
- return name + ":" + type;
+ return name + ":" + type;
}
}
diff --git a/javax/security/auth/kerberos/ServicePermission.java b/javax/security/auth/kerberos/ServicePermission.java
index 452f8e966..4412ea459 100644
--- a/javax/security/auth/kerberos/ServicePermission.java
+++ b/javax/security/auth/kerberos/ServicePermission.java
@@ -48,7 +48,7 @@ import java.util.Vector;
* This represents permission to access to a Kerberos service principal.
* See the Kerberos authentication RFC for more information:
* <a href="http://www.ietf.org/rfc/rfc1510.txt">RFC 1510</a>.
- *
+ *
* @since 1.4
*/
public final class ServicePermission
@@ -64,15 +64,15 @@ public final class ServicePermission
/**
* Create a new service permission with the indicated name and actions.
- *
+ *
* The name is the name of the kerberos principal for the service.
- *
+ *
* The actions are a comma-separated list of strings. The recognized
* actions are "initiate" and "accept". The "initiate" action means
* that the holder of the permission can access the service. The
* "accept" action means that the holder of the permission can operate
* as this service.
- *
+ *
* @param name the prinicpal's name
* @param action the allowed actions
*/
diff --git a/javax/security/auth/login/AccountNotFoundException.java b/javax/security/auth/login/AccountNotFoundException.java
index a052fbf68..e74ca0163 100644
--- a/javax/security/auth/login/AccountNotFoundException.java
+++ b/javax/security/auth/login/AccountNotFoundException.java
@@ -40,7 +40,7 @@ package javax.security.auth.login;
/**
* An exception indicating that an account was not found.
- * @since 1.5
+ * @since 1.5
*/
public class AccountNotFoundException extends AccountException
{
diff --git a/javax/security/auth/login/AppConfigurationEntry.java b/javax/security/auth/login/AppConfigurationEntry.java
index 3c8b64d4c..044c9105b 100644
--- a/javax/security/auth/login/AppConfigurationEntry.java
+++ b/javax/security/auth/login/AppConfigurationEntry.java
@@ -97,7 +97,7 @@ public class AppConfigurationEntry
public String toString()
{
-
+
return loginModuleName + "\t"
+ String.valueOf(controlFlag) + "\t"
+ String.valueOf(options);
diff --git a/javax/security/auth/login/LoginContext.java b/javax/security/auth/login/LoginContext.java
index 17641e65b..b2e4b97b6 100644
--- a/javax/security/auth/login/LoginContext.java
+++ b/javax/security/auth/login/LoginContext.java
@@ -230,9 +230,9 @@ public class LoginContext
Exception cause = null;
try
{
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class c = Class.forName(entry.getLoginModuleName(), true, cl);
- module = (LoginModule) c.newInstance();
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ Class c = Class.forName(entry.getLoginModuleName(), true, cl);
+ module = (LoginModule) c.newInstance();
}
catch (ClassNotFoundException cnfe)
{
diff --git a/javax/security/sasl/Sasl.java b/javax/security/sasl/Sasl.java
index 52210d971..402ad6ede 100644
--- a/javax/security/sasl/Sasl.java
+++ b/javax/security/sasl/Sasl.java
@@ -1,4 +1,4 @@
-/* Sasl.java --
+/* Sasl.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/sound/midi/ControllerEventListener.java b/javax/sound/midi/ControllerEventListener.java
index eb075b32f..8349de057 100644
--- a/javax/sound/midi/ControllerEventListener.java
+++ b/javax/sound/midi/ControllerEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI controller events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/javax/sound/midi/Instrument.java b/javax/sound/midi/Instrument.java
index f2821db64..a8626faeb 100644
--- a/javax/sound/midi/Instrument.java
+++ b/javax/sound/midi/Instrument.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The abstract base class for all MIDI instruments.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -49,29 +49,29 @@ public abstract class Instrument extends SoundbankResource
{
// The instrument patch.
private Patch patch;
-
+
/**
* Create a new Instrument.
- *
+ *
* @param soundbank the Soundbank containing the instrument.
* @param patch the patch for this instrument
* @param name the name of this instrument
* @param dataClass the class used to represent sample data for this instrument
*/
- protected Instrument(Soundbank soundbank, Patch patch,
+ protected Instrument(Soundbank soundbank, Patch patch,
String name, Class<?> dataClass)
{
super(soundbank, name, dataClass);
- this.patch = patch;
+ this.patch = patch;
}
-
+
/**
* Get the patch for this instrument.
- *
+ *
* @return the patch for this instrument
*/
public Patch getPatch()
{
return patch;
- }
+ }
}
diff --git a/javax/sound/midi/InvalidMidiDataException.java b/javax/sound/midi/InvalidMidiDataException.java
index 9f5690069..6325b04e0 100644
--- a/javax/sound/midi/InvalidMidiDataException.java
+++ b/javax/sound/midi/InvalidMidiDataException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when we encounter bad MIDI data.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class InvalidMidiDataException extends Exception
{
private static final long serialVersionUID = 2780771756789932067L;
-
+
/**
* Create an InvalidMidiDataException object.
*/
@@ -59,7 +59,7 @@ public class InvalidMidiDataException extends Exception
/**
* Create an InvalidMidiDataException object.
- *
+ *
* @param s the exception message string
*/
public InvalidMidiDataException(String s)
diff --git a/javax/sound/midi/MetaEventListener.java b/javax/sound/midi/MetaEventListener.java
index dd7b8a24b..28a7a9de4 100644
--- a/javax/sound/midi/MetaEventListener.java
+++ b/javax/sound/midi/MetaEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI meta events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/javax/sound/midi/MetaMessage.java b/javax/sound/midi/MetaMessage.java
index f7c4fb424..4d43975c3 100644
--- a/javax/sound/midi/MetaMessage.java
+++ b/javax/sound/midi/MetaMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A system exclusive MIDI message.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public class MetaMessage extends MidiMessage
* The META status code. Only valid for MIDI files, not the wire protocol.
*/
public static final int META = 0xFF;
-
+
// The length of the variable length data length encoding.
private int lengthLength = 0;
-
+
/**
* Create a default valid meta message.
- *
+ *
* The official specs don't specify what message is to be
- * created. For now, we create a zero length meta message
+ * created. For now, we create a zero length meta message
* with a type code of 0.
*/
public MetaMessage()
@@ -71,7 +71,7 @@ public class MetaMessage extends MidiMessage
data[3] = (byte) 0; // Length
lengthLength = 1;
}
-
+
/**
* Create a MetaMessage object.
* @param data a complete system exclusive message
@@ -84,10 +84,10 @@ public class MetaMessage extends MidiMessage
while ((data[index++] & 0x80) > 0)
lengthLength++;
}
-
+
/**
* Set the meta message.
- *
+ *
* @param type the meta type byte (< 128)
* @param data the message data
* @param length the length of the message data
@@ -101,9 +101,9 @@ public class MetaMessage extends MidiMessage
+ Integer.toHexString(type)
+ " must be less than 128");
- // For a nice description of how variable length values are handled,
+ // For a nice description of how variable length values are handled,
// see http://www.borg.com/~jglatt/tech/midifile.htm
-
+
// First compute the length of the length value
lengthLength = 0;
int lengthValue = length;
@@ -111,13 +111,13 @@ public class MetaMessage extends MidiMessage
lengthValue = lengthValue >> 7;
lengthLength++;
} while (lengthValue > 0);
-
+
// Now allocate our data array
this.length = 2 + lengthLength + length;
this.data = new byte[this.length];
this.data[0] = (byte) META;
this.data[1] = (byte) type;
-
+
// Now compute the length representation
long buffer = length & 0x7F;
while ((length >>= 7) > 0)
@@ -125,7 +125,7 @@ public class MetaMessage extends MidiMessage
buffer <<= 8;
buffer |= ((length & 0x7F) | 0x80);
}
-
+
// Now store the variable length length value
int index = 2;
do
@@ -135,25 +135,25 @@ public class MetaMessage extends MidiMessage
break;
buffer >>= 8;
} while (true);
-
+
// Now copy the real data.
System.arraycopy(data, 0, this.data, index, length);
}
-
+
/**
* Get the meta message type.
- *
+ *
* @return the meta message type
*/
public int getType()
{
return data[1];
}
-
+
/**
* Get the data for this message, not including the status,
* type, or length information.
- *
+ *
* @return the message data, not including status, type or lenght info
*/
public byte[] getData()
@@ -163,7 +163,7 @@ public class MetaMessage extends MidiMessage
System.arraycopy(data, 2 + lengthLength, result, 0, dataLength);
return result;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
@@ -171,6 +171,6 @@ public class MetaMessage extends MidiMessage
{
byte message[] = new byte[length];
System.arraycopy(data, 0, message, 0, length);
- return new MetaMessage(message);
+ return new MetaMessage(message);
}
}
diff --git a/javax/sound/midi/MidiChannel.java b/javax/sound/midi/MidiChannel.java
index fe3b5111a..36da51d0f 100644
--- a/javax/sound/midi/MidiChannel.java
+++ b/javax/sound/midi/MidiChannel.java
@@ -40,22 +40,22 @@ package javax.sound.midi;
/**
* A MIDI channel.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
*/
public interface MidiChannel
{
-
+
/**
* Start playing a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param velocity the velocity at which the key was pressed
*/
public void noteOn(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
*
@@ -63,173 +63,173 @@ public interface MidiChannel
* @param velocity the volcity at which the ket was released
*/
public void noteOff(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
- *
+ *
* @param noteNumber the MIDI note number
*/
public void noteOff(int noteNumber);
-
+
/**
* Change in a key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param pressure the key pressure
*/
public void setPolyPressure(int noteNumber, int pressure);
-
+
/**
* Get the key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @return the key pressure
*/
public int getPolyPressure(int noteNumber);
-
+
/**
* Set the key pressure for the channel.
- *
+ *
* @param pressure the key pressure
*/
public void setChannelPressure(int pressure);
-
+
/**
* Get the key pressure for the channel.
- *
+ *
* @return the key pressure
*/
public int getChannelPressure();
-
+
/**
* Set a change in a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @param value the new value (0 to 127)
*/
public void controlChange(int controller, int value);
-
+
/**
* Get a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @return the controller's value (0 to 127)
*/
public int getController(int controller);
-
+
/**
* Change the patch for this channel.
- *
+ *
* @param program the patch number to switch to (0 to 127)
*/
public void programChange(int program);
-
+
/**
* Change the bank and patch for this channel.
- *
+ *
* @param bank the bank to switch to (0 to 16383)
* @param program the patch to switch to (0 to 127)
*/
public void programChange(int bank, int program);
-
+
/**
* Get the current patch for this channel.
- *
+ *
* @return current patch (0 to 127)
*/
public int getProgram();
-
+
/**
* Change the pitch bend for this channel using a positive 14-bit value.
- *
+ *
* @param bend the new pitch bend value
*/
public void setPitchBend(int bend);
-
+
/**
* Get the pitch bend for this channel as a positive 14-bit value.
- *
+ *
* @return the current patch bend value
*/
public int getPitchBend();
-
+
/**
* Reset all MIDI controllers to their default values.
*/
public void resetAllControllers();
-
+
/**
* Stop playing all notes. Sound may not stop.
*/
public void allNotesOff();
-
+
/**
* Stop all sound.
*/
public void allSoundOff();
-
+
/**
* Set whether or not local controls are on or off. They are on by
* default.
- *
+ *
* @param on true to enable local controls, false to disable
* @return the new value
*/
public boolean localControl(boolean on);
-
+
/**
* Turns mono mode on or off.
- *
- * @param on true to enable mono mode, false to disable
+ *
+ * @param on true to enable mono mode, false to disable
*/
public void setMono(boolean on);
-
+
/**
* Get the current mono mode.
- *
+ *
* @return true if mono is enabled, false otherwise
*/
public boolean getMono();
-
+
/**
* Turns omni mode on or off.
- *
+ *
* @param on true to enable omni mode, false to disable
*/
public void setOmni(boolean on);
-
+
/**
* Get the current omni mode.
- *
+ *
* @return true if omni is enabled, false otherwise
*/
public boolean getOmni();
-
+
/**
* Turns mute mode on or off.
- *
+ *
* @param mute true to enable mute mode, false to disable
*/
public void setMute(boolean mute);
-
+
/**
* Get the current mute mode.
- *
+ *
* @return true if mute is enabled, false otherwise
*/
public boolean getMute();
-
+
/**
* Turns solo mode on or off. If any channels are soloed, then only those
* channels make sounds, otherwise all channels will make sound.
- *
+ *
* @param solo true to enable solo mode, false to disable
*/
public void setSolo(boolean solo);
-
+
/**
* Get the current solo mode.
- *
+ *
* @return true is solo is enabled, false otherwise.
*/
public boolean getSolo();
diff --git a/javax/sound/midi/MidiDevice.java b/javax/sound/midi/MidiDevice.java
index 387cceac2..7a0ca7f2b 100644
--- a/javax/sound/midi/MidiDevice.java
+++ b/javax/sound/midi/MidiDevice.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Interface for all MIDI devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ public interface MidiDevice
* @return the Info object describing this device
*/
public Info getDeviceInfo();
-
+
/**
* Open this MIDI device and allocate any system resource we need.
- *
+ *
* @throws MidiUnavailableException if we're not able to open for some reason
*/
public void open() throws MidiUnavailableException;
-
+
/**
* Close this MIDI device, and release any system resources we're using.
*/
public void close();
-
+
/**
* Returns true if this MIDI device is open and false otherwise.
- *
+ *
* @return true if this is open, false otherwise
*/
public boolean isOpen();
-
+
/**
* If this device supports time-stamps, then it will return the number
* of microseconds since this device has been open, and -1 otherwise.
- *
+ *
* @return -1 or the number of microseconds since this was opened
*/
public long getMicrosecondPosition();
-
+
/**
* The maximum number of MIDI IN connections we can get as Receivers,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Receivers we can get
*/
public int getMaxReceivers();
-
+
/**
* The maximum number of MIDI OUT connections we can get as Transmitters,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Transmitters we can get
*/
public int getMaxTransmitters();
-
+
/**
* Get a MIDI IN Receiver for this device.
- *
+ *
* @return a MIDI IN Receiver for this device
* @throws MidiUnavailableException if we can't get a Receiver
*/
public Receiver getReceiver() throws MidiUnavailableException;
-
+
/**
* Get a MIDI OUT Transmitter for this device.
- *
+ *
* @return a MIDI OUT Transmitter for this device
* @throws MidiUnavailableException if we can't get a Transmitter
*/
public Transmitter getTransmitter() throws MidiUnavailableException;
-
+
/**
* A MIDI device descriptor object.
- *
+ *
* @author green@redhat.com
*
*/
@@ -125,10 +125,10 @@ public interface MidiDevice
private String vendor;
private String description;
private String version;
-
+
/**
* Create an Info object for a MIDI device
- *
+ *
* @param name the device name
* @param vendor the vendor name
* @param description the device description
@@ -141,11 +141,11 @@ public interface MidiDevice
this.description = description;
this.version = version;
}
-
+
/**
* This equals method only returns true if this object
* is the same as obj.
- *
+ *
* @param obj the object we're comparing to
* @return true if this is the same object
* @see java.lang.Object#equals(java.lang.Object)
@@ -154,10 +154,10 @@ public interface MidiDevice
{
return super.equals(obj);
}
-
+
/**
* A hash code for this object.
- *
+ *
* @return the hash code for this object
* @see java.lang.Object#hashCode()
*/
@@ -165,50 +165,50 @@ public interface MidiDevice
{
return super.hashCode();
}
-
+
/**
* Get the device name.
- *
+ *
* @return the device name
*/
public final String getName()
{
return name;
}
-
+
/**
* Get the device vendor.
- *
+ *
* @return the device vendor
*/
public final String getVendor()
{
return vendor;
}
-
+
/**
* Get the device description
- *
+ *
* @return the device description
*/
public final String getDescription()
{
return description;
}
-
+
/**
* get the device version
- *
+ *
* @return the device version
*/
public final String getVersion()
{
return version;
}
-
+
/**
* Simple return the name of the device.
- *
+ *
* @return the device name
* @see java.lang.Object#toString()
*/
diff --git a/javax/sound/midi/MidiEvent.java b/javax/sound/midi/MidiEvent.java
index 3ca5c21ea..3b0072cfa 100644
--- a/javax/sound/midi/MidiEvent.java
+++ b/javax/sound/midi/MidiEvent.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* A MIDI event is the combination of a MIDI message and a timestamp specified
* in MIDI ticks.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,10 +50,10 @@ public class MidiEvent
{
private final MidiMessage message;
private long tick;
-
+
/**
* Create a MIDI event object from the given MIDI message and timestamp.
- *
+ *
* @param message the MidiMessage for this event
* @param tick the timestamp for this event
*/
@@ -62,30 +62,30 @@ public class MidiEvent
this.message = message;
this.tick = tick;
}
-
+
/**
* Get the MIDI message for this event.
- *
+ *
* @return the MidiMessage for this event
*/
public MidiMessage getMessage()
{
return message;
}
-
+
/**
* Set the timestemp for this event in MIDI ticks.
- *
+ *
* @param tick the timestamp
*/
public void setTick(long tick)
{
this.tick = tick;
}
-
+
/**
* Get the timestamp for this event in MIDI ticks.
- *
+ *
* @return the timestamp for this even in MIDI ticks
*/
public long getTick()
diff --git a/javax/sound/midi/MidiFileFormat.java b/javax/sound/midi/MidiFileFormat.java
index 79fa9fe29..73744523d 100644
--- a/javax/sound/midi/MidiFileFormat.java
+++ b/javax/sound/midi/MidiFileFormat.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Describe a MIDI file, including specifics about its type, length and timing.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,44 +48,44 @@ package javax.sound.midi;
public class MidiFileFormat
{
/**
- * The MIDI file type. This is either 0, 1 or 2.
- *
+ * The MIDI file type. This is either 0, 1 or 2.
+ *
* Type 0 files contain a single track and represents a single song
* performance.
* Type 1 may contain multiple tracks for a single song performance.
* Type 2 may contain multiple tracks, each representing a
* separate song performance.
- *
+ *
* See http://en.wikipedia.org/wiki/MIDI#MIDI_file_formats for more
* information.
*/
protected int type;
/**
- * The division type of the MIDI file.
+ * The division type of the MIDI file.
*/
protected float divisionType;
-
+
/**
* The timing resolution of the MIDI file.
*/
protected int resolution;
-
+
/**
- * The size of the MIDI file in bytes.
+ * The size of the MIDI file in bytes.
*/
protected int byteLength = UNKNOWN_LENGTH;
-
+
/**
- * The length of the MIDI file in microseconds.
+ * The length of the MIDI file in microseconds.
*/
protected long microsecondLength = UNKNOWN_LENGTH;
-
+
/**
* A special value indicating an unknown quantity.
*/
public static final int UNKNOWN_LENGTH = -1; // FIXME is this really -1?
-
+
/**
* Create a MidiFileFormat object from the given parameters.
*
@@ -95,8 +95,8 @@ public class MidiFileFormat
* @param bytes the MIDI file size in bytes
* @param microseconds the MIDI file length in microseconds
*/
- public MidiFileFormat(int type, float divisionType,
- int resolution, int bytes, long microseconds)
+ public MidiFileFormat(int type, float divisionType,
+ int resolution, int bytes, long microseconds)
{
this.type = type;
this.divisionType = divisionType;
@@ -104,41 +104,41 @@ public class MidiFileFormat
this.byteLength = bytes;
this.microsecondLength = microseconds;
}
-
+
/**
* Get the MIDI file type (0, 1, or 2).
- *
+ *
* @return the MIDI file type (0, 1, or 2)
*/
public int getType()
{
return type;
}
-
+
/**
* Get the file division type.
- *
+ *
* @return the file divison type
*/
public float getDivisionType()
{
- return divisionType;
+ return divisionType;
}
-
+
/**
* Get the file timing resolution. If the division type is PPQ, then this
* is value represents ticks per beat, otherwise it's ticks per frame (SMPTE).
- *
+ *
* @return the timing resolution in ticks per beat or ticks per frame
*/
public int getResolution()
{
return resolution;
}
-
+
/**
* Get the file length in bytes.
- *
+ *
* @return the file length in bytes or UNKNOWN_LENGTH
*/
public int getByteLength()
@@ -148,7 +148,7 @@ public class MidiFileFormat
/**
* Get the file length in microseconds.
- *
+ *
* @return the file length in microseconds or UNKNOWN_LENGTH
*/
public long getMicrosecondLength()
diff --git a/javax/sound/midi/MidiMessage.java b/javax/sound/midi/MidiMessage.java
index e265b5ead..806615199 100644
--- a/javax/sound/midi/MidiMessage.java
+++ b/javax/sound/midi/MidiMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The base class for all MIDI messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public abstract class MidiMessage implements Cloneable
* MIDI message data.
*/
protected byte data[];
-
+
/**
* The total length of the MIDI message.
*/
protected int length;
-
+
/**
* MidiMessage contructor.
- *
+ *
* @param data a valid MIDI message
*/
protected MidiMessage(byte[] data)
@@ -67,59 +67,59 @@ public abstract class MidiMessage implements Cloneable
this.data = data;
this.length = data.length;
}
-
+
/**
* Set the complete MIDI message.
- *
+ *
* @param data The complete MIDI message.
* @param length The length of the MIDI message.
* @throws InvalidMidiDataException Thrown when the MIDI message is invalid.
*/
- protected void setMessage(byte[] data, int length)
+ protected void setMessage(byte[] data, int length)
throws InvalidMidiDataException
{
this.data = new byte[length];
System.arraycopy(data, 0, this.data, 0, length);
this.length = length;
}
-
+
/**
* Get the MIDI message data.
- *
+ *
* @return an array containing the MIDI message data
*/
public byte[] getMessage()
{
byte copy[] = new byte[length];
System.arraycopy(data, 0, copy, 0, length);
- return copy;
+ return copy;
}
-
+
/**
* Get the status byte of the MIDI message (as an int)
- *
+ *
* @return the status byte of the MIDI message (as an int), or zero if the message length is zero.
*/
public int getStatus()
{
if (length > 0)
return (data[0] & 0xff);
- else
+ else
return 0;
}
-
+
/**
* Get the length of the MIDI message.
- *
+ *
* @return the length of the MIDI messsage
*/
public int getLength()
{
return length;
}
-
+
/* Create a clone of this object.
- *
+ *
* @see java.lang.Object#clone()
*/
public abstract Object clone();
diff --git a/javax/sound/midi/MidiSystem.java b/javax/sound/midi/MidiSystem.java
index 627dd95e9..b273b98e5 100644
--- a/javax/sound/midi/MidiSystem.java
+++ b/javax/sound/midi/MidiSystem.java
@@ -55,9 +55,9 @@ import javax.sound.midi.spi.MidiFileWriter;
import javax.sound.midi.spi.SoundbankReader;
/**
- * MidiSystem provides access to the computer system's MIDI resources,
+ * MidiSystem provides access to the computer system's MIDI resources,
* as well as utility routines for reading MIDI files and more.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -71,15 +71,15 @@ public class MidiSystem
/**
* Get an array of all available MIDI devices.
- *
+ *
* @return a possibly empty array of all available MIDI devices
*/
public static MidiDevice.Info[] getMidiDeviceInfo()
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
List infoList = new ArrayList();
-
+
while (deviceProviders.hasNext())
{
MidiDeviceProvider provider = (MidiDeviceProvider) deviceProviders.next();
@@ -87,44 +87,44 @@ public class MidiSystem
for (int i = infos.length; i > 0; )
infoList.add(infos[--i]);
}
-
- return (MidiDevice.Info[])
- infoList.toArray(new MidiDevice.Info[infoList.size()]);
+
+ return (MidiDevice.Info[])
+ infoList.toArray(new MidiDevice.Info[infoList.size()]);
}
-
+
/**
* Get the specified MIDI device.
- *
+ *
* @param info a description of the device we're looking for
* @return the requested MIDI device
* @throws MidiUnavailableException if no MIDI devices are configured or found
* @throws IllegalArgumentException if the device described by info is not found
*/
- public static MidiDevice getMidiDevice(MidiDevice.Info info)
+ public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
-
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+
if (! deviceProviders.hasNext())
throw new MidiUnavailableException("No MIDI device providers available.");
-
+
do
{
- MidiDeviceProvider provider =
+ MidiDeviceProvider provider =
(MidiDeviceProvider) deviceProviders.next();
if (provider.isDeviceSupported(info))
return provider.getDevice(info);
} while (deviceProviders.hasNext());
-
- throw new IllegalArgumentException("MIDI device "
- + info + " not available.");
+
+ throw new IllegalArgumentException("MIDI device "
+ + info + " not available.");
}
-
+
/**
* Get the default Receiver instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Receiver instance
* @throws MidiUnavailableException if no Receiver is found
*/
@@ -145,7 +145,7 @@ public class MidiSystem
/**
* Get the default Transmitter instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Transmitter instance
* @throws MidiUnavailableException if no Transmitter is found
*/
@@ -166,7 +166,7 @@ public class MidiSystem
/**
* Get the default Synthesizer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Synthesizer instance
* @throws MidiUnavailableException if no Synthesizer is found
*/
@@ -183,11 +183,11 @@ public class MidiSystem
}
throw new MidiUnavailableException("No Synthesizer device available");
}
-
+
/**
* Get the default Sequencer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Sequencer instance
* @throws MidiUnavailableException if no Sequencer is found
*/
@@ -203,11 +203,11 @@ public class MidiSystem
return (Sequencer) device;
}
throw new MidiUnavailableException("No Sequencer device available");
- }
-
+ }
+
/**
* Read a Soundbank object from the given stream.
- *
+ *
* @param stream the stream from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -229,7 +229,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given url.
- *
+ *
* @param url the url from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -251,7 +251,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given file.
- *
+ *
* @param file the file from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -268,13 +268,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Cannot read soundbank from file "
- + file);
- }
+ throw new InvalidMidiDataException("Cannot read soundbank from file "
+ + file);
+ }
/**
* Read a MidiFileFormat object from the given stream.
- *
+ *
* @param stream the stream from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -296,7 +296,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given url.
- *
+ *
* @param url the url from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -318,7 +318,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given file.
- *
+ *
* @param file the file from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -335,13 +335,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ file);
- }
-
+ }
+
/**
* Read a Sequence object from the given stream.
- *
+ *
* @param stream the stream from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -363,7 +363,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given url.
- *
+ *
* @param url the url from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -385,7 +385,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given file.
- *
+ *
* @param file the file from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -402,13 +402,13 @@ public class MidiSystem
if (sq != null)
return sq;
}
- throw new InvalidMidiDataException("Can't read Sequence from file "
+ throw new InvalidMidiDataException("Can't read Sequence from file "
+ file);
- }
-
+ }
+
/**
* Return an array of supported MIDI file types on this system.
- *
+ *
* @return the array of supported MIDI file types
*/
public static int[] getMidiFileTypes()
@@ -443,7 +443,7 @@ public class MidiSystem
/**
* Return true if the system supports writing files of type fileType.
- *
+ *
* @param fileType the MIDI file type we want to write
* @return true if we can write fileType files, false otherwise
*/
@@ -453,17 +453,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType))
return true;
}
return false;
}
-
+
/**
* Return an array of supported MIDI file types on this system
* for the given sequnce.
- *
+ *
* @param sequence the sequnce to write
* @return the array of supported MIDI file types
*/
@@ -496,11 +496,11 @@ public class MidiSystem
}
return result;
}
-
+
/**
* Return true if the system supports writing files of type fileType
* for the given sequence.
- *
+ *
* @param fileType the MIDI file type we want to write
* @param sequence the Sequence we want to write
* @return true if we can write fileType files for sequence, false otherwise
@@ -511,7 +511,7 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, sequence))
return true;
}
@@ -520,7 +520,7 @@ public class MidiSystem
/**
* Write a sequence to an output stream using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the output stream to write to
@@ -535,17 +535,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
/**
* Write a sequence to a file using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the file to write to
@@ -560,12 +560,11 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
}
-
diff --git a/javax/sound/midi/MidiUnavailableException.java b/javax/sound/midi/MidiUnavailableException.java
index a992c16a7..5403e42c3 100644
--- a/javax/sound/midi/MidiUnavailableException.java
+++ b/javax/sound/midi/MidiUnavailableException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when MIDI resources are not available.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class MidiUnavailableException extends Exception
{
private static final long serialVersionUID = 6093809578628944323L;
-
+
/**
* Create a MidiUnavailableException.
*/
@@ -59,7 +59,7 @@ public class MidiUnavailableException extends Exception
/**
* Create an MidiUnavailableException object.
- *
+ *
* @param s the exception message string
*/
public MidiUnavailableException(String s)
diff --git a/javax/sound/midi/Patch.java b/javax/sound/midi/Patch.java
index eb9d8bc3b..75e347f51 100644
--- a/javax/sound/midi/Patch.java
+++ b/javax/sound/midi/Patch.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A Patch describes where an Instrument is loaded on a Synthesizer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,11 +50,11 @@ public class Patch
// Private data describing the patch
private int bank = 0;
private int program = 0;
-
+
/**
* Create a Patch object, specifying the bank and program in which this Patch
* is located.
- *
+ *
* @param bank the bank in which this Patch is located
* @param program the program in which this Patch is located
*/
@@ -63,20 +63,20 @@ public class Patch
this.bank = bank;
this.program = program;
}
-
+
/**
* Get the bank in which this Patch is located.
- *
+ *
* @return the bank in which this Patch is located
*/
public int getBank()
{
return bank;
}
-
+
/**
* Get the program in which this Patch is located.
- *
+ *
* @return the program in which this Patch is located
*/
public int getProgram()
diff --git a/javax/sound/midi/Receiver.java b/javax/sound/midi/Receiver.java
index 0e70b2809..bc660d0d6 100644
--- a/javax/sound/midi/Receiver.java
+++ b/javax/sound/midi/Receiver.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* This interface describes the methods required by objects receiving MIDI
* messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,14 +51,14 @@ public interface Receiver
/**
* Send a MIDI message and timestamp. Some receivers don't support
* timestamps, in which case timeStamp should be -1.
- *
+ *
* @param message the MIDI message to send
* @param timeStamp time timestamp for this message in microseconds (or -1)
* @throws IllegalStateException if the receiver is closed
*/
public void send(MidiMessage message, long timeStamp)
throws IllegalStateException;
-
+
/**
* Close this receiver, possibly freeing system resources.
*/
diff --git a/javax/sound/midi/Sequence.java b/javax/sound/midi/Sequence.java
index 2ea201cb2..833150afe 100644
--- a/javax/sound/midi/Sequence.java
+++ b/javax/sound/midi/Sequence.java
@@ -42,9 +42,9 @@ import java.util.Iterator;
import java.util.Vector;
/**
- * Objects of this type represent sequences of MIDI messages that can be
+ * Objects of this type represent sequences of MIDI messages that can be
* played back by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ import java.util.Vector;
public class Sequence
{
/**
- * The timing division type for this sequence (PPQ or SMPTE*)
+ * The timing division type for this sequence (PPQ or SMPTE*)
*/
protected float divisionType;
-
+
/**
- * The timing resolution in ticks/beat or ticks/frame, depending on the
- * division type.
+ * The timing resolution in ticks/beat or ticks/frame, depending on the
+ * division type.
*/
protected int resolution;
-
+
/**
- * The MIDI tracks used by this sequence.
+ * The MIDI tracks used by this sequence.
*/
protected Vector<Track> tracks;
-
+
/**
* Tempo-based timing. Resolution is specified in ticks per beat.
*/
public static final float PPQ = 0.0f;
-
+
/**
* 24 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_24 = 24.0f;
-
+
/**
* 25 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_25 = 25.0f;
-
+
/**
* 30 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_30 = 30.0f;
-
+
/**
* 29.97 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_30DROP = 29.97f;
-
+
// Private helper class
private void init(float divisionType, int resolution, int numTracks)
throws InvalidMidiDataException
{
if (divisionType != PPQ
- && divisionType != SMPTE_24
+ && divisionType != SMPTE_24
&& divisionType != SMPTE_25
&& divisionType != SMPTE_30
&& divisionType != SMPTE_30DROP)
- throw new InvalidMidiDataException("Invalid division type ("
+ throw new InvalidMidiDataException("Invalid division type ("
+ divisionType + ")");
this.divisionType = divisionType;
this.resolution = resolution;
-
+
tracks = new Vector<Track>(numTracks);
while (numTracks > 0)
tracks.set(--numTracks, new Track());
}
-
+
/**
* Create a MIDI sequence object with no initial tracks.
- *
+ *
* @param divisionType the division type (must be one of PPQ or SMPTE_*)
* @param resolution the timing resolution
* @throws InvalidMidiDataException if the division type is invalid
@@ -127,7 +127,7 @@ public class Sequence
/**
* Create a MIDI seqence object.
- *
+ *
* @param divisionType the division type (must be one of PPQ or SMPTE_*)
* @param resolution the timing resolution
* @param numTracks the number of initial tracks
@@ -138,30 +138,30 @@ public class Sequence
{
init(divisionType, resolution, 0);
}
-
+
/**
* The division type of this sequence.
- *
+ *
* @return division type of this sequence
*/
public float getDivisionType()
{
return divisionType;
}
-
+
/**
* The timing resolution for this sequence, relative to the division type.
- *
+ *
* @return the timing resolution for this sequence
*/
public int getResolution()
{
return resolution;
}
-
+
/**
* Create a new empty MIDI track and add it to this sequence.
- *
+ *
* @return the newly create MIDI track
*/
public Track createTrack()
@@ -170,10 +170,10 @@ public class Sequence
tracks.add(track);
return track;
}
-
+
/**
* Remove the specified MIDI track from this sequence.
- *
+ *
* @param track the track to remove
* @return true if track was removed and false othewise
*/
@@ -181,33 +181,33 @@ public class Sequence
{
return tracks.remove(track);
}
-
+
/**
* Get an array of MIDI tracks used in this sequence.
- *
+ *
* @return a possibly empty array of tracks
*/
public Track[] getTracks()
{
return tracks.toArray(new Track[tracks.size()]);
}
-
+
/**
* The length of this sequence in microseconds.
- *
+ *
* @return the length of this sequence in microseconds
*/
public long getMicrosecondLength()
{
long tickLength = getTickLength();
-
+
if (divisionType == PPQ)
{
// FIXME
// How can this possible be computed? PPQ is pulses per quarter-note,
// which is dependent on the tempo of the Sequencer.
- throw new
- UnsupportedOperationException("Can't compute PPQ based lengths yet");
+ throw new
+ UnsupportedOperationException("Can't compute PPQ based lengths yet");
}
else
{
@@ -215,10 +215,10 @@ public class Sequence
return (long) ((tickLength * 1000000) / (divisionType * resolution));
}
}
-
+
/**
* The length of this sequence in MIDI ticks.
- *
+ *
* @return the length of this sequence in MIDI ticks
*/
public long getTickLength()
@@ -234,15 +234,15 @@ public class Sequence
}
return length;
}
-
+
/**
* Get an array of patches used in this sequence.
- *
+ *
* @return an array of patches used in this sequence
*/
public Patch[] getPatchList()
{
- // FIXE: not quite sure how to do this yet.
+ // FIXE: not quite sure how to do this yet.
throw new UnsupportedOperationException("Can't get patch list yet");
}
}
diff --git a/javax/sound/midi/Sequencer.java b/javax/sound/midi/Sequencer.java
index 24ee2505c..ca9cad779 100644
--- a/javax/sound/midi/Sequencer.java
+++ b/javax/sound/midi/Sequencer.java
@@ -45,7 +45,7 @@ import java.io.InputStream;
* A Sequencer object plays MIDI sequences described as Sequence objects.
* This class provides methods for loading and unloading sequences, as well
* as basic transport controls.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -54,46 +54,46 @@ public interface Sequencer extends MidiDevice
{
/**
* Set the Sequence object for this sequencer.
- *
+ *
* @param seq the Sequence to process
* @throws InvalidMidiDataException if the sequence is invalid for any reason
*/
public void setSequence(Sequence seq) throws InvalidMidiDataException;
-
+
/**
* Set the sequence for this sequencer. istream reads on a valid MIDI file.
- *
+ *
* @param istream an input stream for a valid MIDI file
* @throws IOException if an I/O exception happens
* @throws InvalidMidiDataException if the MIDI file contains bad data
*/
- public void setSequence(InputStream istream)
+ public void setSequence(InputStream istream)
throws IOException, InvalidMidiDataException;
-
+
/**
* Get the current sequence object for this sequencer.
- *
+ *
* @return the current sequence object. May be null.
*/
public Sequence getSequence();
-
+
/**
* Start playback of the current sequence.
*/
public void start();
-
+
/**
* Stop playback of the current sequence.
*/
public void stop();
-
+
/**
* Returns true if the sequence is playing.
- *
+ *
* @return true if the sequence is playing and false otherwise
*/
public boolean isRunning();
-
+
/**
* Start playback and record of MIDI events.
* Any tracks enabled for recording will have their events replaced.
@@ -101,114 +101,114 @@ public interface Sequencer extends MidiDevice
* will be sent to the sequencer's transmitter.
*/
public void startRecording();
-
+
/**
* Stop recording, although continue playing.
*/
public void stopRecording();
-
+
/**
* Returns true if sequence is recording.
- *
+ *
* @return true if the sequence is recording and false otherwise
*/
public boolean isRecording();
-
+
/**
* Enable recording for a specific track using data from a specific channel.
- *
- * @param track the track to enable for recording
+ *
+ * @param track the track to enable for recording
* @param channel the channel from which to record
*/
public void recordEnable(Track track, int channel);
-
+
/**
* Disable recording for a specific track.
- *
+ *
* @param track the track to disable recording for
*/
public void recordDisable(Track track);
-
+
/**
* Get the current tempo in beats per minute.
- *
+ *
* @return the current tempo in beats per minute
*/
public float getTempoInBPM();
-
+
/**
* Sets the current tempo in beats per minute.
- *
+ *
* @param bpm the new tempo in bears per minutes
*/
public void setTempoInBPM(float bpm);
-
+
/**
* Get the current tempo in microseconds per quarter note.
- *
+ *
* @return the current tempo in microseconds per quarter note.
*/
public float getTempoInMPQ();
-
+
/**
* Sets the current tempo in microseconds per quarter note.
- *
+ *
* @param mpq the new tempo in microseconds per quarter note.
*/
public void setTempoInMPQ(float mpq);
-
+
/**
* Set a scaling factor for the playback tempo, which is 1.0 by default.
- *
+ *
* @param factor the new tempo scaling factor
*/
public void setTempoFactor(float factor);
-
+
/**
* Get the current scaling factor for the playback tempo.
- *
- * @return the current tempo scaling factor
+ *
+ * @return the current tempo scaling factor
*/
public float getTempoFactor();
-
+
/**
* Get the length of the current sequence in MIDI ticks.
- *
+ *
* @return the length of the current sequence in MIDI ticks
*/
public long getTickLength();
-
+
/**
* Get the current playback position of the sequencer in MIDI ticks.
- *
+ *
* @return the current playback position of the sequencer in MIDI ticks
*/
public long getTickPosition();
-
+
/**
* Set the current playback position of the sequencer in MIDI ticks.
- *
+ *
* @param tick the new playback position of the sequencer in MIDI ticks
*/
public void setTickPosition(long tick);
/**
* Get the length of the current sequence in microseconds.
- *
+ *
* @return the length of the current sequence in microseconds
*/
public long getMicrosecondLength();
-
+
/**
* Get the current playback position of the sequencer in microseconds.
- *
+ *
* @return the current playback position of the sequencer in microseconds
*/
public long getMicrosecondPosition();
-
+
/**
* Set the current playback position of the sequencer in microseconds.
- *
+ *
* @param microsecond the new playback position of the sequencer in microseconds
*/
public void setMicrosecondPosition(long microsecond);
@@ -217,125 +217,125 @@ public interface Sequencer extends MidiDevice
* Set the source of timing information. sync must be found in the array
* returned by getMasterSyncModes().
* FIXME: What happens if it isn't?
- *
+ *
* @param sync the new source of timing information
*/
public void setMasterSyncMode(SyncMode sync);
-
+
/**
* Get the source of timing information.
- *
+ *
* @return the current source of timing information
*/
public SyncMode getMasterSyncMode();
-
+
/**
* Get an array of timing sources supported by this sequencer.
- *
+ *
* @return an array of timing sources supported by this sequencer
*/
public SyncMode[] getMasterSyncModes();
-
+
/**
* Set the slave synchronization mode for this sequencer. sync must be
* found in the array returned by getSlaveSyncModes().
* FIXME: What happens if it isn't?
- *
+ *
* @param sync the new slave sync mode for this sequencer
*/
public void setSlaveSyncMode(SyncMode sync);
-
+
/**
* Get the current slave synchronization mode.
- *
+ *
* @return the current slave synchronization mode
*/
public SyncMode getSlaveSyncMode();
-
+
/**
* Get an array of slave sync modes supported by this sequencer.
- *
+ *
* @return an array of slave sync modes supported by this sequencer
*/
public SyncMode[] getSlaveSyncModes();
-
+
/**
* Sets the mute state for a specific track.
- *
+ *
* @param track the track to modify
* @param mute the new mute state
*/
public void setTrackMute(int track, boolean mute);
-
+
/**
* Get the mute state of a specific track.
- *
+ *
* @param track the track to query
* @return the mute state for track
*/
public boolean getTrackMute(int track);
-
+
/**
* Sets the solo state for a specific track.
- *
+ *
* @param track the track to modify
* @param solo the new solo state
*/
public void setTrackSolo(int track, boolean solo);
-
+
/**
* Get the solo state for a specific track.
- *
+ *
* @param track the track to query
* @return the solo state for track
*/
public boolean getTrackSolo(int track);
-
+
/**
* Add a meta event listening object to this sequencer. It will receive
* notification whenever the sequencer processes a meta event.
* A listener may fail to get added if this sequencer doesn't support
* meta events.
- *
+ *
* @param listener the listener to add
* @return true if listener was added, false othewise
*/
public boolean addMetaEventListener(MetaEventListener listener);
-
+
/**
* Remove a meta event listener from this sequencer.
- *
+ *
* @param listener the listener to remove
*/
public void removeMetaEventListener(MetaEventListener listener);
-
+
/**
- * Add a controller event listening object to this sequencer. It will
- * receive notification whenever the sequencer processes a controller
+ * Add a controller event listening object to this sequencer. It will
+ * receive notification whenever the sequencer processes a controller
* event for a specified controller number..
- *
+ *
* @param listener the listener to add
* @param controllers the conroller numbers to listen to
* @return the controller numbers being listened to
*/
- public int[] addControllerEventListener(ControllerEventListener listener,
+ public int[] addControllerEventListener(ControllerEventListener listener,
int controllers[]);
-
+
/**
* Remove a controller listener from this sequencer for the specified
* controller numbers.
- *
+ *
* @param listener the listener to remove
* @param controllers the controllers to unlisten
* @return the controller numbers being unlistened
*/
public int[] removeControllerEventListener(ControllerEventListener listener,
int controllers[]);
-
+
/**
* A SyncMode object represents the mechanism by which a MIDI sequencer
* synchronizes time with a master or slave device.
- *
+ *
* @author green@redhat.com
*
*/
@@ -345,18 +345,18 @@ public interface Sequencer extends MidiDevice
* A master sync mode indicating the use of an internal sequencer clock.
*/
public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock");
-
+
/**
* A master or slave sync mode indicating the use of MIDI clock messages.
*/
public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync");
-
+
/**
- * A master or slave sync mode indicating the use of MIDI Time Code
+ * A master or slave sync mode indicating the use of MIDI Time Code
* messages.
*/
public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code");
-
+
/**
* A slave sync mode indicating that no timing info will be transmitted.
*/
@@ -364,7 +364,7 @@ public interface Sequencer extends MidiDevice
// The name
private String name;
-
+
/**
* Create a new SyncMode object
* @param name the SyncMode name
@@ -373,7 +373,7 @@ public interface Sequencer extends MidiDevice
{
this.name = name;
}
-
+
/**
* SyncMode objects are only equal when identical.
*/
@@ -381,7 +381,7 @@ public interface Sequencer extends MidiDevice
{
return super.equals(o);
}
-
+
/**
* SyncMode objects use the Object hashCode.
*/
@@ -389,7 +389,7 @@ public interface Sequencer extends MidiDevice
{
return super.hashCode();
}
-
+
/**
* Use the SyncMode name as the string representation.
* @see java.lang.Object#toString()
diff --git a/javax/sound/midi/ShortMessage.java b/javax/sound/midi/ShortMessage.java
index ef01d1168..08b873703 100644
--- a/javax/sound/midi/ShortMessage.java
+++ b/javax/sound/midi/ShortMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A short MIDI message that is no longer than 3 bytes long.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,91 +51,91 @@ public class ShortMessage extends MidiMessage
* Status byte for Time Code message.
*/
public static final int MIDI_TIME_CODE = 0xF1;
-
+
/**
- * Status byte for Song Position Pointer message.
+ * Status byte for Song Position Pointer message.
*/
public static final int SONG_POSITION_POINTER = 0xF2;
-
+
/**
* Status byte for Song Select message.
*/
public static final int SONG_SELECT = 0xF3;
-
+
/**
- * Status byte for Tune Request message.
+ * Status byte for Tune Request message.
*/
public static final int TUNE_REQUEST = 0xF6;
-
+
/**
* Status byte for End Of Exclusive message.
*/
public static final int END_OF_EXCLUSIVE = 0xF7;
-
+
/**
- * Status byte for Timing Clock message.
+ * Status byte for Timing Clock message.
*/
public static final int TIMING_CLOCK = 0xF8;
-
+
/**
- * Status byte for Start message.
+ * Status byte for Start message.
*/
public static final int START = 0xFA;
-
+
/**
- * Status byte for Continue message.
+ * Status byte for Continue message.
*/
- public static final int CONTINUE = 0xFB;
-
+ public static final int CONTINUE = 0xFB;
+
/**
- * Status byte for Stop message.
+ * Status byte for Stop message.
*/
- public static final int STOP = 0xFC;
-
+ public static final int STOP = 0xFC;
+
/**
* Status byte for Active Sensing message.
*/
- public static final int ACTIVE_SENSING = 0xFE;
-
+ public static final int ACTIVE_SENSING = 0xFE;
+
/**
* Status byte for System Reset message.
*/
- public static final int SYSTEM_RESET = 0xFF;
-
+ public static final int SYSTEM_RESET = 0xFF;
+
/**
* Status nibble for Note Off message.
*/
- public static final int NOTE_OFF = 0x80;
-
+ public static final int NOTE_OFF = 0x80;
+
/**
* Status nibble for Note On message.
*/
- public static final int NOTE_ON = 0x90;
-
+ public static final int NOTE_ON = 0x90;
+
/**
* Status nibble for Poly Pressure message.
*/
- public static final int POLY_PRESSURE = 0xA0;
-
+ public static final int POLY_PRESSURE = 0xA0;
+
/**
* Status nibble for Control Change message.
*/
- public static final int CONTROL_CHANGE = 0xB0;
-
+ public static final int CONTROL_CHANGE = 0xB0;
+
/**
* Status nibble for Program Change message.
*/
- public static final int PROGRAM_CHANGE = 0xC0;
-
+ public static final int PROGRAM_CHANGE = 0xC0;
+
/**
* Statue nibble for Channel Pressure message.
*/
public static final int CHANNEL_PRESSURE = 0xD0;
-
+
/**
* Status nibble for Pitch Bend message.
*/
- public static final int PITCH_BEND = 0xE0;
+ public static final int PITCH_BEND = 0xE0;
// Create and initialize a default, arbitrary message.
private static byte[] defaultMessage;
@@ -144,25 +144,25 @@ public class ShortMessage extends MidiMessage
defaultMessage = new byte[1];
defaultMessage[0] = (byte) STOP;
}
-
+
/**
* Create a short MIDI message.
- *
+ *
* The spec requires that this represent a valid MIDI message, but doesn't
* specify what it should be. We've chosen the STOP message for our
* implementation.
*/
public ShortMessage()
{
- this(defaultMessage);
+ this(defaultMessage);
}
-
+
/**
* Create a short MIDI message.
- *
+ *
* The data argument should be a valid MIDI message. Unfortunately the spec
* does not allow us to throw an InvalidMidiDataException if data is invalid.
- *
+ *
* @param data the message data
*/
protected ShortMessage(byte[] data)
@@ -171,8 +171,8 @@ public class ShortMessage extends MidiMessage
}
/**
- * Set the MIDI message.
- *
+ * Set the MIDI message.
+ *
* @param status the status byte for this message
* @param data1 the first data byte for this message
* @param data2 the second data byte for this message
@@ -189,19 +189,19 @@ public class ShortMessage extends MidiMessage
if (length > 1)
{
if (data1 < 0 || data1 > 127)
- throw new InvalidMidiDataException("data1 (" + data1
+ throw new InvalidMidiDataException("data1 (" + data1
+ ") must be between 0 and 127.");
data[1] = (byte) data1;
if (length > 2)
{
if (data2 < 0 || data2 > 127)
- throw new InvalidMidiDataException("data2 (" + data2
+ throw new InvalidMidiDataException("data2 (" + data2
+ ") must be between 0 and 127.");
data[2] = (byte) data2;
}
}
}
-
+
public void setMessage(int command, int channel, int data1, int data2)
throws InvalidMidiDataException
{
@@ -209,10 +209,10 @@ public class ShortMessage extends MidiMessage
// It currently assumes command and channel are valid values.
setMessage(command + channel, data1, data2);
}
-
+
/**
* Set the MIDI message to one that requires no data bytes.
- *
+ *
* @param status the status byte for this message
* @throws InvalidMidiDataException if status is bad, or requires data
*/
@@ -227,10 +227,10 @@ public class ShortMessage extends MidiMessage
setMessage(status, 0, 0);
}
-
+
/**
* Return the number of data bytes needed for a given MIDI status byte.
- *
+ *
* @param status the status byte for a short MIDI message
* @return the number of data bytes needed for this status byte
* @throws InvalidMidiDataException if status is an invalid status byte
@@ -238,27 +238,27 @@ public class ShortMessage extends MidiMessage
protected final int getDataLength(int status) throws InvalidMidiDataException
{
int originalStatus = status;
-
+
if ((status & 0xF0) != 0xF0)
status &= 0xF0;
-
+
switch (status)
{
- case NOTE_OFF:
- case NOTE_ON:
- case POLY_PRESSURE:
- case CONTROL_CHANGE:
+ case NOTE_OFF:
+ case NOTE_ON:
+ case POLY_PRESSURE:
+ case CONTROL_CHANGE:
case PITCH_BEND:
case SONG_POSITION_POINTER:
return 2;
-
+
case PROGRAM_CHANGE:
case CHANNEL_PRESSURE:
case SONG_SELECT:
case 0xF5: // FIXME: unofficial bus select. Not in spec??
return 1;
-
- case TUNE_REQUEST:
+
+ case TUNE_REQUEST:
case END_OF_EXCLUSIVE:
case TIMING_CLOCK:
case START:
@@ -267,39 +267,39 @@ public class ShortMessage extends MidiMessage
case ACTIVE_SENSING:
case SYSTEM_RESET:
return 0;
-
+
default:
- throw new InvalidMidiDataException("Invalid status: 0x"
+ throw new InvalidMidiDataException("Invalid status: 0x"
+ Integer.toHexString(originalStatus));
}
}
-
+
/**
- * Get the channel information from this MIDI message, assuming it is a
+ * Get the channel information from this MIDI message, assuming it is a
* MIDI channel message.
- *
+ *
* @return the MIDI channel for this message
*/
public int getChannel()
{
return data[0] & 0x0F;
}
-
+
/**
* Get the command nibble from this MIDI message, assuming it is a MIDI
* channel message.
- *
+ *
* @return the MIDI command for this message
*/
public int getCommand()
{
return data[0] & 0xF0;
}
-
+
/**
- * Get the first data byte from this message, assuming it exists, and
+ * Get the first data byte from this message, assuming it exists, and
* zero otherwise.
- *
+ *
* @return the first data byte or zero if none exists.
*/
public int getData1()
@@ -309,11 +309,11 @@ public class ShortMessage extends MidiMessage
else
return 0;
}
-
+
/**
- * Get the second data byte from this message, assuming it exists, and
+ * Get the second data byte from this message, assuming it exists, and
* zero otherwise.
- *
+ *
* @return the second date byte or zero if none exists.
*/
public int getData2()
@@ -323,7 +323,7 @@ public class ShortMessage extends MidiMessage
else
return 0;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
diff --git a/javax/sound/midi/Soundbank.java b/javax/sound/midi/Soundbank.java
index 16d9d79ea..d959cf5cd 100644
--- a/javax/sound/midi/Soundbank.java
+++ b/javax/sound/midi/Soundbank.java
@@ -39,9 +39,9 @@ exception statement from your version. */
package javax.sound.midi;
/**
- * A Soundbank is a container for instruments which may be loaded into
+ * A Soundbank is a container for instruments which may be loaded into
* a Synthesizer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,50 +50,50 @@ public interface Soundbank
{
/**
* Get the sound bank name.
- *
+ *
* @return the sound bank name
*/
String getName();
-
+
/**
* Get the sound bank version.
- *
+ *
* @return the sound bank version
*/
String getVersion();
/**
* Get the sound bank vendor.
- *
+ *
* @return the sound bank vendor
*/
String getVendor();
-
-
+
+
/**
* Get the sound bank description.
- *
+ *
* @return the sound bank description
*/
String getDescription();
-
+
/**
* Get an array of non-Instrument resources in this sound bank.
- *
+ *
* @return an array of non-instrument resources in this sound bank
*/
SoundbankResource[] getResources();
-
+
/**
* Get an array of Instruments in this sound bank.
- *
+ *
* @return an array of instruments in this sound bank
*/
Instrument[] getInstruments();
-
+
/**
* Get the Instrument for the given Patch.
- *
+ *
* @param patch the Patch to search for
* @return the Instrument corresponding to patch
*/
diff --git a/javax/sound/midi/SoundbankResource.java b/javax/sound/midi/SoundbankResource.java
index 93f42e48e..0b4675b10 100644
--- a/javax/sound/midi/SoundbankResource.java
+++ b/javax/sound/midi/SoundbankResource.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* SoundbankResource objects represent audio data stored in a sound bank.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,54 +50,54 @@ public abstract class SoundbankResource
private final Soundbank soundbank;
private final String name;
private final Class dataClass;
-
+
/**
* Create a SoundbankResource object.
- *
+ *
* @param soundbank the soundbank object containing this resource
* @param name the name of the resource
* @param dataClass the class used to represent the audio data
*/
protected SoundbankResource(Soundbank soundbank, String name, Class<?> dataClass)
{
- this.soundbank = soundbank;
+ this.soundbank = soundbank;
this.name = name;
this.dataClass = dataClass;
}
-
+
/**
* Get the sound bank containing this resource.
- *
+ *
* @return the sound bank in which this resource resides
*/
public Soundbank getSoundbank()
{
return soundbank;
}
-
+
/**
* Get the name of this resource.
- *
+ *
* @return the name of this resource
*/
public String getName()
{
return name;
}
-
+
/**
* Get the class used to represent the audio data for this resource.
- *
+ *
* @return the class used to represent the audio data for this resource
*/
public Class<?> getDataClass()
{
return dataClass;
}
-
+
/**
* Get the audio data for this resource.
- *
+ *
* @return the audio data object for this resource
*/
public abstract Object getData();
diff --git a/javax/sound/midi/Synthesizer.java b/javax/sound/midi/Synthesizer.java
index 22e5e9256..3a7ab3c7b 100644
--- a/javax/sound/midi/Synthesizer.java
+++ b/javax/sound/midi/Synthesizer.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Interface for MIDI audio synthesizer devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -49,122 +49,122 @@ public interface Synthesizer extends MidiDevice
{
/**
* Get the maximum number of notes that the synth can play at once.
- *
+ *
* @return the maximum number of notes that the synth can play at once
*/
public int getMaxPolyphony();
-
+
/**
* The processing latency for this synth in microseconds.
- *
+ *
* @return the processing latency for this synth in microseconds
*/
public long getLatency();
-
+
/**
* Get the set of MIDI channels controlled by this synth.
- *
+ *
* @return an array of MIDI channels controlled by this synth
*/
public MidiChannel[] getChannels();
-
+
/**
* Get the current status for the voices produced by this synth.
- *
+ *
* @return an array of VoiceStatus objects, getMaxPolyphony() in length
*/
public VoiceStatus[] getVoiceStatus();
-
+
/**
* Returns true is this synth is capable of loading soundbank.
- *
+ *
* @param soundbank the Soundbank to examine
* @return true if soundbank can be loaded, false otherwise
*/
public boolean isSoundbankSupported(Soundbank soundbank);
-
+
/**
* Load an instrument into this synth. The instrument must be part of a
* supported soundbank.
- *
+ *
* @param instrument the Instrument to load
* @return true if the instrument was loaded and false otherwise
* @throws IllegalArgumentException if this synth doesn't support instrument
*/
public boolean loadInstrument(Instrument instrument);
-
+
/**
* Unload an instrument from this synth.
- *
+ *
* @param instrument the Instrument to unload
* @throws IllegalArgumentException if this synth doesn't support instrument
*/
public void unloadInstrument(Instrument instrument);
-
+
/**
* Move an intrument from one place to another. The instrument at the
* target location is unloaded.
- *
+ *
* @param from the instrument source
* @param to the instrument target
* @return if from was remapped
* @throws IllegalArgumentException
*/
public boolean remapInstrument(Instrument from, Instrument to);
-
+
/**
* Get the default Soundbank for this synth. Return null if there is no
* default.
- *
+ *
* @return the default Soundbank for this synth, possibly null.
*/
public Soundbank getDefaultSoundbank();
-
+
/**
* Get an array containing all instruments in this synthesizer.
- *
+ *
* @return an array containing all instruments in this synthesizer
*/
public Instrument[] getAvailableInstruments();
-
+
/**
* Get an array containing all instruments loaded in this synthesizer.
- *
+ *
* @return an array containing all instruments loaded in this synthesizer
*/
public Instrument[] getLoadedInstruments();
-
+
/**
* Load all soundbank instruments into this synthesizer.
- *
+ *
* @param soundbank the Soundbank from which to load instruments
* @return true if all instruments were loaded, false othewise
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public boolean loadAllInstruments(Soundbank soundbank);
-
+
/**
* Unload all soundbank instruments from this synthesizer.
- *
+ *
* @param soundbank the Soundbank containing the instruments to unload
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public void unloadAllInstruments(Soundbank soundbank);
-
+
/**
- * Load a subset of soundbank instruments into this synthesizer. The
+ * Load a subset of soundbank instruments into this synthesizer. The
* subset is defined by an array of Patch objects.
- *
+ *
* @param soundbank the Soundbank from which to load instruments
* @param patchList the array of patches identifying instruments to load
* @return true if instruments were loaded, false otherwise
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList);
-
+
/**
* Unload a subset of soundbank instruments from this synthesizer.
- *
+ *
* @param soundbank the Soundbank containing the instruments to unload
* @param patchList the array of patches identifying instruments to unload
* @throws IllegalArgumentException if the soundbank isn't supported by this
diff --git a/javax/sound/midi/SysexMessage.java b/javax/sound/midi/SysexMessage.java
index 3744e2f6b..93e3b5d09 100644
--- a/javax/sound/midi/SysexMessage.java
+++ b/javax/sound/midi/SysexMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A system exclusive MIDI message.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,14 +48,14 @@ package javax.sound.midi;
public class SysexMessage extends MidiMessage
{
public static final int SYSTEM_EXCLUSIVE = 0xF0;
-
+
public static final int SPECIAL_SYSTEM_EXCLUSIVE = 0xF7;
-
+
/**
* Create a default valid system exclusive message.
- *
+ *
* The official specs don't specify what message is to be
- * created. Our implementation creates an empty
+ * created. Our implementation creates an empty
* system exclusive message.
*/
public SysexMessage()
@@ -64,20 +64,20 @@ public class SysexMessage extends MidiMessage
data[0] = (byte) SYSTEM_EXCLUSIVE;
data[1] = (byte) ShortMessage.END_OF_EXCLUSIVE;
}
-
+
/**
* Create a SysexMessage object.
* @param data a complete system exclusive message
*/
protected SysexMessage(byte[] data)
{
- super(data);
+ super(data);
}
-
+
/**
* Set the sysex message. The first data byte (status) must be
* 0xF0 or 0xF7.
- *
+ *
* @param data the message data
* @param length the length of the message data
* @throws InvalidMidiDataException if the status byte is not 0xF0 or 0xF7
@@ -95,7 +95,7 @@ public class SysexMessage extends MidiMessage
/**
* Set the sysex message. status must be either 0xF0 or 0xF7.
- *
+ *
* @param status the sysex statys byte (0xF0 or 0xF7)
* @param data the message data
* @param length the length of the message data
@@ -114,7 +114,7 @@ public class SysexMessage extends MidiMessage
System.arraycopy(data, 0, this.data, 1, length);
this.length = length+1;
}
-
+
/**
* Get the data for this message, not including the status byte.
* @return the message data, not including the status byte
@@ -125,7 +125,7 @@ public class SysexMessage extends MidiMessage
System.arraycopy(data, 1, result, 0, length - 1);
return result;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
@@ -133,7 +133,6 @@ public class SysexMessage extends MidiMessage
{
byte message[] = new byte[length];
System.arraycopy(data, 0, message, 0, length);
- return new SysexMessage(message);
+ return new SysexMessage(message);
}
}
-
diff --git a/javax/sound/midi/Track.java b/javax/sound/midi/Track.java
index eed5d4c2d..550d2e1c4 100644
--- a/javax/sound/midi/Track.java
+++ b/javax/sound/midi/Track.java
@@ -42,9 +42,9 @@ import java.util.HashSet;
import java.util.Vector;
/**
- * A Track contains a list of timecoded MIDI events for processing
+ * A Track contains a list of timecoded MIDI events for processing
* by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,10 +52,10 @@ import java.util.Vector;
public class Track
{
/**
- * The list of MidiEvents for this track.
+ * The list of MidiEvents for this track.
*/
Vector events = new Vector();
-
+
// A HashSet to speed processing
private HashSet eventSet = new HashSet();
@@ -68,7 +68,7 @@ public class Track
* Add a new event to this track. Specific events may only be added once.
* The event will be inserted into the appropriate spot in the event list
* based on its timecode.
- *
+ *
* @param event the event to add
* @return true if the event was added, false otherwise
*/
@@ -78,7 +78,7 @@ public class Track
{
if (eventSet.contains(event))
return false;
-
+
eventSet.add(event);
long targetTick = event.getTick();
@@ -89,10 +89,10 @@ public class Track
return true;
}
}
-
+
/**
* Remove an event from this track.
- *
+ *
* @param event the event to remove
* @return true if the event was removed, false otherwise
*/
@@ -102,21 +102,21 @@ public class Track
{
if (! eventSet.remove(event))
return false;
-
+
int i = events.indexOf(event);
if (i >= 0)
{
events.remove(i);
return true;
}
-
+
throw new InternalError("event in set but not list");
}
}
-
+
/**
* Get an event idetified by its order index
- *
+ *
* @param index the location of the event to get
* @return the event at index
* @throws ArrayIndexOutOfBoundsException if index is out of bounds
@@ -131,16 +131,16 @@ public class Track
}
catch (IndexOutOfBoundsException e)
{
- throw (ArrayIndexOutOfBoundsException)
+ throw (ArrayIndexOutOfBoundsException)
new ArrayIndexOutOfBoundsException().initCause(e);
}
}
}
-
-
+
+
/**
* Get the number events in this track.
- *
+ *
* @return the number of events in this track
*/
public int size()
@@ -150,7 +150,7 @@ public class Track
/**
* Get the length of the track in MIDI ticks.
- *
+ *
* @return the length of the track in MIDI ticks
*/
public long ticks()
@@ -162,4 +162,3 @@ public class Track
}
}
}
-
diff --git a/javax/sound/midi/Transmitter.java b/javax/sound/midi/Transmitter.java
index d788725e0..ab81cc819 100644
--- a/javax/sound/midi/Transmitter.java
+++ b/javax/sound/midi/Transmitter.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* This interface specifies the methods required by objects which send
* MIDI events to Receivers, including MIDI IN ports and Sequencers.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,14 +50,14 @@ public interface Transmitter
{
/**
* Set the Receiver to which MIDI events will be sent.
- *
+ *
* @param receiver the Receiver to which MIDI events will be sent
*/
public void setReceiver(Receiver receiver);
-
+
/**
* Get the Receiver to which MIDI events will be sent (possibly null)
- *
+ *
* @return the Receiver to which MIDI events will be sent (possibly null)
*/
public Receiver getReceiver();
@@ -66,5 +66,5 @@ public interface Transmitter
* Close this Transmitter, possibly releasing system resources.
* FIXME: Does this mean the Receiver is closed? I think it must.
*/
- public void close();
+ public void close();
}
diff --git a/javax/sound/midi/VoiceStatus.java b/javax/sound/midi/VoiceStatus.java
index a6a9c3f87..2ba0c9ea1 100644
--- a/javax/sound/midi/VoiceStatus.java
+++ b/javax/sound/midi/VoiceStatus.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Objects of this type define the status of a Synthesizer voice.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,27 +51,27 @@ public class VoiceStatus
* True if this voice is processing a MIDI note.
*/
public boolean active = false;
-
+
/**
* The channel for this voice when active.
*/
public int channel = 0;
-
+
/**
* The bank of the voice when active.
*/
public int bank = 0;
-
+
/**
* The program for this voice when active.
*/
public int program = 0;
-
+
/**
* The note for this voice when active.
*/
public int note = 0;
-
+
/**
* The volume for this voice when active.
*/
diff --git a/javax/sound/midi/spi/MidiDeviceProvider.java b/javax/sound/midi/spi/MidiDeviceProvider.java
index 537edb2b3..7119ec4a2 100644
--- a/javax/sound/midi/spi/MidiDeviceProvider.java
+++ b/javax/sound/midi/spi/MidiDeviceProvider.java
@@ -42,7 +42,7 @@ import javax.sound.midi.*;
/**
* The abstract base class for all MidiDeviceProvider types.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,36 +51,36 @@ public abstract class MidiDeviceProvider
{
/**
* Returns true if this provider supports a specific MIDI device.
- *
+ *
* @param info the MIDI device descriptor
* @return true if this provider supports info
*/
public boolean isDeviceSupported(MidiDevice.Info info)
{
MidiDevice.Info infos[] = getDeviceInfo();
-
+
int i = infos.length;
-
+
while (i > 0)
{
if (info.equals(infos[--i]))
return true;
}
-
+
return false;
}
-
+
/**
* Get the list descriptors for all MIDI devices supported by
* this provider.
- *
+ *
* @return an array of descriptors for all supported MIDI devices.
*/
public abstract MidiDevice.Info[] getDeviceInfo();
-
+
/**
* Get the MidiDevice for the MIDI device described by info
- *
+ *
* @param info the descriptor for the MIDI device we want
* @return the MidiDevice we're looking for
* @throws IllegalArgumentException is this provider doesn't support info
diff --git a/javax/sound/midi/spi/MidiFileReader.java b/javax/sound/midi/spi/MidiFileReader.java
index 4342ebf5e..d370a8a44 100644
--- a/javax/sound/midi/spi/MidiFileReader.java
+++ b/javax/sound/midi/spi/MidiFileReader.java
@@ -50,7 +50,7 @@ import javax.sound.midi.Sequence;
/**
* The MidiFileReader abstract class defines the methods to be provided
* by a MIDI file reader.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -59,7 +59,7 @@ public abstract class MidiFileReader
{
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param stream the stream from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the stream refers to invalid data
@@ -67,32 +67,32 @@ public abstract class MidiFileReader
*/
public abstract MidiFileFormat getMidiFileFormat(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param url the url from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the url refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract MidiFileFormat getMidiFileFormat(URL url)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param file the file from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the file refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract MidiFileFormat getMidiFileFormat(File file)
- throws InvalidMidiDataException, IOException;
-
+ throws InvalidMidiDataException, IOException;
+
/**
* Read a Sequence from the given stream.
- *
+ *
* @param stream the stream from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the stream refers to invalid data
@@ -100,26 +100,26 @@ public abstract class MidiFileReader
*/
public abstract Sequence getSequence(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Read a Sequence from the given stream.
- *
+ *
* @param url the url from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the url refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract Sequence getSequence(URL url)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
/**
* Read a Sequence from the given stream.
- *
+ *
* @param file the file from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the file refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract Sequence getSequence(File file)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
}
diff --git a/javax/sound/midi/spi/MidiFileWriter.java b/javax/sound/midi/spi/MidiFileWriter.java
index e2a1f55c6..08aee36f0 100644
--- a/javax/sound/midi/spi/MidiFileWriter.java
+++ b/javax/sound/midi/spi/MidiFileWriter.java
@@ -45,20 +45,20 @@ import java.io.OutputStream;
import javax.sound.midi.Sequence;
/**
- * MidiFileWriter provides MIDI file writing services.
- *
- * There are three types of Standard MIDI File (SMF) formats,
+ * MidiFileWriter provides MIDI file writing services.
+ *
+ * There are three types of Standard MIDI File (SMF) formats,
* represented by integers 0, 1, and 2.
- *
+ *
* Type 0 files contain a single track and represents a single song
* performance.
* Type 1 may contain multiple tracks for a single song performance.
* Type 2 may contain multiple tracks, each representing a
* separate song performance.
- *
+ *
* See http://en.wikipedia.org/wiki/MIDI#MIDI_file_formats for more
* information.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -67,23 +67,23 @@ public abstract class MidiFileWriter
{
/**
* Return the MIDI file types supported by this writer.
- *
+ *
* @return the MIDI file types, or an empty array
*/
public abstract int[] getMidiFileTypes();
-
+
/**
* Return the MIDI file types supported by this writer for the
* given sequence.
- *
+ *
* @param sequence the sequence we'd like to write
* @return the MIDI file types, or an empty array
*/
public abstract int[] getMidiFileTypes(Sequence sequence);
-
+
/**
* Returns true if this writer supports the given file type.
- *
+ *
* @param fileType the file type we're asking about
* @return true if this writer supports fileType, false otherwise
*/
@@ -101,7 +101,7 @@ public abstract class MidiFileWriter
/**
* Returns true if this writer supports the given file type for the
* given sequence.
- *
+ *
* @param fileType the file type we're asking about
* @param sequence the sequence we'd like to write
* @return true if this writer supports fileType, false otherwise
@@ -119,7 +119,7 @@ public abstract class MidiFileWriter
/**
* Write a sequence to a stream using the specified MIDI file type.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file type to use
* @param out the output stream to write to
@@ -131,7 +131,7 @@ public abstract class MidiFileWriter
/**
* Write a sequence to a file using the specified MIDI file type.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file type to use
* @param out the file to write to
diff --git a/javax/sound/midi/spi/SoundbankReader.java b/javax/sound/midi/spi/SoundbankReader.java
index dbf2bb018..948d54fd1 100644
--- a/javax/sound/midi/spi/SoundbankReader.java
+++ b/javax/sound/midi/spi/SoundbankReader.java
@@ -49,7 +49,7 @@ import javax.sound.midi.Soundbank;
/**
* The SoundbankReader abstract class defines the methods to be provided
* by a soundbank file reader.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -58,37 +58,37 @@ public abstract class SoundbankReader
{
/**
* Get a Soundbank from the given URL.
- *
+ *
* @param url from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by url cannot be recognized
* @throws IOException if the data provided by url cannot be read
*/
public abstract Soundbank getSoundbank(URL url)
throws InvalidMidiDataException, IOException;
-
+
/**
* Get a Soundbank from the given InputStream.
- *
+ *
* @param stream from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by InputStream cannot be recognized
* @throws IOException if the data provided by InputStream cannot be read
*/
public abstract Soundbank getSoundbank(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Get a Soundbank from the given File.
- *
+ *
* @param file from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by File cannot be recognized
* @throws IOException if the data provided by File cannot be read
*/
diff --git a/javax/sound/sampled/AudioFileFormat.java b/javax/sound/sampled/AudioFileFormat.java
index 899258c05..2eeb78cf3 100644
--- a/javax/sound/sampled/AudioFileFormat.java
+++ b/javax/sound/sampled/AudioFileFormat.java
@@ -143,7 +143,7 @@ public class AudioFileFormat
/**
* Create a new AudioFileFormat given the type, the format, the
- * frame length, and some properties. The new object will have an
+ * frame length, and some properties. The new object will have an
* unspecified byte length. A copy of the properties argument will
* be made, so changes to the map passed in will not affect the
* new AudioFileFormat.
@@ -153,7 +153,7 @@ public class AudioFileFormat
* @param properties the properties
*/
public AudioFileFormat(Type type, AudioFormat fmt, int frameLen,
- Map<String, Object> properties)
+ Map<String, Object> properties)
{
this.byteLength = AudioSystem.NOT_SPECIFIED;
this.format = fmt;
@@ -171,7 +171,7 @@ public class AudioFileFormat
* @param frameLen the frame length
*/
protected AudioFileFormat(Type type, int byteLen, AudioFormat fmt,
- int frameLen)
+ int frameLen)
{
this.byteLength = byteLen;
this.format = fmt;
@@ -237,6 +237,6 @@ public class AudioFileFormat
public String toString()
{
return ("byteLength=" + byteLength + "; format=" + format
- + "; type=" + type + "; frameLength=" + frameLength);
+ + "; type=" + type + "; frameLength=" + frameLength);
}
}
diff --git a/javax/sound/sampled/AudioFormat.java b/javax/sound/sampled/AudioFormat.java
index 1f31c9929..b4fc601f2 100644
--- a/javax/sound/sampled/AudioFormat.java
+++ b/javax/sound/sampled/AudioFormat.java
@@ -140,7 +140,7 @@ public class AudioFormat
/**
* Create a new audio format, given various attributes of it.
* The properties map for this format will be empty.
- *
+ *
* @param encoding the encoding for this format
* @param sampleRate the sample rate
* @param sampleSizeInBits the sample size, in bits
@@ -150,8 +150,8 @@ public class AudioFormat
* @param bigEndian true if the data is stored big-endian
*/
public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
- int channels, int frameSize, float frameRate,
- boolean bigEndian)
+ int channels, int frameSize, float frameRate,
+ boolean bigEndian)
{
this.encoding = encoding;
this.sampleRate = sampleRate;
@@ -178,8 +178,8 @@ public class AudioFormat
* @param properties a map describing properties of this format
*/
public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
- int channels, int frameSize, float frameRate,
- boolean bigEndian, Map<String, Object> properties)
+ int channels, int frameSize, float frameRate,
+ boolean bigEndian, Map<String, Object> properties)
{
this.encoding = encoding;
this.sampleRate = sampleRate;
@@ -198,7 +198,7 @@ public class AudioFormat
* bits and the number of channels, unless one of those is
* AudioSystem#NOT_SPECIFIED. The frame rate will be the same as the sample
* rate, and the properties map will be empty.
- *
+ *
* @param sampleRate the sample rate
* @param sampleSizeInBits the sample size, in bits
* @param channels the number of channels
@@ -206,7 +206,7 @@ public class AudioFormat
* @param bigEndian true if the data is stored big-endian
*/
public AudioFormat(float sampleRate, int sampleSizeInBits,
- int channels, boolean signed, boolean bigEndian)
+ int channels, boolean signed, boolean bigEndian)
{
this.encoding = signed ? Encoding.PCM_SIGNED : Encoding.PCM_UNSIGNED;
this.sampleRate = sampleRate;
@@ -257,7 +257,7 @@ public class AudioFormat
/**
* Given a key, return a property associated with this format;
- * or null if this property is not set.
+ * or null if this property is not set.
* @param key the name of the property
* @return the value of the property, or null if the property is not set
*/
@@ -318,7 +318,7 @@ public class AudioFormat
}
/**
- * Return a read-only Map holding the properties associated with
+ * Return a read-only Map holding the properties associated with
* this format.
*/
public Map<String, Object> properties()
@@ -332,24 +332,24 @@ public class AudioFormat
public String toString()
{
CPStringBuilder result = new CPStringBuilder();
-
+
// usually at least encoding should be somewhat specified
result.append(encoding);
-
+
if (sampleRate != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
result.append(sampleRate);
result.append(" Hz");
}
-
+
if (sampleSizeInBits != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
result.append(sampleSizeInBits);
result.append(" bits");
}
-
+
if (channels != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
@@ -357,10 +357,10 @@ public class AudioFormat
result.append(" channel");
if (channels > 1) result.append("s");
}
-
+
if (sampleSizeInBits > 8)
result.append(bigEndian ? " big endian" : " little endian");
-
+
return result.toString();
}
}
diff --git a/javax/sound/sampled/AudioInputStream.java b/javax/sound/sampled/AudioInputStream.java
index 863578b0b..526e7e192 100644
--- a/javax/sound/sampled/AudioInputStream.java
+++ b/javax/sound/sampled/AudioInputStream.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ public class AudioInputStream extends InputStream
/** The length of the audio stream in frames. */
protected long frameLength;
- /** The current frame position, starting from frame zero. */
+ /** The current frame position, starting from frame zero. */
protected long framePos;
/** The size of a frame in bytes. */
@@ -92,7 +92,7 @@ public class AudioInputStream extends InputStream
public AudioInputStream(TargetDataLine line)
{
this(new TargetInputStream(line), line.getFormat(),
- AudioSystem.NOT_SPECIFIED);
+ AudioSystem.NOT_SPECIFIED);
}
/**
@@ -181,30 +181,30 @@ public class AudioInputStream extends InputStream
result = -1;
else
{
- int myFrameSize = (frameSize == AudioSystem.NOT_SPECIFIED
- ? 1 : frameSize);
- // Ensure length is a multiple of frame size.
- length -= length % myFrameSize;
-
- result = 0;
- while (result == 0 || result % myFrameSize != 0)
- {
- int val = input.read(buf, offset, length);
- if (val < 0)
- {
- // This is a weird situation as we might have read a
- // frame already. It isn't clear at all what to do if
- // we only found a partial frame. For now we just
- // return whatever we did find.
- if (result == 0)
- return -1;
- result -= result % myFrameSize;
- break;
- }
- result += val;
- }
- // assert result % myFrameSize == 0;
- framePos += result / myFrameSize;
+ int myFrameSize = (frameSize == AudioSystem.NOT_SPECIFIED
+ ? 1 : frameSize);
+ // Ensure length is a multiple of frame size.
+ length -= length % myFrameSize;
+
+ result = 0;
+ while (result == 0 || result % myFrameSize != 0)
+ {
+ int val = input.read(buf, offset, length);
+ if (val < 0)
+ {
+ // This is a weird situation as we might have read a
+ // frame already. It isn't clear at all what to do if
+ // we only found a partial frame. For now we just
+ // return whatever we did find.
+ if (result == 0)
+ return -1;
+ result -= result % myFrameSize;
+ break;
+ }
+ result += val;
+ }
+ // assert result % myFrameSize == 0;
+ framePos += result / myFrameSize;
}
return result;
}
@@ -212,7 +212,7 @@ public class AudioInputStream extends InputStream
public void reset() throws IOException
{
input.reset();
- framePos = markedFramePos;
+ framePos = markedFramePos;
}
public long skip(long n) throws IOException
@@ -243,10 +243,10 @@ public class AudioInputStream extends InputStream
public synchronized int read() throws IOException
{
if (buf == null)
- buf = new byte[1];
+ buf = new byte[1];
int count = read(buf, 0, 1);
if (count < 0)
- return -1;
+ return -1;
return buf[0];
}
diff --git a/javax/sound/sampled/AudioPermission.java b/javax/sound/sampled/AudioPermission.java
index 6698e35ce..a5325c910 100644
--- a/javax/sound/sampled/AudioPermission.java
+++ b/javax/sound/sampled/AudioPermission.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/sound/sampled/AudioSystem.java b/javax/sound/sampled/AudioSystem.java
index e858f176d..01133c91d 100644
--- a/javax/sound/sampled/AudioSystem.java
+++ b/javax/sound/sampled/AudioSystem.java
@@ -57,7 +57,7 @@ import javax.sound.sampled.spi.MixerProvider;
* This clas is the primary interface to the audio system. It contains
* a number of static methods which can be used to access this package's
* functionality.
- *
+ *
* @since 1.3
*/
public class AudioSystem
@@ -77,7 +77,7 @@ public class AudioSystem
* Return the file format of a given File.
* @param f the file to check
* @return the format of the file
- * @throws UnsupportedAudioFileException if the file's format is not
+ * @throws UnsupportedAudioFileException if the file's format is not
* recognized
* @throws IOException if there is an I/O error reading the file
*/
@@ -104,7 +104,7 @@ public class AudioSystem
* Return the file format of a given input stream.
* @param is the input stream to check
* @return the format of the stream
- * @throws UnsupportedAudioFileException if the stream's format is not
+ * @throws UnsupportedAudioFileException if the stream's format is not
* recognized
* @throws IOException if there is an I/O error reading the stream
*/
@@ -131,7 +131,7 @@ public class AudioSystem
* Return the file format of a given URL.
* @param url the URL to check
* @return the format of the URL
- * @throws UnsupportedAudioFileException if the URL's format is not
+ * @throws UnsupportedAudioFileException if the URL's format is not
* recognized
* @throws IOException if there is an I/O error reading the URL
*/
@@ -197,14 +197,14 @@ public class AudioSystem
/**
* Given an audio input stream, this will try to create a new audio input
* stream whose encoding matches the given target encoding. If no provider
- * offers this conversion, an exception is thrown.
+ * offers this conversion, an exception is thrown.
* @param targ the target encoding
* @param ais the original audio stream
* @return a new audio stream
* @throws IllegalArgumentException if the conversion cannot be made
*/
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
- AudioInputStream ais)
+ AudioInputStream ais)
{
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
@@ -220,14 +220,14 @@ public class AudioSystem
/**
* Given an audio input stream, this will try to create a new audio input
* stream whose format matches the given target format. If no provider
- * offers this conversion, an exception is thrown.
+ * offers this conversion, an exception is thrown.
* @param targ the target format
* @param ais the original audio stream
* @return a new audio stream
* @throws IllegalArgumentException if the conversion cannot be made
*/
public static AudioInputStream getAudioInputStream(AudioFormat targ,
- AudioInputStream ais)
+ AudioInputStream ais)
{
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
@@ -457,7 +457,7 @@ public class AudioSystem
* @since 1.5
*/
public static SourceDataLine getSourceDataLine(AudioFormat fmt,
- Mixer.Info mixer)
+ Mixer.Info mixer)
throws LineUnavailableException
{
DataLine.Info info = new DataLine.Info(SourceDataLine.class, fmt);
@@ -489,7 +489,7 @@ public class AudioSystem
/**
* Find and return a target data line matching the given audio format.
* @param fmt the format to match
- * @throws LineUnavailableException if no matching line was found
+ * @throws LineUnavailableException if no matching line was found
* @since 1.5
*/
public static TargetDataLine getTargetDataLine(AudioFormat fmt)
@@ -517,7 +517,7 @@ public class AudioSystem
* @since 1.5
*/
public static TargetDataLine getTargetDataLine(AudioFormat fmt,
- Mixer.Info mixer)
+ Mixer.Info mixer)
throws LineUnavailableException
{
DataLine.Info info = new DataLine.Info(TargetDataLine.class, fmt);
@@ -571,12 +571,12 @@ public class AudioSystem
/**
* Given a target encoding and a source audio format, return an array of all
- * matching audio formats to which data in this source format can be converted.
+ * matching audio formats to which data in this source format can be converted.
* @param encoding the target encoding
* @param sourceFmt the source format
*/
public static AudioFormat[] getTargetFormats(AudioFormat.Encoding encoding,
- AudioFormat sourceFmt)
+ AudioFormat sourceFmt)
{
HashSet<AudioFormat> result = new HashSet<AudioFormat>();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
@@ -616,9 +616,9 @@ public class AudioSystem
* @param source the source format
*/
public static boolean isConversionSupported(AudioFormat.Encoding targ,
- AudioFormat source)
+ AudioFormat source)
{
- Iterator i
+ Iterator i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -636,9 +636,9 @@ public class AudioSystem
* @param source the source format
*/
public static boolean isConversionSupported(AudioFormat targ,
- AudioFormat source)
+ AudioFormat source)
{
- Iterator i
+ Iterator i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -672,20 +672,20 @@ public class AudioSystem
/**
* Return true if the given audio file format is supported for the
- * given audio input stream by one of the providers installed on the
+ * given audio input stream by one of the providers installed on the
* system.
* @param type the audio file format type
* @param ais the audio input stream
*/
public static boolean isFileTypeSupported(AudioFileFormat.Type type,
- AudioInputStream ais)
+ AudioInputStream ais)
{
return isFileTypeSupported(getAudioFileTypes(ais), type);
}
/**
* Return true if some provider on the system supplies a line
- * matching the argument.
+ * matching the argument.
* @param info the line to match
*/
public static boolean isLineSupported(Line.Info info)
@@ -711,7 +711,7 @@ public class AudioSystem
* @throws IllegalArgumentException if the file type is not supported
*/
public static int write(AudioInputStream ais, AudioFileFormat.Type type,
- File out)
+ File out)
throws IOException
{
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
@@ -736,7 +736,7 @@ public class AudioSystem
* @throws IllegalArgumentException if the file type is not supported
*/
public static int write(AudioInputStream ais, AudioFileFormat.Type type,
- OutputStream os)
+ OutputStream os)
throws IOException
{
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
diff --git a/javax/sound/sampled/BooleanControl.java b/javax/sound/sampled/BooleanControl.java
index 0a78e493f..37e372e7b 100644
--- a/javax/sound/sampled/BooleanControl.java
+++ b/javax/sound/sampled/BooleanControl.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,7 +99,7 @@ public abstract class BooleanControl extends Control
* @param falseLabel the label for the false state
*/
protected BooleanControl(Type type, boolean init, String trueLabel,
- String falseLabel)
+ String falseLabel)
{
super(type);
this.value = init;
diff --git a/javax/sound/sampled/Clip.java b/javax/sound/sampled/Clip.java
index 1fa769470..28b49796f 100644
--- a/javax/sound/sampled/Clip.java
+++ b/javax/sound/sampled/Clip.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/sound/sampled/CompoundControl.java b/javax/sound/sampled/CompoundControl.java
index 556c805ad..2b8941cf3 100644
--- a/javax/sound/sampled/CompoundControl.java
+++ b/javax/sound/sampled/CompoundControl.java
@@ -95,9 +95,9 @@ public abstract class CompoundControl extends Control
result.append(": ");
for (int i = 0; i < memberControls.length; ++i)
{
- if (i > 0)
- result.append(", ");
- result.append(memberControls[i].toString());
+ if (i > 0)
+ result.append(", ");
+ result.append(memberControls[i].toString());
}
return result.toString();
}
diff --git a/javax/sound/sampled/DataLine.java b/javax/sound/sampled/DataLine.java
index 4482c9885..5d88c6ace 100644
--- a/javax/sound/sampled/DataLine.java
+++ b/javax/sound/sampled/DataLine.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005-2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@ import gnu.java.lang.CPStringBuilder;
* The DataLine interface adds data-related functionality to the Line
* interface. For example, it adds methods to start and stop the data
* on the line.
- * @since 1.3
+ * @since 1.3
*/
public interface DataLine extends Line
{
@@ -158,7 +158,7 @@ public interface DataLine extends Line
if (minBufferSize < other.minBufferSize ||
maxBufferSize > other.maxBufferSize)
return false;
-
+
for (int i = 0; i < formats.length; ++i)
{
boolean ok = false;
@@ -173,7 +173,7 @@ public interface DataLine extends Line
if (! ok)
return false;
}
-
+
return true;
}
@@ -190,14 +190,14 @@ public interface DataLine extends Line
result.append(", ");
result.append(formats[i].toString());
}
-
+
result.append("]; minBufferSize: ");
result.append(minBufferSize);
result.append("; maxBufferSize: ");
result.append(maxBufferSize);
return result.toString();
}
-
+
} // end class: Info
/**
@@ -237,7 +237,7 @@ public interface DataLine extends Line
float getLevel();
/**
- * Return the current frame position.
+ * Return the current frame position.
* @since 1.5
*/
long getLongFramePosition();
diff --git a/javax/sound/sampled/EnumControl.java b/javax/sound/sampled/EnumControl.java
index 1ddc8a9a8..7a032420d 100644
--- a/javax/sound/sampled/EnumControl.java
+++ b/javax/sound/sampled/EnumControl.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,7 @@ package javax.sound.sampled;
/**
* An EnumControl is a Control which can take one of a specified set of
- * values.
+ * values.
* @since 1.3
*/
public abstract class EnumControl extends Control
@@ -110,8 +110,8 @@ public abstract class EnumControl extends Control
{
for (int i = 0; i < values.length; ++i)
{
- if (! values[i].equals(value))
- throw new IllegalArgumentException("value not supported");
+ if (! values[i].equals(value))
+ throw new IllegalArgumentException("value not supported");
}
this.value = value;
}
diff --git a/javax/sound/sampled/FloatControl.java b/javax/sound/sampled/FloatControl.java
index bbdb24bab..6ae917829 100644
--- a/javax/sound/sampled/FloatControl.java
+++ b/javax/sound/sampled/FloatControl.java
@@ -97,7 +97,7 @@ public abstract class FloatControl extends Control
/**
* Create a new FloatControl given its type and various parameters.
* The minimum, maximum, and midpoint labels will all be the empty string.
- *
+ *
* @param type the type
* @param min the minimum valuee
* @param max the maximum value
@@ -107,7 +107,7 @@ public abstract class FloatControl extends Control
* @param units the description of the units
*/
protected FloatControl(Type type, float min, float max, float prec,
- int update, float init, String units)
+ int update, float init, String units)
{
super(type);
this.minimum = min;
@@ -123,7 +123,7 @@ public abstract class FloatControl extends Control
/**
* Create a new FloatControl given its type and various parameters.
- *
+ *
* @param type the type
* @param min the minimum valuee
* @param max the maximum value
@@ -136,8 +136,8 @@ public abstract class FloatControl extends Control
* @param maxLabel the label for the maximum value
*/
protected FloatControl(Type type, float min, float max, float prec,
- int update, float init, String units,
- String minLabel, String midLabel, String maxLabel)
+ int update, float init, String units,
+ String minLabel, String midLabel, String maxLabel)
{
super(type);
this.minimum = min;
@@ -242,7 +242,7 @@ public abstract class FloatControl extends Control
* over the given time interval, specified in microseconds.
* The default implementation does not do this, but instead
* simply sets the value to the final value immediately.
- *
+ *
* @param from the starting value
* @param to the final value
* @param ms the number of microseconds
diff --git a/javax/sound/sampled/Line.java b/javax/sound/sampled/Line.java
index 536752a1c..62d284bd8 100644
--- a/javax/sound/sampled/Line.java
+++ b/javax/sound/sampled/Line.java
@@ -94,7 +94,7 @@ public interface Line
* @param listener the listener to notify
*/
void addLineListener(LineListener listener);
-
+
/**
* Close this line.
*/
diff --git a/javax/sound/sampled/LineEvent.java b/javax/sound/sampled/LineEvent.java
index dd4a9ae9a..43a184cae 100644
--- a/javax/sound/sampled/LineEvent.java
+++ b/javax/sound/sampled/LineEvent.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -153,15 +153,15 @@ public class LineEvent extends EventObject
public String toString()
{
return ("type=" + type + "; framePosition=" + framePosition
- + "line=" + line);
+ + "line=" + line);
}
-
+
private void readObject(ObjectInputStream ois)
throws IOException
{
throw new NotSerializableException("LineEvent is not serializable");
}
-
+
private void writeObject(ObjectOutputStream oos)
throws IOException
{
diff --git a/javax/sound/sampled/LineUnavailableException.java b/javax/sound/sampled/LineUnavailableException.java
index b203d7be2..a4655fffd 100644
--- a/javax/sound/sampled/LineUnavailableException.java
+++ b/javax/sound/sampled/LineUnavailableException.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/sound/sampled/Mixer.java b/javax/sound/sampled/Mixer.java
index ff657cfd1..dd400f94d 100644
--- a/javax/sound/sampled/Mixer.java
+++ b/javax/sound/sampled/Mixer.java
@@ -115,7 +115,7 @@ public interface Mixer extends Line
public final String toString()
{
return ("name=" + name + "; description=" + description
- + "; vendor=" + vendor + "; version=" + version);
+ + "; vendor=" + vendor + "; version=" + version);
}
}
@@ -148,7 +148,7 @@ public interface Mixer extends Line
/**
* Return an array of Info objects describing all the source lines
* available in this Mixer, which match the provided decsription.
- * @param info the description of the source lines to find
+ * @param info the description of the source lines to find
*/
Line.Info[] getSourceLineInfo(Line.Info info);
@@ -166,7 +166,7 @@ public interface Mixer extends Line
/**
* Return an array of Info objects describing all the target lines
* available in this Mixer, which match the provided decsription.
- * @param info the description of the target lines to find
+ * @param info the description of the target lines to find
*/
Line.Info[] getTargetLineInfo(Line.Info info);
diff --git a/javax/sound/sampled/Port.java b/javax/sound/sampled/Port.java
index fc0bf71d9..292e1f151 100644
--- a/javax/sound/sampled/Port.java
+++ b/javax/sound/sampled/Port.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package javax.sound.sampled;
/**
* A Port is a Line which represents an audio device, for instance
* a microphone.
- *
+ *
* @since 1.3
*/
public interface Port extends Line
@@ -56,28 +56,28 @@ public interface Port extends Line
/** A CD player. */
public static final Info COMPACT_DISC = new Info(Port.class,
- "Compact Disc",
- true);
+ "Compact Disc",
+ true);
/** Headphones. */
public static final Info HEADPHONE = new Info(Port.class, "Headphone",
- false);
+ false);
/** Generic input line. */
public static final Info LINE_IN = new Info(Port.class, "Line in",
- true);
+ true);
/** Generic output line. */
public static final Info LINE_OUT = new Info(Port.class, "Line out",
- false);
+ false);
/** A microphone. */
public static final Info MICROPHONE = new Info(Port.class, "Microphone",
- true);
+ true);
/** A speaker. */
public static final Info SPEAKER = new Info(Port.class, "Speaker",
- false);
+ false);
private String name;
private boolean isSource;
diff --git a/javax/sound/sampled/ReverbType.java b/javax/sound/sampled/ReverbType.java
index c7cced8a7..79a4b4945 100644
--- a/javax/sound/sampled/ReverbType.java
+++ b/javax/sound/sampled/ReverbType.java
@@ -1,4 +1,4 @@
-/* Reverb attributes
+/* Reverb attributes
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,7 +61,7 @@ public class ReverbType
* @param decay the decay time in microseconds
*/
protected ReverbType(String name, int earlyDelay, float earlyInten,
- int lateDelay, float lateInten, int decay)
+ int lateDelay, float lateInten, int decay)
{
this.name = name;
this.earlyReflectionDelay = earlyDelay;
@@ -136,9 +136,9 @@ public class ReverbType
public final String toString()
{
return ("name=" + name + "; earlyReflectionDelay=" + earlyReflectionDelay
- + "; earlyReflectionIntensity=" + earlyReflectionIntensity
- + "; lateReflectionDelay=" + lateReflectionDelay
- + "; lateReflectionIntensity=" + lateReflectionIntensity
- + "; decayTime=" + decayTime);
+ + "; earlyReflectionIntensity=" + earlyReflectionIntensity
+ + "; lateReflectionDelay=" + lateReflectionDelay
+ + "; lateReflectionIntensity=" + lateReflectionIntensity
+ + "; decayTime=" + decayTime);
}
}
diff --git a/javax/sound/sampled/UnsupportedAudioFileException.java b/javax/sound/sampled/UnsupportedAudioFileException.java
index bced9c18f..1399b61a8 100644
--- a/javax/sound/sampled/UnsupportedAudioFileException.java
+++ b/javax/sound/sampled/UnsupportedAudioFileException.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/sound/sampled/spi/AudioFileReader.java b/javax/sound/sampled/spi/AudioFileReader.java
index 6df4cc22d..098190f0f 100644
--- a/javax/sound/sampled/spi/AudioFileReader.java
+++ b/javax/sound/sampled/spi/AudioFileReader.java
@@ -51,7 +51,7 @@ import javax.sound.sampled.UnsupportedAudioFileException;
* This abstract class defines the interface to audio file readers.
* A concrete provider subclass will implement the methods declared
* here. These methods can be used to determine the format of
- * files, and to retrieve an AudioInputStream for a file.
+ * files, and to retrieve an AudioInputStream for a file.
* @since 1.3
*/
public abstract class AudioFileReader
@@ -110,36 +110,36 @@ public abstract class AudioFileReader
/**
* Return an AudioInputStream for the given file. The file is assumed
- * to hold valid audio data.
+ * to hold valid audio data.
* @param file the file to read
* @return an AudioInputStream for the file
* @throws UnsupportedAudioFileException if the file's type is not
* recognized
- * @throws IOException if there is an error while reading the file
+ * @throws IOException if there is an error while reading the file
*/
public abstract AudioInputStream getAudioInputStream(File file)
throws UnsupportedAudioFileException, IOException;
/**
* Return an AudioInputStream wrapping the given input stream. The stream
- * is assumed to hold valid audio data.
+ * is assumed to hold valid audio data.
* @param is the input stream to wrap
* @return an AudioInputStream for the stream
* @throws UnsupportedAudioFileException if the stream's type is not
* recognized
- * @throws IOException if there is an error while reading the stream
+ * @throws IOException if there is an error while reading the stream
*/
public abstract AudioInputStream getAudioInputStream(InputStream is)
throws UnsupportedAudioFileException, IOException;
/**
* Return an AudioInputStream for the given URL. The URL is assumed
- * to hold valid audio data.
+ * to hold valid audio data.
* @param url the URL to read
* @return an AudioInputStream for the URL
* @throws UnsupportedAudioFileException if the URL's type is not
* recognized
- * @throws IOException if there is an error while reading the URL
+ * @throws IOException if there is an error while reading the URL
*/
public abstract AudioInputStream getAudioInputStream(URL url)
throws UnsupportedAudioFileException, IOException;
diff --git a/javax/sound/sampled/spi/AudioFileWriter.java b/javax/sound/sampled/spi/AudioFileWriter.java
index 955bb0517..82f9b31b8 100644
--- a/javax/sound/sampled/spi/AudioFileWriter.java
+++ b/javax/sound/sampled/spi/AudioFileWriter.java
@@ -94,7 +94,7 @@ public abstract class AudioFileWriter
* @param ais the audio input stream to write
*/
public boolean isFileTypeSupported(AudioFileFormat.Type type,
- AudioInputStream ais)
+ AudioInputStream ais)
{
AudioFileFormat.Type[] types = getAudioFileTypes(ais);
for (int i = 0; i < types.length; ++i)
@@ -114,7 +114,7 @@ public abstract class AudioFileWriter
* @throws IOException if an I/O error occurs when writing
*/
public abstract int write(AudioInputStream ais, AudioFileFormat.Type type,
- File out)
+ File out)
throws IOException;
/**
@@ -126,6 +126,6 @@ public abstract class AudioFileWriter
* @throws IOException if an I/O error occurs when writing
*/
public abstract int write(AudioInputStream ais, AudioFileFormat.Type type,
- OutputStream os)
+ OutputStream os)
throws IOException;
}
diff --git a/javax/sound/sampled/spi/FormatConversionProvider.java b/javax/sound/sampled/spi/FormatConversionProvider.java
index e96cc0454..b9d3e9d10 100644
--- a/javax/sound/sampled/spi/FormatConversionProvider.java
+++ b/javax/sound/sampled/spi/FormatConversionProvider.java
@@ -42,7 +42,7 @@ import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
/**
- * A format conversion provider supplies methods for converting between
+ * A format conversion provider supplies methods for converting between
* different audio formats. This abstract class defines the interface
* to this functionality; concrete subclasses will implement the methods
* declared here.
@@ -67,7 +67,7 @@ public abstract class FormatConversionProvider
* @throws IllegalArgumentException if the conversion is not supported
*/
public abstract AudioInputStream getAudioInputStream(AudioFormat.Encoding encoding,
- AudioInputStream source);
+ AudioInputStream source);
/**
* Return an audio input stream given the desired target format and
@@ -79,7 +79,7 @@ public abstract class FormatConversionProvider
* @throws IllegalArgumentException if the conversion is not supported
*/
public abstract AudioInputStream getAudioInputStream(AudioFormat format,
- AudioInputStream source);
+ AudioInputStream source);
/**
* Return an array of all the source encodings supported by this conversion
@@ -109,7 +109,7 @@ public abstract class FormatConversionProvider
* @return an array of supported target formats
*/
public abstract AudioFormat[] getTargetFormats(AudioFormat.Encoding targ,
- AudioFormat src);
+ AudioFormat src);
/**
* Return true if this provider supports conversion from the given
@@ -119,13 +119,13 @@ public abstract class FormatConversionProvider
* @return true if the conversion is supported
*/
public boolean isConversionSupported(AudioFormat.Encoding targ,
- AudioFormat src)
+ AudioFormat src)
{
AudioFormat.Encoding[] encodings = getTargetEncodings(src);
for (int i = 0; i < encodings.length; ++i)
{
- if (targ.equals(encodings[i]))
- return true;
+ if (targ.equals(encodings[i]))
+ return true;
}
return false;
}
@@ -154,14 +154,14 @@ public abstract class FormatConversionProvider
AudioFormat.Encoding[] srcs = getSourceEncodings();
for (int i = 0; i < srcs.length; ++i)
{
- if (src.equals(srcs[i]))
- return true;
+ if (src.equals(srcs[i]))
+ return true;
}
return false;
}
/**
- * Return true if an encoding matching the argument is supported as a
+ * Return true if an encoding matching the argument is supported as a
* target encoding by this provider.
* @param targ the target encoding
* @return true if it is supported
@@ -171,8 +171,8 @@ public abstract class FormatConversionProvider
AudioFormat.Encoding[] encodings = getTargetEncodings();
for (int i = 0; i < encodings.length; ++i)
{
- if (targ.equals(encodings[i]))
- return true;
+ if (targ.equals(encodings[i]))
+ return true;
}
return false;
}
diff --git a/javax/sql/ConnectionEvent.java b/javax/sql/ConnectionEvent.java
index 0d20b1afb..3821f4100 100644
--- a/javax/sql/ConnectionEvent.java
+++ b/javax/sql/ConnectionEvent.java
@@ -1,4 +1,4 @@
-/* ConnectionEvent.java
+/* ConnectionEvent.java
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ import java.util.EventObject;
/**
* @since 1.4
*/
-public class ConnectionEvent extends EventObject
+public class ConnectionEvent extends EventObject
{
private static final long serialVersionUID = -4843217645290030002L;
diff --git a/javax/sql/ConnectionEventListener.java b/javax/sql/ConnectionEventListener.java
index 080118966..b9b69d34c 100644
--- a/javax/sql/ConnectionEventListener.java
+++ b/javax/sql/ConnectionEventListener.java
@@ -1,4 +1,4 @@
-/* ConnectionEventListener.java
+/* ConnectionEventListener.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,7 +43,7 @@ import java.util.EventListener;
/**
* @since 1.4
*/
-public interface ConnectionEventListener extends EventListener
+public interface ConnectionEventListener extends EventListener
{
/**
* @since 1.4
diff --git a/javax/sql/ConnectionPoolDataSource.java b/javax/sql/ConnectionPoolDataSource.java
index 99661d7f4..545af3fe9 100644
--- a/javax/sql/ConnectionPoolDataSource.java
+++ b/javax/sql/ConnectionPoolDataSource.java
@@ -1,4 +1,4 @@
-/* ConnectionPoolDataSource.java
+/* ConnectionPoolDataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface ConnectionPoolDataSource
+public interface ConnectionPoolDataSource
{
/**
* @since 1.4
diff --git a/javax/sql/DataSource.java b/javax/sql/DataSource.java
index de1bc8267..da2017494 100644
--- a/javax/sql/DataSource.java
+++ b/javax/sql/DataSource.java
@@ -1,4 +1,4 @@
-/* DataSource.java
+/* DataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,7 +45,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface DataSource
+public interface DataSource
{
/**
* @since 1.4
diff --git a/javax/sql/PooledConnection.java b/javax/sql/PooledConnection.java
index 1fb23df14..8a839ba7d 100644
--- a/javax/sql/PooledConnection.java
+++ b/javax/sql/PooledConnection.java
@@ -1,4 +1,4 @@
-/* PooledConnection.java
+/* PooledConnection.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface PooledConnection
+public interface PooledConnection
{
/**
* @since 1.4
diff --git a/javax/sql/RowSet.java b/javax/sql/RowSet.java
index 2a9ad2784..ca7f72987 100644
--- a/javax/sql/RowSet.java
+++ b/javax/sql/RowSet.java
@@ -1,4 +1,4 @@
-/* RowSet.java
+/* RowSet.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -56,7 +56,7 @@ import java.util.Map;
/**
* @since 1.4
*/
-public interface RowSet extends ResultSet
+public interface RowSet extends ResultSet
{
String getUrl() throws SQLException;
diff --git a/javax/sql/RowSetEvent.java b/javax/sql/RowSetEvent.java
index 26de4e973..dd0a9bcc4 100644
--- a/javax/sql/RowSetEvent.java
+++ b/javax/sql/RowSetEvent.java
@@ -1,4 +1,4 @@
-/* RowSetEvent.java
+/* RowSetEvent.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,7 +43,7 @@ import java.util.EventObject;
/**
* @since 1.4
*/
-public class RowSetEvent extends EventObject
+public class RowSetEvent extends EventObject
{
public RowSetEvent(RowSet source)
{
diff --git a/javax/sql/RowSetInternal.java b/javax/sql/RowSetInternal.java
index 1fdacb9e7..7b3252cff 100644
--- a/javax/sql/RowSetInternal.java
+++ b/javax/sql/RowSetInternal.java
@@ -1,4 +1,4 @@
-/* RowSetInternal.java
+/* RowSetInternal.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,7 +45,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface RowSetInternal
+public interface RowSetInternal
{
/**
* @since 1.4
diff --git a/javax/sql/RowSetListener.java b/javax/sql/RowSetListener.java
index 86726747f..1a887c548 100644
--- a/javax/sql/RowSetListener.java
+++ b/javax/sql/RowSetListener.java
@@ -1,4 +1,4 @@
-/* RowSetListener.java
+/* RowSetListener.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,7 +43,7 @@ import java.util.EventListener;
/**
* @since 1.4
*/
-public interface RowSetListener extends EventListener
+public interface RowSetListener extends EventListener
{
void rowSetChanged(RowSetEvent event);
diff --git a/javax/sql/RowSetMetaData.java b/javax/sql/RowSetMetaData.java
index 8279fee39..72c58ac0c 100644
--- a/javax/sql/RowSetMetaData.java
+++ b/javax/sql/RowSetMetaData.java
@@ -1,4 +1,4 @@
-/* RowSetMetaData.java
+/* RowSetMetaData.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface RowSetMetaData extends ResultSetMetaData
+public interface RowSetMetaData extends ResultSetMetaData
{
void setColumnCount(int columnCount) throws SQLException;
diff --git a/javax/sql/RowSetReader.java b/javax/sql/RowSetReader.java
index fb33315b4..a6541e0e3 100644
--- a/javax/sql/RowSetReader.java
+++ b/javax/sql/RowSetReader.java
@@ -1,4 +1,4 @@
-/* RowSetReader.java
+/* RowSetReader.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,7 +43,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface RowSetReader
+public interface RowSetReader
{
void readData(RowSetInternal caller) throws SQLException;
}
diff --git a/javax/sql/RowSetWriter.java b/javax/sql/RowSetWriter.java
index 20c1034dd..3d07541bc 100644
--- a/javax/sql/RowSetWriter.java
+++ b/javax/sql/RowSetWriter.java
@@ -1,4 +1,4 @@
-/* RowSetWriter.java
+/* RowSetWriter.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -43,7 +43,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface RowSetWriter
+public interface RowSetWriter
{
boolean writeData(RowSetInternal caller) throws SQLException;
}
diff --git a/javax/sql/XAConnection.java b/javax/sql/XAConnection.java
index 2fadffcfe..4cb0b3086 100644
--- a/javax/sql/XAConnection.java
+++ b/javax/sql/XAConnection.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,7 +45,7 @@ import javax.transaction.xa.XAResource;
/**
* @since 1.4
*/
-public interface XAConnection extends PooledConnection
+public interface XAConnection extends PooledConnection
{
XAResource getXAResource() throws SQLException;
}
diff --git a/javax/sql/XADataSource.java b/javax/sql/XADataSource.java
index 724e2f08a..0387140d9 100644
--- a/javax/sql/XADataSource.java
+++ b/javax/sql/XADataSource.java
@@ -1,4 +1,4 @@
-/* XADataSource.java
+/* XADataSource.java
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ import java.sql.SQLException;
/**
* @since 1.4
*/
-public interface XADataSource
+public interface XADataSource
{
XAConnection getXAConnection() throws SQLException;
diff --git a/javax/swing/AbstractAction.java b/javax/swing/AbstractAction.java
index ffd122fe0..535a3e71e 100644
--- a/javax/swing/AbstractAction.java
+++ b/javax/swing/AbstractAction.java
@@ -47,7 +47,7 @@ import javax.swing.event.SwingPropertyChangeSupport;
/**
* A base class for implementing the {@link Action} interface.
- *
+ *
* @author Andrew Selkirk
*/
public abstract class AbstractAction
@@ -59,9 +59,9 @@ public abstract class AbstractAction
* A flag that indicates whether or not the action is enabled.
*/
protected boolean enabled = true;
-
+
/**
- * Provides support for property change event notification.
+ * Provides support for property change event notification.
*/
protected SwingPropertyChangeSupport changeSupport =
new SwingPropertyChangeSupport(this);
@@ -80,7 +80,7 @@ public abstract class AbstractAction
}
/**
- * Creates a new action with the specified name. The name is stored as a
+ * Creates a new action with the specified name. The name is stored as a
* property with the key {@link Action#NAME}, and no other properties are
* initialised.
*
@@ -94,7 +94,7 @@ public abstract class AbstractAction
/**
* Creates a new action with the specified name and icon. The name is stored
* as a property with the key {@link Action#NAME}, the icon is stored as a
- * property with the key {@link Action#SMALL_ICON}, and no other properties
+ * property with the key {@link Action#SMALL_ICON}, and no other properties
* are initialised.
*
* @param name the name (<code>null</code> permitted).
@@ -123,12 +123,12 @@ public abstract class AbstractAction
/**
* Returns the value associated with the specified key.
- *
+ *
* @param key the key (not <code>null</code>).
- *
- * @return The value associated with the specified key, or
+ *
+ * @return The value associated with the specified key, or
* <code>null</code> if the key is not found.
- *
+ *
* @see #putValue(String, Object)
*/
public Object getValue(String key)
@@ -137,20 +137,20 @@ public abstract class AbstractAction
}
/**
- * Sets the value associated with the specified key and sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners.
- * The standard keys are:
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are:
* <ul>
* <li>{@link #NAME}</li>
- * <li>{@link #SHORT_DESCRIPTION}</li>
+ * <li>{@link #SHORT_DESCRIPTION}</li>
* <li>{@link #LONG_DESCRIPTION}</li>
- * <li>{@link #SMALL_ICON}</li>
+ * <li>{@link #SMALL_ICON}</li>
* <li>{@link #ACTION_COMMAND_KEY}</li>
- * <li>{@link #ACCELERATOR_KEY}</li>
+ * <li>{@link #ACCELERATOR_KEY}</li>
* <li>{@link #MNEMONIC_KEY}</li>
* </ul>
* Any existing value associated with the key will be overwritten.
- *
+ *
* @param key the key (not <code>null</code>).
* @param value the value (<code>null</code> permitted).
*/
@@ -168,7 +168,7 @@ public abstract class AbstractAction
* Returns the flag that indicates whether or not the action is enabled.
*
* @return The flag.
- *
+ *
* @see #setEnabled(boolean)
*/
public boolean isEnabled()
@@ -178,12 +178,12 @@ public abstract class AbstractAction
/**
* Sets the flag that indicates whether or not the action is enabled and, if
- * the value of the flag changed from the previous setting, sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
+ * the value of the flag changed from the previous setting, sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
* the property name 'enabled').
*
* @param enabled the new flag value.
- *
+ *
* @see #isEnabled()
*/
public void setEnabled(boolean enabled)
@@ -196,10 +196,10 @@ public abstract class AbstractAction
}
/**
- * Returns an array of the keys for the property values that have been
+ * Returns an array of the keys for the property values that have been
* defined via the {@link #putValue(String, Object)} method (or the class
* constructor).
- *
+ *
* @return An array of keys.
*/
public Object[] getKeys()
@@ -208,7 +208,7 @@ public abstract class AbstractAction
}
/**
- * Sends a {@link PropertyChangeEvent} for the named property to all
+ * Sends a {@link PropertyChangeEvent} for the named property to all
* registered listeners.
*
* @param propertyName the property name.
@@ -220,17 +220,17 @@ public abstract class AbstractAction
{
changeSupport.firePropertyChange(propertyName, oldValue, newValue);
}
-
+
/**
* Sends a {@link PropertyChangeEvent} for the named property to all
- * registered listeners. This private method is called by the
+ * registered listeners. This private method is called by the
* {@link #setEnabled(boolean)} method.
*
* @param propertyName the property name.
* @param oldValue the old value of the property.
* @param newValue the new value of the property.
*/
- private void firePropertyChange(String propertyName, boolean oldValue,
+ private void firePropertyChange(String propertyName, boolean oldValue,
boolean newValue)
{
changeSupport.firePropertyChange(propertyName, oldValue, newValue);
@@ -241,7 +241,7 @@ public abstract class AbstractAction
* from this action.
*
* @param listener the listener.
- *
+ *
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
@@ -250,11 +250,11 @@ public abstract class AbstractAction
}
/**
- * Deregisters a listener so that it no longer receives
+ * Deregisters a listener so that it no longer receives
* {@link PropertyChangeEvent} notifications from this action.
*
* @param listener the listener.
- *
+ *
* @see #addPropertyChangeListener(PropertyChangeListener)
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
@@ -266,7 +266,7 @@ public abstract class AbstractAction
* Returns all registered listeners.
*
* @return An array of listeners.
- *
+ *
* @since 1.4
*/
public PropertyChangeListener[] getPropertyChangeListeners()
diff --git a/javax/swing/AbstractButton.java b/javax/swing/AbstractButton.java
index 8764f6f8c..6cbc7751f 100644
--- a/javax/swing/AbstractButton.java
+++ b/javax/swing/AbstractButton.java
@@ -129,11 +129,11 @@ import javax.swing.text.View;
*
* <p>The various behavioral aspects of these properties follows:</p>
*
- * <ul>
+ * <ul>
*
* <li>When non-bound properties stored in the button change, the button
* fires ChangeEvents to its ChangeListeners.</li>
- *
+ *
* <li>When bound properties stored in the button change, the button fires
* PropertyChangeEvents to its PropertyChangeListeners</li>
*
@@ -271,7 +271,7 @@ public abstract class AbstractButton extends JComponent
/** Whether or not the button fills its content area. */
boolean contentAreaFilled;
-
+
/** Whether rollover is enabled. */
boolean rollOverEnabled;
@@ -302,7 +302,7 @@ public abstract class AbstractButton extends JComponent
/**
* Listener the button uses to receive ChangeEvents from its model.
- */
+ */
protected ChangeListener changeListener;
/**
@@ -317,16 +317,16 @@ public abstract class AbstractButton extends JComponent
* <code>ActionEvent</code>.
*/
long multiClickThreshhold;
-
+
/**
* Listener the button uses to receive PropertyChangeEvents from its
* Action.
*/
PropertyChangeListener actionPropertyChangeListener;
-
- /** ChangeEvent that is fired to button's ChangeEventListeners */
+
+ /** ChangeEvent that is fired to button's ChangeEventListeners */
protected ChangeEvent changeEvent = new ChangeEvent(this);
-
+
/**
* Indicates if the borderPainted property has been set by a client
* program or by the UI.
@@ -367,26 +367,26 @@ public abstract class AbstractButton extends JComponent
* Fired in a PropertyChangeEvent when the "borderPainted" property changes.
*/
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
-
+
/**
* Fired in a PropertyChangeEvent when the "contentAreaFilled" property
* changes.
*/
public static final String CONTENT_AREA_FILLED_CHANGED_PROPERTY =
"contentAreaFilled";
-
+
/**
* Fired in a PropertyChangeEvent when the "disabledIcon" property changes.
*/
public static final String DISABLED_ICON_CHANGED_PROPERTY = "disabledIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "disabledSelectedIcon" property
* changes.
*/
public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY =
"disabledSelectedIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "focusPainted" property changes.
*/
@@ -433,14 +433,14 @@ public abstract class AbstractButton extends JComponent
* Fired in a PropertyChangeEvent when the "rolloverIcon" property changes.
*/
public static final String ROLLOVER_ICON_CHANGED_PROPERTY = "rolloverIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "rolloverSelectedIcon" property
* changes.
*/
public static final String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY =
"rolloverSelectedIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "selectedIcon" property changes.
*/
@@ -471,7 +471,7 @@ public abstract class AbstractButton extends JComponent
AccessibleText
{
private static final long serialVersionUID = -5673062525319836790L;
-
+
protected AccessibleAbstractButton()
{
// Nothing to do here yet.
@@ -553,7 +553,7 @@ public abstract class AbstractButton extends JComponent
{
Object[] target = new Object[group.getButtonCount()];
Enumeration els = group.getElements();
-
+
for (int index = 0; els.hasMoreElements(); ++index)
{
target[index] = els.nextElement();
@@ -663,7 +663,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Sets the current accessible value as object. If the specified number
+ * Sets the current accessible value as object. If the specified number
* is 0 the button will be deselected, otherwise the button will
* be selected.
*
@@ -942,7 +942,7 @@ public abstract class AbstractButton extends JComponent
public AttributeSet getCharacterAttribute(int i)
{
AttributeSet atts = null;
- View view = (View) getClientProperty(BasicHTML.propertyKey);
+ View view = (View) getClientProperty(BasicHTML.propertyKey);
if (view != null)
{
Document doc = view.getDocument();
@@ -1019,8 +1019,8 @@ public abstract class AbstractButton extends JComponent
setDisplayedMnemonicIndex(-1);
setOpaque(true);
text = "";
- // testing on JRE1.5 shows that the iconTextGap default value is
- // hard-coded here and the 'Button.iconTextGap' setting in the
+ // testing on JRE1.5 shows that the iconTextGap default value is
+ // hard-coded here and the 'Button.iconTextGap' setting in the
// UI defaults is ignored, at least by the MetalLookAndFeel
iconTextGap = 4;
}
@@ -1036,7 +1036,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Set the model the button is currently using. This un-registers all
+ * Set the model the button is currently using. This un-registers all
* listeners associated with the current model, and re-registers them
* with the new model.
*
@@ -1072,7 +1072,7 @@ public abstract class AbstractButton extends JComponent
repaint();
}
- protected void init(String text, Icon icon)
+ protected void init(String text, Icon icon)
{
// If text is null, we fall back to the empty
// string (which is set using AbstractButton's
@@ -1083,10 +1083,10 @@ public abstract class AbstractButton extends JComponent
if (icon != null)
default_icon = icon;
-
+
updateUI();
}
-
+
/**
* <p>Returns the action command string for this button's model.</p>
*
@@ -1140,9 +1140,9 @@ public abstract class AbstractButton extends JComponent
/**
* Returns all added <code>ActionListener</code> objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ActionListener[] getActionListeners()
@@ -1175,9 +1175,9 @@ public abstract class AbstractButton extends JComponent
/**
* Returns all added <code>ItemListener</code> objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ItemListener[] getItemListeners()
@@ -1188,7 +1188,7 @@ public abstract class AbstractButton extends JComponent
/**
* Adds a ChangeListener to the button's listener list. When the button's
* model changes any of its (non-bound) properties, these listeners will be
- * called.
+ * called.
*
* @param l The new listener to add
*/
@@ -1209,9 +1209,9 @@ public abstract class AbstractButton extends JComponent
/**
* Returns all added <code>ChangeListener</code> objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ChangeListener[] getChangeListeners()
@@ -1229,7 +1229,7 @@ public abstract class AbstractButton extends JComponent
{
e.setSource(this);
ItemListener[] listeners = getItemListeners();
-
+
for (int i = 0; i < listeners.length; i++)
listeners[i].itemStateChanged(e);
}
@@ -1242,8 +1242,8 @@ public abstract class AbstractButton extends JComponent
*/
protected void fireActionPerformed(ActionEvent e)
{
- // Dispatch a copy of the given ActionEvent in order to
- // set the source and action command correctly.
+ // Dispatch a copy of the given ActionEvent in order to
+ // set the source and action command correctly.
ActionEvent ae = new ActionEvent(
this,
e.getID(),
@@ -1252,7 +1252,7 @@ public abstract class AbstractButton extends JComponent
e.getModifiers());
ActionListener[] listeners = getActionListeners();
-
+
for (int i = 0; i < listeners.length; i++)
listeners[i].actionPerformed(ae);
}
@@ -1338,12 +1338,12 @@ public abstract class AbstractButton extends JComponent
}
}
- /**
+ /**
* Sets the button's mnemonic index. The mnemonic index is a hint to the
* look and feel class, suggesting which character in the button's label
* should be underlined when drawing the label. If the mnemonic index is
- * -1, no mnemonic will be displayed.
- *
+ * -1, no mnemonic will be displayed.
+ *
* If no mnemonic index is set, the button will choose a mnemonic index
* by default, which will be the first occurrence of the mnemonic
* character in the button's text.
@@ -1358,11 +1358,11 @@ public abstract class AbstractButton extends JComponent
{
if (index < -1 || (text != null && index >= text.length()))
throw new IllegalArgumentException();
-
+
mnemonicIndex = index;
}
-
- /**
+
+ /**
* Get the button's mnemonic index, which is an offset into the button's
* "text" property. The character specified by this offset should be
* underlined when the look and feel class draws this button.
@@ -1373,7 +1373,7 @@ public abstract class AbstractButton extends JComponent
{
return mnemonicIndex;
}
-
+
/**
* Set the "rolloverEnabled" property. When rollover is enabled, and the
@@ -1450,15 +1450,15 @@ public abstract class AbstractButton extends JComponent
mod.setEnabled(b);
}
- /**
+ /**
* Set the horizontal alignment of the button's text and icon. The
* alignment is a numeric constant from {@link SwingConstants}. It must
* be one of: <code>RIGHT</code>, <code>LEFT</code>, <code>CENTER</code>,
* <code>LEADING</code> or <code>TRAILING</code>. The default is
* <code>CENTER</code>.
- *
+ *
* @return The current horizontal alignment
- *
+ *
* @see #setHorizontalAlignment(int)
*/
public int getHorizontalAlignment()
@@ -1476,14 +1476,14 @@ public abstract class AbstractButton extends JComponent
* @param a The new horizontal alignment
* @throws IllegalArgumentException If alignment is not one of the legal
* constants.
- *
+ *
* @see #getHorizontalAlignment()
*/
public void setHorizontalAlignment(int a)
{
if (horizontalAlignment == a)
return;
- if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING
+ if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING
&& a != TRAILING)
throw new IllegalArgumentException("Invalid alignment.");
int old = horizontalAlignment;
@@ -1522,7 +1522,7 @@ public abstract class AbstractButton extends JComponent
{
if (horizontalTextPosition == t)
return;
- if (t != LEFT && t != CENTER && t != RIGHT && t != LEADING
+ if (t != LEFT && t != CENTER && t != RIGHT && t != LEADING
&& t != TRAILING)
throw new IllegalArgumentException("Invalid alignment.");
@@ -1540,7 +1540,7 @@ public abstract class AbstractButton extends JComponent
* <code>BOTTOM</code>. The default is <code>CENTER</code>.
*
* @return The current vertical alignment
- *
+ *
* @see #setVerticalAlignment(int)
*/
public int getVerticalAlignment()
@@ -1557,7 +1557,7 @@ public abstract class AbstractButton extends JComponent
* @param a The new vertical alignment
* @throws IllegalArgumentException If alignment is not one of the legal
* constants.
- *
+ *
* @see #getVerticalAlignment()
*/
public void setVerticalAlignment(int a)
@@ -1605,7 +1605,7 @@ public abstract class AbstractButton extends JComponent
return;
if (t != TOP && t != CENTER && t != BOTTOM)
throw new IllegalArgumentException("Invalid alignment.");
-
+
int old = verticalTextPosition;
verticalTextPosition = t;
firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t);
@@ -1645,7 +1645,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Get the value of the "action" property.
+ * Get the value of the "action" property.
*
* @return The current value of the "action" property
*/
@@ -1664,7 +1664,7 @@ public abstract class AbstractButton extends JComponent
* <p>This method also configures several of the button's properties from
* the Action, by calling {@link #configurePropertiesFromAction}, and
* subscribes the button to the Action as a PropertyChangeListener.
- * Subsequent changes to the Action will thus reconfigure the button
+ * Subsequent changes to the Action will thus reconfigure the button
* automatically.</p>
*
* @param a The new value of the "action" property
@@ -1687,7 +1687,7 @@ public abstract class AbstractButton extends JComponent
configurePropertiesFromAction(action);
if (action != null)
{
- actionPropertyChangeListener = createActionPropertyChangeListener(a);
+ actionPropertyChangeListener = createActionPropertyChangeListener(a);
action.addPropertyChangeListener(actionPropertyChangeListener);
addActionListener(action);
}
@@ -1713,9 +1713,9 @@ public abstract class AbstractButton extends JComponent
{
if (default_icon == i)
return;
-
- Icon old = default_icon;
- default_icon = i;
+
+ Icon old = default_icon;
+ default_icon = i;
firePropertyChange(ICON_CHANGED_PROPERTY, old, i);
revalidate();
repaint();
@@ -1768,7 +1768,7 @@ public abstract class AbstractButton extends JComponent
{
if (text == t)
return;
-
+
String old = text;
text = t;
firePropertyChange(TEXT_CHANGED_PROPERTY, old, t);
@@ -1778,9 +1778,9 @@ public abstract class AbstractButton extends JComponent
/**
* Set the value of the {@link #iconTextGap} property.
- *
+ *
* @param i The new value of the property
- *
+ *
* @since 1.4
*/
public void setIconTextGap(int i)
@@ -1788,7 +1788,7 @@ public abstract class AbstractButton extends JComponent
clientIconTextGapSet = true;
if (iconTextGap == i)
return;
-
+
int old = iconTextGap;
iconTextGap = i;
firePropertyChange("iconTextGap", new Integer(old), new Integer(i));
@@ -1800,7 +1800,7 @@ public abstract class AbstractButton extends JComponent
* Get the value of the {@link #iconTextGap} property.
*
* @return The current value of the property
- *
+ *
* @since 1.4
*/
public int getIconTextGap()
@@ -1831,7 +1831,7 @@ public abstract class AbstractButton extends JComponent
{
if (margin == m)
return;
-
+
Insets old = margin;
margin = m;
firePropertyChange(MARGIN_CHANGED_PROPERTY, old, m);
@@ -1864,7 +1864,7 @@ public abstract class AbstractButton extends JComponent
{
if (pressed_icon == pressedIcon)
return;
-
+
Icon old = pressed_icon;
pressed_icon = pressedIcon;
firePropertyChange(PRESSED_ICON_CHANGED_PROPERTY, old, pressed_icon);
@@ -1889,7 +1889,7 @@ public abstract class AbstractButton extends JComponent
Image grayImage = GrayFilter.createDisabledImage(iconImage);
disabledIcon = new ImageIcon(grayImage);
}
-
+
return disabledIcon;
}
@@ -1940,7 +1940,7 @@ public abstract class AbstractButton extends JComponent
{
if (focusPainted == p)
return;
-
+
boolean old = focusPainted;
focusPainted = p;
firePropertyChange(FOCUS_PAINTED_CHANGED_PROPERTY, old, p);
@@ -2077,7 +2077,7 @@ public abstract class AbstractButton extends JComponent
* is changed, this listener is unsubscribed from the old model and
* subscribed to the new one.</p>
*
- * @return A new ActionListener
+ * @return A new ActionListener
*/
protected ActionListener createActionListener()
{
@@ -2098,7 +2098,7 @@ public abstract class AbstractButton extends JComponent
* button's action is changed subsequently, the listener is unsubscribed
* from the old action and subscribed to the new one.</p>
*
- * @param a The Action which will be listened to, and which should be
+ * @param a The Action which will be listened to, and which should be
* the same as the source of any PropertyChangeEvents received by the
* new listener returned from this method.
*
@@ -2238,12 +2238,12 @@ public abstract class AbstractButton extends JComponent
{
if (disabledSelectedIcon == icon)
return;
-
+
Icon old = disabledSelectedIcon;
disabledSelectedIcon = icon;
firePropertyChange(DISABLED_SELECTED_ICON_CHANGED_PROPERTY, old, icon);
revalidate();
- repaint();
+ repaint();
}
/**
@@ -2270,7 +2270,7 @@ public abstract class AbstractButton extends JComponent
{
if (rolloverIcon == r)
return;
-
+
Icon old = rolloverIcon;
rolloverIcon = r;
firePropertyChange(ROLLOVER_ICON_CHANGED_PROPERTY, old, rolloverIcon);
@@ -2293,10 +2293,10 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Set the button's rollover selected icon and sets the
- * <code>rolloverEnabled</code> property to <code>true</code>. The look and
- * feel class should paint this icon when the "rolloverEnabled" property of
- * the button is <code>true</code>, the "selected" property of the button's
+ * Set the button's rollover selected icon and sets the
+ * <code>rolloverEnabled</code> property to <code>true</code>. The look and
+ * feel class should paint this icon when the "rolloverEnabled" property of
+ * the button is <code>true</code>, the "selected" property of the button's
* model is <code>true</code>, and the mouse rolls over the button.
*
* @param r The new rollover selected icon.
@@ -2305,7 +2305,7 @@ public abstract class AbstractButton extends JComponent
{
if (rolloverSelectedIcon == r)
return;
-
+
Icon old = rolloverSelectedIcon;
rolloverSelectedIcon = r;
firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, r);
@@ -2341,7 +2341,7 @@ public abstract class AbstractButton extends JComponent
{
if (selectedIcon == s)
return;
-
+
Icon old = selectedIcon;
selectedIcon = s;
firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, s);
@@ -2418,7 +2418,7 @@ public abstract class AbstractButton extends JComponent
clientContentAreaFilledSet = true;
if (contentAreaFilled == b)
return;
-
+
// The JDK sets the opaque property to the value of the contentAreaFilled
// property, so should we do.
setOpaque(b);
@@ -2492,7 +2492,7 @@ public abstract class AbstractButton extends JComponent
{
super.setUI(ui);
}
-
+
/**
* Set the "UI" property of the button, which is a look and feel class
* responsible for handling the button's input events and painting it.
@@ -2503,7 +2503,7 @@ public abstract class AbstractButton extends JComponent
{
return (ButtonUI) ui;
}
-
+
/**
* Set the "UI" property to a class constructed, via the {@link
* UIManager}, from the current look and feel. This should be overridden
@@ -2520,7 +2520,7 @@ public abstract class AbstractButton extends JComponent
* into a single <code>ActionEvent</code>.
*
* @return the time in milliseconds
- *
+ *
* @since 1.4
*/
public long getMultiClickThreshhold()
@@ -2533,7 +2533,7 @@ public abstract class AbstractButton extends JComponent
* <code>ActionEvent</code>.
*
* @param threshhold the time in milliseconds
- *
+ *
* @since 1.4
*/
public void setMultiClickThreshhold(long threshhold)
@@ -2586,7 +2586,7 @@ public abstract class AbstractButton extends JComponent
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/AbstractCellEditor.java b/javax/swing/AbstractCellEditor.java
index e993df5cf..eade00c07 100644
--- a/javax/swing/AbstractCellEditor.java
+++ b/javax/swing/AbstractCellEditor.java
@@ -69,7 +69,7 @@ public abstract class AbstractCellEditor
/**
* Creates a new instance of AbstractCellEditor.
*/
- public AbstractCellEditor()
+ public AbstractCellEditor()
{
listenerList = new EventListenerList();
changeEvent = new ChangeEvent(this);
@@ -85,10 +85,10 @@ public abstract class AbstractCellEditor
* @return <code>true</code> if the cell is editable using
* <code>event</code>, <code>false</code> if it's not
*/
- public boolean isCellEditable(EventObject event)
+ public boolean isCellEditable(EventObject event)
{
return true;
- }
+ }
/**
* Returns <code>true</code> if the editing cell should be selected,
@@ -101,7 +101,7 @@ public abstract class AbstractCellEditor
* @return <code>true</code> if the editing cell should be selected,
* <code>false</code> otherwise
*/
- public boolean shouldSelectCell(EventObject event)
+ public boolean shouldSelectCell(EventObject event)
{
return true;
}
@@ -113,7 +113,7 @@ public abstract class AbstractCellEditor
* @return <code>true</code> if editing has been stopped successfully,
* <code>false</code>otherwise
*/
- public boolean stopCellEditing()
+ public boolean stopCellEditing()
{
fireEditingStopped();
return true;
@@ -123,10 +123,10 @@ public abstract class AbstractCellEditor
* Stop editing the cell and do not accept any partial value that has
* been entered into the cell.
*/
- public void cancelCellEditing()
+ public void cancelCellEditing()
{
fireEditingCanceled();
- }
+ }
/**
* Adds a CellEditorListener to the list of CellEditorListeners of this
@@ -149,7 +149,7 @@ public abstract class AbstractCellEditor
{
listenerList.remove(CellEditorListener.class, listener);
}
-
+
/**
* Returns the list of CellEditorListeners that have been registered
* in this CellEditor.
diff --git a/javax/swing/AbstractListModel.java b/javax/swing/AbstractListModel.java
index 7d4b2bb2a..72aefbcd5 100644
--- a/javax/swing/AbstractListModel.java
+++ b/javax/swing/AbstractListModel.java
@@ -125,7 +125,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
{
ListDataEvent event =
new ListDataEvent(source, ListDataEvent.INTERVAL_ADDED,
- startIndex, endIndex);
+ startIndex, endIndex);
ListDataListener[] listeners = getListDataListeners();
for (int index = 0; index < listeners.length; index++)
@@ -148,7 +148,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
{
ListDataEvent event =
new ListDataEvent(source, ListDataEvent.INTERVAL_REMOVED,
- startIndex, endIndex);
+ startIndex, endIndex);
ListDataListener[] listeners = getListDataListeners();
for (int index = 0; index < listeners.length; index++)
diff --git a/javax/swing/AbstractSpinnerModel.java b/javax/swing/AbstractSpinnerModel.java
index d247a3313..984e52af2 100644
--- a/javax/swing/AbstractSpinnerModel.java
+++ b/javax/swing/AbstractSpinnerModel.java
@@ -47,7 +47,7 @@ import javax.swing.event.EventListenerList;
/**
* Provides standard implementations for some of the methods in
* {@link SpinnerModel}.
- *
+ *
* @since 1.4
*
* @author Ka-Hing Cheung
@@ -55,7 +55,7 @@ import javax.swing.event.EventListenerList;
public abstract class AbstractSpinnerModel implements SpinnerModel
{
private ChangeEvent changeEvent = new ChangeEvent(this);
-
+
/** Stores the listeners registered with the model. */
protected EventListenerList listenerList = new EventListenerList();
diff --git a/javax/swing/Action.java b/javax/swing/Action.java
index 3dd63539d..fa1925f45 100644
--- a/javax/swing/Action.java
+++ b/javax/swing/Action.java
@@ -44,9 +44,9 @@ import java.beans.PropertyChangeListener;
* Provides a convenient central point of control for some task
* that can be triggered by more than one control in a Swing user interface
* (for example, a menu item and a toolbar button).
- *
+ *
* @see AbstractButton#setAction(Action)
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
* @author Andrew Selkirk
*/
@@ -96,23 +96,23 @@ public interface Action extends ActionListener {
/**
* Returns the value associated with the specified key.
- *
+ *
* @param key the key (not <code>null</code>).
- *
- * @return The value associated with the specified key, or
+ *
+ * @return The value associated with the specified key, or
* <code>null</code> if the key is not found.
*/
Object getValue(String key);
/**
- * Sets the value associated with the specified key and sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners.
- * The standard keys are defined in this interface: {@link #NAME},
- * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
- * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
- * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
- * associated with the key will be overwritten.
- *
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are defined in this interface: {@link #NAME},
+ * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
+ * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
+ * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
+ * associated with the key will be overwritten.
+ *
* @param key the key (not <code>null</code>).
* @param value the value (<code>null</code> permitted).
*/
@@ -120,16 +120,16 @@ public interface Action extends ActionListener {
/**
* Returns the flag that indicates whether or not this action is enabled.
- *
+ *
* @return The flag.
*/
boolean isEnabled();
/**
* Sets the flag that indicates whether or not this action is enabled. If
- * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
+ * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
* all registered listeners.
- *
+ *
* @param b the new value of the flag.
*/
void setEnabled(boolean b);
@@ -137,15 +137,15 @@ public interface Action extends ActionListener {
/**
* Registers a listener to receive notification whenever one of the
* action's properties is modified.
- *
+ *
* @param listener the listener.
*/
void addPropertyChangeListener(PropertyChangeListener listener);
/**
* Deregisters a listener so that it no longer receives notification of
- * changes to the action's properties.
- *
+ * changes to the action's properties.
+ *
* @param listener the listener.
*/
void removePropertyChangeListener(PropertyChangeListener listener);
diff --git a/javax/swing/BorderFactory.java b/javax/swing/BorderFactory.java
index ca78deb12..f5c4cbbb6 100644
--- a/javax/swing/BorderFactory.java
+++ b/javax/swing/BorderFactory.java
@@ -413,7 +413,7 @@ public class BorderFactory
* Create a matte-look border using a solid color. (The difference between
* this border and a line border is that you can specify the individual border
* dimensions.)
- *
+ *
* @param top
* An int specifying the width of the top in pixels
* @param left
diff --git a/javax/swing/BoundedRangeModel.java b/javax/swing/BoundedRangeModel.java
index 54446acd5..87fec5f0f 100644
--- a/javax/swing/BoundedRangeModel.java
+++ b/javax/swing/BoundedRangeModel.java
@@ -42,11 +42,11 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
- * The data model that represents a <i>range</i> that is constrained to fit
- * within specified <i>bounds</i>. The range is defined as <code>value</code>
- * to <code>value + extent</code>, where both <code>value</code> and
+ * The data model that represents a <i>range</i> that is constrained to fit
+ * within specified <i>bounds</i>. The range is defined as <code>value</code>
+ * to <code>value + extent</code>, where both <code>value</code> and
* <code>extent</code> are integers, and <code>extent >= 0</code>. The bounds
- * are defined by integers <code>minimum</code> and <code>maximum</code>.
+ * are defined by integers <code>minimum</code> and <code>maximum</code>.
* <p>
* This type of model is used in components that display a range of values,
* like {@link JProgressBar} and {@link JSlider}.
@@ -57,7 +57,7 @@ public interface BoundedRangeModel
{
/**
* Returns the current value for the model.
- *
+ *
* @return The current value for the model.
*
* @see #setValue(int)
@@ -68,7 +68,7 @@ public interface BoundedRangeModel
* Sets the value for the model and sends a {@link ChangeEvent} to
* all registered listeners. The new value must satisfy the constraint
* <code>min <= value <= value + extent <= max</code>.
- *
+ *
* @param value the value
*
* @see #getValue()
@@ -76,9 +76,9 @@ public interface BoundedRangeModel
void setValue(int value);
/**
- * Returns the lower bound for the model. The start of the model's range
+ * Returns the lower bound for the model. The start of the model's range
* (see {@link #getValue()}) cannot be less than this lower bound.
- *
+ *
* @return The lower bound for the model.
*
* @see #setMinimum(int)
@@ -90,7 +90,7 @@ public interface BoundedRangeModel
* Sets the lower bound for the model and sends a {@link ChangeEvent} to all
* registered listeners. The new minimum must be less than or equal to the
* start value of the model's range (as returned by {@link #getValue()}).
- *
+ *
* @param minimum the minimum value
*
* @see #getMinimum()
@@ -99,9 +99,9 @@ public interface BoundedRangeModel
/**
* Returns the upper bound for the model. This sets an upper limit for the
- * end value of the model's range ({@link #getValue()} +
+ * end value of the model's range ({@link #getValue()} +
* {@link #getExtent()}).
- *
+ *
* @return The upper bound for the model.
*
* @see #setMaximum(int)
@@ -112,9 +112,9 @@ public interface BoundedRangeModel
/**
* Sets the upper bound for the model and sends a {@link ChangeEvent} to all
* registered listeners. The new maximum must be greater than or equal to the
- * end value of the model's range (as returned by {@link #getValue()} +
+ * end value of the model's range (as returned by {@link #getValue()} +
* {@link #getExtent()}).
- *
+ *
* @param maximum the maximum value
*
* @see #getMaximum()
@@ -123,7 +123,7 @@ public interface BoundedRangeModel
/**
* Returns the value of the <code>valueIsAdjusting</code> property.
- *
+ *
* @return <code>true</code> if value is adjusting,
* otherwise <code>false</code>
*
@@ -133,7 +133,7 @@ public interface BoundedRangeModel
/**
* Sets the <code>valueIsAdjusting</code> property.
- *
+ *
* @param adjusting <code>true</code> if adjusting,
* <code>false</code> otherwise
*
@@ -153,7 +153,7 @@ public interface BoundedRangeModel
/**
* Sets the extent, which is the length of the model's range, and sends a
* {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param extent the extent
*
* @see #getExtent()
@@ -162,12 +162,12 @@ public interface BoundedRangeModel
/**
* Sets all the properties for the model in a single call.
- *
+ *
* @param value the value
* @param extent the extent
* @param minimum the minimum value
* @param maximum the maximum value
- * @param adjusting a flag that indicates the model is being adjusted
+ * @param adjusting a flag that indicates the model is being adjusted
* continuously.
*/
void setRangeProperties(int value, int extent, int minimum, int maximum,
@@ -175,16 +175,16 @@ public interface BoundedRangeModel
/**
* Adds a <code>ChangeListener</code> to this object.
- *
+ *
* @param listener the listener to add
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
void addChangeListener(ChangeListener listener);
/**
* Removes a <code>ChangeListener</code> from this object.
- *
+ *
* @param listener the listener to remove
*
* @see #addChangeListener(ChangeListener)
diff --git a/javax/swing/Box.java b/javax/swing/Box.java
index 0f984a984..ce9cb8f20 100644
--- a/javax/swing/Box.java
+++ b/javax/swing/Box.java
@@ -60,19 +60,19 @@ import javax.accessibility.AccessibleRole;
public class Box extends JComponent implements Accessible
{
private static final long serialVersionUID = 1525417495883046342L;
-
+
/**
* Provides accessibility support for <code>Box</code>es.
*/
protected class AccessibleBox extends Container.AccessibleAWTContainer
{
private static final long serialVersionUID = -7775079816389931944L;
-
+
protected AccessibleBox()
{
// Nothing to do here.
}
-
+
public AccessibleRole getAccessibleRole()
{
return null;
@@ -85,7 +85,7 @@ public class Box extends JComponent implements Accessible
public static class Filler extends JComponent implements Accessible
{
private static final long serialVersionUID = -1204263191910183998L;
-
+
/**
* Provides accessibility support for <code>Box.Filler</code>.
*/
@@ -93,20 +93,20 @@ public class Box extends JComponent implements Accessible
extends Component.AccessibleAWTComponent
{
private static final long serialVersionUID = 164963348357479321L;
-
+
protected AccessibleBoxFiller()
{
// Nothing to do here.
}
-
+
public AccessibleRole getAccessibleRole()
{
return null;
}
}
-
+
private transient Dimension min, pref, max;
-
+
/**
* Creates a new instance of Filler.
*
@@ -118,7 +118,7 @@ public class Box extends JComponent implements Accessible
{
changeShape(min, pref, max);
}
-
+
/**
* Changes the dimensions of this Filler.
*
@@ -130,16 +130,16 @@ public class Box extends JComponent implements Accessible
{
this.min = min;
this.pref = pref;
- this.max = max;
+ this.max = max;
}
-
+
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleBoxFiller();
return accessibleContext;
}
-
+
/**
* Returns the maximum size of this Filler.
*
@@ -149,7 +149,7 @@ public class Box extends JComponent implements Accessible
{
return max;
}
-
+
/**
* Returns the minimum size of this Filler.
*
@@ -159,7 +159,7 @@ public class Box extends JComponent implements Accessible
{
return min;
}
-
+
/**
* Returns the preferred size of this Filler.
*
@@ -170,7 +170,7 @@ public class Box extends JComponent implements Accessible
return pref;
}
}
-
+
/**
* Creates a new Box component, that lays out its children according
* to the <code>axis</code> parameter.
@@ -184,9 +184,9 @@ public class Box extends JComponent implements Accessible
*/
public Box(int axis)
{
- super.setLayout(new BoxLayout(this, axis));
+ super.setLayout(new BoxLayout(this, axis));
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -200,12 +200,12 @@ public class Box extends JComponent implements Accessible
new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
return glue;
}
-
+
public static Box createHorizontalBox()
{
return new Box(BoxLayout.X_AXIS);
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -219,7 +219,7 @@ public class Box extends JComponent implements Accessible
new Dimension(Short.MAX_VALUE, 0));
return glue;
}
-
+
/**
* Creates a filler component which acts as strut between components.
* It will fill exactly the specified horizontal size.
@@ -235,17 +235,17 @@ public class Box extends JComponent implements Accessible
new Dimension(width, Integer.MAX_VALUE));
return strut;
}
-
+
public static Component createRigidArea(Dimension d)
{
return new Filler(d, d, d);
}
-
+
public static Box createVerticalBox()
{
return new Box(BoxLayout.Y_AXIS);
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -257,7 +257,7 @@ public class Box extends JComponent implements Accessible
{
return createGlue();
}
-
+
/**
* Creates a filler component which acts as strut between components.
* It will fill exactly the specified vertical size.
@@ -273,18 +273,18 @@ public class Box extends JComponent implements Accessible
new Dimension(Integer.MAX_VALUE, height));
return strut;
}
-
+
public void setLayout(LayoutManager l)
{
throw new AWTError("Not allowed to set layout managers for boxes.");
}
-
+
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleBox();
return accessibleContext;
}
-
-
+
+
}
diff --git a/javax/swing/BoxLayout.java b/javax/swing/BoxLayout.java
index a7f9dd61a..55c489eb9 100644
--- a/javax/swing/BoxLayout.java
+++ b/javax/swing/BoxLayout.java
@@ -85,7 +85,7 @@ public class BoxLayout implements LayoutManager2, Serializable
* The container given to the constructor.
*/
private Container container;
-
+
/**
* Current type of component layouting. Defaults to X_AXIS.
*/
@@ -174,14 +174,14 @@ public class BoxLayout implements LayoutManager2, Serializable
private boolean isHorizontalIn(Container parent)
{
ComponentOrientation orientation = parent.getComponentOrientation();
- return this.way == X_AXIS
- || (this.way == LINE_AXIS
+ return this.way == X_AXIS
+ || (this.way == LINE_AXIS
&& orientation.isHorizontal())
|| (this.way == PAGE_AXIS
&& (!orientation.isHorizontal()));
}
-
+
/**
* Returns the preferred size of the layout.
@@ -236,7 +236,7 @@ public class BoxLayout implements LayoutManager2, Serializable
{
if (container != parent)
throw new AWTError("BoxLayout can't be shared");
-
+
checkLayout();
Component[] children = container.getComponents();
Insets in = container.getInsets();
@@ -337,7 +337,7 @@ public class BoxLayout implements LayoutManager2, Serializable
Insets i = container.getInsets();
int xDim = xTotal.maximum + i.left + i.right;
int yDim = yTotal.maximum + i.top + i.bottom;
-
+
// Check for overflow
if (xDim < xTotal.maximum)
xDim = Integer.MAX_VALUE;
diff --git a/javax/swing/ButtonGroup.java b/javax/swing/ButtonGroup.java
index 6a474f98d..d4168bb99 100644
--- a/javax/swing/ButtonGroup.java
+++ b/javax/swing/ButtonGroup.java
@@ -84,7 +84,7 @@ public class ButtonGroup implements Serializable
/**
* Adds a button to this group. If the button is in the selected state, then:
* <ul>
- * <li>if the group has no current selection, the new button becomes the
+ * <li>if the group has no current selection, the new button becomes the
* selected button for the group;</li>
* <li>if the group already has a selected button, the new button is set to
* "not selected".</li>
@@ -103,14 +103,14 @@ public class ButtonGroup implements Serializable
sel = b.getModel();
else
b.setSelected(false);
- }
+ }
buttons.addElement(b);
}
/**
- * Removes the specified button from this group. If the button is the
- * selected button, the current selection is set to <code>null</code>.
- * The group for the removed button's model is set to <code>null</code>.
+ * Removes the specified button from this group. If the button is the
+ * selected button, the current selection is set to <code>null</code>.
+ * The group for the removed button's model is set to <code>null</code>.
*
* @param b the button to remove (<code>null</code> is ignored).
*/
@@ -180,13 +180,13 @@ public class ButtonGroup implements Serializable
{
ButtonModel old = sel;
sel = m;
-
+
if (old != null)
old.setSelected(false);
-
+
if (m != null)
sel.setSelected(true);
-
+
AbstractButton button = findButton(old);
if (button != null)
button.repaint();
diff --git a/javax/swing/ButtonModel.java b/javax/swing/ButtonModel.java
index 03fac13d2..d48eb1e65 100644
--- a/javax/swing/ButtonModel.java
+++ b/javax/swing/ButtonModel.java
@@ -48,7 +48,7 @@ import javax.swing.event.ChangeListener;
* The data model that is used in all kinds of buttons.
*/
public interface ButtonModel extends ItemSelectable
-{
+{
/**
* Returns <code>true</code> if the button is armed, <code>false</code>
@@ -56,7 +56,7 @@ public interface ButtonModel extends ItemSelectable
*
* A button is armed, when the user has pressed the mouse over it, but has
* not yet released the mouse.
- *
+ *
* @return <code>true</code> if the button is armed, <code>false</code>
* otherwise
*
@@ -145,7 +145,7 @@ public interface ButtonModel extends ItemSelectable
*
* An <code>ActionEvent</code> is usually fired when the user clicks on a
* button.
- *
+ *
* @param l the action listener to add
*
* @see #removeActionListener(ActionListener)
@@ -225,7 +225,7 @@ public interface ButtonModel extends ItemSelectable
/**
* Returns the keyboard mnemonic for the button. This specifies a shortcut
* or accelerator key that can be used to activate the button.
- *
+ *
* @return the keyboard mnemonic for the button
*
* @see #setMnemonic(int)
@@ -235,7 +235,7 @@ public interface ButtonModel extends ItemSelectable
/**
* Sets the keyboard mnemonic for the button. This specifies a shortcut
* or accelerator key that can be used to activate the button.
- *
+ *
* @param key the keyboard mnemonic for the button
*
* @see #getMnemonic()
@@ -276,7 +276,7 @@ public interface ButtonModel extends ItemSelectable
* Some kinds of buttons (e.g. toggle buttons, check boxes, radio buttons)
* can be in one of two states: selected or unselected. The selected state
* is usually toggled by clicking on the button.
- *
+ *
* @param b <code>true</code> if the button is selected, <code>false</code>
* otherwise
*
@@ -291,7 +291,7 @@ public interface ButtonModel extends ItemSelectable
* Some kinds of buttons (e.g. toggle buttons, check boxes, radio buttons)
* can be in one of two states: selected or unselected. The selected state
* is usually toggled by clicking on the button.
- *
+ *
* @return <code>true</code> if the button is selected, <code>false</code>
* otherwise
*
diff --git a/javax/swing/CellEditor.java b/javax/swing/CellEditor.java
index 9eb083ab2..134c316e4 100644
--- a/javax/swing/CellEditor.java
+++ b/javax/swing/CellEditor.java
@@ -53,17 +53,17 @@ public interface CellEditor
{
/**
* Returns the current value for the <code>CellEditor</code>.
- *
+ *
* @return The value.
*/
Object getCellEditorValue();
/**
- * Returns <code>true</code> if the specified event makes the editor
+ * Returns <code>true</code> if the specified event makes the editor
* editable, and <code>false</code> otherwise.
- *
+ *
* @param event the event.
- *
+ *
* @return A boolean.
*/
boolean isCellEditable(EventObject event);
@@ -76,10 +76,10 @@ public interface CellEditor
boolean shouldSelectCell(EventObject event);
/**
- * Signals to the <code>CellEditor</code> that it should stop editing,
+ * Signals to the <code>CellEditor</code> that it should stop editing,
* accepting the current cell value, and returns <code>true</code> if the
* editor actually stops editing, and <code>false</code> otherwise.
- *
+ *
* @return A boolean.
*/
boolean stopCellEditing();
@@ -90,17 +90,17 @@ public interface CellEditor
void cancelCellEditing();
/**
- * Registers a listener to receive {@link ChangeEvent} notifications from the
+ * Registers a listener to receive {@link ChangeEvent} notifications from the
* <code>CellEditor</code>.
- *
+ *
* @param listener the listener.
*/
void addCellEditorListener(CellEditorListener listener);
/**
- * Deregisters a listener so that it no longer receives {@link ChangeEvent}
+ * Deregisters a listener so that it no longer receives {@link ChangeEvent}
* notifications from the <code>CellEditor</code>.
- *
+ *
* @param listener the listener.
*/
void removeCellEditorListener(CellEditorListener listener);
diff --git a/javax/swing/CellRendererPane.java b/javax/swing/CellRendererPane.java
index 764a4c500..0140b4c2c 100644
--- a/javax/swing/CellRendererPane.java
+++ b/javax/swing/CellRendererPane.java
@@ -162,7 +162,7 @@ public class CellRendererPane extends Container implements Accessible
* painting
*/
public void paintComponent(Graphics graphics, Component c,
- Container p, int x, int y, int w, int h,
+ Container p, int x, int y, int w, int h,
boolean shouldValidate)
{
// reparent c
diff --git a/javax/swing/ComboBoxModel.java b/javax/swing/ComboBoxModel.java
index 610527587..ce252faed 100644
--- a/javax/swing/ComboBoxModel.java
+++ b/javax/swing/ComboBoxModel.java
@@ -41,9 +41,9 @@ import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
/**
- * The data model for a {@link JComboBox}. This model keeps track of elements
+ * The data model for a {@link JComboBox}. This model keeps track of elements
* contained in the <code>JComboBox</code> as well as the current
- * combo box selection. Whenever the selection in the <code>JComboBox</code>
+ * combo box selection. Whenever the selection in the <code>JComboBox</code>
* changes, the <code>ComboBoxModel</code> should fire a {@link ListDataEvent}
* to the model's {@link ListDataListener}s.
*
@@ -52,8 +52,8 @@ import javax.swing.event.ListDataListener;
public interface ComboBoxModel extends ListModel
{
/**
- * Sets the selected item in the combo box. Classes implementing this
- * interface should fire a {@link ListDataEvent} to all registered
+ * Sets the selected item in the combo box. Classes implementing this
+ * interface should fire a {@link ListDataEvent} to all registered
* {@link ListDataListener}s to indicate that the selection has changed.
*
* @param item the selected item (<code>null</code> permitted).
diff --git a/javax/swing/ComponentInputMap.java b/javax/swing/ComponentInputMap.java
index 28aa8e22c..dc4d0bfd4 100644
--- a/javax/swing/ComponentInputMap.java
+++ b/javax/swing/ComponentInputMap.java
@@ -64,7 +64,7 @@ public class ComponentInputMap extends InputMap
{
if (comp == null)
throw new IllegalArgumentException();
-
+
this.component = comp;
}
@@ -117,13 +117,13 @@ public class ComponentInputMap extends InputMap
if (parentMap != null && !(parentMap instanceof ComponentInputMap))
throw new IllegalArgumentException("ComponentInputMaps can only have " +
"ComponentInputMaps for parents");
-
- if (parentMap != null &&
+
+ if (parentMap != null &&
((ComponentInputMap) parentMap).getComponent() != component)
- throw new
+ throw new
IllegalArgumentException("ComponentInputMaps' parents must " +
"be associated with the same JComponents");
-
+
super.setParent(parentMap);
if (component != null)
component.updateComponentInputMap(this);
diff --git a/javax/swing/DebugGraphics.java b/javax/swing/DebugGraphics.java
index 126309a58..d96de4a22 100644
--- a/javax/swing/DebugGraphics.java
+++ b/javax/swing/DebugGraphics.java
@@ -153,7 +153,7 @@ public class DebugGraphics extends Graphics
/**
* Sets the color to draw stuff with.
- *
+ *
* @param color The color
*/
public void setColor(Color color)
@@ -301,7 +301,7 @@ public class DebugGraphics extends Graphics
/**
* Returns the color used for drawing.
- *
+ *
* @return The color.
*/
public Color getColor()
@@ -454,7 +454,7 @@ public class DebugGraphics extends Graphics
// Ignore this.
}
}
-
+
/**
* Draws a rectangle.
*
@@ -552,8 +552,8 @@ public class DebugGraphics extends Graphics
* @param arcWidth TODO
* @param arcHeight TODO
*/
- public void drawRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void drawRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -576,8 +576,8 @@ public class DebugGraphics extends Graphics
* @param arcWidth TODO
* @param arcHeight TODO
*/
- public void fillRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void fillRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -593,7 +593,7 @@ public class DebugGraphics extends Graphics
/**
* drawLine
*
- * @param x1 The x-position of the start
+ * @param x1 The x-position of the start
* @param y1 The y-position of the start
* @param x2 The x-position of the end
* @param y2 The y-position of the end
@@ -699,8 +699,8 @@ public class DebugGraphics extends Graphics
* @param startAngle TODO
* @param arcAngle TODO
*/
- public void drawArc(int x, int y, int width, int height,
- int startAngle, int arcAngle)
+ public void drawArc(int x, int y, int width, int height,
+ int startAngle, int arcAngle)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -723,8 +723,8 @@ public class DebugGraphics extends Graphics
* @param startAngle TODO
* @param arcAngle TODO
*/
- public void fillArc(int x, int y, int width, int height,
- int startAngle, int arcAngle)
+ public void fillArc(int x, int y, int width, int height,
+ int startAngle, int arcAngle)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -817,7 +817,7 @@ public class DebugGraphics extends Graphics
* @param y the y coordinate
*/
public void drawString(AttributedCharacterIterator iterator,
- int x, int y)
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -830,7 +830,7 @@ public class DebugGraphics extends Graphics
/**
* drawBytes
- *
+ *
* @param data TODO
* @param offset TODO
* @param length TODO
@@ -838,7 +838,7 @@ public class DebugGraphics extends Graphics
* @param y the y coordinate
*/
public void drawBytes(byte[] data, int offset, int length,
- int x, int y)
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
logStream().println(prefix() + " Drawing bytes at: " + new Point(x, y));
@@ -848,15 +848,15 @@ public class DebugGraphics extends Graphics
/**
* drawChars
- *
+ *
* @param data array of characters to draw
* @param offset offset in array
* @param length number of characters in array to draw
* @param x x-position
* @param y y-position
*/
- public void drawChars(char[] data, int offset, int length,
- int x, int y)
+ public void drawChars(char[] data, int offset, int length,
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
logStream().println(prefix() + " Drawing chars at: " + new Point(x, y));
@@ -889,7 +889,7 @@ public class DebugGraphics extends Graphics
* @return boolean
*/
public boolean drawImage(Image image, int x, int y,
- ImageObserver observer)
+ ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -902,7 +902,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -912,8 +912,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y, int width,
- int height, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, int width,
+ int height, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -926,7 +926,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -936,8 +936,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y,
- Color background, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -951,7 +951,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -963,8 +963,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y, int width, int height,
- Color background, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, int width, int height,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -978,7 +978,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param dx1 TODO
* @param dy1 TODO
@@ -989,12 +989,12 @@ public class DebugGraphics extends Graphics
* @param sx2 TODO
* @param sy2 TODO
* @param observer The image observer
- *
+ *
* @return boolean
*/
public boolean drawImage(Image image, int dx1, int dy1,
- int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
- ImageObserver observer)
+ int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
+ ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1025,8 +1025,8 @@ public class DebugGraphics extends Graphics
* @return boolean
*/
public boolean drawImage(Image image, int dx1, int dy1,
- int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
- Color background, ImageObserver observer)
+ int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1049,8 +1049,8 @@ public class DebugGraphics extends Graphics
* @param destx The x position of the destination area
* @param desty The y posiiton of the destination area
*/
- public void copyArea(int x, int y, int width, int height,
- int destx, int desty)
+ public void copyArea(int x, int y, int width, int height,
+ int destx, int desty)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1109,7 +1109,7 @@ public class DebugGraphics extends Graphics
/**
* Creates and returns the prefix that should be prepended to all logging
* messages. The prefix is made up like this:
- *
+ *
* <code>Graphics(<counter>-1)</code> where counter is an integer number
* saying how many DebugGraphics objects have been created so far. The second
* number always seem to be 1 on Sun's JDK, this has to be investigated a
diff --git a/javax/swing/DefaultBoundedRangeModel.java b/javax/swing/DefaultBoundedRangeModel.java
index 786e4ee92..c1d0fe74a 100644
--- a/javax/swing/DefaultBoundedRangeModel.java
+++ b/javax/swing/DefaultBoundedRangeModel.java
@@ -371,7 +371,7 @@ public class DefaultBoundedRangeModel
this.minimum = minimum;
this.maximum = maximum;
this.isAdjusting = isAdjusting;
-
+
fireStateChanged();
}
@@ -405,7 +405,7 @@ public class DefaultBoundedRangeModel
protected void fireStateChanged()
{
ChangeListener[] listeners = getChangeListeners();
-
+
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
@@ -443,7 +443,7 @@ public class DefaultBoundedRangeModel
{
return (ChangeListener[]) getListeners(ChangeListener.class);
}
-
+
/**
* Provides serialization support.
*
@@ -451,8 +451,8 @@ public class DefaultBoundedRangeModel
*
* @throws IOException if there is an I/O error.
*/
- private void writeObject(ObjectOutputStream stream)
- throws IOException
+ private void writeObject(ObjectOutputStream stream)
+ throws IOException
{
stream.defaultWriteObject();
}
diff --git a/javax/swing/DefaultButtonModel.java b/javax/swing/DefaultButtonModel.java
index c0eaea239..d29a23ed3 100644
--- a/javax/swing/DefaultButtonModel.java
+++ b/javax/swing/DefaultButtonModel.java
@@ -331,7 +331,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if ((a && isArmed()) || (!a && !isArmed()))
return;
-
+
// cannot change ARMED state unless button is enabled
if (!isEnabled())
return;
@@ -427,7 +427,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if (r == isRollover())
return;
-
+
// cannot set ROLLOVER property unless button is enabled
if (!isEnabled())
return;
@@ -452,7 +452,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if ((s && isSelected()) || (!s && !isSelected()))
return;
-
+
// make the change
if (s)
stateMask = stateMask | SELECTED;
@@ -556,7 +556,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
* <code>true</code> at a time.
*
* @param g The new "group" property (<code>null</code> permitted).
- *
+ *
* @see #getGroup()
*/
public void setGroup(ButtonGroup g)
@@ -568,7 +568,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
* Returns the current value of the model's "group" property.
*
* @return The value of the "group" property
- *
+ *
* @see #setGroup(ButtonGroup)
*/
public ButtonGroup getGroup()
diff --git a/javax/swing/DefaultCellEditor.java b/javax/swing/DefaultCellEditor.java
index 16ed1ec68..46f637071 100644
--- a/javax/swing/DefaultCellEditor.java
+++ b/javax/swing/DefaultCellEditor.java
@@ -57,7 +57,7 @@ import javax.swing.tree.TreeCellEditor;
* The default implementation of {@link TableCellEditor} and
* {@link TreeCellEditor}. It provides editor components for
* some standard object types.
- *
+ *
* @author Andrew Selkirk
* @author Audrius Meskauskas
*/
@@ -69,12 +69,12 @@ public class DefaultCellEditor
/**
* This changeable module access the editor component in the component
- * specific way. For instance, to set the value for JTextField, we need to
- * call setText(String), and for JCheckBox we need to call
+ * specific way. For instance, to set the value for JTextField, we need to
+ * call setText(String), and for JCheckBox we need to call
* setSelected(boolean). Each default editor has the component specific
* derivative of this class. These derivatives are private inner classes of
* the DefaultCellEditor.
- *
+ *
* The editor delegate is also set for the editor component as the action
* listener. It listens for the events that indicate that editing has stopped.
*/
@@ -98,7 +98,7 @@ public class DefaultCellEditor
{
// Nothing to do here.
}
-
+
/**
* Set the value for the editor component. This method is normally
* overridden to set the value in the way, specific for the text
@@ -121,12 +121,12 @@ public class DefaultCellEditor
public Object getCellEditorValue()
{
return value;
- }
+ }
/**
- * The default method returns true for the {@link MouseEvent} and false
+ * The default method returns true for the {@link MouseEvent} and false
* for any other events.
- *
+ *
* @param event the event to check
*
* @return true if the passed event is the mouse event and false otherwise.
@@ -141,10 +141,10 @@ public class DefaultCellEditor
/**
* Returns true to indicate that the editing cell can be selected.
- *
+ *
* The default method returns true without action but may be overridden
* in derived classes for more specific behavior.
- *
+ *
* @param event unused in default method
*
* @return true always
@@ -158,8 +158,8 @@ public class DefaultCellEditor
/**
* Finish the cell editing session. This method notifies the registered
* cell editor listeners (including the table) that the editing has been
- * stopped.
- *
+ * stopped.
+ *
* @return boolean
*/
public boolean stopCellEditing()
@@ -182,9 +182,9 @@ public class DefaultCellEditor
* Start editing session and returns true to indicate the editing has begun.
* The default method returns true without action but may be overridden
* in derived classes for more specific behavior.
- *
+ *
* @param event the event.
- *
+ *
* @return true, always
*/
public boolean startCellEditing(EventObject event)
@@ -196,8 +196,8 @@ public class DefaultCellEditor
/**
* This event is fired by the editor component (for instance, by pressing
* ENTER in the {@link JTextField}. The default method delegates call to
- * the {@link #stopCellEditing}, finishing the editing session.
- *
+ * the {@link #stopCellEditing}, finishing the editing session.
+ *
* @param event unused in default method
*/
public void actionPerformed(ActionEvent event)
@@ -207,8 +207,8 @@ public class DefaultCellEditor
/**
* This event is fired by the editor component.The default method delegates
- * call to the {@link #stopCellEditing}, finishing the editing session.
- *
+ * call to the {@link #stopCellEditing}, finishing the editing session.
+ *
* @param event unused in default method
*/
public void itemStateChanged(ItemEvent event)
@@ -225,9 +225,9 @@ public class DefaultCellEditor
CellEditorListener[] listeners = getCellEditorListeners();
for (int index = 0; index < listeners.length; index++)
listeners[index].editingStopped(changeEvent);
-
+
}
-
+
/**
* Notify the registered listeners (including the table) that the editing
* has been canceled.
@@ -239,10 +239,10 @@ public class DefaultCellEditor
listeners[index].editingCanceled(changeEvent);
}
} // EditorDelegate
-
+
/**
* Provides getter and setter methods to work with the text component.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JTextFieldDelegate extends EditorDelegate
@@ -251,7 +251,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -268,21 +268,21 @@ public class DefaultCellEditor
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (String)
*/
public Object getCellEditorValue()
{
JTextField f = (JTextField) editorComponent;
- return value = f.getText();
- }
+ return value = f.getText();
+ }
}
/**
* Provides getter and setter methods to work with the combo box.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JComboBoxDelegate extends EditorDelegate
{
@@ -290,7 +290,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -298,14 +298,14 @@ public class DefaultCellEditor
*/
public void setValue(Object aValue)
{
- value = aValue;
+ value = aValue;
JComboBox c = (JComboBox) editorComponent;
if (value != null)
c.setSelectedItem(value);
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (as String)
*/
@@ -313,13 +313,13 @@ public class DefaultCellEditor
{
JComboBox c = (JComboBox) editorComponent;
return value = c.getSelectedItem();
- }
-
+ }
+
/**
* Returns true to indicate that the editing cell can be selected. If the
* check box is not editable, expands it. If it is editable, brings
* focus to the editor field.
- *
+ *
* @param event unused in default method
*
* @return true always
@@ -330,13 +330,13 @@ public class DefaultCellEditor
if (!c.isEditable)
c.showPopup();
return true;
- }
+ }
}
/**
* Provides getter and setter methods to work with the check box.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JCheckBoxDelegate extends EditorDelegate
{
@@ -344,7 +344,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -353,7 +353,7 @@ public class DefaultCellEditor
public void setValue(Object value)
{
JCheckBox c = (JCheckBox) editorComponent;
-
+
if (value == null)
c.setSelected(false);
else
@@ -361,7 +361,7 @@ public class DefaultCellEditor
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (must be CharSequence)
*/
@@ -370,9 +370,9 @@ public class DefaultCellEditor
JCheckBox c = (JCheckBox) editorComponent;
value = c.isSelected() ? Boolean.TRUE : Boolean.FALSE;
return value;
- }
+ }
}
-
+
/**
* The Swing JComponent, performing the editing session.
*/
@@ -392,7 +392,7 @@ public class DefaultCellEditor
/**
* Create the DefaultCellEditor that uses the text field as its editor
* component (appropriate for the text content)
- *
+ *
* @param textfield the text field as will be used as the editor component
*/
public DefaultCellEditor(JTextField textfield)
@@ -406,7 +406,7 @@ public class DefaultCellEditor
/**
* Constructor DefaultCellEditor that uses the checkbox (appropriate
* for boolean values)
- *
+ *
* @param checkbox the checkbox that will be used with this editor.
*/
public DefaultCellEditor(JCheckBox checkbox)
@@ -419,7 +419,7 @@ public class DefaultCellEditor
/**
* Constructor DefaultCellEditor that uses the combo box.
- *
+ *
* @param combobox the combo box that will be used with this editor.
*/
public DefaultCellEditor(JComboBox combobox)
@@ -431,19 +431,19 @@ public class DefaultCellEditor
} // DefaultCellEditor()
/**
- * Get the component that performs the editing sessions. It is the same
+ * Get the component that performs the editing sessions. It is the same
* component that was passed in constructor.
- *
- * @return the component, performing the editing sessions.
+ *
+ * @return the component, performing the editing sessions.
*/
public Component getComponent()
{
- return editorComponent;
+ return editorComponent;
} // getComponent()
/**
* Get the number of mouse clicks, required to start the editing session.
- *
+ *
* @return int the number of mouse clicks, required to start the session
*/
public int getClickCountToStart()
@@ -453,7 +453,7 @@ public class DefaultCellEditor
/**
* Set the number of mouse clicks, required to start the editing session.
- *
+ *
* @param count the number of clicks, required to start the session
*/
public void setClickCountToStart(int count)
@@ -462,9 +462,9 @@ public class DefaultCellEditor
} // setClickCountToStart()
/**
- * Get the value, currently being displayed by the editor component. The
+ * Get the value, currently being displayed by the editor component. The
* call is forwarded to the {@link #delegate}.
- *
+ *
* @return Object the value (class depends on the editor component)
*/
public Object getCellEditorValue()
@@ -474,7 +474,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @param event forwarded to the delegate.
*
* @return boolean returned by delegate
@@ -486,7 +486,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @param event forwarded to the delegate.
*
* @return boolean returned by delegate
@@ -498,7 +498,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @return boolean returned by delegate
*/
public boolean stopCellEditing()
@@ -515,14 +515,14 @@ public class DefaultCellEditor
} // cancelCellEditing()
/**
- * Sets an initial value for the editor.
- * This will cause the editor to stopEditing and lose any partially
+ * Sets an initial value for the editor.
+ * This will cause the editor to stopEditing and lose any partially
* edited value if the editor is editing when this method is called.
- * Returns the component that should be added to the client's Component
- * hierarchy. Once installed in the client's hierarchy this component will
- * then be able to draw and receive user input.
- *
- * @param tree - the JTree that is asking the editor to edit; this
+ * Returns the component that should be added to the client's Component
+ * hierarchy. Once installed in the client's hierarchy this component will
+ * then be able to draw and receive user input.
+ *
+ * @param tree - the JTree that is asking the editor to edit; this
* parameter can be null
* @param value - the value of the cell to be edited
* @param isSelected - true is the cell is to be renderer with selection
@@ -546,21 +546,21 @@ public class DefaultCellEditor
* Get the cell editor component that will perform the editing session. If
* returned once, the same component is also returned on the repetetive calls
* again (reused).
- *
+ *
* @param table the table where the editing is performed
- * @param value the current value of the table. It is set as the initial
+ * @param value the current value of the table. It is set as the initial
* component value.
* @param isSelected if true, the cell is currently selected
* @param row the row of the cell being edited
* @param column the column of the cell being edited
- *
+ *
* @return Component the component that will perform the editing session
*/
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row,
int column)
{
- // NOTE: as specified by Sun, we don't call new() everytime, we return
+ // NOTE: as specified by Sun, we don't call new() everytime, we return
// editorComponent on each call to getTableCellEditorComponent or
// getTreeCellEditorComponent.
delegate.setValue(value);
diff --git a/javax/swing/DefaultComboBoxModel.java b/javax/swing/DefaultComboBoxModel.java
index 9b5bdb60d..a90b89d93 100644
--- a/javax/swing/DefaultComboBoxModel.java
+++ b/javax/swing/DefaultComboBoxModel.java
@@ -78,13 +78,13 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Creates a new model and initializes its item list to the values in the
- * given array. The selected item is set to the first item in the array, or
+ * Creates a new model and initializes its item list to the values in the
+ * given array. The selected item is set to the first item in the array, or
* <code>null</code> if the array length is zero.
*
* @param items an array containing items for the model (<code>null</code>
* not permitted).
- *
+ *
* @throws NullPointerException if <code>items</code> is <code>null</code>.
*/
public DefaultComboBoxModel(Object[] items)
@@ -95,13 +95,13 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Creates a new model and initializes its item list to the values in the
- * given vector. The selected item is set to the first item in the vector,
+ * Creates a new model and initializes its item list to the values in the
+ * given vector. The selected item is set to the first item in the vector,
* or <code>null</code> if the vector length is zero.
*
* @param vector a vector containing items for the model (<code>null</code>
* not permitted).
- *
+ *
* @throws NullPointerException if <code>vector</code> is <code>null</code>.
*/
public DefaultComboBoxModel(Vector<?> vector)
@@ -114,7 +114,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Adds an element to the model's item list and sends a {@link ListDataEvent}
* to all registered listeners. If the new element is the first item added
- * to the list, and the selected item is <code>null</code>, the new element
+ * to the list, and the selected item is <code>null</code>, the new element
* is set as the selected item.
*
* @param object item to add to the model's item list.
@@ -131,12 +131,12 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Removes the element at the specified index from the model's item list
* and sends a {@link ListDataEvent} to all registered listeners. If the
- * element removed was the selected item, then the preceding element becomes
- * the new selected item (or the next element, if there is no preceding
+ * element removed was the selected item, then the preceding element becomes
+ * the new selected item (or the next element, if there is no preceding
* element).
*
* @param index the index of the item to remove.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if <code>index</code> is out of
* bounds.
*/
@@ -147,7 +147,7 @@ public class DefaultComboBoxModel extends AbstractListModel
{
if (selected > 0)
setSelectedItem(getElementAt(selected - 1));
- else
+ else
setSelectedItem(getElementAt(selected + 1));
}
list.removeElementAt(index);
@@ -161,10 +161,10 @@ public class DefaultComboBoxModel extends AbstractListModel
* @param object element to insert
* @param index index specifing position in the list where given element
* should be inserted.
- *
- * @throws ArrayIndexOutOfBoundsException if <code>index</code> is out of
+ *
+ * @throws ArrayIndexOutOfBoundsException if <code>index</code> is out of
* bounds.
- *
+ *
* @see #addElement(Object)
*/
public void insertElementAt(Object object, int index)
@@ -174,7 +174,7 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Removes an element from the model's item list and sends a
+ * Removes an element from the model's item list and sends a
* {@link ListDataEvent} to all registered listeners. If the item to be
* removed is the current selected item, a new selected item will be set.
* If the element is not found in the model's item list, this method does
@@ -191,7 +191,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Removes all the items from the model's item list, resets and selected item
- * to <code>null</code>, and sends a {@link ListDataEvent} to all registered
+ * to <code>null</code>, and sends a {@link ListDataEvent} to all registered
* listeners.
*/
public void removeAllElements()
@@ -217,7 +217,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Sets the selected item for the model and sends a {@link ListDataEvent} to
- * all registered listeners. The start and end index of the event is set to
+ * all registered listeners. The start and end index of the event is set to
* -1 to indicate the model's selection has changed, and not its contents.
*
* @param object the new selected item (<code>null</code> permitted).
diff --git a/javax/swing/DefaultDesktopManager.java b/javax/swing/DefaultDesktopManager.java
index cad88186f..9613449ff 100644
--- a/javax/swing/DefaultDesktopManager.java
+++ b/javax/swing/DefaultDesktopManager.java
@@ -126,11 +126,11 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
Container c = frame.getParent();
if (c != null)
{
- if (frame.isIcon())
- c.remove(frame.getDesktopIcon());
- else
- c.remove(frame);
- c.repaint();
+ if (frame.isIcon())
+ c.remove(frame.getDesktopIcon());
+ else
+ c.remove(frame);
+ c.repaint();
}
}
@@ -151,25 +151,25 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
Container p = frame.getParent();
if (p != null)
{
- Rectangle pBounds = p.getBounds();
- Insets insets = p.getInsets();
- pBounds.width -= insets.left + insets.right;
- pBounds.height -= insets.top + insets.bottom;
+ Rectangle pBounds = p.getBounds();
+ Insets insets = p.getInsets();
+ pBounds.width -= insets.left + insets.right;
+ pBounds.height -= insets.top + insets.bottom;
- setBoundsForFrame(frame, 0, 0, pBounds.width, pBounds.height);
+ setBoundsForFrame(frame, 0, 0, pBounds.width, pBounds.height);
}
if (p instanceof JDesktopPane)
((JDesktopPane) p).setSelectedFrame(frame);
else
{
- try
- {
- frame.setSelected(true);
- }
- catch (PropertyVetoException e)
- {
- // Do nothing.
- }
+ try
+ {
+ frame.setSelected(true);
+ }
+ catch (PropertyVetoException e)
+ {
+ // Do nothing.
+ }
}
}
@@ -320,7 +320,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
{
p.setSelectedFrame(frame);
}
-
+
}
frame.toFront();
}
@@ -414,7 +414,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
dragCache.width, dragCache.height);
pane = null;
dragCache = null;
- component.repaint();
+ component.repaint();
}
}
@@ -477,7 +477,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
dragCache.width, dragCache.height);
pane = null;
dragCache = null;
- component.repaint();
+ component.repaint();
}
}
@@ -527,9 +527,9 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
protected Rectangle getBoundsForIconOf(JInternalFrame frame)
{
// IconRects has no order to it.
- // The icon _must_ be placed in the first free slot (working from
+ // The icon _must_ be placed in the first free slot (working from
// the bottom left corner)
- // The icon also must not be placed where another icon is placed
+ // The icon also must not be placed where another icon is placed
// (regardless whether that frame is an icon currently or not)
JDesktopPane desktopPane = frame.getDesktopPane();
@@ -547,7 +547,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
if (frames[i] instanceof JDesktopIcon
|| frames[i] instanceof JInternalFrame
&& ((JInternalFrame) frames[i]).getWasIcon() && frames[i] != frame)
- count++;
+ count++;
iconRects = new Rectangle[count];
for (int i = 0, j = 0; i < frames.length; i++)
if (frames[i] instanceof JDesktopIcon)
diff --git a/javax/swing/DefaultFocusManager.java b/javax/swing/DefaultFocusManager.java
index 103a7f36c..3c5daa0e6 100644
--- a/javax/swing/DefaultFocusManager.java
+++ b/javax/swing/DefaultFocusManager.java
@@ -49,7 +49,7 @@ import java.util.Stack;
*
* @author Andrew Selkirk
*/
-public class DefaultFocusManager extends FocusManager
+public class DefaultFocusManager extends FocusManager
{
/**
@@ -65,9 +65,9 @@ public class DefaultFocusManager extends FocusManager
// TODO
} // DefaultFocusManager()
- /**
+ /**
* processKeyEvent
- *
+ *
* @param component
* TODO
* @param event
@@ -80,7 +80,7 @@ public class DefaultFocusManager extends FocusManager
/**
* focusNextComponent
- *
+ *
* @param component
* TODO
*/
@@ -91,7 +91,7 @@ public class DefaultFocusManager extends FocusManager
/**
* focusPreviousComponent
- *
+ *
* @param component
* TODO
*/
@@ -102,7 +102,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getFirstComponent
- *
+ *
* @param container
* TODO
* @return Component
@@ -114,7 +114,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getLastComponent
- *
+ *
* @param container
* TODO
* @return Component
@@ -126,7 +126,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getComponentBefore
- *
+ *
* @param container
* TODO
* @param component
@@ -140,7 +140,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getComponentAfter
- *
+ *
* @param container
* TODO
* @param component
@@ -154,7 +154,7 @@ public class DefaultFocusManager extends FocusManager
/**
* compareTabOrder
- *
+ *
* @param component1
* TODO
* @param component2
diff --git a/javax/swing/DefaultListModel.java b/javax/swing/DefaultListModel.java
index 674864cce..aa2600760 100644
--- a/javax/swing/DefaultListModel.java
+++ b/javax/swing/DefaultListModel.java
@@ -166,7 +166,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Sets the list element at a particular index.
*
- * @param index The list index at which to set a value
+ * @param index The list index at which to set a value
* @param element The value to set at the specified index
*
* @return The value previously held at the specified index
@@ -253,7 +253,7 @@ public class DefaultListModel extends AbstractListModel
* least as large as the list.
*
* @param array The array to copy the list into
- *
+ *
* @throws IndexOutOfBoundsException if the array is too small to hold the
* elements of the list
*/
@@ -317,7 +317,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Sets the capacity of the list to be equal to its size. The list's capacity
* is the number of elements it can hold before it needs to be reallocated.
- * The list's size is the number of elements it currently holds.
+ * The list's size is the number of elements it currently holds.
*/
public void trimToSize()
{
@@ -360,7 +360,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Gets the capacity of the list. The list's capacity is the number of
- * elements it can hold before it needs to be reallocated.
+ * elements it can hold before it needs to be reallocated.
*
* @return The capacity of the list
*/
@@ -393,7 +393,7 @@ public class DefaultListModel extends AbstractListModel
* Sets the list element at a particular index.
*
* @param element The value to set at the specified index
- * @param index The list index at which to set a value
+ * @param index The list index at which to set a value
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
* outside the bounds of the list <code>[0, size())</code>
diff --git a/javax/swing/DefaultListSelectionModel.java b/javax/swing/DefaultListSelectionModel.java
index d1e2da85f..273ca0d15 100644
--- a/javax/swing/DefaultListSelectionModel.java
+++ b/javax/swing/DefaultListSelectionModel.java
@@ -69,7 +69,7 @@ public class DefaultListSelectionModel implements Cloneable,
protected EventListenerList listenerList = new EventListenerList();
- /**
+ /**
* The current list selection mode. Must be one of the numeric constants
* <code>SINGLE_SELECTION</code>, <code>SINGLE_INTERVAL_SELECTION</code>
* or <code>MULTIPLE_INTERVAL_SELECTION</code> from {@link
@@ -129,7 +129,7 @@ public class DefaultListSelectionModel implements Cloneable,
boolean valueIsAdjusting = false;
- /**
+ /**
* The current set of "intervals", represented simply by a {@link
* java.util.BitSet}. A set bit indicates a selected index, whereas a
* cleared bit indicates a non-selected index.
@@ -150,13 +150,13 @@ public class DefaultListSelectionModel implements Cloneable,
boolean setLeadCalledFromAdd = false;
/**
- * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}. The default value is
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
public int getSelectionMode()
@@ -171,7 +171,7 @@ public class DefaultListSelectionModel implements Cloneable,
*/
public void setSelectionMode(int mode)
{
- if (mode < ListSelectionModel.SINGLE_SELECTION
+ if (mode < ListSelectionModel.SINGLE_SELECTION
|| mode > ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
throw new IllegalArgumentException("Unrecognised mode: " + mode);
selectionMode = mode;
@@ -179,7 +179,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Gets the value of the {@link #anchorSelectionIndex} property.
- *
+ *
* @return The current property value
*
* @see #setAnchorSelectionIndex
@@ -191,7 +191,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #anchorSelectionIndex} property.
- *
+ *
* @param index The new property value
*
* @see #getAnchorSelectionIndex
@@ -206,10 +206,10 @@ public class DefaultListSelectionModel implements Cloneable,
fireValueChanged(index, old);
}
}
-
+
/**
* Gets the value of the {@link #leadSelectionIndex} property.
- *
+ *
* @return The current property value
*
* @see #setLeadSelectionIndex
@@ -245,7 +245,7 @@ public class DefaultListSelectionModel implements Cloneable,
* {@link ListSelectionEvent} includes only the minimum range of values
* which changed selection status between the beginning and end of the
* method.</p>
- *
+ *
* @param leadIndex The new property value
*
* @see #getAnchorSelectionIndex
@@ -267,7 +267,7 @@ public class DefaultListSelectionModel implements Cloneable,
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval (leadIndex, leadIndex);
-
+
int oldLeadIndex = leadSelectionIndex;
if (oldLeadIndex == -1)
oldLeadIndex = leadIndex;
@@ -276,8 +276,8 @@ public class DefaultListSelectionModel implements Cloneable,
leadSelectionIndex = leadIndex;
if (anchorSelectionIndex == -1)
- return;
-
+ return;
+
int R1 = Math.min(anchorSelectionIndex, oldLeadIndex);
int R2 = Math.max(anchorSelectionIndex, oldLeadIndex);
int S1 = Math.min(anchorSelectionIndex, leadIndex);
@@ -295,28 +295,28 @@ public class DefaultListSelectionModel implements Cloneable,
{
sel.set(R1, R2+1);
sel.clear(S1, S2+1);
- }
+ }
int beg = sel.nextSetBit(0), end = -1;
- for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
+ for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
end = i;
-
+
BitSet old = (BitSet) oldSel;
-
+
// The new and previous lead location requires repainting.
old.set(oldLeadIndex, !sel.get(oldLeadIndex));
old.set(leadSelectionIndex, !sel.get(leadSelectionIndex));
-
+
fireDifference(sel, old);
}
/**
- * Moves the lead selection index to <code>leadIndex</code> without
+ * Moves the lead selection index to <code>leadIndex</code> without
* changing the selection values.
- *
+ *
* If leadAnchorNotificationEnabled is true, send a notification covering the
* old and new lead cells.
- *
+ *
* @param leadIndex the new lead selection index
* @since 1.5
*/
@@ -324,16 +324,16 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (leadSelectionIndex == leadIndex)
return;
-
+
leadSelectionIndex = leadIndex;
if (isLeadAnchorNotificationEnabled())
fireValueChanged(Math.min(leadSelectionIndex, leadIndex),
Math.max(leadSelectionIndex, leadIndex));
}
-
+
/**
* Gets the value of the {@link #leadAnchorNotificationEnabled} property.
- *
+ *
* @return The current property value
*
* @see #setLeadAnchorNotificationEnabled
@@ -345,7 +345,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #leadAnchorNotificationEnabled} property.
- *
+ *
* @param l The new property value
*
* @see #isLeadAnchorNotificationEnabled
@@ -404,7 +404,7 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (isSelectionEmpty())
return -1;
-
+
return sel.nextSetBit(0);
}
@@ -424,8 +424,8 @@ public class DefaultListSelectionModel implements Cloneable,
return -1;
int mx = -1;
- for(int i=sel.nextSetBit(0); i >= 0; i=sel.nextSetBit(i+1))
- {
+ for(int i=sel.nextSetBit(0); i >= 0; i=sel.nextSetBit(i+1))
+ {
mx = i;
}
return mx;
@@ -451,12 +451,12 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* If the {@link #selectionMode} property is equal to
* <code>SINGLE_SELECTION</code> equivalent to calling
- * <code>setSelectionInterval(index1, index2)</code>;
- * If the {@link #selectionMode} property is equal to
+ * <code>setSelectionInterval(index1, index2)</code>;
+ * If the {@link #selectionMode} property is equal to
* <code>SINGLE_INTERVAL_SELECTION</code> and the interval being
* added is not adjacent to an already selected interval,
* equivalent to <code>setSelectionInterval(index1, index2)</code>.
- * Otherwise adds the range <code>[index0, index1]</code>
+ * Otherwise adds the range <code>[index0, index1]</code>
* to the selection interval set.
*
* @param index0 The beginning of the range of indices to select
@@ -465,11 +465,11 @@ public class DefaultListSelectionModel implements Cloneable,
* @see #setSelectionInterval
* @see #removeSelectionInterval
*/
- public void addSelectionInterval(int index0, int index1)
+ public void addSelectionInterval(int index0, int index1)
{
if (index0 == -1 || index1 == -1)
return;
-
+
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval(index0, index1);
else
@@ -479,27 +479,27 @@ public class DefaultListSelectionModel implements Cloneable,
oldSel = sel.clone();
- // COMPAT: Like Sun (but not like IBM), we allow calls to
+ // COMPAT: Like Sun (but not like IBM), we allow calls to
// addSelectionInterval when selectionMode is
// SINGLE_SELECTION_INTERVAL iff the interval being added
// is adjacent to an already selected interval
if (selectionMode == SINGLE_INTERVAL_SELECTION)
- if (!(isSelectedIndex(index0) ||
- isSelectedIndex(index1) ||
- isSelectedIndex(Math.max(lo-1,0)) ||
+ if (!(isSelectedIndex(index0) ||
+ isSelectedIndex(index1) ||
+ isSelectedIndex(Math.max(lo-1,0)) ||
isSelectedIndex(Math.min(hi+1,sel.size()))))
- sel.clear();
+ sel.clear();
// We have to update the anchorSelectionIndex and leadSelectionIndex
// variables
-
+
// The next if statements breaks down to "if this selection is adjacent
// to the previous selection and going in the same direction"
- if ((isSelectedIndex(leadSelectionIndex))
- && ((index0 - 1 == leadSelectionIndex
- && (index1 >= index0)
+ if ((isSelectedIndex(leadSelectionIndex))
+ && ((index0 - 1 == leadSelectionIndex
+ && (index1 >= index0)
&& (leadSelectionIndex >= anchorSelectionIndex))
- || (index0 + 1 == leadSelectionIndex && (index1 <= index0)
+ || (index0 + 1 == leadSelectionIndex && (index1 <= index0)
&& (leadSelectionIndex <= anchorSelectionIndex)))
&& (anchorSelectionIndex != -1 || leadSelectionIndex != -1))
{
@@ -535,24 +535,24 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (index0 == -1 || index1 == -1)
return;
-
+
oldSel = sel.clone();
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
-
+
// if selectionMode is SINGLE_INTERVAL_SELECTION and removing the interval
// (index0,index1) would leave two disjoint selection intervals, remove all
// selected indices from lo to the last selected index
- if (getMinSelectionIndex() > 0 && getMinSelectionIndex() < lo &&
+ if (getMinSelectionIndex() > 0 && getMinSelectionIndex() < lo &&
selectionMode == SINGLE_INTERVAL_SELECTION)
hi = sel.size() - 1;
- sel.clear(lo, hi+1);
+ sel.clear(lo, hi+1);
//update anchorSelectionIndex and leadSelectionIndex variables
//TODO: will probably need MouseDragged to test properly and know if this works
setAnchorSelectionIndex(index0);
leadSelectionIndex = index1;
-
+
fireDifference(sel, (BitSet) oldSel);
}
@@ -566,19 +566,19 @@ public class DefaultListSelectionModel implements Cloneable,
if (from < 0)
return; // Empty selection - nothing to do.
int to = from;
-
+
int i;
for (i = from; i>=0; i=sel.nextSetBit(i+1))
to = i;
-
+
sel.clear();
fireValueChanged(from, to, valueIsAdjusting);
}
-
+
/**
* Fire the change event, covering the difference between the two sets.
- *
+ *
* @param current the current set
* @param x the previous set, the object will be reused.
*/
@@ -596,12 +596,12 @@ public class DefaultListSelectionModel implements Cloneable,
fireValueChanged(from, to, valueIsAdjusting);
}
-
+
/**
* Clears the current selection and marks a given interval as "selected". If
* the current selection mode is <code>SINGLE_SELECTION</code> only the
* index <code>index2</code> is selected.
- *
+ *
* @param anchor the anchor selection index.
* @param lead the lead selection index.
*/
@@ -639,7 +639,7 @@ public class DefaultListSelectionModel implements Cloneable,
int last = first;
if (first >= 0)
last += (sel.cardinality() - 1);
-
+
// update the selection
int lo = Math.min(anchor, lead);
int hi = Math.max(anchor, lead);
@@ -647,7 +647,7 @@ public class DefaultListSelectionModel implements Cloneable,
return; // selected interval is not being changed
sel.clear();
sel.set(lo, hi + 1);
-
+
// include the old selection in the event range
if (first >= 0)
lo = Math.min(lo, first);
@@ -661,7 +661,7 @@ public class DefaultListSelectionModel implements Cloneable,
anchorSelectionIndex = anchor;
leadSelectionIndex = lead;
fireValueChanged(lo, hi);
- }
+ }
else
{
BitSet oldSel = (BitSet) sel.clone();
@@ -675,7 +675,7 @@ public class DefaultListSelectionModel implements Cloneable,
// update the anchorSelectionIndex and leadSelectionIndex variables
setAnchorSelectionIndex(anchor);
leadSelectionIndex = lead;
-
+
fireDifference(sel, oldSel);
}
}
@@ -697,7 +697,7 @@ public class DefaultListSelectionModel implements Cloneable,
boolean before)
{
if (!before)
- {
+ {
index++;
length--;
}
@@ -759,7 +759,7 @@ public class DefaultListSelectionModel implements Cloneable,
{
fireValueChanged(firstIndex, lastIndex, getValueIsAdjusting());
}
-
+
/**
* Fires a {@link ListSelectionEvent} to all the listeners of type {@link
* ListSelectionListener} registered with this selection model.
@@ -770,7 +770,7 @@ public class DefaultListSelectionModel implements Cloneable,
* made to the selection, such as during interactive scrolling
*/
protected void fireValueChanged(int firstIndex, int lastIndex,
- boolean isAdjusting)
+ boolean isAdjusting)
{
ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
lastIndex, isAdjusting);
diff --git a/javax/swing/DefaultSingleSelectionModel.java b/javax/swing/DefaultSingleSelectionModel.java
index 3f79f0dee..93d129ebb 100644
--- a/javax/swing/DefaultSingleSelectionModel.java
+++ b/javax/swing/DefaultSingleSelectionModel.java
@@ -82,9 +82,9 @@ public class DefaultSingleSelectionModel
/**
* Returns the selected index or <code>-1</code> if there is no selection.
- *
+ *
* @return The selected index.
- *
+ *
* @see #setSelectedIndex(int)
*/
public int getSelectedIndex()
@@ -93,11 +93,11 @@ public class DefaultSingleSelectionModel
}
/**
- * Sets the selected index and, if this is different to the previous
+ * Sets the selected index and, if this is different to the previous
* selection, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param index the index (use <code>-1</code> to represent no selection).
- *
+ *
* @see #getSelectedIndex()
* @see #clearSelection
*/
@@ -113,7 +113,7 @@ public class DefaultSingleSelectionModel
/**
* Clears the selection by setting the selected index to <code>-1</code> and
* sends a {@link ChangeEvent} to all registered listeners. If the selected
- * index is already <code>-1</code>, this method does nothing.
+ * index is already <code>-1</code>, this method does nothing.
*/
public void clearSelection()
{
@@ -122,8 +122,8 @@ public class DefaultSingleSelectionModel
/**
* Returns <code>true</code> if there is a selection, and <code>false</code>
- * otherwise.
- *
+ * otherwise.
+ *
* @return A boolean.
*/
public boolean isSelected()
diff --git a/javax/swing/FocusManager.java b/javax/swing/FocusManager.java
index 21e4482d1..b8459d4d5 100644
--- a/javax/swing/FocusManager.java
+++ b/javax/swing/FocusManager.java
@@ -199,7 +199,7 @@ public abstract class FocusManager
{
wrapped.addKeyEventPostProcessor(p);
}
-
+
/**
* Wraps {@link KeyboardFocusManager#addPropertyChangeListener(PropertyChangeListener)}.
*
@@ -366,7 +366,7 @@ public abstract class FocusManager
return wrapped.getVetoableChangeListeners(n);
}
-
+
/**
* Wraps
* {@link KeyboardFocusManager#removeKeyEventDispatcher(KeyEventDispatcher)}.
@@ -490,7 +490,7 @@ public abstract class FocusManager
public static FocusManager getCurrentManager()
{
KeyboardFocusManager m =
- KeyboardFocusManager.getCurrentKeyboardFocusManager();
+ KeyboardFocusManager.getCurrentKeyboardFocusManager();
return new WrappingFocusManager(m);
}
diff --git a/javax/swing/GrayFilter.java b/javax/swing/GrayFilter.java
index ef0d14718..a7f969386 100644
--- a/javax/swing/GrayFilter.java
+++ b/javax/swing/GrayFilter.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -57,7 +57,7 @@ public class GrayFilter extends RGBImageFilter
/**
* Create a GrayFilter. If b is true then brighten. Also, indicate how much
* gray.
- *
+ *
* @param b if brighten
* @param p percent of gray, 0 - 100
*/
@@ -79,7 +79,7 @@ public class GrayFilter extends RGBImageFilter
return (Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(
src.getSource(), new GrayFilter(true, 0))));
}
-
+
/**
* Filter RGB to gray
*/
diff --git a/javax/swing/Icon.java b/javax/swing/Icon.java
index c73ad2d40..ed7f94fda 100644
--- a/javax/swing/Icon.java
+++ b/javax/swing/Icon.java
@@ -1,4 +1,4 @@
-/* Icon.java --
+/* Icon.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,21 +48,21 @@ public interface Icon
{
/**
* Returns the height of the icon.
- *
+ *
* @return The height of the icon.
*/
int getIconHeight();
-
+
/**
* Returns the width of the icon.
- *
+ *
* @return The width of the icon.
*/
int getIconWidth();
-
+
/**
* Draws the icon at the location (x, y) on the specified graphics device.
- *
+ *
* @param c a component related to the icon in some way (can be ignored by
some implementing classes).
* @param g the graphics device.
diff --git a/javax/swing/ImageIcon.java b/javax/swing/ImageIcon.java
index cedf4be35..c78d04c58 100644
--- a/javax/swing/ImageIcon.java
+++ b/javax/swing/ImageIcon.java
@@ -90,7 +90,7 @@ public class ImageIcon
/**
* Returns the accessible state for the <code>ImageIcon</code>. To
- * match the reference implementation, this method always returns
+ * match the reference implementation, this method always returns
* <code>null</code>.
*
* @return <code>null</code>.
@@ -138,7 +138,7 @@ public class ImageIcon
/**
* Returns the accessible child at index <code>i</code>, which is
- * <code>null</code> in this case because an {@link ImageIcon} has no
+ * <code>null</code> in this case because an {@link ImageIcon} has no
* children.
*
* @param i the index of the child to be fetched
@@ -151,12 +151,12 @@ public class ImageIcon
}
/**
- * Returns the locale of this object. To match the reference
+ * Returns the locale of this object. To match the reference
* implementation, this method always returns <code>null</code>.
*
* @return <code>null</code>.
*/
- public Locale getLocale()
+ public Locale getLocale()
throws IllegalComponentStateException
{
// refer to Sun's bug report 4269253
@@ -168,7 +168,7 @@ public class ImageIcon
* <code>description</code> property of the underlying {@link ImageIcon}.
*
* @return The description (possibly <code>null</code>).
- *
+ *
* @see #setAccessibleIconDescription(String)
*/
public String getAccessibleIconDescription()
@@ -177,11 +177,11 @@ public class ImageIcon
}
/**
- * Sets the accessible icon description. This sets the
+ * Sets the accessible icon description. This sets the
* <code>description</code> property of the underlying {@link ImageIcon}.
*
* @param newDescr the description (<code>null</code> permitted).
- *
+ *
* @see #getAccessibleIconDescription()
*/
public void setAccessibleIconDescription(String newDescr)
@@ -190,7 +190,7 @@ public class ImageIcon
}
/**
- * Returns the icon height. This returns the <code>iconHeight</code>
+ * Returns the icon height. This returns the <code>iconHeight</code>
* property of the underlying {@link ImageIcon}.
*
* @return The icon height.
@@ -199,9 +199,9 @@ public class ImageIcon
{
return getIconHeight();
}
-
+
/**
- * Returns the icon width. This returns the <code>iconWidth</code> property
+ * Returns the icon width. This returns the <code>iconWidth</code> property
* of the underlying {@link ImageIcon}.
*
* @return The icon width.
@@ -217,7 +217,7 @@ public class ImageIcon
/** A dummy Component that is used in the MediaTracker. */
protected static final Component component = new Component()
{
- // No need to implement this.
+ // No need to implement this.
};
/** The MediaTracker used to monitor the loading of images. */
@@ -243,7 +243,7 @@ public class ImageIcon
{
// Nothing to do here.
}
-
+
/**
* Constructs an ImageIcon given a filename. The icon's description
* is initially set to the filename itself. A filename of "" means
@@ -277,7 +277,7 @@ public class ImageIcon
{
this(imageData, null);
}
-
+
/**
* Creates an ImageIcon from the given byte array and sets the given
* description.
@@ -332,7 +332,7 @@ public class ImageIcon
{
return observer;
}
-
+
/**
* Sets the ImageObserver that will be used for all Image
* operations. Can be set to null (the default) when no observer is
@@ -459,7 +459,7 @@ public class ImageIcon
* Returns the object that provides accessibility features for this
* <code>ImageIcon</code> instance.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleImageIcon}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/InputMap.java b/javax/swing/InputMap.java
index 19a75f4e9..40c43daa4 100644
--- a/javax/swing/InputMap.java
+++ b/javax/swing/InputMap.java
@@ -87,7 +87,7 @@ public class InputMap
*
* @param keystroke the key of the entry (<code>null</code> is ignored).
*
- * @return The binding associated with the specified keystroke (or
+ * @return The binding associated with the specified keystroke (or
* <code>null</code>).
*/
public Object get(KeyStroke keystroke)
@@ -102,11 +102,11 @@ public class InputMap
}
/**
- * Puts a new entry into the <code>InputMap</code>. If
- * <code>actionMapKey</code> is <code>null</code> any existing entry will be
+ * Puts a new entry into the <code>InputMap</code>. If
+ * <code>actionMapKey</code> is <code>null</code> any existing entry will be
* removed.
*
- * @param keystroke the keystroke for the entry (<code>null</code> is
+ * @param keystroke the keystroke for the entry (<code>null</code> is
* ignored).
* @param actionMapKey the action (<code>null</code> permitted).
*/
@@ -126,7 +126,7 @@ public class InputMap
* Removes an entry from this <code>InputMap</code>. Note that this will
* not remove any entry from the parent map, if there is one.
*
- * @param keystroke the key of the entry to remove (<code>null</code> is
+ * @param keystroke the key of the entry to remove (<code>null</code> is
* ignored).
*/
public void remove(KeyStroke keystroke)
@@ -140,7 +140,7 @@ public class InputMap
* is <code>null</code>.
*
* @return The parent map (possibly <code>null</code>).
- *
+ *
* @see #setParent(InputMap)
*/
public InputMap getParent()
@@ -154,7 +154,7 @@ public class InputMap
* find an entry in this map.
*
* @param parentMap the new parent (<code>null</code> permitted).
- *
+ *
* @see #getParent()
*/
public void setParent(InputMap parentMap)
@@ -163,7 +163,7 @@ public class InputMap
}
/**
- * Returns the number of entries in this <code>InputMap</code>. This count
+ * Returns the number of entries in this <code>InputMap</code>. This count
* does not include any entries from the parent map, if there is one.
*
* @return The number of entries.
@@ -188,12 +188,12 @@ public class InputMap
/**
* Returns all keys of entries in this <code>InputMap</code>. This does not
- * include keys defined in the parent, if there is one (use the
+ * include keys defined in the parent, if there is one (use the
* {@link #allKeys()} method for that case).
* <br><br>
* Following the behaviour of the reference implementation, this method will
- * return <code>null</code> when no entries have been added to the map,
- * and a zero length array if entries have been added but subsequently
+ * return <code>null</code> when no entries have been added to the map,
+ * and a zero length array if entries have been added but subsequently
* removed (or cleared) from the map.
*
* @return An array of keys (may be <code>null</code> or have zero length).
@@ -209,7 +209,7 @@ public class InputMap
}
/**
- * Returns all keys of entries in this <code>InputMap</code> and all its
+ * Returns all keys of entries in this <code>InputMap</code> and all its
* parents.
*
* @return An array of keys (may be <code>null</code> or have zero length).
@@ -227,7 +227,7 @@ public class InputMap
if (inputMap != null)
set.addAll(inputMap.keySet());
if (set.size() == 0)
- return null;
+ return null;
KeyStroke[] array = new KeyStroke[set.size()];
return (KeyStroke[]) set.toArray(array);
}
diff --git a/javax/swing/InternalFrameFocusTraversalPolicy.java b/javax/swing/InternalFrameFocusTraversalPolicy.java
index 4780a67c5..9187f2924 100644
--- a/javax/swing/InternalFrameFocusTraversalPolicy.java
+++ b/javax/swing/InternalFrameFocusTraversalPolicy.java
@@ -47,7 +47,7 @@ import java.awt.FocusTraversalPolicy;
* when it is selected.
*
* @author Michael Koch
- *
+ *
* @since 1.4
*/
public abstract class InternalFrameFocusTraversalPolicy
diff --git a/javax/swing/JApplet.java b/javax/swing/JApplet.java
index 68eb983dd..d725131e6 100644
--- a/javax/swing/JApplet.java
+++ b/javax/swing/JApplet.java
@@ -79,7 +79,7 @@ public class JApplet extends Applet
protected AccessibleContext accessibleContext;
private static final long serialVersionUID = 7269359214497372587L;
-
+
protected JRootPane rootPane;
/**
@@ -196,7 +196,7 @@ public class JApplet extends Applet
{
super.processKeyEvent(e);
}
-
+
public void remove(Component comp)
{
// If we're removing the root pane, use super.remove. Otherwise
diff --git a/javax/swing/JButton.java b/javax/swing/JButton.java
index 705a86381..40c104194 100644
--- a/javax/swing/JButton.java
+++ b/javax/swing/JButton.java
@@ -91,9 +91,9 @@ public class JButton extends AbstractButton
/**
* Creates a new button from the specified action.
- *
+ *
* @param a the action (<code>null</code> permitted).
- *
+ *
* @see AbstractButton#setAction(Action)
*/
public JButton(Action a)
@@ -105,7 +105,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified icon (and an empty string for
* the button text).
- *
+ *
* @param icon the icon (<code>null</code> permitted).
*/
public JButton(Icon icon)
@@ -115,7 +115,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified text and no icon.
- *
+ *
* @param text the button text (<code>null</code> permitted, will be
* substituted by an empty string).
*/
@@ -126,7 +126,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified text and icon.
- *
+ *
* @param text the button text (<code>null</code> permitted, will be
* substituted by an empty string).
* @param icon the icon (<code>null</code> permitted).
@@ -140,7 +140,7 @@ public class JButton extends AbstractButton
}
protected void configurePropertiesFromAction(Action a)
- {
+ {
super.configurePropertiesFromAction(a);
}
@@ -158,8 +158,8 @@ public class JButton extends AbstractButton
}
/**
- * Returns the suffix (<code>"ButtonUI"</code> in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix (<code>"ButtonUI"</code> in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a <code>JButton</code>.
*
* @return <code>"ButtonUI"</code>.
@@ -167,7 +167,7 @@ public class JButton extends AbstractButton
public String getUIClassID()
{
// Returns a string that specifies the name of the L&F class that renders
- // this component.
+ // this component.
return "ButtonUI";
}
@@ -211,7 +211,7 @@ public class JButton extends AbstractButton
public boolean isDefaultCapable()
{
// Returns whether or not this button is capable of being the default
- // button on the RootPane.
+ // button on the RootPane.
return defaultCapable;
}
diff --git a/javax/swing/JCheckBox.java b/javax/swing/JCheckBox.java
index 26f9f6ca5..0bf871a50 100644
--- a/javax/swing/JCheckBox.java
+++ b/javax/swing/JCheckBox.java
@@ -1,4 +1,4 @@
-/* JCheckBox.java --
+/* JCheckBox.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,7 +74,7 @@ public class JCheckBox extends JToggleButton implements Accessible
/**
* Returns the accessble role of <code>JCheckBox</code>,
- * {@link AccessibleRole#CHECK_BOX}.
+ * {@link AccessibleRole#CHECK_BOX}.
*/
public AccessibleRole getAccessibleRole()
{
@@ -86,7 +86,7 @@ public class JCheckBox extends JToggleButton implements Accessible
public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY =
"borderPaintedFlat";
-
+
private boolean borderPaintedFlat;
private void init()
@@ -94,7 +94,7 @@ public class JCheckBox extends JToggleButton implements Accessible
borderPainted = false;
contentAreaFilled = false;
}
-
+
public JCheckBox()
{
this(null, null, false);
@@ -106,25 +106,25 @@ public class JCheckBox extends JToggleButton implements Accessible
}
public JCheckBox(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
public JCheckBox(Icon icon, boolean selected)
- {
+ {
this(null, icon, selected);
- }
-
+ }
+
public JCheckBox(String text)
{
this(text, null, false);
}
-
+
public JCheckBox(String text, boolean selected)
{
this(text, null, selected);
}
-
+
public JCheckBox(String text, Icon icon)
{
this(text, icon, false);
@@ -145,7 +145,7 @@ public class JCheckBox extends JToggleButton implements Accessible
{
return "CheckBoxUI";
}
-
+
protected String paramString()
{
return super.paramString() + ",borderPaintedFlat=" + borderPaintedFlat;
diff --git a/javax/swing/JCheckBoxMenuItem.java b/javax/swing/JCheckBoxMenuItem.java
index 51634c93f..b3045be27 100644
--- a/javax/swing/JCheckBoxMenuItem.java
+++ b/javax/swing/JCheckBoxMenuItem.java
@@ -49,7 +49,7 @@ import javax.accessibility.AccessibleRole;
* {@link AbstractButton#setSelected} and {@link #setState} can be use used for
* the same purpose. <code>JCheckBoxMenuItem</code> uses
* <code>ToggleButtonModel</code> to keep track of its selection.
- *
+ *
* @author original author unknown
*/
public class JCheckBoxMenuItem
@@ -80,7 +80,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem with given icon
- *
+ *
* @param icon Icon for this menu item
*/
public JCheckBoxMenuItem(Icon icon)
@@ -90,7 +90,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem with given label
- *
+ *
* @param text Label for this menu item
*/
public JCheckBoxMenuItem(String text)
@@ -100,7 +100,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem using given action
- *
+ *
* @param action Action for this menu item.
*/
public JCheckBoxMenuItem(Action action)
@@ -111,7 +111,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object with given label and icon
- *
+ *
* @param text Label for this menu item
* @param icon Icon for this menu item
*/
@@ -123,7 +123,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object using specified label and marked as
* checked if given 'state' is true.
- *
+ *
* @param text Label for this menu item
* @param state <code>true</code> if this item should be in checked state
* and <code>false</code> otherwise
@@ -136,7 +136,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object with given label, icon, and marked
* as checked if given 'state' is true.
- *
+ *
* @param text Label for this menu item
* @param icon icon for this menu item
* @param state <code>true</code> if this item should be in checked state
@@ -155,7 +155,7 @@ public class JCheckBoxMenuItem
/**
* This method returns a name to identify which look and feel class will be
* the UI delegate for the menuItem.
- *
+ *
* @return The Look and Feel classID. "JCheckBoxMenuItemUI"
*/
public String getUIClassID()
@@ -165,7 +165,7 @@ public class JCheckBoxMenuItem
/**
* Returns checked state for this check box menu item.
- *
+ *
* @return Returns true if this menu item is in checked state and false
* otherwise.
*/
@@ -177,7 +177,7 @@ public class JCheckBoxMenuItem
/**
* Sets state for this check box menu item. If given 'state' is true, then
* mark menu item as checked, and uncheck this menu item otherwise.
- *
+ *
* @param state new state for this menu item
*/
public synchronized void setState(boolean state)
@@ -188,7 +188,7 @@ public class JCheckBoxMenuItem
/**
* This method returns array containing label of this menu item if it is
* selected and null otherwise.
- *
+ *
* @return Array containing label of this menu item if this menu item is
* selected or null otherwise.
*/
@@ -216,7 +216,7 @@ public class JCheckBoxMenuItem
* <code>JCheckBoxMenuItem</code> component, for use in debugging. The
* return value is guaranteed to be non-<code>null</code>, but the format
* of the string may vary between implementations.
- *
+ *
* @return A string describing the attributes of the
* <code>JCheckBoxMenuItem</code>.
*/
@@ -230,7 +230,7 @@ public class JCheckBoxMenuItem
/**
* Returns the object that provides accessibility features for this
* <code>JCheckBoxMenuItem</code> component.
- *
+ *
* @return The accessible context (an instance of
* {@link AccessibleJCheckBoxMenuItem}).
*/
@@ -245,7 +245,7 @@ public class JCheckBoxMenuItem
/**
* Provides the accessibility features for the <code>JCheckBoxMenuItem</code>
* component.
- *
+ *
* @see JCheckBoxMenuItem#getAccessibleContext()
*/
protected class AccessibleJCheckBoxMenuItem
@@ -264,7 +264,7 @@ public class JCheckBoxMenuItem
/**
* Returns the accessible role for the <code>JCheckBoxMenuItem</code>
* component.
- *
+ *
* @return {@link AccessibleRole#CHECK_BOX}.
*/
public AccessibleRole getAccessibleRole()
diff --git a/javax/swing/JComboBox.java b/javax/swing/JComboBox.java
index 74ff315ea..0d2be0c17 100644
--- a/javax/swing/JComboBox.java
+++ b/javax/swing/JComboBox.java
@@ -188,8 +188,8 @@ public class JComboBox extends JComponent implements ItemSelectable,
public JComboBox(Object[] itemArray)
{
this(new DefaultComboBoxModel(itemArray));
-
- if (itemArray.length > 0)
+
+ if (itemArray.length > 0)
setSelectedIndex(0);
}
@@ -298,7 +298,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
// Removes itself (as DataListener) from the to-be-replaced model.
dataModel.removeListDataListener(this);
}
-
+
/* Adds itself as a DataListener to the new model.
* It is intentioned that this operation will fail with a NullPointerException if the
* caller delivered a null argument.
@@ -309,7 +309,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
ComboBoxModel oldDataModel = dataModel;
dataModel = newDataModel;
selectedItemReminder = newDataModel.getSelectedItem();
-
+
// Notifies the listeners of the model change.
firePropertyChange("model", oldDataModel, dataModel);
}
@@ -500,7 +500,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void setSelectedIndex(int index)
{
- if (index < -1 || index >= dataModel.getSize())
+ if (index < -1 || index >= dataModel.getSize())
// Fails because index is out of bounds.
throw new IllegalArgumentException("illegal index: " + index);
else
@@ -518,7 +518,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
* <code>DefaultComboBoxModel</code> the complexity is O(n) where n is the
* number of elements in the combo box.
* </p>
- *
+ *
* @return int Index specifying location of the currently selected item in the
* combo box or -1 if nothing is selected in the combo box.
*/
@@ -552,12 +552,12 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Returns an object that is used as the display value when calculating the
- * preferred size for the combo box. This value is, of course, never
+ * Returns an object that is used as the display value when calculating the
+ * preferred size for the combo box. This value is, of course, never
* displayed anywhere.
- *
+ *
* @return The prototype display value (possibly <code>null</code>).
- *
+ *
* @since 1.4
* @see #setPrototypeDisplayValue(Object)
*/
@@ -569,11 +569,11 @@ public class JComboBox extends JComponent implements ItemSelectable,
/**
* Sets the object that is assumed to be the displayed item when calculating
* the preferred size for the combo box. A {@link PropertyChangeEvent} (with
- * the name <code>prototypeDisplayValue</code>) is sent to all registered
- * listeners.
- *
+ * the name <code>prototypeDisplayValue</code>) is sent to all registered
+ * listeners.
+ *
* @param value the new value (<code>null</code> permitted).
- *
+ *
* @since 1.4
* @see #getPrototypeDisplayValue()
*/
@@ -593,7 +593,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void addItem(Object element)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).addElement(element);
else
throw new RuntimeException("Unable to add the item because the data "
@@ -611,7 +611,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void insertItemAt(Object element, int index)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).insertElementAt(element, index);
else
throw new RuntimeException("Unable to insert the item because the data "
@@ -628,7 +628,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void removeItem(Object element)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).removeElement(element);
else
throw new RuntimeException("Unable to remove the item because the data "
@@ -753,7 +753,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
action = a;
configurePropertiesFromAction(action);
if (action != null)
- // FIXME: remove from old action and add to new action
+ // FIXME: remove from old action and add to new action
// PropertyChangeListener to listen to changes in the action
addActionListener(action);
}
@@ -856,7 +856,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Fires a popupMenuWillBecomeInvisible() event to all
+ * Fires a popupMenuWillBecomeInvisible() event to all
* <code>PopupMenuListeners</code>.
*
* Note: This method is intended for use by plaf classes only.
@@ -870,7 +870,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Fires a popupMenuWillBecomeVisible() event to all
+ * Fires a popupMenuWillBecomeVisible() event to all
* <code>PopupMenuListeners</code>.
*
* Note: This method is intended for use by plaf classes only.
@@ -892,19 +892,19 @@ public class JComboBox extends JComponent implements ItemSelectable,
protected void selectedItemChanged()
{
// Fire ItemEvent to indicated that previously selected item is now
- // deselected
+ // deselected
if (selectedItemReminder != null)
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
selectedItemReminder,
ItemEvent.DESELECTED));
- // Fire ItemEvent to indicate that new item is selected
+ // Fire ItemEvent to indicate that new item is selected
Object newSelection = getSelectedItem();
if (newSelection != null)
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
newSelection, ItemEvent.SELECTED));
- // Fire Action Event to JComboBox's registered listeners
+ // Fire Action Event to JComboBox's registered listeners
fireActionEvent();
selectedItemReminder = newSelection;
@@ -997,7 +997,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
// if first and last index of the given ListDataEvent are both -1,
// then it indicates that selected item in the combo box data model
- // have changed.
+ // have changed.
if (event.getIndex0() == -1 && event.getIndex1() == -1)
selectedItemChanged();
}
@@ -1110,7 +1110,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
sb.append(",isEditable=").append(isEditable());
sb.append(",lightWeightPopupEnabled=").append(isLightWeightPopupEnabled());
sb.append(",maximumRowCount=").append(getMaximumRowCount());
-
+
sb.append(",selectedItemReminder=");
if (selectedItemReminder != null)
sb.append(selectedItemReminder);
@@ -1121,7 +1121,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
* Returns the object that provides accessibility features for this
* <code>JComboBox</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJComboBox}).
*/
public AccessibleContext getAccessibleContext()
@@ -1466,7 +1466,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
// Nothing to do here.
}
}
-
+
private class DefaultKeySelectionManager
implements KeySelectionManager
{
diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java
index f71217867..365f62aa9 100644
--- a/javax/swing/JComponent.java
+++ b/javax/swing/JComponent.java
@@ -105,7 +105,7 @@ public abstract class JComponent extends Container implements Serializable
{
private static final long serialVersionUID = -7908749299918704233L;
- /**
+ /**
* The accessible context of this <code>JComponent</code>.
*/
protected AccessibleContext accessibleContext;
@@ -114,7 +114,7 @@ public abstract class JComponent extends Container implements Serializable
* Basic accessibility support for <code>JComponent</code> derived
* widgets.
*/
- public abstract class AccessibleJComponent
+ public abstract class AccessibleJComponent
extends AccessibleAWTContainer
implements AccessibleExtendedComponent
{
@@ -123,7 +123,7 @@ public abstract class JComponent extends Container implements Serializable
* fires appropriate PropertyChangeEvents to listeners registered with
* the AccessibleJComponent.
*/
- protected class AccessibleFocusHandler
+ protected class AccessibleFocusHandler
implements FocusListener
{
/**
@@ -168,7 +168,7 @@ public abstract class JComponent extends Container implements Serializable
* from the JComponent and fires appropriate PropertyChangeEvents to
* interested listeners on the AccessibleJComponent.
*/
- protected class AccessibleContainerHandler
+ protected class AccessibleContainerHandler
implements ContainerListener
{
/**
@@ -464,7 +464,7 @@ public abstract class JComponent extends Container implements Serializable
else if (border instanceof TitledBorder)
{
TitledBorder titled = (TitledBorder) border;
- title = titled.getTitle();
+ title = titled.getTitle();
}
return title;
}
@@ -489,7 +489,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public String getTitledBorderText()
{
- return getBorderTitle(getBorder());
+ return getBorderTitle(getBorder());
}
/**
@@ -536,29 +536,29 @@ public abstract class JComponent extends Container implements Serializable
*/
float alignmentY = -1.0F;
- /**
+ /**
* The border painted around this component.
- *
+ *
* @see #paintBorder
*/
Border border;
/**
* The popup menu for the component.
- *
+ *
* @see #getComponentPopupMenu()
* @see #setComponentPopupMenu(JPopupMenu)
*/
JPopupMenu componentPopupMenu;
-
+
/**
* A flag that controls whether the {@link #getComponentPopupMenu()} method
* looks to the component's parent when the <code>componentPopupMenu</code>
* field is <code>null</code>.
*/
boolean inheritsPopupMenu;
-
- /**
+
+ /**
* <p>Whether to double buffer this component when painting. This flag
* should generally be <code>true</code>, to ensure good painting
* performance.</p>
@@ -587,7 +587,7 @@ public abstract class JComponent extends Container implements Serializable
*/
int debugGraphicsOptions;
- /**
+ /**
* <p>This property controls two independent behaviors simultaneously.</p>
*
* <p>First, it controls whether to fill the background of this widget
@@ -616,9 +616,9 @@ public abstract class JComponent extends Container implements Serializable
*/
boolean opaque = false;
- /**
+ /**
* The user interface delegate for this component. Event delivery and
- * repainting of the component are usually delegated to this object.
+ * repainting of the component are usually delegated to this object.
*
* @see #setUI
* @see #getUIClassID
@@ -630,7 +630,7 @@ public abstract class JComponent extends Container implements Serializable
* A hint to the focus system that this component should or should not
* get focus. If this is <code>false</code>, swing will not try to
* request focus on this component; if <code>true</code>, swing might
- * try to request focus, but the request might fail. Thus it is only
+ * try to request focus, but the request might fail. Thus it is only
* a hint guiding swing's behavior.
*
* @see #requestFocus()
@@ -653,7 +653,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Indicates whether the current paint call is already double buffered or
- * not.
+ * not.
*/
static boolean paintingDoubleBuffered = false;
@@ -675,14 +675,14 @@ public abstract class JComponent extends Container implements Serializable
*/
private VetoableChangeSupport vetoableChangeSupport;
- /**
+ /**
* Storage for "client properties", which are key/value pairs associated
* with this component by a "client", such as a user application or a
* layout manager. This is lazily constructed when the component gets its
* first client property.
*/
private Hashtable clientProperties;
-
+
private InputMap inputMap_whenFocused;
private InputMap inputMap_whenAncestorOfFocused;
private ComponentInputMap inputMap_whenInFocusedWindow;
@@ -717,12 +717,12 @@ public abstract class JComponent extends Container implements Serializable
/**
* The default locale of the component.
- *
+ *
* @see #getDefaultLocale
* @see #setDefaultLocale
*/
private static Locale defaultLocale;
-
+
public static final String TOOL_TIP_TEXT_KEY = "ToolTipText";
/**
@@ -734,7 +734,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int UNDEFINED_CONDITION = -1;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -742,7 +742,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int WHEN_FOCUSED = 0;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component is an ancestor of the component which has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -750,7 +750,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT = 1;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component is in the window which has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -796,7 +796,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Helper to lazily construct and return the client properties table.
- *
+ *
* @return The current client properties table
*
* @see #clientProperties
@@ -861,7 +861,7 @@ public abstract class JComponent extends Container implements Serializable
* Unregister an <code>AncestorListener</code>.
*
* @param listener The listener to unregister
- *
+ *
* @see #addAncestorListener
*/
public void removeAncestorListener(AncestorListener listener)
@@ -911,22 +911,22 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Returns all registered {@link EventListener}s of the given
+ * Returns all registered {@link EventListener}s of the given
* <code>listenerType</code>.
*
- * @param listenerType the class of listeners to filter (<code>null</code>
+ * @param listenerType the class of listeners to filter (<code>null</code>
* not permitted).
- *
+ *
* @return An array of registered listeners.
- *
+ *
* @throws ClassCastException if <code>listenerType</code> does not implement
* the {@link EventListener} interface.
- * @throws NullPointerException if <code>listenerType</code> is
+ * @throws NullPointerException if <code>listenerType</code> is
* <code>null</code>.
- *
+ *
* @see #getAncestorListeners()
* @see #listenerList
- *
+ *
* @since 1.3
*/
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
@@ -953,14 +953,14 @@ public abstract class JComponent extends Container implements Serializable
/**
* Return all registered <code>VetoableChangeListener</code> objects.
*
- * @return An array of the <code>VetoableChangeListener</code> objects
- * registered with this component (possibly empty but never
+ * @return An array of the <code>VetoableChangeListener</code> objects
+ * registered with this component (possibly empty but never
* <code>null</code>).
- *
+ *
* @since 1.4
*/
public VetoableChangeListener[] getVetoableChangeListeners()
- {
+ {
return vetoableChangeSupport == null ? new VetoableChangeListener[0]
: vetoableChangeSupport.getVetoableChangeListeners();
}
@@ -1004,7 +1004,7 @@ public abstract class JComponent extends Container implements Serializable
{
super.firePropertyChange(property, oldValue, newValue);
}
-
+
/**
* Fires a property change for a primitive boolean property.
*
@@ -1081,7 +1081,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Set the value of the {@link #border} property.
- *
+ *
* @param newBorder The new value of the property
*
* @see #getBorder
@@ -1257,7 +1257,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getMaximumSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isMaximumSizeSet())
size = super.getMaximumSize();
else
@@ -1287,7 +1287,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getMinimumSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isMinimumSizeSet())
size = super.getMinimumSize();
else
@@ -1317,7 +1317,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getPreferredSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isPreferredSizeSet())
size = super.getPreferredSize();
else
@@ -1335,7 +1335,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @return The current value of the property, or <code>null</code>
* if none has been set.
- *
+ *
* @deprecated See {@link java.awt.FocusTraversalPolicy}
*/
public Component getNextFocusableComponent()
@@ -1362,11 +1362,11 @@ public abstract class JComponent extends Container implements Serializable
KeyStroke[] ks2;
if (inputMap_whenFocused != null)
ks0 = inputMap_whenFocused.keys();
- else
+ else
ks0 = new KeyStroke[0];
if (inputMap_whenAncestorOfFocused != null)
ks1 = inputMap_whenAncestorOfFocused.keys();
- else
+ else
ks1 = new KeyStroke[0];
if (inputMap_whenInFocusedWindow != null)
ks2 = inputMap_whenInFocusedWindow.keys();
@@ -1428,7 +1428,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Return the location at which the <code>toolTipText</code> property should
- * be displayed, when triggered by a particular mouse event.
+ * be displayed, when triggered by a particular mouse event.
*
* @param event The event the tooltip is being presented in response to
*
@@ -1496,31 +1496,31 @@ public abstract class JComponent extends Container implements Serializable
{
return getToolTipText();
}
-
+
/**
* Returns the flag that controls whether or not the component inherits its
* parent's popup menu when no popup menu is specified for this component.
- *
+ *
* @return A boolean.
- *
+ *
* @since 1.5
- *
+ *
* @see #setInheritsPopupMenu(boolean)
*/
public boolean getInheritsPopupMenu()
{
- return inheritsPopupMenu;
+ return inheritsPopupMenu;
}
-
+
/**
* Sets the flag that controls whether or not the component inherits its
* parent's popup menu when no popup menu is specified for this component.
* This is a bound property with the property name 'inheritsPopupMenu'.
- *
+ *
* @param inherit the new flag value.
- *
+ *
* @since 1.5
- *
+ *
* @see #getInheritsPopupMenu()
*/
public void setInheritsPopupMenu(boolean inherit)
@@ -1531,17 +1531,17 @@ public abstract class JComponent extends Container implements Serializable
this.firePropertyChange("inheritsPopupMenu", ! inherit, inherit);
}
}
-
+
/**
- * Returns the popup menu for this component. If the popup menu is
+ * Returns the popup menu for this component. If the popup menu is
* <code>null</code> AND the {@link #getInheritsPopupMenu()} method returns
* <code>true</code>, this method will return the parent's popup menu (if it
* has one).
- *
+ *
* @return The popup menu (possibly <code>null</code>.
- *
+ *
* @since 1.5
- *
+ *
* @see #setComponentPopupMenu(JPopupMenu)
* @see #getInheritsPopupMenu()
*/
@@ -1549,7 +1549,7 @@ public abstract class JComponent extends Container implements Serializable
{
if (componentPopupMenu == null && getInheritsPopupMenu())
{
- Container parent = getParent();
+ Container parent = getParent();
if (parent instanceof JComponent)
return ((JComponent) parent).getComponentPopupMenu();
else
@@ -1560,13 +1560,13 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Sets the popup menu for this component (this is a bound property with
+ * Sets the popup menu for this component (this is a bound property with
* the property name 'componentPopupMenu').
- *
+ *
* @param popup the popup menu (<code>null</code> permitted).
*
* @since 1.5
- *
+ *
* @see #getComponentPopupMenu()
*/
public void setComponentPopupMenu(JPopupMenu popup)
@@ -1578,7 +1578,7 @@ public abstract class JComponent extends Container implements Serializable
firePropertyChange("componentPopupMenu", old, popup);
}
}
-
+
/**
* Return the top level ancestral container (usually a {@link
* java.awt.Window} or {@link java.applet.Applet}) which this component is
@@ -1689,7 +1689,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Return the current value of the {@link #opaque} property.
+ * Return the current value of the {@link #opaque} property.
*
* @return The current property value
*/
@@ -2149,7 +2149,7 @@ public abstract class JComponent extends Container implements Serializable
// The component that is finally triggered for painting.
JComponent paintRoot = this;
-
+
// Stores the component and all its parents. This will be used to limit
// the actually painted components in paintChildren by setting
// the field paintChild.
@@ -2200,7 +2200,7 @@ public abstract class JComponent extends Container implements Serializable
else if (jc.isPartiallyObscured(i, paintX, paintY, paintW,
paintH))
updatePaintRoot = true;
-
+
}
}
if (updatePaintRoot)
@@ -2430,27 +2430,27 @@ public abstract class JComponent extends Container implements Serializable
* A variant of {@link
* #registerKeyboardAction(ActionListener,String,KeyStroke,int)} which
* provides <code>null</code> for the command name.
- *
+ *
* @param act the action listener to notify when the keystroke occurs.
* @param stroke the key stroke.
- * @param cond the condition (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_IN_FOCUSED_WINDOW} and
+ * @param cond the condition (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_IN_FOCUSED_WINDOW} and
* {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}).
*/
public void registerKeyboardAction(ActionListener act,
- KeyStroke stroke,
+ KeyStroke stroke,
int cond)
{
registerKeyboardAction(act, null, stroke, cond);
}
- /*
+ /*
* There is some charmingly undocumented behavior sun seems to be using
* to simulate the old register/unregister keyboard binding API. It's not
* clear to me why this matters, but we shall endeavour to follow suit.
*
* Two main thing seem to be happening when you do registerKeyboardAction():
- *
+ *
* - no actionMap() entry gets created, just an entry in inputMap()
*
* - the inputMap() entry is a proxy class which invokes the the
@@ -2470,7 +2470,7 @@ public abstract class JComponent extends Container implements Serializable
ActionListener target;
String bindingCommandName;
- public ActionListenerProxy(ActionListener li,
+ public ActionListenerProxy(ActionListener li,
String cmd)
{
target = li;
@@ -2487,7 +2487,7 @@ public abstract class JComponent extends Container implements Serializable
}
}
-
+
/**
* An obsolete method to register a keyboard action on this component.
* You should use <code>getInputMap</code> and <code>getActionMap</code>
@@ -2507,9 +2507,9 @@ public abstract class JComponent extends Container implements Serializable
* @see #getConditionForKeyStroke
* @see #resetKeyboardActions
*/
- public void registerKeyboardAction(ActionListener act,
+ public void registerKeyboardAction(ActionListener act,
String cmd,
- KeyStroke stroke,
+ KeyStroke stroke,
int cond)
{
ActionListenerProxy proxy = new ActionListenerProxy(act, cmd);
@@ -2519,12 +2519,12 @@ public abstract class JComponent extends Container implements Serializable
/**
* Sets the input map for the given condition.
- *
- * @param condition the condition (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_IN_FOCUSED_WINDOW} and
+ *
+ * @param condition the condition (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_IN_FOCUSED_WINDOW} and
* {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}).
* @param map the map.
- *
+ *
* @throws IllegalArgumentException if <code>condition</code> is not one of
* the specified values.
*/
@@ -2543,12 +2543,12 @@ public abstract class JComponent extends Container implements Serializable
case WHEN_IN_FOCUSED_WINDOW:
if (map != null && !(map instanceof ComponentInputMap))
- throw new
- IllegalArgumentException("WHEN_IN_FOCUSED_WINDOW " +
+ throw new
+ IllegalArgumentException("WHEN_IN_FOCUSED_WINDOW " +
"InputMap must be a ComponentInputMap");
inputMap_whenInFocusedWindow = (ComponentInputMap)map;
break;
-
+
case UNDEFINED_CONDITION:
default:
throw new IllegalArgumentException();
@@ -2558,13 +2558,13 @@ public abstract class JComponent extends Container implements Serializable
/**
* Returns the input map associated with this component for the given
* state/condition.
- *
- * @param condition the state (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} and
+ *
+ * @param condition the state (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} and
* {@link #WHEN_IN_FOCUSED_WINDOW}).
- *
+ *
* @return The input map.
- * @throws IllegalArgumentException if <code>condition</code> is not one of
+ * @throws IllegalArgumentException if <code>condition</code> is not one of
* the specified values.
* @since 1.3
*/
@@ -2590,17 +2590,17 @@ public abstract class JComponent extends Container implements Serializable
case UNDEFINED_CONDITION:
default:
- throw new IllegalArgumentException("Invalid 'condition' argument: "
+ throw new IllegalArgumentException("Invalid 'condition' argument: "
+ condition);
}
}
/**
- * Returns the input map associated with this component for the
+ * Returns the input map associated with this component for the
* {@link #WHEN_FOCUSED} state.
- *
+ *
* @return The input map.
- *
+ *
* @since 1.3
* @see #getInputMap(int)
*/
@@ -2634,19 +2634,19 @@ public abstract class JComponent extends Container implements Serializable
* #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or {@link
* #WHEN_IN_FOCUSED_WINDOW}
*
- * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
- * @see #unregisterKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
+ * @see #unregisterKeyboardAction
* @see #resetKeyboardActions
*/
public int getConditionForKeyStroke(KeyStroke ks)
{
- if (inputMap_whenFocused != null
+ if (inputMap_whenFocused != null
&& inputMap_whenFocused.get(ks) != null)
return WHEN_FOCUSED;
- else if (inputMap_whenAncestorOfFocused != null
+ else if (inputMap_whenAncestorOfFocused != null
&& inputMap_whenAncestorOfFocused.get(ks) != null)
return WHEN_ANCESTOR_OF_FOCUSED_COMPONENT;
- else if (inputMap_whenInFocusedWindow != null
+ else if (inputMap_whenInFocusedWindow != null
&& inputMap_whenInFocusedWindow.get(ks) != null)
return WHEN_IN_FOCUSED_WINDOW;
else
@@ -2655,7 +2655,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Get the ActionListener (typically an {@link Action} object) which is
- * associated with a particular keystroke.
+ * associated with a particular keystroke.
*
* @param ks The keystroke to retrieve the action of
*
@@ -2711,10 +2711,10 @@ public abstract class JComponent extends Container implements Serializable
// Note: Input maps for disabled components are skipped.
// 4. The WHEN_IN_FOCUSED_WINDOW maps of all the enabled components in
// the focused window are searched.
-
+
KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(e);
boolean pressed = e.getID() == KeyEvent.KEY_PRESSED;
-
+
if (processKeyBinding(keyStroke, e, WHEN_FOCUSED, pressed))
{
// This is step 1 from above comment.
@@ -2728,37 +2728,37 @@ public abstract class JComponent extends Container implements Serializable
e.consume();
return;
}
-
+
// This is step 3 from above comment.
- Container current = getParent();
+ Container current = getParent();
while (current != null)
- {
+ {
// If current is a JComponent, see if it handles the event in its
// WHEN_ANCESTOR_OF_FOCUSED_COMPONENT maps.
- if ((current instanceof JComponent) &&
- ((JComponent)current).processKeyBinding
+ if ((current instanceof JComponent) &&
+ ((JComponent)current).processKeyBinding
(keyStroke, e,WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, pressed))
{
e.consume();
return;
- }
-
+ }
+
// Stop when we've tried a top-level container and it didn't handle it
if (current instanceof Window || current instanceof Applet)
- break;
-
+ break;
+
// Move up the hierarchy
current = current.getParent();
}
-
+
// Current being null means the JComponent does not currently have a
- // top-level ancestor, in which case we don't need to check
+ // top-level ancestor, in which case we don't need to check
// WHEN_IN_FOCUSED_WINDOW bindings.
if (current == null || e.isConsumed())
return;
-
+
// This is step 4 from above comment. KeyboardManager maintains mappings
- // related to WHEN_IN_FOCUSED_WINDOW bindings so that we don't have to
+ // related to WHEN_IN_FOCUSED_WINDOW bindings so that we don't have to
// traverse the containment hierarchy each time.
if (KeyboardManager.getManager().processKeyStroke(current, keyStroke, e))
e.consume();
@@ -2781,7 +2781,7 @@ public abstract class JComponent extends Container implements Serializable
{
if (cmd instanceof ActionListenerProxy)
act = (Action) cmd;
- else
+ else
act = getActionMap().get(cmd);
}
}
@@ -2806,7 +2806,7 @@ public abstract class JComponent extends Container implements Serializable
}
return false;
}
-
+
/**
* Remove a keyboard action registry.
*
@@ -2899,7 +2899,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Queue a an invalidation and revalidation of this component, using
+ * Queue a an invalidation and revalidation of this component, using
* {@link RepaintManager#addInvalidComponent}.
*/
public void revalidate()
@@ -2925,7 +2925,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Calls <code>scrollRectToVisible</code> on the component's parent.
+ * Calls <code>scrollRectToVisible</code> on the component's parent.
* Components which can service this call should override.
*
* @param r The rectangle to make visible
@@ -3069,7 +3069,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Set the specified component to be the next component in the
+ * Set the specified component to be the next component in the
* focus cycle, overriding the {@link FocusTraversalPolicy} for
* this component.
*
@@ -3151,7 +3151,7 @@ public abstract class JComponent extends Container implements Serializable
* background.
*
* @param isOpaque if true, paint all pixels. If false, expect the clean
- * background.
+ * background.
*
* @see ComponentUI#update
*/
@@ -3192,8 +3192,8 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Call {@link #paint}.
- *
+ * Call {@link #paint}.
+ *
* @param g The graphics context to paint into
*/
public void update(Graphics g)
@@ -3258,12 +3258,12 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Returns the locale used as the default for all new components. The
+ * Returns the locale used as the default for all new components. The
* default value is {@link Locale#getDefault()} (that is, the platform
* default locale).
- *
+ *
* @return The locale (never <code>null</code>).
- *
+ *
* @see #setDefaultLocale(Locale)
*/
public static Locale getDefaultLocale()
@@ -3272,19 +3272,19 @@ public abstract class JComponent extends Container implements Serializable
defaultLocale = Locale.getDefault();
return defaultLocale;
}
-
+
/**
* Sets the locale to be used as the default for all new components. If this
* is set to <code>null</code>, the {@link #getDefaultLocale()} method will
* return the platform default locale.
- *
+ *
* @param l the locale (<code>null</code> permitted).
*/
public static void setDefaultLocale(Locale l)
{
defaultLocale = l;
}
-
+
/**
* Returns the currently set input verifier for this component.
*
@@ -3357,7 +3357,7 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus()} or
+ * encouraged to call {@link #requestFocus()} or
* {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
@@ -3406,7 +3406,7 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus()} or
+ * encouraged to call {@link #requestFocus()} or
* {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
@@ -3470,7 +3470,7 @@ public abstract class JComponent extends Container implements Serializable
* has changed.
*
* This method is called before the component is actually removed from
- * its parent, so the parent is still visible through
+ * its parent, so the parent is still visible through
* {@link Component#getParent}.
*/
public void removeNotify()
@@ -3478,7 +3478,7 @@ public abstract class JComponent extends Container implements Serializable
super.removeNotify();
KeyboardManager.getManager().clearBindingsForComp(this);
-
+
// Notify ancestor listeners.
fireAncestorEvent(this, AncestorEvent.ANCESTOR_REMOVED);
@@ -3727,7 +3727,7 @@ public abstract class JComponent extends Container implements Serializable
jc.fireAncestorEvent(ancestor, id);
}
}
-
+
/**
* This is the method that gets called when the WHEN_IN_FOCUSED_WINDOW map
* is changed.
@@ -3743,26 +3743,26 @@ public abstract class JComponent extends Container implements Serializable
InputMap curr = getInputMap(WHEN_IN_FOCUSED_WINDOW);
while (curr != null && curr != changed)
curr = curr.getParent();
-
+
// If curr is null then changed is not in the hierarchy
if (curr == null)
return;
-
+
// Now we have to update the keyboard manager's hashtable
KeyboardManager km = KeyboardManager.getManager();
-
- // This is a poor strategy, should be improved. We currently
+
+ // This is a poor strategy, should be improved. We currently
// delete all the old bindings for the component and then register
// the current bindings.
km.clearBindingsForComp(changed.getComponent());
- km.registerEntireMap((ComponentInputMap)
+ km.registerEntireMap((ComponentInputMap)
getInputMap(WHEN_IN_FOCUSED_WINDOW));
}
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/JDesktopPane.java b/javax/swing/JDesktopPane.java
index b068a2998..6d8b21276 100644
--- a/javax/swing/JDesktopPane.java
+++ b/javax/swing/JDesktopPane.java
@@ -329,13 +329,13 @@ public class JDesktopPane extends JLayeredPane implements Accessible
int count = 0;
for (int i = 0; i < components.length; i++)
- if (components[i] instanceof JInternalFrame)
- count++;
-
+ if (components[i] instanceof JInternalFrame)
+ count++;
+
JInternalFrame[] value = new JInternalFrame[count];
for (int i = 0, j = 0; i < components.length && j != count; i++)
if (components[i] instanceof JInternalFrame)
- value[j++] = (JInternalFrame) components[i];
+ value[j++] = (JInternalFrame) components[i];
return value;
}
@@ -343,7 +343,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
* Returns the object that provides accessibility features for this
* <code>JDesktopPane</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJDesktopPane}).
*/
public AccessibleContext getAccessibleContext()
@@ -357,7 +357,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/JDialog.java b/javax/swing/JDialog.java
index 495c9c791..04ec825bc 100644
--- a/javax/swing/JDialog.java
+++ b/javax/swing/JDialog.java
@@ -61,7 +61,7 @@ import javax.accessibility.AccessibleContext;
*
* Also, unlike <code>java.awt.Dialog</code>s, JDialogs support the
* Swing Pluggable Look &amp; Feel architecture.
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
public class JDialog extends Dialog implements Accessible, WindowConstants,
@@ -94,16 +94,16 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
* Whether checking is enabled on the RootPane.
*
* @specnote Should be false to comply with J2SE 5.0
- */
+ */
protected boolean rootPaneCheckingEnabled = false;
/** The default action taken when closed. */
private int closeAction = HIDE_ON_CLOSE;
-
+
/** Whether JDialogs are decorated by the Look and Feel. */
private static boolean decorated;
- /* Creates a new non-modal JDialog with no title
+ /* Creates a new non-modal JDialog with no title
* using a shared Frame as the owner.
*/
public JDialog()
@@ -135,7 +135,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new non-modal JDialog using the
+ * Creates a new non-modal JDialog using the
* given title and owner.
*
* @param owner The owner of the JDialog.
@@ -147,7 +147,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, and owner.
*
* @param owner The owner of the JDialog.
@@ -160,7 +160,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, owner and graphics configuration.
*
* @param owner The owner of the JDialog.
@@ -199,7 +199,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new non-modal JDialog using the
+ * Creates a new non-modal JDialog using the
* given title and owner.
*
* @param owner The owner of the JDialog.
@@ -211,7 +211,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, and owner.
*
* @param owner The owner of the JDialog.
@@ -224,7 +224,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, owner and graphics configuration.
*
* @param owner The owner of the JDialog.
@@ -240,8 +240,8 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method is called to initialize the
- * JDialog. It sets the layout used, the locale,
+ * This method is called to initialize the
+ * JDialog. It sets the layout used, the locale,
* and creates the RootPane.
*/
protected void dialogInit()
@@ -283,7 +283,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method returns the preferred size of
+ * This method returns the preferred size of
* the JDialog.
*
* @return The preferred size.
@@ -306,7 +306,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method sets the JMenuBar used
+ * This method sets the JMenuBar used
* in this JDialog.
*
* @param menubar The JMenuBar to use.
@@ -318,7 +318,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
/**
* This method sets the LayoutManager used in the JDialog.
- * This method will throw an Error if rootPaneChecking is
+ * This method will throw an Error if rootPaneChecking is
* enabled.
*
* @param manager The LayoutManager to use.
@@ -440,7 +440,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method is called when a component is added to the
+ * This method is called when a component is added to the
* the JDialog. Calling this method with rootPaneCheckingEnabled
* will cause an Error to be thrown.
*
@@ -469,7 +469,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
// pass it on to the content pane instead.
if (comp == rootPane)
super.remove(rootPane);
- else
+ else
getContentPane().remove(comp);
}
@@ -502,8 +502,8 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
{
paint(g);
}
-
-
+
+
/**
* This method handles window events. This allows the JDialog
* to honour its default close operation.
diff --git a/javax/swing/JEditorPane.java b/javax/swing/JEditorPane.java
index d6b87764f..8ad1095ee 100644
--- a/javax/swing/JEditorPane.java
+++ b/javax/swing/JEditorPane.java
@@ -125,7 +125,7 @@ public class JEditorPane extends JTextComponent
*/
public String getAccessibleDescription()
{
- String descr = super.getAccessibleDescription();
+ String descr = super.getAccessibleDescription();
if (descr == null)
return getContentType();
else
@@ -183,9 +183,9 @@ public class JEditorPane extends JTextComponent
{
super();
}
-
+
/**
- * The accessible representation of a HTML link.
+ * The accessible representation of a HTML link.
*
* @author Roman Kennke (kennke@aicas.com)
*/
@@ -230,7 +230,7 @@ public class JEditorPane extends JTextComponent
* general, link have 1 AccessibleAction associated with them. There are
* special cases where links can have multiple actions associated, like
* in image maps.
- *
+ *
* @return the number of AccessibleActions in this link object
*/
public int getAccessibleActionCount()
@@ -352,7 +352,7 @@ public class JEditorPane extends JTextComponent
{
return element.getEndOffset();
}
-
+
}
/**
@@ -503,7 +503,7 @@ public class JEditorPane extends JTextComponent
/**
* Creates a new EditorKitMapping object.
- *
+ *
* @param cn the classname
* @param cl the classloader
*/
@@ -655,11 +655,11 @@ public class JEditorPane extends JTextComponent
}
private static final long serialVersionUID = 3140472492599046285L;
-
+
private EditorKit editorKit;
-
+
boolean focus_root;
-
+
/**
* Maps content-types to editor kit instances.
*/
@@ -684,7 +684,7 @@ public class JEditorPane extends JTextComponent
}
// A mapping between content types and used EditorKits
- HashMap editorMap;
+ HashMap editorMap;
/**
* The currently loading stream, if any.
@@ -715,9 +715,9 @@ public class JEditorPane extends JTextComponent
setEditorKit(createEditorKitForContentType("text/html"));
setPage(url);
}
-
+
/**
- * Called by the constructors to set up the default bindings for content
+ * Called by the constructors to set up the default bindings for content
* types and EditorKits.
*/
void init()
@@ -731,10 +731,10 @@ public class JEditorPane extends JTextComponent
}
/**
- * Creates and returns an EditorKit that is appropriate for the given
+ * Creates and returns an EditorKit that is appropriate for the given
* content type. This is created using the default recognized types
* plus any EditorKit types that have been registered.
- *
+ *
* @see #registerEditorKitForContentType(String, String)
* @see #registerEditorKitForContentType(String, String, ClassLoader)
* @param type the content type
@@ -756,7 +756,7 @@ public class JEditorPane extends JTextComponent
e = (EditorKit) loader.loadClass(className).newInstance();
}
catch (Exception e2)
- {
+ {
// The reference implementation returns null when class is not
// loadable or instantiatable.
}
@@ -817,7 +817,7 @@ public class JEditorPane extends JTextComponent
/**
* Returns the class name of the EditorKit associated with the given
* content type.
- *
+ *
* @since 1.3
* @param type the content type
* @return the class name of the EditorKit associated with this content type
@@ -831,13 +831,13 @@ public class JEditorPane extends JTextComponent
/**
* Returns the EditorKit to use for the given content type. If an
- * EditorKit has been explicitly set via
+ * EditorKit has been explicitly set via
* <code>setEditorKitForContentType</code>
* then it will be returned. Otherwise an attempt will be made to create
* an EditorKit from the default recognzied content types or any
* EditorKits that have been registered. If none can be created, a
* PlainEditorKit is created.
- *
+ *
* @see #registerEditorKitForContentType(String, String)
* @see #registerEditorKitForContentType(String, String, ClassLoader)
* @param type the content type
@@ -975,7 +975,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * This method initializes from a stream.
+ * This method initializes from a stream.
*/
public void read(InputStream in, Object desc) throws IOException
{
@@ -1004,9 +1004,9 @@ public class JEditorPane extends JTextComponent
/**
* Establishes a binding between type and classname. This enables
* us to create an EditorKit later for the given content type.
- *
+ *
* @param type the content type
- * @param classname the name of the class that is associated with this
+ * @param classname the name of the class that is associated with this
* content type
*/
public static void registerEditorKitForContentType(String type,
@@ -1055,11 +1055,11 @@ public class JEditorPane extends JTextComponent
type = type.substring(0, paramIndex).trim();
}
if (editorKit != null
- && editorKit.getContentType().equals(type))
+ && editorKit.getContentType().equals(type))
return;
-
+
EditorKit kit = getEditorKitForContentType(type);
-
+
if (kit != null)
setEditorKit(kit);
}
@@ -1068,19 +1068,19 @@ public class JEditorPane extends JTextComponent
{
if (editorKit == newValue)
return;
-
+
if (editorKit != null)
editorKit.deinstall(this);
-
+
EditorKit oldValue = editorKit;
editorKit = newValue;
-
+
if (editorKit != null)
{
- editorKit.install(this);
- setDocument(editorKit.createDefaultDocument());
+ editorKit.install(this);
+ setDocument(editorKit.createDefaultDocument());
}
-
+
firePropertyChange("editorKit", oldValue, newValue);
invalidate();
repaint();
@@ -1099,7 +1099,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * Sets the current URL being displayed.
+ * Sets the current URL being displayed.
*/
public void setPage(String url) throws IOException
{
@@ -1107,7 +1107,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * Sets the current URL being displayed.
+ * Sets the current URL being displayed.
*/
public void setPage(URL page) throws IOException
{
@@ -1162,7 +1162,7 @@ public class JEditorPane extends JTextComponent
* the content of the current document and uses the EditorKit to read in the
* new text. This allows the EditorKit to handle the String rather than just
* inserting in plain text.
- *
+ *
* @param t the text to display in this JEditorPane
*/
public void setText(String t)
@@ -1174,7 +1174,7 @@ public class JEditorPane extends JTextComponent
doc.remove(0, doc.getLength());
if (t == null || t.equals(""))
return;
-
+
// Let the EditorKit read the text into the Document.
getEditorKit().read(new StringReader(t), doc, 0);
}
diff --git a/javax/swing/JFileChooser.java b/javax/swing/JFileChooser.java
index b7615a58d..61b2fde73 100644
--- a/javax/swing/JFileChooser.java
+++ b/javax/swing/JFileChooser.java
@@ -77,72 +77,72 @@ public class JFileChooser extends JComponent implements Accessible
{
private static final long serialVersionUID = 3162921138695327837L;
- /**
- * A dialog type for selecting a file to open.
+ /**
+ * A dialog type for selecting a file to open.
* @see #setDialogType(int)
*/
public static final int OPEN_DIALOG = 0;
- /**
- * A dialog type for selecting a file to save.
+ /**
+ * A dialog type for selecting a file to save.
* @see #setDialogType(int)
*/
public static final int SAVE_DIALOG = 1;
- /**
+ /**
* A dialog type for some custom purpose.
* @see #setDialogType(int)
*/
public static final int CUSTOM_DIALOG = 2;
- /**
+ /**
* A return value indicating the file chooser has been closed by cancelling.
- *
+ *
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int CANCEL_OPTION = 1;
- /**
+ /**
* A return value indicating the file chooser has been closed by approving
* the selection.
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int APPROVE_OPTION = 0;
- /**
+ /**
* A return value indicating the file chooser has been closed by some error.
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int ERROR_OPTION = -1;
- /**
+ /**
* A selection mode constant indicating acceptance of files only.
* @see #setFileSelectionMode(int)
*/
public static final int FILES_ONLY = 0;
- /**
- * A selection mode constant indicating acceptance of directories only.
+ /**
+ * A selection mode constant indicating acceptance of directories only.
* @see #setFileSelectionMode(int)
*/
public static final int DIRECTORIES_ONLY = 1;
- /**
+ /**
* A selection mode constant indicating acceptance of files and directories.
* @see #setFileSelectionMode(int)
*/
public static final int FILES_AND_DIRECTORIES = 2;
- /**
+ /**
* Action command string for cancelling the current selection.
* @see #cancelSelection()
*/
public static final String CANCEL_SELECTION = "CancelSelection";
- /**
+ /**
* Action command string for approving the current selection.
* @see #cancelSelection()
*/
@@ -150,7 +150,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The name of the property for the approve button text.
- * @see #setApproveButtonText(String)
+ * @see #setApproveButtonText(String)
*/
public static final String APPROVE_BUTTON_TEXT_CHANGED_PROPERTY =
"ApproveButtonTextChangedProperty";
@@ -178,7 +178,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The name of the property for the current directory.
- * @see #setCurrentDirectory(File)
+ * @see #setCurrentDirectory(File)
*/
public static final String DIRECTORY_CHANGED_PROPERTY = "directoryChanged";
@@ -196,23 +196,23 @@ public class JFileChooser extends JComponent implements Accessible
public static final String SELECTED_FILES_CHANGED_PROPERTY =
"SelectedFilesChangedProperty";
- /**
+ /**
* The name of the property for multi-selection.
- * @see #setMultiSelectionEnabled(boolean)
+ * @see #setMultiSelectionEnabled(boolean)
*/
public static final String MULTI_SELECTION_ENABLED_CHANGED_PROPERTY =
"MultiSelectionEnabledChangedProperty";
/**
* The name of the 'file system view' property.
- * @see #setFileSystemView(FileSystemView)
+ * @see #setFileSystemView(FileSystemView)
*/
public static final String FILE_SYSTEM_VIEW_CHANGED_PROPERTY =
"FileSystemViewChanged";
/**
* The name of the 'file view' property.
- * @see #setFileView(FileView)
+ * @see #setFileView(FileView)
*/
public static final String FILE_VIEW_CHANGED_PROPERTY = "fileViewChanged";
@@ -272,13 +272,13 @@ public class JFileChooser extends JComponent implements Accessible
public static final String CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY =
"ChoosableFileFilterChangedProperty";
- /**
- * The accessible context.
+ /**
+ * The accessible context.
* @see #getAccessibleContext()
*/
protected AccessibleContext accessibleContext;
- /**
+ /**
* The file system view.
* @see #setFileSystemView(FileSystemView)
*/
@@ -353,46 +353,46 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The file selection mode.
- * @see #setFileSelectionMode(int)
+ * @see #setFileSelectionMode(int)
*/
private int fileSelectionMode = FILES_ONLY;
- /**
+ /**
* The file view.
* @see #setFileView(FileView)
*/
private FileView fv = null;
- /**
- * A flag controlling whether or not the control buttons are visible.
- * @see #setControlButtonsAreShown(boolean)
+ /**
+ * A flag controlling whether or not the control buttons are visible.
+ * @see #setControlButtonsAreShown(boolean)
*/
private boolean controlButtonsShown = true;
- /**
- * The current directory.
+ /**
+ * The current directory.
* @see #setCurrentDirectory(File)
*/
private File currentDir = null;
- /**
+ /**
* The current file filter.
* @see #setFileFilter(FileFilter)
*/
private FileFilter currentFilter = null;
- /**
+ /**
* An array of selected files.
- * @see #setSelectedFiles(File[])
+ * @see #setSelectedFiles(File[])
*/
private File[] selectedFiles;
- /**
- * The selected file.
+ /**
+ * The selected file.
* @see #setSelectedFile(File)
*/
private File selectedFile;
-
+
/**
* The drag enabled property.
* @see #setDragEnabled(boolean)
@@ -413,7 +413,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new <code>JFileChooser</code> object.
*
* @param currentDirectoryPath the directory that should initially be
- * shown in the filechooser (if <code>null</code>, the user's home
+ * shown in the filechooser (if <code>null</code>, the user's home
* directory is used).
*/
public JFileChooser(String currentDirectoryPath)
@@ -422,11 +422,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Creates a new <code>JFileChooser</code> object with the specified
+ * Creates a new <code>JFileChooser</code> object with the specified
* directory and {@link FileSystemView}.
*
* @param currentDirectoryPath the directory that should initially be
- * shown in the filechooser (if <code>null</code>, the user's home
+ * shown in the filechooser (if <code>null</code>, the user's home
* directory is used).
* @param fsv the file system view (if <code>null</code>, the default file
* system view is used).
@@ -444,7 +444,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new <code>JFileChooser</code> object.
*
* @param currentDirectory the directory that should initially be
- * shown in the filechooser (if <code>null</code>, the user's home
+ * shown in the filechooser (if <code>null</code>, the user's home
* directory is used).
*/
public JFileChooser(File currentDirectory)
@@ -469,7 +469,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new <code>JFileChooser</code> object.
*
* @param currentDirectory the directory that should initially be
- * shown in the filechooser (if <code>null</code>, the user's home
+ * shown in the filechooser (if <code>null</code>, the user's home
* directory is used).
* @param fsv the file system view (if <code>null</code>, the default file
* system view is used).
@@ -485,7 +485,7 @@ public class JFileChooser extends JComponent implements Accessible
*
* @param view the file system view (if <code>null</code>, the default file
* system view is used).
- *
+ *
* @see FileSystemView#getFileSystemView()
*/
protected void setup(FileSystemView view)
@@ -499,18 +499,18 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the dragEnabled property, this disables/enables automatic drag
* handling (drag and drop) on this component. The default value of the
- * dragEnabled property is false.
- *
+ * dragEnabled property is false.
+ *
* Some look and feels might not support automatic drag and drop; they
* will ignore this property.
- *
+ *
* @param b - the new dragEnabled value
*/
public void setDragEnabled(boolean b)
{
if (b && GraphicsEnvironment.isHeadless())
throw new HeadlessException();
-
+
dragEnabled = b;
}
@@ -528,7 +528,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the selected file, if there is one.
*
* @return The selected file (possibly <code>null</code>).
- *
+ *
* @see #setSelectedFile(File)
*/
public File getSelectedFile()
@@ -538,7 +538,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the selected file and sends a {@link PropertyChangeEvent} to all
- * registered listeners. The property name is
+ * registered listeners. The property name is
* {@link #SELECTED_FILE_CHANGED_PROPERTY}.
*
* @param file the file (<code>null</code> permitted).
@@ -547,9 +547,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (selectedFile == null || !selectedFile.equals(file))
{
- File old = selectedFile;
- selectedFile = file;
- firePropertyChange(SELECTED_FILE_CHANGED_PROPERTY, old, selectedFile);
+ File old = selectedFile;
+ selectedFile = file;
+ firePropertyChange(SELECTED_FILE_CHANGED_PROPERTY, old, selectedFile);
}
}
@@ -569,9 +569,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the selected files and sends a {@link PropertyChangeEvent} (with the
- * name {@link #SELECTED_FILES_CHANGED_PROPERTY}) to all registered
- * listeners.
+ * Sets the selected files and sends a {@link PropertyChangeEvent} (with the
+ * name {@link #SELECTED_FILES_CHANGED_PROPERTY}) to all registered
+ * listeners.
*
* @param selectedFiles the selected files (<code>null</code> permitted).
*/
@@ -585,9 +585,9 @@ public class JFileChooser extends JComponent implements Accessible
setSelectedFile(null);
if (this.selectedFiles != selectedFiles)
{
- File[] old = this.selectedFiles;
- this.selectedFiles = selectedFiles;
- firePropertyChange(SELECTED_FILES_CHANGED_PROPERTY, old, selectedFiles);
+ File[] old = this.selectedFiles;
+ this.selectedFiles = selectedFiles;
+ firePropertyChange(SELECTED_FILES_CHANGED_PROPERTY, old, selectedFiles);
}
}
@@ -603,26 +603,26 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the current directory and fires a {@link PropertyChangeEvent} (with
- * the property name {@link #DIRECTORY_CHANGED_PROPERTY}) to all registered
- * listeners. If <code>dir</code> is <code>null</code>, the current
+ * Sets the current directory and fires a {@link PropertyChangeEvent} (with
+ * the property name {@link #DIRECTORY_CHANGED_PROPERTY}) to all registered
+ * listeners. If <code>dir</code> is <code>null</code>, the current
* directory is set to the default directory returned by the file system
* view.
*
* @param dir the new directory (<code>null</code> permitted).
- *
+ *
* @see FileSystemView#getDefaultDirectory()
*/
public void setCurrentDirectory(File dir)
{
if (currentDir != dir || dir == null)
{
- if (dir == null)
- dir = fsv.getDefaultDirectory();
+ if (dir == null)
+ dir = fsv.getDefaultDirectory();
- File old = currentDir;
- currentDir = dir;
- firePropertyChange(DIRECTORY_CHANGED_PROPERTY, old, currentDir);
+ File old = currentDir;
+ currentDir = dir;
+ firePropertyChange(DIRECTORY_CHANGED_PROPERTY, old, currentDir);
}
}
@@ -643,7 +643,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Ensures the the specified file is visible (this is handled by the
+ * Ensures the the specified file is visible (this is handled by the
* UI delegate).
*
* @param f the file.
@@ -654,13 +654,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #OPEN_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -681,13 +681,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #SAVE_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -705,13 +705,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #CUSTOM_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -750,10 +750,10 @@ public class JFileChooser extends JComponent implements Accessible
dialog.getContentPane().add(this);
dialog.addWindowListener( new WindowAdapter()
{
- public void windowClosing(WindowEvent e)
- {
- cancelSelection();
- }
+ public void windowClosing(WindowEvent e)
+ {
+ cancelSelection();
+ }
});
dialog.setModal(true);
dialog.invalidate();
@@ -766,7 +766,7 @@ public class JFileChooser extends JComponent implements Accessible
* shown on the file chooser.
*
* @return A boolean.
- *
+ *
* @see #setControlButtonsAreShown(boolean)
*/
public boolean getControlButtonsAreShown()
@@ -786,18 +786,18 @@ public class JFileChooser extends JComponent implements Accessible
{
if (controlButtonsShown != b)
{
- controlButtonsShown = b;
- firePropertyChange(CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY,
- ! controlButtonsShown, controlButtonsShown);
+ controlButtonsShown = b;
+ firePropertyChange(CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY,
+ ! controlButtonsShown, controlButtonsShown);
}
}
/**
* Returns the type of file chooser.
*
- * @return {@link #OPEN_DIALOG}, {@link #SAVE_DIALOG} or
+ * @return {@link #OPEN_DIALOG}, {@link #SAVE_DIALOG} or
* {@link #CUSTOM_DIALOG}.
- *
+ *
* @see #setDialogType(int)
*/
public int getDialogType()
@@ -807,12 +807,12 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the dialog type and fires a {@link PropertyChangeEvent} (with the
- * property name {@link #DIALOG_TYPE_CHANGED_PROPERTY}) to all
+ * property name {@link #DIALOG_TYPE_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param dialogType the dialog type (one of: {@link #OPEN_DIALOG},
* {@link #SAVE_DIALOG}, {@link #CUSTOM_DIALOG}).
- *
+ *
* @throws IllegalArgumentException if <code>dialogType</code> is not valid.
*/
public void setDialogType(int dialogType)
@@ -823,28 +823,28 @@ public class JFileChooser extends JComponent implements Accessible
if (this.dialogType != dialogType)
{
- int old = this.dialogType;
- this.dialogType = dialogType;
- firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, old, this.dialogType);
+ int old = this.dialogType;
+ this.dialogType = dialogType;
+ firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, old, this.dialogType);
}
}
/**
- * Sets the dialog title and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #DIALOG_TITLE_CHANGED_PROPERTY}) to all
+ * Sets the dialog title and sends a {@link PropertyChangeEvent} (with the
+ * property name {@link #DIALOG_TITLE_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param dialogTitle the dialog title (<code>null</code> permitted).
- *
+ *
* @see #getDialogTitle()
*/
public void setDialogTitle(String dialogTitle)
{
if (this.dialogTitle != dialogTitle)
{
- String old = this.dialogTitle;
- this.dialogTitle = dialogTitle;
- firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, old, this.dialogTitle);
+ String old = this.dialogTitle;
+ this.dialogTitle = dialogTitle;
+ firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, old, this.dialogTitle);
}
}
@@ -852,7 +852,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the dialog title.
*
* @return The dialog title (possibly <code>null</code>).
- *
+ *
* @see #setDialogTitle(String)
*/
public String getDialogTitle()
@@ -861,9 +861,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the tool tip text for the approve button and sends a
+ * Sets the tool tip text for the approve button and sends a
* {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY}) to all
+ * {@link #APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param toolTipText the text.
@@ -872,10 +872,10 @@ public class JFileChooser extends JComponent implements Accessible
{
if (approveButtonToolTipText != toolTipText)
{
- String oldText = approveButtonToolTipText;
- approveButtonToolTipText = toolTipText;
- firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY,
- oldText, approveButtonToolTipText);
+ String oldText = approveButtonToolTipText;
+ approveButtonToolTipText = toolTipText;
+ firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY,
+ oldText, approveButtonToolTipText);
}
}
@@ -883,7 +883,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the tool tip text for the approve button.
*
* @return The tool tip text for the approve button.
- *
+ *
* @see #setApproveButtonToolTipText(String)
*/
public String getApproveButtonToolTipText()
@@ -895,7 +895,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the approve button mnemonic, or zero if no mnemonic has been set.
*
* @return The approve button mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(int)
*/
public int getApproveButtonMnemonic()
@@ -904,34 +904,34 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the mnemonic for the approve button and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
+ * Sets the mnemonic for the approve button and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param mnemonic the mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(char)
*/
public void setApproveButtonMnemonic(int mnemonic)
{
if (approveButtonMnemonic != mnemonic)
{
- int oldMnemonic = approveButtonMnemonic;
- approveButtonMnemonic = mnemonic;
- firePropertyChange(APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY,
- oldMnemonic, approveButtonMnemonic);
+ int oldMnemonic = approveButtonMnemonic;
+ approveButtonMnemonic = mnemonic;
+ firePropertyChange(APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY,
+ oldMnemonic, approveButtonMnemonic);
}
}
/**
- * Sets the mnemonic for the approve button and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
+ * Sets the mnemonic for the approve button and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param mnemonic the mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(int)
*/
public void setApproveButtonMnemonic(char mnemonic)
@@ -940,22 +940,22 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the approve button text and fires a {@link PropertyChangeEvent}
- * (with the property name {@link #APPROVE_BUTTON_TEXT_CHANGED_PROPERTY}) to
+ * Sets the approve button text and fires a {@link PropertyChangeEvent}
+ * (with the property name {@link #APPROVE_BUTTON_TEXT_CHANGED_PROPERTY}) to
* all registered listeners.
*
* @param approveButtonText the text (<code>null</code> permitted).
- *
+ *
* @see #getApproveButtonText()
*/
public void setApproveButtonText(String approveButtonText)
{
if (this.approveButtonText != approveButtonText)
{
- String oldText = this.approveButtonText;
- this.approveButtonText = approveButtonText;
- firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, oldText,
- this.approveButtonText);
+ String oldText = this.approveButtonText;
+ this.approveButtonText = approveButtonText;
+ firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, oldText,
+ this.approveButtonText);
}
}
@@ -963,7 +963,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the approve button text.
*
* @return The approve button text (possibly <code>null</code>).
- *
+ *
* @see #setApproveButtonText(String)
*/
public String getApproveButtonText()
@@ -982,9 +982,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Adds a file filter to the list of available filters and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * Adds a file filter to the list of available filters and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param filter the filter (<code>null</code> permitted).
@@ -996,21 +996,21 @@ public class JFileChooser extends JComponent implements Accessible
FileFilter[] old = getChoosableFileFilters();
choosableFilters.add(filter);
FileFilter[] newFilters = getChoosableFileFilters();
- firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old,
+ firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old,
newFilters);
}
setFileFilter(filter);
}
/**
- * Removes a file filter from the list of available filters and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * Removes a file filter from the list of available filters and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param f the file filter.
*
- * @return <code>true</code> if the filter was removed and
+ * @return <code>true</code> if the filter was removed and
* <code>false</code> otherwise.
*/
public boolean removeChoosableFileFilter(FileFilter f)
@@ -1047,11 +1047,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns the flag that controls whether or not the 'accept all' file
+ * Returns the flag that controls whether or not the 'accept all' file
* filter is included in the list of filters.
*
* @return A boolean.
- *
+ *
* @see #setAcceptAllFileFilterUsed(boolean)
*/
public boolean isAcceptAllFileFilterUsed()
@@ -1061,9 +1061,9 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the flag that controls whether or not the 'accept all' file filter
- * is included in the list of filters, and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY}) to all registered
+ * is included in the list of filters, and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param b the new value of the flag.
@@ -1072,13 +1072,13 @@ public class JFileChooser extends JComponent implements Accessible
{
if (isAcceptAll != b)
{
- isAcceptAll = b;
+ isAcceptAll = b;
if (b)
addChoosableFileFilter(getAcceptAllFileFilter());
- else
+ else
removeChoosableFileFilter(getAcceptAllFileFilter());
- firePropertyChange(ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY,
- ! isAcceptAll, isAcceptAll);
+ firePropertyChange(ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY,
+ ! isAcceptAll, isAcceptAll);
}
}
@@ -1087,7 +1087,7 @@ public class JFileChooser extends JComponent implements Accessible
* value is <code>null</code>.
*
* @return The accessory component (possibly <code>null</code>).
- *
+ *
* @see #setAccessory(JComponent)
*/
public JComponent getAccessory()
@@ -1096,7 +1096,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the accessory component for the file chooser and sends a
+ * Sets the accessory component for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners. The property
* name is {@link #ACCESSORY_CHANGED_PROPERTY}.
*
@@ -1106,20 +1106,20 @@ public class JFileChooser extends JComponent implements Accessible
{
if (accessory != newAccessory)
{
- JComponent old = accessory;
- accessory = newAccessory;
- firePropertyChange(ACCESSORY_CHANGED_PROPERTY, old, accessory);
+ JComponent old = accessory;
+ accessory = newAccessory;
+ firePropertyChange(ACCESSORY_CHANGED_PROPERTY, old, accessory);
}
}
/**
* Sets the file selection mode and sends a {@link PropertyChangeEvent}
- * to all registered listeners. The property name is
+ * to all registered listeners. The property name is
* {@link #FILE_SELECTION_MODE_CHANGED_PROPERTY}.
*
* @param mode the mode ({@link #FILES_ONLY}, {@link #DIRECTORIES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}).
- *
+ *
* @throws IllegalArgumentException if the mode is invalid.
*/
public void setFileSelectionMode(int mode)
@@ -1129,20 +1129,20 @@ public class JFileChooser extends JComponent implements Accessible
throw new IllegalArgumentException("Choose a correct file selection mode.");
if (fileSelectionMode != mode)
{
- int old = fileSelectionMode;
- fileSelectionMode = mode;
- firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, old,
- fileSelectionMode);
+ int old = fileSelectionMode;
+ fileSelectionMode = mode;
+ firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, old,
+ fileSelectionMode);
}
}
/**
- * Returns the file selection mode, one of: {@link #FILES_ONLY},
+ * Returns the file selection mode, one of: {@link #FILES_ONLY},
* {@link #DIRECTORIES_ONLY} or {@link #FILES_AND_DIRECTORIES}. The
* default is {@link #FILES_ONLY}.
*
* @return The file selection mode.
- *
+ *
* @see #setFileSelectionMode(int)
*/
public int getFileSelectionMode()
@@ -1151,13 +1151,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns <code>true</code> if file selection is enabled, and
+ * Returns <code>true</code> if file selection is enabled, and
* <code>false</code> otherwise. File selection is enabled when the
- * file selection mode is {@link #FILES_ONLY} or
+ * file selection mode is {@link #FILES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}.
*
* @return <code>true</code> if file selection is enabled.
- *
+ *
* @see #getFileSelectionMode()
*/
public boolean isFileSelectionEnabled()
@@ -1167,13 +1167,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns <code>true</code> if directory selection is enabled, and
+ * Returns <code>true</code> if directory selection is enabled, and
* <code>false</code> otherwise. Directory selection is enabled when the
- * file selection mode is {@link #DIRECTORIES_ONLY} or
+ * file selection mode is {@link #DIRECTORIES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}.
*
* @return <code>true</code> if file selection is enabled.
- *
+ *
* @see #getFileSelectionMode()
*/
public boolean isDirectorySelectionEnabled()
@@ -1183,9 +1183,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the flag that controls whether multiple selections are allowed in
- * this filechooser and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #MULTI_SELECTION_ENABLED_CHANGED_PROPERTY}) to all
+ * Sets the flag that controls whether multiple selections are allowed in
+ * this filechooser and sends a {@link PropertyChangeEvent} (with the
+ * property name {@link #MULTI_SELECTION_ENABLED_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param b the new value of the flag.
@@ -1194,9 +1194,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (multiSelection != b)
{
- multiSelection = b;
- firePropertyChange(MULTI_SELECTION_ENABLED_CHANGED_PROPERTY,
- ! multiSelection, multiSelection);
+ multiSelection = b;
+ firePropertyChange(MULTI_SELECTION_ENABLED_CHANGED_PROPERTY,
+ ! multiSelection, multiSelection);
}
}
@@ -1205,7 +1205,7 @@ public class JFileChooser extends JComponent implements Accessible
* file chooser, and <code>false</code> otherwise.
*
* @return A boolean.
- *
+ *
* @see #setMultiSelectionEnabled(boolean)
*/
public boolean isMultiSelectionEnabled()
@@ -1214,11 +1214,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns <code>true</code> if hidden files are to be hidden, and
+ * Returns <code>true</code> if hidden files are to be hidden, and
* <code>false</code> otherwise.
*
* @return A boolean.
- *
+ *
* @see #setFileHidingEnabled(boolean)
*/
public boolean isFileHidingEnabled()
@@ -1237,15 +1237,15 @@ public class JFileChooser extends JComponent implements Accessible
{
if (fileHiding != b)
{
- fileHiding = b;
- firePropertyChange(FILE_HIDING_CHANGED_PROPERTY, ! fileHiding,
- fileHiding);
+ fileHiding = b;
+ firePropertyChange(FILE_HIDING_CHANGED_PROPERTY, ! fileHiding,
+ fileHiding);
}
}
/**
* Sets the file filter and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * property name {@link #FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param filter the filter (<code>null</code> permitted).
@@ -1266,7 +1266,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the file filter.
*
* @return The file filter.
- *
+ *
* @see #setFileFilter(FileFilter)
*/
public FileFilter getFileFilter()
@@ -1275,7 +1275,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets a custom {@link FileView} for the file chooser and sends a
+ * Sets a custom {@link FileView} for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners. The property
* name is {@link #FILE_VIEW_CHANGED_PROPERTY}.
*
@@ -1287,9 +1287,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (fv != fileView)
{
- FileView old = fv;
- fv = fileView;
- firePropertyChange(FILE_VIEW_CHANGED_PROPERTY, old, fv);
+ FileView old = fv;
+ fv = fileView;
+ firePropertyChange(FILE_VIEW_CHANGED_PROPERTY, old, fv);
}
}
@@ -1340,7 +1340,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns the type description for the file, generated by the current (or
+ * Returns the type description for the file, generated by the current (or
* default) {@link FileView}.
*
* @param f the file.
@@ -1375,7 +1375,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns <code>true</code> if the file is traversable, and
+ * Returns <code>true</code> if the file is traversable, and
* <code>false</code> otherwise.
*
* @param f the file or directory.
@@ -1400,14 +1400,14 @@ public class JFileChooser extends JComponent implements Accessible
if (f == null)
return true;
FileFilter ff = getFileFilter();
- if (ff != null)
+ if (ff != null)
return ff.accept(f);
else
return true;
}
/**
- * Sets the file system view for the file chooser and sends a
+ * Sets the file system view for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners.
*
* @param fsv the file system view.
@@ -1416,9 +1416,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (this.fsv != fsv)
{
- FileSystemView old = this.fsv;
- this.fsv = fsv;
- firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, old, this.fsv);
+ FileSystemView old = this.fsv;
+ this.fsv = fsv;
+ firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, old, this.fsv);
}
}
@@ -1426,7 +1426,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the file system view being used by this file chooser.
*
* @return The file system view.
- *
+ *
* @see #setFileSystemView(FileSystemView)
*/
public FileSystemView getFileSystemView()
@@ -1473,11 +1473,11 @@ public class JFileChooser extends JComponent implements Accessible
{
try
{
- listenerList.remove(ActionListener.class, l);
+ listenerList.remove(ActionListener.class, l);
}
catch (IllegalArgumentException e)
{
- e.printStackTrace();
+ e.printStackTrace();
}
}
@@ -1535,12 +1535,12 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns a string describing the attributes for the
- * <code>JFileChooser</code> component, for use in debugging. The return
- * value is guaranteed to be non-<code>null</code>, but the format of the
+ * Returns a string describing the attributes for the
+ * <code>JFileChooser</code> component, for use in debugging. The return
+ * value is guaranteed to be non-<code>null</code>, but the format of the
* string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* <code>JFileChooser</code>.
*/
protected String paramString()
@@ -1587,7 +1587,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* <code>JFileChooser</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJFileChooser}).
*/
public AccessibleContext getAccessibleContext()
@@ -1601,7 +1601,7 @@ public class JFileChooser extends JComponent implements Accessible
* Provides the accessibility features for the <code>JFileChooser</code>
* component.
*/
- protected class AccessibleJFileChooser
+ protected class AccessibleJFileChooser
extends JComponent.AccessibleJComponent
{
/**
@@ -1611,9 +1611,9 @@ public class JFileChooser extends JComponent implements Accessible
{
// Nothing to do here.
}
-
+
/**
- * Returns the accessible role for the <code>JFileChooser</code>
+ * Returns the accessible role for the <code>JFileChooser</code>
* component.
*
* @return {@link AccessibleRole#FILE_CHOOSER}.
diff --git a/javax/swing/JFormattedTextField.java b/javax/swing/JFormattedTextField.java
index 36554857e..e4b6fec79 100644
--- a/javax/swing/JFormattedTextField.java
+++ b/javax/swing/JFormattedTextField.java
@@ -84,18 +84,18 @@ public class JFormattedTextField extends JTextField
public abstract static class AbstractFormatter implements Serializable
{
private static final long serialVersionUID = -5193212041738979680L;
-
+
private JFormattedTextField textField;
-
+
public AbstractFormatter ()
{
//Do nothing here.
}
/**
- * Clones the AbstractFormatter and removes the association to any
+ * Clones the AbstractFormatter and removes the association to any
* particular JFormattedTextField.
- *
+ *
* @return a clone of this formatter with no association to any particular
* JFormattedTextField
* @throws CloneNotSupportedException if the Object's class doesn't support
@@ -106,7 +106,7 @@ public class JFormattedTextField extends JTextField
{
// Clone this formatter.
AbstractFormatter newFormatter = (AbstractFormatter) super.clone();
-
+
// And remove the association to the JFormattedTextField.
newFormatter.textField = null;
return newFormatter;
@@ -115,7 +115,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns a custom set of Actions that this formatter supports. Should
* be subclassed by formatters that have a custom set of Actions.
- *
+ *
* @return <code>null</code>. Should be subclassed by formatters that want
* to install custom Actions on the JFormattedTextField.
*/
@@ -128,13 +128,13 @@ public class JFormattedTextField extends JTextField
* Gets the DocumentFilter for this formatter. Should be subclassed
* by formatters wishing to install a filter that oversees Document
* mutations.
- *
+ *
* @return <code>null</code>. Should be subclassed by formatters
* that want to restrict Document mutations.
*/
protected DocumentFilter getDocumentFilter()
{
- // Subclasses should override this if they want to install a
+ // Subclasses should override this if they want to install a
// DocumentFilter.
return null;
}
@@ -142,7 +142,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns the JFormattedTextField on which this formatter is
* currently installed.
- *
+ *
* @return the JFormattedTextField on which this formatter is currently
* installed
*/
@@ -153,29 +153,29 @@ public class JFormattedTextField extends JTextField
/**
* Gets the NavigationFilter for this formatter. Should be subclassed
- * by formatters (such as {@link DefaultFormatter}) that wish to
+ * by formatters (such as {@link DefaultFormatter}) that wish to
* restrict where the cursor can be placed within the text field.
- *
+ *
* @return <code>null</code>. Subclassed by formatters that want to restrict
* cursor location within the JFormattedTextField.
*/
protected NavigationFilter getNavigationFilter()
{
- // This should be subclassed if the formatter wants to install
+ // This should be subclassed if the formatter wants to install
// a NavigationFilter on the JFormattedTextField.
return null;
}
/**
- * Installs this formatter on the specified JFormattedTextField. This
- * converts the current value to a displayable String and displays it,
+ * Installs this formatter on the specified JFormattedTextField. This
+ * converts the current value to a displayable String and displays it,
* and installs formatter specific Actions from <code>getActions</code>.
- * It also installs a DocumentFilter and NavigationFilter on the
- * JFormattedTextField.
+ * It also installs a DocumentFilter and NavigationFilter on the
+ * JFormattedTextField.
* <p>
- * If there is a <code>ParseException</code> this sets the text to an
+ * If there is a <code>ParseException</code> this sets the text to an
* empty String and marks the text field in an invalid state.
- *
+ *
* @param textField the JFormattedTextField on which to install this
* formatter
*/
@@ -184,10 +184,10 @@ public class JFormattedTextField extends JTextField
// Uninstall the current textfield.
if (this.textField != null)
uninstall();
-
+
this.textField = textField;
-
- // Install some state on the text field, including display text,
+
+ // Install some state on the text field, including display text,
// DocumentFilter, NavigationFilter, and formatter specific Actions.
if (textField != null)
{
@@ -196,16 +196,16 @@ public class JFormattedTextField extends JTextField
// Set the text of the field.
textField.setText(valueToString(textField.getValue()));
Document doc = textField.getDocument();
-
+
// Set the DocumentFilter for the field's Document.
if (doc instanceof AbstractDocument)
((AbstractDocument) doc).setDocumentFilter(getDocumentFilter());
-
+
// Set the NavigationFilter.
textField.setNavigationFilter(getNavigationFilter());
-
+
// Set the Formatter Actions
- // FIXME: Have to add the actions from getActions()
+ // FIXME: Have to add the actions from getActions()
}
catch (ParseException pe)
{
@@ -218,8 +218,8 @@ public class JFormattedTextField extends JTextField
/**
* Clears the state installed on the JFormattedTextField by the formatter.
- * This resets the DocumentFilter, NavigationFilter, and any additional
- * Actions (returned by <code>getActions()</code>).
+ * This resets the DocumentFilter, NavigationFilter, and any additional
+ * Actions (returned by <code>getActions()</code>).
*/
public void uninstall()
{
@@ -234,7 +234,7 @@ public class JFormattedTextField extends JTextField
/**
* Invoke this method when invalid values are entered. This forwards the
- * call to the JFormattedTextField.
+ * call to the JFormattedTextField.
*/
protected void invalidEdit()
{
@@ -242,9 +242,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * This method updates the <code>editValid</code> property of
+ * This method updates the <code>editValid</code> property of
* JFormattedTextField.
- *
+ *
* @param valid the new state for the <code>editValid</code> property
*/
protected void setEditValid(boolean valid)
@@ -254,7 +254,7 @@ public class JFormattedTextField extends JTextField
/**
* Parses <code>text</code> to return a corresponding Object.
- *
+ *
* @param text the String to parse
* @return an Object that <code>text</code> represented
* @throws ParseException if there is an error in the conversion
@@ -265,7 +265,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns a String to be displayed, based on the Object
* <code>value</code>.
- *
+ *
* @param value the Object from which to generate a String
* @return a String to be displayed
* @throws ParseException if there is an error in the conversion
@@ -276,7 +276,7 @@ public class JFormattedTextField extends JTextField
/**
* Delivers instances of an {@link AbstractFormatter} for
- * a specific value type for a JFormattedTextField.
+ * a specific value type for a JFormattedTextField.
*/
public abstract static class AbstractFormatterFactory
{
@@ -296,22 +296,22 @@ public class JFormattedTextField extends JTextField
/** The most recent valid and committed value **/
private Object value;
-
+
/** The behaviour for when this text field loses focus **/
private int focusLostBehavior = COMMIT_OR_REVERT;
-
+
/** The formatter factory currently being used **/
private AbstractFormatterFactory formatterFactory;
-
+
/** The formatter currently being used **/
private AbstractFormatter formatter;
-
+
// Package-private to avoid an accessor method.
boolean editValid = true;
-
+
/**
- * Creates a JFormattedTextField with no formatter factory.
- * <code>setValue</code> or <code>setFormatterFactory</code> will
+ * Creates a JFormattedTextField with no formatter factory.
+ * <code>setValue</code> or <code>setFormatterFactory</code> will
* properly configure this text field to edit a particular type
* of value.
*/
@@ -321,10 +321,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Creates a JFormattedTextField that can handle the specified Format.
- * An appopriate AbstractFormatter and AbstractFormatterFactory will
+ * Creates a JFormattedTextField that can handle the specified Format.
+ * An appopriate AbstractFormatter and AbstractFormatterFactory will
* be created for the specified Format.
- *
+ *
* @param format the Format that this JFormattedTextField should be able
* to handle
*/
@@ -335,10 +335,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Creates a JFormattedTextField with the specified formatter. This will
+ * Creates a JFormattedTextField with the specified formatter. This will
* create a {@link DefaultFormatterFactory} with this formatter as the default
* formatter.
- *
+ *
* @param formatter the formatter to use for this JFormattedTextField
*/
public JFormattedTextField(AbstractFormatter formatter)
@@ -348,7 +348,7 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified formatter factory.
- *
+ *
* @param factory the formatter factory to use for this JFormattedTextField
*/
public JFormattedTextField(AbstractFormatterFactory factory)
@@ -359,12 +359,12 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified formatter factory and
* initial value.
- *
+ *
* @param factory the initial formatter factory for this JFormattedTextField
* @param value the initial value for the text field
*/
public JFormattedTextField(AbstractFormatterFactory factory, Object value)
- {
+ {
setFormatterFactory(factory);
setValue(value);
}
@@ -372,14 +372,14 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified value. This creates a
* formatter and formatterFactory that are appropriate for the value.
- *
+ *
* @param value the initial value for this JFormattedTextField
*/
public JFormattedTextField(Object value)
{
setValue(value);
}
-
+
/**
* Returns an AbstractFormatterFactory that will give an appropriate
* AbstractFormatter for the given Format.
@@ -396,14 +396,14 @@ public class JFormattedTextField extends JTextField
newFormatter = new NumberFormatter ((NumberFormat) format);
else
newFormatter = new InternationalFormatter(format);
-
+
return new DefaultFormatterFactory(newFormatter);
}
/**
* Forces the current value from the editor to be set as the current
* value. If there is no current formatted this has no effect.
- *
+ *
* @throws ParseException if the formatter cannot format the current value
*/
public void commitEdit()
@@ -414,17 +414,17 @@ public class JFormattedTextField extends JTextField
// Note: this code is a lot like setValue except that we don't want
// to create a new formatter.
Object oldValue = this.value;
-
+
this.value = formatter.stringToValue(getText());
editValid = true;
-
- firePropertyChange("value", oldValue, this.value);
+
+ firePropertyChange("value", oldValue, this.value);
}
/**
* Gets the command list supplied by the UI augmented by the specific
* Actions for JFormattedTextField.
- *
+ *
* @return an array of Actions that this text field supports
*/
public Action[] getActions()
@@ -436,8 +436,8 @@ public class JFormattedTextField extends JTextField
/**
* Returns the behaviour of this JFormattedTextField upon losing focus. This
- * is one of <code>COMMIT</code>, <code>COMMIT_OR_REVERT</code>,
- * <code>PERSIST</code>, or <code>REVERT</code>.
+ * is one of <code>COMMIT</code>, <code>COMMIT_OR_REVERT</code>,
+ * <code>PERSIST</code>, or <code>REVERT</code>.
* @return the behaviour upon losing focus
*/
public int getFocusLostBehavior()
@@ -453,7 +453,7 @@ public class JFormattedTextField extends JTextField
{
return formatter;
}
-
+
/**
* Returns the factory currently used to generate formatters for this
* JFormattedTextField.
@@ -470,9 +470,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * Returns the last valid value. This may not be the value currently shown
- * in the text field depending on whether or not the formatter commits on
- * valid edits and allows invalid input to be temporarily displayed.
+ * Returns the last valid value. This may not be the value currently shown
+ * in the text field depending on whether or not the formatter commits on
+ * valid edits and allows invalid input to be temporarily displayed.
* @return the last committed valid value
*/
public Object getValue()
@@ -482,7 +482,7 @@ public class JFormattedTextField extends JTextField
/**
* This method is used to provide feedback to the user when an invalid value
- * is input during editing.
+ * is input during editing.
*/
protected void invalidEdit()
{
@@ -500,10 +500,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Processes focus events. This is overridden because we may want to
- * change the formatted depending on whether or not this field has
+ * Processes focus events. This is overridden because we may want to
+ * change the formatted depending on whether or not this field has
* focus.
- *
+ *
* @param evt the FocusEvent
*/
protected void processFocusEvent(FocusEvent evt)
@@ -513,11 +513,11 @@ public class JFormattedTextField extends JTextField
// based on whether or not it has focus.
setFormatter (formatterFactory.getFormatter(this));
}
-
+
/**
* Associates this JFormattedTextField with a Document and propagates
* a PropertyChange event to each listener.
- *
+ *
* @param newDocument the Document to associate with this text field
*/
public void setDocument(Document newDocument)
@@ -528,26 +528,26 @@ public class JFormattedTextField extends JTextField
if (oldDocument == newDocument)
return;
-
+
super.setDocument(newDocument);
}
/**
* Sets the behaviour of this JFormattedTextField upon losing focus.
- * This must be <code>COMMIT</code>, <code>COMMIT_OR_REVERT</code>,
- * <code>PERSIST</code>, or <code>REVERT</code> or an
+ * This must be <code>COMMIT</code>, <code>COMMIT_OR_REVERT</code>,
+ * <code>PERSIST</code>, or <code>REVERT</code> or an
* IllegalArgumentException will be thrown.
- *
+ *
* @param behavior
- * @throws IllegalArgumentException if <code>behaviour</code> is not
+ * @throws IllegalArgumentException if <code>behaviour</code> is not
* one of the above
*/
public void setFocusLostBehavior(int behavior)
{
if (behavior != COMMIT
- && behavior != COMMIT_OR_REVERT
- && behavior != PERSIST
- && behavior != REVERT)
+ && behavior != COMMIT_OR_REVERT
+ && behavior != PERSIST
+ && behavior != REVERT)
throw new IllegalArgumentException("invalid behavior");
this.focusLostBehavior = behavior;
@@ -556,22 +556,22 @@ public class JFormattedTextField extends JTextField
/**
* Sets the formatter for this JFormattedTextField. Normally the formatter
* factory will take care of this, or calls to setValue will also make sure
- * that the formatter is set appropriately.
- *
+ * that the formatter is set appropriately.
+ *
* @param formatter the AbstractFormatter to use for formatting the value for
* this JFormattedTextField
*/
protected void setFormatter(AbstractFormatter formatter)
{
AbstractFormatter oldFormatter = null;
-
+
oldFormatter = this.formatter;
if (oldFormatter != null)
oldFormatter.uninstall();
-
+
this.formatter = formatter;
-
+
if (formatter != null)
formatter.install(this);
@@ -579,9 +579,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * Sets the factory from which this JFormattedTextField should obtain
- * its formatters.
- *
+ * Sets the factory from which this JFormattedTextField should obtain
+ * its formatters.
+ *
* @param factory the AbstractFormatterFactory that will be used to generate
* formatters for this JFormattedTextField
*/
@@ -589,11 +589,11 @@ public class JFormattedTextField extends JTextField
{
if (formatterFactory == factory)
return;
-
+
AbstractFormatterFactory oldFactory = formatterFactory;
formatterFactory = factory;
firePropertyChange("formatterFactory", oldFactory, factory);
-
+
// Now set the formatter according to our new factory.
if (formatterFactory != null)
setFormatter(formatterFactory.getFormatter(this));
@@ -603,7 +603,7 @@ public class JFormattedTextField extends JTextField
/**
* Sets the value that will be formatted and displayed.
- *
+ *
* @param newValue the value to be formatted and displayed
*/
public void setValue(Object newValue)
@@ -613,11 +613,11 @@ public class JFormattedTextField extends JTextField
Object oldValue = value;
value = newValue;
-
+
// If there is no formatterFactory then make one.
if (formatterFactory == null)
setFormatterFactory(createFormatterFactory(newValue));
-
+
// Set the formatter appropriately. This is because there may be a new
// formatterFactory from the line above, or we may want a new formatter
// depending on the type of newValue (or if newValue is null).
@@ -626,7 +626,7 @@ public class JFormattedTextField extends JTextField
}
/**
- * A helper method that attempts to create a formatter factory that is
+ * A helper method that attempts to create a formatter factory that is
* suitable to format objects of the type like <code>value</code>.
*
* @param value an object which should be formatted by the formatter factory.
@@ -642,7 +642,7 @@ public class JFormattedTextField extends JTextField
else if (value instanceof Number)
formatter = new NumberFormatter();
else
- formatter = new DefaultFormatter();
+ formatter = new DefaultFormatter();
return new DefaultFormatterFactory(formatter);
}
}
diff --git a/javax/swing/JFrame.java b/javax/swing/JFrame.java
index 0c956b396..074d1c7d3 100644
--- a/javax/swing/JFrame.java
+++ b/javax/swing/JFrame.java
@@ -64,7 +64,7 @@ import javax.accessibility.AccessibleContext;
*
* Also, unlike <code>java.awt.Frame</code>s, JFrames support the
* Swing Pluggable Look &amp; Feel architecture.
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
public class JFrame extends Frame
@@ -100,7 +100,7 @@ public class JFrame extends Frame
private int closeAction = HIDE_ON_CLOSE;
protected AccessibleContext accessibleContext;
protected JRootPane rootPane;
-
+
/**
* @specnote rootPaneCheckingEnabled is false to comply with J2SE 5.0
*/
@@ -117,7 +117,7 @@ public class JFrame extends Frame
/**
* Creates a new <code>JFrame</code> with the specified title.
- *
+ *
* @param title the frame title (<code>null</code> permitted).
*/
public JFrame(String title)
@@ -307,7 +307,7 @@ public class JFrame extends Frame
}
/**
- * Returns the object that provides accessibility features for this
+ * Returns the object that provides accessibility features for this
* <code>JFrame</code>.
*
* @return The accessible context (an instance of {@link AccessibleJFrame}).
@@ -322,11 +322,11 @@ public class JFrame extends Frame
/**
* Returns a code for the default operation when the frame is closed. The
* default value is {@link WindowConstants#HIDE_ON_CLOSE}.
- *
+ *
* @return One of: {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE},
* {@link WindowConstants#DISPOSE_ON_CLOSE}, {@link #EXIT_ON_CLOSE}.
- *
+ *
* @see #setDefaultCloseOperation(int)
*/
public int getDefaultCloseOperation()
@@ -336,9 +336,9 @@ public class JFrame extends Frame
/**
* Returns a string describing the attributes for the <code>JFrame</code>,
- * for use in debugging. The return value is guaranteed to be
+ * for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format may vary between implementations.
- *
+ *
* @return A string describing the attributes of the <code>JFrame</code>.
*/
protected String paramString()
@@ -360,38 +360,38 @@ public class JFrame extends Frame
if (e.getID() == WindowEvent.WINDOW_CLOSING)
{
switch (closeAction)
- {
- case EXIT_ON_CLOSE:
- System.exit(0);
- break;
- case DISPOSE_ON_CLOSE:
- dispose();
- break;
- case HIDE_ON_CLOSE:
- setVisible(false);
- break;
- case DO_NOTHING_ON_CLOSE:
- break;
- }
+ {
+ case EXIT_ON_CLOSE:
+ System.exit(0);
+ break;
+ case DISPOSE_ON_CLOSE:
+ dispose();
+ break;
+ case HIDE_ON_CLOSE:
+ setVisible(false);
+ break;
+ case DO_NOTHING_ON_CLOSE:
+ break;
+ }
}
}
/**
* Sets the default operation that is performed when this frame is closed.
- * The default is <code>HIDE_ON_CLOSE</code>. When
+ * The default is <code>HIDE_ON_CLOSE</code>. When
* <code>EXIT_ON_CLOSE</code> is specified this method calls
* <code>SecurityManager.checkExit(0)</code> which might throw a
* <code>SecurityException</code>.
- *
- * @param operation a code for the operation (one of:
- * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE},
- * {@link WindowConstants#DISPOSE_ON_CLOSE} and
+ *
+ * @param operation a code for the operation (one of:
+ * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE},
+ * {@link WindowConstants#DISPOSE_ON_CLOSE} and
* {@link WindowConstants#EXIT_ON_CLOSE}).
- *
+ *
* @throws IllegalArgumentException if <code>operation</code> is not one of
* the specified codes.
- *
+ *
* @see #getDefaultCloseOperation()
*/
public void setDefaultCloseOperation(int operation)
@@ -402,7 +402,7 @@ public class JFrame extends Frame
if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE
&& operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE)
- throw new IllegalArgumentException("operation must be EXIT_ON_CLOSE, "
+ throw new IllegalArgumentException("operation must be EXIT_ON_CLOSE, "
+ "HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE");
closeAction = operation;
diff --git a/javax/swing/JInternalFrame.java b/javax/swing/JInternalFrame.java
index ff3ae1faa..511bc6ed4 100644
--- a/javax/swing/JInternalFrame.java
+++ b/javax/swing/JInternalFrame.java
@@ -101,7 +101,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the accessible role for the <code>JInternalFrame</code>
+ * Returns the accessible role for the <code>JInternalFrame</code>
* component.
*
* @return {@link AccessibleRole#INTERNAL_FRAME}.
@@ -112,8 +112,8 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JInternalFrame}. Since this class
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JInternalFrame}. Since this class
* implements {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -124,7 +124,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the current layer for the {@link JInternalFrame} component,
+ * Returns the current layer for the {@link JInternalFrame} component,
* as an {@link Integer}.
*
* @return The layer for the {@link JInternalFrame} component.
@@ -194,7 +194,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the accessible role for the <code>JDesktopIcon</code>
+ * Returns the accessible role for the <code>JDesktopIcon</code>
* component.
*
* @return {@link AccessibleRole#DESKTOP_ICON}.
@@ -205,8 +205,8 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JDesktopIcon}. Since this class
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JDesktopIcon}. Since this class
* implements {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -248,10 +248,10 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the layer for the internal frame represented by this
+ * Sets the layer for the internal frame represented by this
* <code>JDesktopIcon</code> component.
*
- * @param n the layer (see the constants defined in
+ * @param n the layer (see the constants defined in
* {@link JLayeredPane}).
*
* @return <code>true</code> if the value is set, and <code>false</code>
@@ -286,7 +286,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the object that provides accessibility features for this
* <code>JDesktopIcon</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJDesktopIcon}).
*/
public AccessibleContext getAccessibleContext()
@@ -496,8 +496,8 @@ public class JInternalFrame extends JComponent implements Accessible,
private transient boolean wasIcon = false;
/**
- * Creates a new JInternalFrame object that has an empty string for its
- * title, and is non-resizable, non-maximizable, non-iconifiable, and
+ * Creates a new JInternalFrame object that has an empty string for its
+ * title, and is non-resizable, non-maximizable, non-iconifiable, and
* non-closable.
*/
public JInternalFrame()
@@ -672,11 +672,11 @@ public class JInternalFrame extends JComponent implements Accessible,
switch (getDefaultCloseOperation())
{
case HIDE_ON_CLOSE:
- setVisible(false);
- break;
+ setVisible(false);
+ break;
case DISPOSE_ON_CLOSE:
- dispose();
- break;
+ dispose();
+ break;
}
}
@@ -692,59 +692,59 @@ public class JInternalFrame extends JComponent implements Accessible,
switch (id)
{
case InternalFrameEvent.INTERNAL_FRAME_CLOSING:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameClosing(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameClosing(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_ACTIVATED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameActivated(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameActivated(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_CLOSED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1]).internalFrameClosed(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1]).internalFrameClosed(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameDeactivated(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameDeactivated(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameDeiconified(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameDeiconified(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_ICONIFIED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameIconified(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameIconified(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_OPENED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1]).internalFrameOpened(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1]).internalFrameOpened(evt);
+ }
+ break;
}
}
@@ -752,7 +752,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the object that provides accessibility features for this
* <code>JInternalFrame</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJInternalFrame}).
*/
public AccessibleContext getAccessibleContext()
@@ -773,14 +773,14 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns a code for the default action taken when this
+ * Returns a code for the default action taken when this
* <code>JInternalFrame</code> is closed.
*
- * @return The action code (usually one of
- * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE}, or
+ * @return The action code (usually one of
+ * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE}, or
* {@link WindowConstants#DISPOSE_ON_CLOSE}).
- *
+ *
* @see #setDefaultCloseOperation(int)
* @see #doDefaultCloseAction()
*/
@@ -790,7 +790,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the <code>JDesktopIcon</code> that represents this
+ * Returns the <code>JDesktopIcon</code> that represents this
* <code>JInternalFrame</code> while it is iconified.
*
* @return The desktop icon component.
@@ -840,12 +840,12 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (isSelected())
{
- Component focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
- if (SwingUtilities.isDescendingFrom(focus, this))
- {
- defaultFocus = focus;
- return focus;
- }
+ Component focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
+ if (SwingUtilities.isDescendingFrom(focus, this))
+ {
+ defaultFocus = focus;
+ return focus;
+ }
}
return null;
}
@@ -975,7 +975,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the frame's title.
*
* @return The frame's title (can be <code>null</code>).
- *
+ *
* @see #setTitle(String)
*/
public String getTitle()
@@ -1161,14 +1161,14 @@ public class JInternalFrame extends JComponent implements Accessible,
{
try
{
- if (isIcon())
- setIcon(false);
- else if (isMaximum())
- setMaximum(false);
+ if (isIcon())
+ setIcon(false);
+ else if (isMaximum())
+ setMaximum(false);
}
catch (PropertyVetoException e)
{
- // Do nothing if they don't want to be restored first.
+ // Do nothing if they don't want to be restored first.
}
setSize(getPreferredSize());
validate();
@@ -1186,10 +1186,10 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * An implementation dependent string describing the current state of this
+ * An implementation dependent string describing the current state of this
* <code>JInternalFrame</code> instance.
*
- * @return A string describing the current state of this
+ * @return A string describing the current state of this
* <code>JInternalFrame</code> instance.
*/
protected String paramString()
@@ -1300,22 +1300,22 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (c != getContentPane())
{
- Container old = getContentPane();
- getRootPane().setContentPane(c);
- firePropertyChange(CONTENT_PANE_PROPERTY, old, c);
+ Container old = getContentPane();
+ getRootPane().setContentPane(c);
+ firePropertyChange(CONTENT_PANE_PROPERTY, old, c);
}
}
/**
- * Sets a code for the action to be taken when this
- * <code>JInternalFrame</code> is closed. Note that no validation is
- * performed on the <code>operation</code> code, any integer will be
+ * Sets a code for the action to be taken when this
+ * <code>JInternalFrame</code> is closed. Note that no validation is
+ * performed on the <code>operation</code> code, any integer will be
* accepted (nevertheless, you should pass in one of the listed values).
*
- * @param operation one of {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE} or
+ * @param operation one of {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE} or
* {@link WindowConstants#DISPOSE_ON_CLOSE}.
- *
+ *
* @see #getDefaultCloseOperation()
* @see #doDefaultCloseAction()
*/
@@ -1329,14 +1329,14 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the <code>JDesktopIcon</code> instance that represents this
+ * Sets the <code>JDesktopIcon</code> instance that represents this
* <code>JInternalFrame</code> while it is iconified and, if the new icon is
- * not the same instance as the existing icon, sends a
- * {@link PropertyChangeEvent} (with the property name
+ * not the same instance as the existing icon, sends a
+ * {@link PropertyChangeEvent} (with the property name
* <code>"desktopIcon"</code>) to all registered listeners..
*
* @param d the icon.
- *
+ *
* @see #getDesktopIcon()
*/
public void setDesktopIcon(JDesktopIcon d)
@@ -1374,9 +1374,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (icon != frameIcon)
{
- Icon old = frameIcon;
- frameIcon = icon;
- firePropertyChange(FRAME_ICON_PROPERTY, old, frameIcon);
+ Icon old = frameIcon;
+ frameIcon = icon;
+ firePropertyChange(FRAME_ICON_PROPERTY, old, frameIcon);
}
}
@@ -1389,9 +1389,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (glass != getGlassPane())
{
- Component old = getGlassPane();
- getRootPane().setGlassPane(glass);
- firePropertyChange(GLASS_PANE_PROPERTY, old, glass);
+ Component old = getGlassPane();
+ getRootPane().setGlassPane(glass);
+ firePropertyChange(GLASS_PANE_PROPERTY, old, glass);
}
}
@@ -1409,15 +1409,15 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b != isIcon())
{
- fireVetoableChange(IS_ICON_PROPERTY, b, isIcon);
+ fireVetoableChange(IS_ICON_PROPERTY, b, isIcon);
- isIcon = b;
+ isIcon = b;
- firePropertyChange(IS_ICON_PROPERTY, ! isIcon, isIcon);
- if (b)
- fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
- else
- fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
+ firePropertyChange(IS_ICON_PROPERTY, ! isIcon, isIcon);
+ if (b)
+ fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
+ else
+ fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
}
}
@@ -1496,9 +1496,9 @@ public class JInternalFrame extends JComponent implements Accessible,
if (layered != getLayeredPane())
{
- JLayeredPane old = getLayeredPane();
- getRootPane().setLayeredPane(layered);
- firePropertyChange(LAYERED_PANE_PROPERTY, old, layered);
+ JLayeredPane old = getLayeredPane();
+ getRootPane().setLayeredPane(layered);
+ firePropertyChange(LAYERED_PANE_PROPERTY, old, layered);
}
}
@@ -1549,9 +1549,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b != isMaximum)
{
- fireVetoableChange(IS_MAXIMUM_PROPERTY, isMaximum, b);
- isMaximum = b;
- firePropertyChange(IS_MAXIMUM_PROPERTY, ! isMaximum, isMaximum);
+ fireVetoableChange(IS_MAXIMUM_PROPERTY, isMaximum, b);
+ isMaximum = b;
+ firePropertyChange(IS_MAXIMUM_PROPERTY, ! isMaximum, isMaximum);
}
}
@@ -1673,12 +1673,12 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the title for the <code>JInternalFrame</code> and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the title for the <code>JInternalFrame</code> and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #TITLE_PROPERTY}) to all registered listeners.
*
* @param title the new title (<code>null</code> permitted).
- *
+ *
* @see #getTitle()
*/
public void setTitle(String title)
@@ -1767,7 +1767,7 @@ public class JInternalFrame extends JComponent implements Accessible,
// We must go into the init stage when updating the UI, so the UI can
// set layout and components directly on the internal frame, not its
// content pane.
- boolean old = isRootPaneCheckingEnabled();
+ boolean old = isRootPaneCheckingEnabled();
setRootPaneCheckingEnabled(false);
setUI((InternalFrameUI) UIManager.getUI(this));
setRootPaneCheckingEnabled(old);
@@ -1785,8 +1785,8 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b && ! wasIcon)
{
- wasIcon = b;
- firePropertyChange(ID, ! b, b);
+ wasIcon = b;
+ firePropertyChange(ID, ! b, b);
}
}
diff --git a/javax/swing/JLabel.java b/javax/swing/JLabel.java
index 2bbd1ee5f..72354c56e 100644
--- a/javax/swing/JLabel.java
+++ b/javax/swing/JLabel.java
@@ -78,10 +78,10 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
extends JComponent.AccessibleJComponent
implements AccessibleText, AccessibleExtendedComponent
{
-
+
/**
* Returns the accessible name.
- *
+ *
* @return The accessible name.
*/
public String getAccessibleName()
@@ -93,7 +93,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
else
return super.getAccessibleName();
}
-
+
/**
* Returns the accessible role for the <code>JLabel</code> component.
*
@@ -103,7 +103,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
return AccessibleRole.LABEL;
}
-
+
/**
* Returns the selected text. This is null since JLabels
* are not selectable.
@@ -456,7 +456,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Creates a new horizontally leading and vertically centered JLabel
+ * Creates a new horizontally leading and vertically centered JLabel
* object with no icon and the given text.
*
* @param text The text to use with the label, <code>null</code> permitted.
@@ -492,13 +492,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public JLabel(String text, Icon icon, int horizontalAlignment)
{
- if (horizontalAlignment != SwingConstants.LEFT
- && horizontalAlignment != SwingConstants.RIGHT
- && horizontalAlignment != SwingConstants.CENTER
- && horizontalAlignment != SwingConstants.LEADING
+ if (horizontalAlignment != SwingConstants.LEFT
+ && horizontalAlignment != SwingConstants.RIGHT
+ && horizontalAlignment != SwingConstants.CENTER
+ && horizontalAlignment != SwingConstants.LEADING
&& horizontalAlignment != SwingConstants.TRAILING)
throw new IllegalArgumentException();
-
+
this.text = text;
this.icon = icon;
this.horizontalAlignment = horizontalAlignment;
@@ -528,7 +528,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Resets the label's UI delegate to the default UI for the current look and
+ * Resets the label's UI delegate to the default UI for the current look and
* feel.
*/
public void updateUI()
@@ -549,7 +549,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Returns a string describing the attributes for the <code>JLabel</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
@@ -590,7 +590,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the text displayed by the label.
*
* @return The label text (possibly <code>null</code>).
- *
+ *
* @see #setText(String)
*/
public String getText()
@@ -600,11 +600,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the text for the label and sends a {@link PropertyChangeEvent} (with
- * the name 'text') to all registered listeners. This method will also
+ * the name 'text') to all registered listeners. This method will also
* update the <code>displayedMnemonicIndex</code>, if necessary.
*
* @param newText The text (<code>null</code> permitted).
- *
+ *
* @see #getText()
* @see #getDisplayedMnemonicIndex()
*/
@@ -628,11 +628,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the active icon. The active icon is painted when the label is
+ * Returns the active icon. The active icon is painted when the label is
* enabled.
*
* @return The active icon.
- *
+ *
* @see #setIcon(Icon)
* @see #getDisabledIcon()
*/
@@ -642,11 +642,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Sets the icon for the label (this is a bound property with the name
+ * Sets the icon for the label (this is a bound property with the name
* 'icon'). This icon will be displayed when the label is enabled.
*
* @param newIcon The icon (<code>null</code> permitted).
- *
+ *
* @see #getIcon()
* @see #setDisabledIcon(Icon)
*/
@@ -662,13 +662,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the disabled icon. The disabled icon is painted when the label is
+ * Returns the disabled icon. The disabled icon is painted when the label is
* disabled. If the disabled icon is <code>null</code> and the active icon
- * is an {@link ImageIcon}, this method returns a grayed version of the icon.
+ * is an {@link ImageIcon}, this method returns a grayed version of the icon.
* The grayed version of the icon becomes the <code>disabledIcon</code>.
*
* @return The disabled icon.
- *
+ *
* @see #setDisabledIcon(Icon)
*/
public Icon getDisabledIcon()
@@ -685,7 +685,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* property with the name 'disabledIcon').
*
* @param newIcon The disabled icon (<code>null</code> permitted).
- *
+ *
* @see #getDisabledIcon()
*/
public void setDisabledIcon(Icon newIcon)
@@ -700,12 +700,12 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the keycode that will be the label's mnemonic (this is a bound
- * property with the name 'displayedMnemonic'). If the label is used as a
- * label for another component, the label will give focus to that component
+ * property with the name 'displayedMnemonic'). If the label is used as a
+ * label for another component, the label will give focus to that component
* when the mnemonic is activated.
*
* @param mnemonic The keycode to use for the mnemonic.
- *
+ *
* @see #getDisplayedMnemonic()
*/
public void setDisplayedMnemonic(int mnemonic)
@@ -727,7 +727,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*
* @param mnemonic The character to use for the mnemonic (this will be
* converted to the equivalent upper case character).
- *
+ *
* @see #getDisplayedMnemonic()
*/
public void setDisplayedMnemonic(char mnemonic)
@@ -739,7 +739,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the keycode that is used for the label's mnemonic.
*
* @return The keycode that is used for the label's mnemonic.
- *
+ *
* @see #setDisplayedMnemonic(int)
*/
public int getDisplayedMnemonic()
@@ -755,7 +755,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* character 'n', you might wish to underline the second occurrence of 'n'
* rather than the first (which is the default).
* <br><br>
- * Note that this method does not validate the character at the specified
+ * Note that this method does not validate the character at the specified
* index to ensure that it matches the key code returned by
* {@link #getDisplayedMnemonic()}.
*
@@ -763,7 +763,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*
* @throws IllegalArgumentException If index less than -1 or index is greater
* than or equal to the label length.
- *
+ *
* @see #getDisplayedMnemonicIndex()
* @since 1.4
*/
@@ -790,7 +790,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* character is to be underlined.
*
* @return The index of the character that will be underlined.
- *
+ *
* @see #setDisplayedMnemonicIndex(int)
* @since 1.4
*/
@@ -800,9 +800,9 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Checks the specified key to ensure that it is valid as a horizontal
+ * Checks the specified key to ensure that it is valid as a horizontal
* alignment, throwing an {@link IllegalArgumentException} if the key is
- * invalid. Valid keys are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * invalid. Valid keys are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
*
* @param key The key to check.
@@ -823,7 +823,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Checks the specified key to ensure that it is valid as a vertical
+ * Checks the specified key to ensure that it is valid as a vertical
* alignment, throwing an {@link IllegalArgumentException} if the key is
* invalid. Valid keys are {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
*
@@ -847,7 +847,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the gap between the icon and the text.
*
* @return The gap between the icon and the text.
- *
+ *
* @see #setIconTextGap(int)
*/
public int getIconTextGap()
@@ -856,19 +856,19 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Sets the gap between the icon and the text, in the case that both are
- * visible (this is a bound property with the name 'iconTextGap').
+ * Sets the gap between the icon and the text, in the case that both are
+ * visible (this is a bound property with the name 'iconTextGap').
*
* @param newGap The gap (in pixels).
- *
+ *
* @see #getIconTextGap()
*/
public void setIconTextGap(int newGap)
{
if (iconTextGap != newGap)
{
- firePropertyChange("iconTextGap", iconTextGap, newGap);
- iconTextGap = newGap;
+ firePropertyChange("iconTextGap", iconTextGap, newGap);
+ iconTextGap = newGap;
}
}
@@ -878,7 +878,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* depends on the installed look and feel, but is usually {@link #CENTER}.
*
* @return The vertical alignment.
- *
+ *
* @see #setVerticalAlignment(int)
*/
public int getVerticalAlignment()
@@ -888,16 +888,16 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the vertical alignment for the label (this is a bound property with
- * the name 'verticalAlignment'). The vertical alignment determines where
- * the label (icon and text) will be placed vertically within the component
- * bounds. Valid alignment codes are {@link #TOP}, {@link #CENTER} and
+ * the name 'verticalAlignment'). The vertical alignment determines where
+ * the label (icon and text) will be placed vertically within the component
+ * bounds. Valid alignment codes are {@link #TOP}, {@link #CENTER} and
* {@link #BOTTOM}.
*
* @param alignment The vertical alignment of the label.
- *
- * @throws IllegalArgumentException if <code>alignment</code> is not one of
+ *
+ * @throws IllegalArgumentException if <code>alignment</code> is not one of
* the specified values.
- *
+ *
* @see #getVerticalAlignment()
*/
public void setVerticalAlignment(int alignment)
@@ -911,13 +911,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the horizontal alignment of the label (one of {@link #LEFT},
+ * Returns the horizontal alignment of the label (one of {@link #LEFT},
* {@link #CENTER}, {@link #RIGHT}, {@link #LEADING} and {@link #TRAILING}).
- * The default value depends on the installed look and feel, but is usually
+ * The default value depends on the installed look and feel, but is usually
* {@link #LEFT}.
*
* @return The horizontal alignment.
- *
+ *
* @see #setHorizontalAlignment(int)
*/
public int getHorizontalAlignment()
@@ -927,23 +927,23 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the horizontal alignment for the label (this is a bound property with
- * the name 'horizontalAlignment'). The horizontal alignment determines where
- * the label (icon and text) will be placed horizontally within the
- * component bounds. Valid alignment codes are {@link #LEFT},
+ * the name 'horizontalAlignment'). The horizontal alignment determines where
+ * the label (icon and text) will be placed horizontally within the
+ * component bounds. Valid alignment codes are {@link #LEFT},
* {@link #CENTER}, {@link #RIGHT}, {@link #LEADING} and {@link #TRAILING}.
*
* @param alignment The horizontal alignment of the label.
- *
- * @throws IllegalArgumentException if <code>alignment</code> is not one of
+ *
+ * @throws IllegalArgumentException if <code>alignment</code> is not one of
* the specified values.
- *
+ *
* @see #getHorizontalAlignment()
*/
public void setHorizontalAlignment(int alignment)
{
if (horizontalAlignment == alignment)
return;
-
+
int oldAlignment = horizontalAlignment;
horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment");
firePropertyChange("horizontalAlignment", oldAlignment,
@@ -951,11 +951,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the vertical position of the label's text relative to the icon.
+ * Returns the vertical position of the label's text relative to the icon.
* This will be one of {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
- *
+ *
* @return The vertical position of the label's text relative to the icon.
- *
+ *
* @see #setVerticalTextPosition(int)
*/
public int getVerticalTextPosition()
@@ -965,11 +965,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the vertical position of the label's text relative to the icon (this
- * is a bound property with the name 'verticalTextPosition'). Valid
+ * is a bound property with the name 'verticalTextPosition'). Valid
* positions are {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
*
* @param textPosition The vertical text position.
- *
+ *
* @throws IllegalArgumentException if <code>textPosition</code> is not one
* of the specified values.
*/
@@ -979,19 +979,19 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
int oldPos = verticalTextPosition;
verticalTextPosition = checkVerticalKey(textPosition,
- "verticalTextPosition");
- firePropertyChange("verticalTextPosition", oldPos,
+ "verticalTextPosition");
+ firePropertyChange("verticalTextPosition", oldPos,
verticalTextPosition);
}
}
/**
- * Returns the horizontal position of the label's text relative to the icon.
- * This will be one of {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * Returns the horizontal position of the label's text relative to the icon.
+ * This will be one of {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
- *
+ *
* @return The horizontal position of the label's text relative to the icon.
- *
+ *
* @see #setHorizontalTextPosition(int)
*/
public int getHorizontalTextPosition()
@@ -1001,12 +1001,12 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the horizontal position of the label's text relative to the icon (this
- * is a bound property with the name 'horizontalTextPosition'). Valid
- * positions are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * is a bound property with the name 'horizontalTextPosition'). Valid
+ * positions are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
*
* @param textPosition The horizontal text position.
- *
+ *
* @throws IllegalArgumentException if <code>textPosition</code> is not one
* of the specified values.
*/
@@ -1017,13 +1017,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldPos = horizontalTextPosition;
horizontalTextPosition = checkHorizontalKey(textPosition,
"horizontalTextPosition");
- firePropertyChange("horizontalTextPosition", oldPos,
+ firePropertyChange("horizontalTextPosition", oldPos,
horizontalTextPosition);
}
}
/**
- * Returns false if the current icon image (current icon will depend on
+ * Returns false if the current icon image (current icon will depend on
* whether the label is enabled) is not equal to the passed in image.
*
* @param img The image to check.
@@ -1050,7 +1050,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Returns the component that this <code>JLabel</code> is providing the label
- * for. This component will typically receive the focus when the label's
+ * for. This component will typically receive the focus when the label's
* mnemonic key is activated via the keyboard.
*
* @return The component (possibly <code>null</code>).
@@ -1063,11 +1063,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the component that this <code>JLabel</code> is providing the label
* for (this is a bound property with the name 'labelFor'). This component
- * will typically receive the focus when the label's mnemonic key is
+ * will typically receive the focus when the label's mnemonic key is
* activated via the keyboard.
*
* @param c the component (<code>null</code> permitted).
- *
+ *
* @see #getLabelFor()
*/
public void setLabelFor(Component c)
diff --git a/javax/swing/JLayeredPane.java b/javax/swing/JLayeredPane.java
index d981788ec..9a4e31efe 100644
--- a/javax/swing/JLayeredPane.java
+++ b/javax/swing/JLayeredPane.java
@@ -1,4 +1,4 @@
-/* JLayeredPane.java --
+/* JLayeredPane.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -85,7 +85,7 @@ import javax.accessibility.AccessibleRole;
* </p>
*
* <p>To change the layer of a component that is already a child of
- * a <code>JLayeredPane</code>, use the {@link #setLayer(Component, int)}
+ * a <code>JLayeredPane</code>, use the {@link #setLayer(Component, int)}
* method.</p>
*
* <p>The purpose of this class is to translate this view of "layers" into a
@@ -94,9 +94,9 @@ import javax.accessibility.AccessibleRole;
*
* <p>There is a precise set of words we will use to refer to numbers within
* this class:</p>
- *
+ *
* <dl>
- * <dt>Component Index:</dt>
+ * <dt>Component Index:</dt>
* <dd>An offset into the <code>component</code> array held in our ancestor,
* {@link java.awt.Container}, from <code>[0 .. component.length)</code>. The drawing
* rule with indices is that 0 is drawn last.</dd>
@@ -106,7 +106,7 @@ import javax.accessibility.AccessibleRole;
* numbers are drawn first, then layer 0, then positive numbered layers, in
* ascending order.</dd>
*
- * <dt>Position:</dt>
+ * <dt>Position:</dt>
* <dd>An offset into a layer's "logical drawing order". Layer position 0
* is drawn last. Layer position -1 is a synonym for the first layer
* position (the logical "bottom").</dd>
@@ -120,7 +120,7 @@ import javax.accessibility.AccessibleRole;
*/
public class JLayeredPane extends JComponent implements Accessible
{
-
+
/**
* Provides accessibility support for <code>JLayeredPane</code>.
*/
@@ -136,7 +136,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Returns the accessble role of <code>JLayeredPane</code>,
- * {@link AccessibleRole#LAYERED_PANE}.
+ * {@link AccessibleRole#LAYERED_PANE}.
*/
public AccessibleRole getAccessibleRole()
{
@@ -145,7 +145,7 @@ public class JLayeredPane extends JComponent implements Accessible
}
private static final long serialVersionUID = 5534920399324590459L;
-
+
public static final String LAYER_PROPERTY = "layeredContainerLayer";
public static final Integer FRAME_CONTENT_LAYER = new Integer(-30000);
@@ -164,7 +164,7 @@ public class JLayeredPane extends JComponent implements Accessible
setLayout(null);
}
- /**
+ /**
* Looks up the layer a child component is currently assigned to.
*
* If <code>c</code> is an instance of {@link JComponent}, then the layer
@@ -199,7 +199,7 @@ public class JLayeredPane extends JComponent implements Accessible
* Looks up the layer in the client property with the key
* {@link #LAYER_PROPERTY} of <code>comp</code>. If no such property can be
* found, we return <code>0</code> ({@link #DEFAULT_LAYER}).
- *
+ *
* @param comp the component for which the layer is looked up
*
* @return the layer of <code>comp</code> as stored in the corresponding
@@ -313,7 +313,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Return the position of a component within its layer. Positions are assigned
- * from the "front" (position 0) to the "back" (position N-1), and drawn from
+ * from the "front" (position 0) to the "back" (position N-1), and drawn from
* the back towards the front.
*
* @param c the component to get the position of
@@ -344,7 +344,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Change the position of a component within its layer. Positions are assigned
- * from the "front" (position 0) to the "back" (position N-1), and drawn from
+ * from the "front" (position 0) to the "back" (position N-1), and drawn from
* the back towards the front.
*
* @param c the component to change the position of
@@ -356,7 +356,7 @@ public class JLayeredPane extends JComponent implements Accessible
{
setLayer(c, getLayer(c), position);
}
-
+
/**
* Return an array of all components within a layer of this
* container. Components are ordered front-to-back, with the "front"
@@ -420,9 +420,9 @@ public class JLayeredPane extends JComponent implements Accessible
* @param c the component to look up.
*
* @return the external index of the component or <code>-1</code> if
- * <code>c</code> is not a child of this layered pane
+ * <code>c</code> is not a child of this layered pane
*/
- public int getIndexOf(Component c)
+ public int getIndexOf(Component c)
{
return getComponentZOrder(c);
}
@@ -439,28 +439,28 @@ public class JLayeredPane extends JComponent implements Accessible
protected Integer getObjectForLayer(int layer)
{
switch (layer)
- {
- case -30000:
+ {
+ case -30000:
return FRAME_CONTENT_LAYER;
- case 0:
+ case 0:
return DEFAULT_LAYER;
- case 100:
+ case 100:
return PALETTE_LAYER;
- case 200:
+ case 200:
return MODAL_LAYER;
- case 300:
+ case 300:
return POPUP_LAYER;
- case 400:
+ case 400:
return DRAG_LAYER;
- default:
+ default:
break;
- }
+ }
return new Integer(layer);
}
@@ -579,8 +579,8 @@ public class JLayeredPane extends JComponent implements Accessible
*/
public void removeAll()
{
- componentToLayer.clear();
- super.removeAll();
+ componentToLayer.clear();
+ super.removeAll();
}
/**
@@ -650,7 +650,7 @@ public class JLayeredPane extends JComponent implements Accessible
* component to
* @param index the position within the layer
*/
- protected void addImpl(Component comp, Object layerConstraint, int index)
+ protected void addImpl(Component comp, Object layerConstraint, int index)
{
int layer;
if (layerConstraint != null && layerConstraint instanceof Integer)
@@ -726,14 +726,14 @@ public class JLayeredPane extends JComponent implements Accessible
boolean result = true;
for (int i = 0; i < numChildren; ++i)
{
- Component c1 = getComponent(i);
- if (! c1.isVisible())
+ Component c1 = getComponent(i);
+ if (! c1.isVisible())
continue;
- Rectangle r1 = c1.getBounds();
- if (r1.isEmpty())
+ Rectangle r1 = c1.getBounds();
+ if (r1.isEmpty())
continue;
- for (int j = i + 1; j < numChildren; ++j)
+ for (int j = i + 1; j < numChildren; ++j)
{
Component c2 = getComponent(j);
if (! c2.isVisible())
diff --git a/javax/swing/JList.java b/javax/swing/JList.java
index bd744064c..b12fda365 100644
--- a/javax/swing/JList.java
+++ b/javax/swing/JList.java
@@ -115,7 +115,7 @@ import javax.swing.text.Position;
* <tr><td>UIClassID </td><td>list </td><td>no </td></tr>
* <tr><td>valueIsAdjusting </td><td>list </td><td>no </td></tr>
* <tr><td>visibleRowCount </td><td>list </td><td>no </td></tr>
- * </table>
+ * </table>
*
* @author Graydon Hoare (graydon@redhat.com)
*/
@@ -277,7 +277,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the font metrics for the specified font. This method forwards
- * to the parent <code>JList</code>.
+ * to the parent <code>JList</code>.
*
* @param font the font for which the font metrics is queried
*
@@ -539,7 +539,7 @@ public class JList extends JComponent implements Accessible, Scrollable
// selectable. Is there a way to disable single children?
if (parent.isEnabled())
states.add(AccessibleState.SELECTABLE);
-
+
if (parent.isSelectedIndex(listIndex))
states.add(AccessibleState.SELECTED);
@@ -613,10 +613,10 @@ public class JList extends JComponent implements Accessible, Scrollable
{
// Do nothing here.
}
-
+
// TODO: Implement the remaining methods of this class.
}
-
+
/**
* Create a new AccessibleJList.
*/
@@ -854,23 +854,23 @@ public class JList extends JComponent implements Accessible, Scrollable
private static final long serialVersionUID = 4406629526391098046L;
- /**
+ /**
* Constant value used in "layoutOrientation" property. This value means
- * that cells are laid out in a single vertical column. This is the default.
+ * that cells are laid out in a single vertical column. This is the default.
*/
public static final int VERTICAL = 0;
- /**
+ /**
* Constant value used in "layoutOrientation" property. This value means
* that cells are laid out in multiple columns "newspaper style", filling
- * vertically first, then horizontally.
+ * vertically first, then horizontally.
*/
public static final int VERTICAL_WRAP = 1;
-
- /**
+
+ /**
* Constant value used in "layoutOrientation" property. This value means
* that cells are laid out in multiple columns "newspaper style",
- * filling horizontally first, then vertically.
+ * filling horizontally first, then vertically.
*/
public static final int HORIZONTAL_WRAP = 2;
@@ -890,7 +890,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* the {@link #prototypeCellValue} property.
*/
int fixedCellWidth;
-
+
/**
* This property indicates an fixed height to assign to all cells in the
* list. If its value is <code>-1</code>, no height has been
@@ -899,13 +899,13 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
int fixedCellHeight;
- /**
+ /**
* This property holds the current layout orientation of the list, which
* is one of the integer constants {@link #VERTICAL}, {@link
- * #VERTICAL_WRAP}, or {@link #HORIZONTAL_WRAP}.
+ * #VERTICAL_WRAP}, or {@link #HORIZONTAL_WRAP}.
*/
int layoutOrientation;
-
+
/** This property holds the data elements displayed by the list. */
ListModel model;
@@ -923,7 +923,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Object prototypeCellValue;
- /**
+ /**
* This property specifies a foreground color for the selected cells in
* the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
@@ -931,7 +931,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Color selectionBackground;
- /**
+ /**
* This property specifies a background color for the selected cells in
* the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
@@ -939,14 +939,14 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Color selectionForeground;
- /**
+ /**
* This property holds a description of which data elements in the {@link
* #model} property should be considered "selected", when displaying and
* interacting with the list.
*/
ListSelectionModel selectionModel;
- /**
+ /**
* This property indicates a <em>preference</em> for the number of rows
* displayed in the list, and will scale the
* {@link #getPreferredScrollableViewportSize} property accordingly. The actual
@@ -956,18 +956,18 @@ public class JList extends JComponent implements Accessible, Scrollable
int visibleRowCount;
/**
- * Fire a {@link ListSelectionEvent} to all the registered
+ * Fire a {@link ListSelectionEvent} to all the registered
* ListSelectionListeners.
- *
+ *
* @param firstIndex the lowest index covering the selection change.
* @param lastIndex the highest index covering the selection change.
* @param isAdjusting a flag indicating if this event is one in a series
* of events updating the selection.
*/
- protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
- boolean isAdjusting)
+ protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
+ boolean isAdjusting)
{
- ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
+ ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
lastIndex, isAdjusting);
ListSelectionListener listeners[] = getListSelectionListeners();
for (int i = 0; i < listeners.length; ++i)
@@ -984,7 +984,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* class receives either type of event, it triggers repainting of the
* list.
*/
- private class ListListener
+ private class ListListener
implements ListSelectionListener, ListDataListener
{
// ListDataListener events
@@ -1013,7 +1013,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
}
- /**
+ /**
* Shared ListListener instance, subscribed to both the current {@link
* #model} and {@link #selectionModel} properties of the list.
*/
@@ -1053,8 +1053,8 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @param model a model containing the list items (<code>null</code> not
* permitted).
- *
- * @throws IllegalArgumentException if <code>model</code> is
+ *
+ * @throws IllegalArgumentException if <code>model</code> is
* <code>null</code>.
*/
public JList(ListModel model)
@@ -1093,7 +1093,7 @@ public class JList extends JComponent implements Accessible, Scrollable
(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
setLayout(null);
-
+
updateUI();
}
@@ -1106,15 +1106,15 @@ public class JList extends JComponent implements Accessible, Scrollable
{
return new DefaultListSelectionModel();
}
-
+
/**
* Gets the value of the {@link #fixedCellHeight} property. This property
* may be <code>-1</code> to indicate that no cell height has been
* set. This property is also set implicitly when the
* {@link #prototypeCellValue} property is set.
*
- * @return The current value of the property
- *
+ * @return The current value of the property
+ *
* @see #fixedCellHeight
* @see #setFixedCellHeight
* @see #setPrototypeCellValue
@@ -1132,7 +1132,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* overrides the height computed from {@link #prototypeCellValue}.
*
* @param h the height.
- *
+ *
* @see #getFixedCellHeight
* @see #getPrototypeCellValue
*/
@@ -1153,8 +1153,8 @@ public class JList extends JComponent implements Accessible, Scrollable
* set. This property is also set implicitly when the {@link
* #prototypeCellValue} property is set.
*
- * @return The current value of the property
- *
+ * @return The current value of the property
+ *
* @see #setFixedCellWidth
* @see #setPrototypeCellValue
*/
@@ -1171,7 +1171,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* overrides the width computed from {@link #prototypeCellValue}.
*
* @param w the width.
- *
+ *
* @see #getFixedCellHeight
* @see #getPrototypeCellValue
*/
@@ -1179,18 +1179,18 @@ public class JList extends JComponent implements Accessible, Scrollable
{
if (fixedCellWidth == w)
return;
-
+
int old = fixedCellWidth;
fixedCellWidth = w;
firePropertyChange("fixedCellWidth", old, w);
}
- /**
- * Gets the value of the {@link #visibleRowCount} property. The default
+ /**
+ * Gets the value of the {@link #visibleRowCount} property. The default
* value is 8.
*
* @return the current value of the property.
- *
+ *
* @see #setVisibleRowCount(int)
*/
public int getVisibleRowCount()
@@ -1199,10 +1199,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Sets the value of the {@link #visibleRowCount} property.
+ * Sets the value of the {@link #visibleRowCount} property.
*
* @param vc The new property value
- *
+ *
* @see #getVisibleRowCount()
*/
public void setVisibleRowCount(int vc)
@@ -1245,7 +1245,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns an array of all ListSelectionListeners subscribed to this
- * list.
+ * list.
*
* @return The current subscribed listeners
*
@@ -1257,20 +1257,20 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the selection mode for the list (one of:
- * {@link ListSelectionModel#SINGLE_SELECTION},
- * {@link ListSelectionModel#SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode for the list (one of:
+ * {@link ListSelectionModel#SINGLE_SELECTION},
+ * {@link ListSelectionModel#SINGLE_INTERVAL_SELECTION} and
* {@link ListSelectionModel#MULTIPLE_INTERVAL_SELECTION}).
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
public int getSelectionMode()
{
return selectionModel.getSelectionMode();
}
-
+
/**
* Sets the list's "selectionMode" property, which simply mirrors the
* same property on the list's {@link #selectionModel} property. This
@@ -1290,7 +1290,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Adds the interval <code>[a,a]</code> to the set of selections managed
* by this list's {@link #selectionModel} property. Depending on the
* selection mode, this may cause existing selections to become invalid,
- * or may simply expand the set of selections.
+ * or may simply expand the set of selections.
*
* @param a A number in the half-open range <code>[0, x)</code> where
* <code>x = getModel.getSize()</code>, indicating the index of an
@@ -1312,7 +1312,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* <code>a</code>, calls {@link #setSelectedIndex} on <code>a[i]</code>.
*
* @param a an array of selected indices (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
* @see #setSelectionMode
* @see #selectionModel
@@ -1339,7 +1339,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns <code>true</code> if the model's selection is empty, otherwise
- * <code>false</code>.
+ * <code>false</code>.
*
* @return The return value of {@link ListSelectionModel#isSelectionEmpty}
*/
@@ -1362,7 +1362,7 @@ public class JList extends JComponent implements Accessible, Scrollable
Rectangle r = getVisibleRect();
if (or == ComponentOrientation.RIGHT_TO_LEFT)
r.translate((int) r.getWidth() - 1, 0);
- return getUI().locationToIndex(this, r.getLocation());
+ return getUI().locationToIndex(this, r.getLocation());
}
@@ -1373,18 +1373,18 @@ public class JList extends JComponent implements Accessible, Scrollable
* <code>-1</code> is returned.
*
* @param location for which to look for in the list
- *
+ *
* @return index of the cell to which specified location is closest to.
*/
public int locationToIndex(Point location)
{
- return getUI().locationToIndex(this, location);
+ return getUI().locationToIndex(this, location);
}
/**
* Returns location of the cell located at the specified index in the list.
* @param index of the cell for which location will be determined
- *
+ *
* @return location of the cell located at the specified index in the list.
*/
public Point indexToLocation(int index)
@@ -1443,7 +1443,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Indicates whether the list element at a given index value is
* currently selected.
*
- * @param a The index to check
+ * @param a The index to check
* @return <code>true</code> if <code>a</code> is the index of a selected
* list element
*/
@@ -1476,7 +1476,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns all the values in the list's {@link #model} property which are
* selected, according to the list's {@link #selectionModel} property.
- *
+ *
* @return An array containing all the selected values
* @see #setSelectedValue
*/
@@ -1524,7 +1524,7 @@ public class JList extends JComponent implements Accessible, Scrollable
{
return selectionForeground;
}
-
+
/**
* Sets the value of the {@link #selectionForeground} property.
*
@@ -1542,7 +1542,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the selection to cover only the specified value, if it
- * exists in the model.
+ * exists in the model.
*
* @param obj The object to select
* @param scroll Whether to scroll the list to make the newly selected
@@ -1595,9 +1595,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns a {@link ListModel} backed by the specified array.
- *
+ *
* @param items the list items (don't use <code>null</code>).
- *
+ *
* @return A list model containing the specified items.
*/
private ListModel createListModel(final Object[] items)
@@ -1614,12 +1614,12 @@ public class JList extends JComponent implements Accessible, Scrollable
}
};
}
-
+
/**
* Returns a {@link ListModel} backed by the specified vector.
- *
+ *
* @param items the list items (don't use <code>null</code>).
- *
+ *
* @return A list model containing the specified items.
*/
private ListModel createListModel(final Vector items)
@@ -1649,20 +1649,20 @@ public class JList extends JComponent implements Accessible, Scrollable
{
setModel(new AbstractListModel()
{
- public int getSize()
- {
- return listData.size();
- }
-
- public Object getElementAt(int i)
- {
- return listData.elementAt(i);
- }
+ public int getSize()
+ {
+ return listData.size();
+ }
+
+ public Object getElementAt(int i)
+ {
+ return listData.elementAt(i);
+ }
});
}
/**
- * Gets the value of the {@link #cellRenderer} property.
+ * Gets the value of the {@link #cellRenderer} property.
*
* @return The current value of the property
*/
@@ -1680,7 +1680,7 @@ public class JList extends JComponent implements Accessible, Scrollable
{
if (cellRenderer == renderer)
return;
-
+
ListCellRenderer old = cellRenderer;
cellRenderer = renderer;
firePropertyChange("cellRenderer", old, renderer);
@@ -1689,7 +1689,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Gets the value of the {@link #model} property.
+ * Gets the value of the {@link #model} property.
*
* @return The current value of the property
*/
@@ -1704,26 +1704,26 @@ public class JList extends JComponent implements Accessible, Scrollable
* and re-subscribed to the new model.
*
* @param model the new model (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>model</code> is
+ *
+ * @throws IllegalArgumentException if <code>model</code> is
* <code>null</code>.
*/
public void setModel(ListModel model)
{
- if (model == null)
+ if (model == null)
throw new IllegalArgumentException("Null 'model' argument.");
if (this.model == model)
return;
-
+
if (this.model != null)
this.model.removeListDataListener(listListener);
-
+
ListModel old = this.model;
this.model = model;
-
+
if (this.model != null)
this.model.addListDataListener(listListener);
-
+
firePropertyChange("model", old, model);
revalidate();
repaint();
@@ -1741,7 +1741,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* <li>{@link #setSelectedIndices(int[])};</li>
* <li>{@link #setSelectionInterval(int, int)}.</li>
* </ul>
- *
+ *
* @return The selection model.
*/
public ListSelectionModel getSelectionModel()
@@ -1760,16 +1760,16 @@ public class JList extends JComponent implements Accessible, Scrollable
{
if (selectionModel == model)
return;
-
+
if (selectionModel != null)
selectionModel.removeListSelectionListener(listListener);
-
+
ListSelectionModel old = selectionModel;
selectionModel = model;
-
+
if (selectionModel != null)
selectionModel.addListSelectionListener(listListener);
-
+
firePropertyChange("selectionModel", old, model);
revalidate();
repaint();
@@ -1855,7 +1855,7 @@ public class JList extends JComponent implements Accessible, Scrollable
Object old = prototypeCellValue;
Component comp = getCellRenderer()
- .getListCellRendererComponent(this, obj, 0, false, false);
+ .getListCellRendererComponent(this, obj, 0, false, false);
Dimension d = comp.getPreferredSize();
fixedCellWidth = d.width;
fixedCellHeight = d.height;
@@ -1878,19 +1878,19 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
public Dimension getPreferredScrollableViewportSize()
{
- //If the layout orientation is not VERTICAL, then this will
- //return the value from getPreferredSize. The current ListUI is
+ //If the layout orientation is not VERTICAL, then this will
+ //return the value from getPreferredSize. The current ListUI is
//expected to override getPreferredSize to return an appropriate value.
if (getLayoutOrientation() != VERTICAL)
- return getPreferredSize();
+ return getPreferredSize();
int size = getModel().getSize();
-
- // Trivial case: if fixedCellWidth and fixedCellHeight were set
+
+ // Trivial case: if fixedCellWidth and fixedCellHeight were set
// just use them
if (fixedCellHeight != -1 && fixedCellWidth != -1)
return new Dimension(fixedCellWidth, size * fixedCellHeight);
-
+
// If the model is empty we use 16 * the number of visible rows
// for the height and either fixedCellWidth (if set) or 256
// for the width
@@ -1935,7 +1935,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* <p>If the provided orientation is <code>HORIZONTAL</code>, the above
* comments refer to "rightwards" for positive direction, and "leftwards"
* for negative.</p>
- *
+ *
*
* @param visibleRect The rectangle to scroll an element into
* @param orientation One of the numeric consants <code>VERTICAL</code>
@@ -2031,7 +2031,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* <p>If the provided orientation is <code>HORIZONTAL</code>, the above
* comments refer to "rightwards" for positive direction, and "leftwards"
* for negative.</p>
- *
+ *
*
* @param visibleRect The rectangle to scroll an element into
* @param orientation One of the numeric consants <code>VERTICAL</code>
@@ -2213,7 +2213,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the index of the anchor item in the current selection, or
* <code>-1</code> if there is no anchor item.
- *
+ *
* @return The item index.
*/
public int getAnchorSelectionIndex()
@@ -2224,7 +2224,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the index of the lead item in the current selection, or
* <code>-1</code> if there is no lead item.
- *
+ *
* @return The item index.
*/
public int getLeadSelectionIndex()
@@ -2235,9 +2235,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the lowest item index in the current selection, or <code>-1</code>
* if there is no selection.
- *
+ *
* @return The index.
- *
+ *
* @see #getMaxSelectionIndex()
*/
public int getMinSelectionIndex()
@@ -2246,11 +2246,11 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the highest item index in the current selection, or
+ * Returns the highest item index in the current selection, or
* <code>-1</code> if there is no selection.
- *
+ *
* @return The index.
- *
+ *
* @see #getMinSelectionIndex()
*/
public int getMaxSelectionIndex()
@@ -2268,9 +2268,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the current selection to the items in the specified range (inclusive).
- * Note that <code>anchor</code> can be less than, equal to, or greater than
+ * Note that <code>anchor</code> can be less than, equal to, or greater than
* <code>lead</code>.
- *
+ *
* @param anchor the index of the anchor item.
* @param lead the index of the anchor item.
*/
@@ -2280,10 +2280,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Adds the specified interval to the current selection. Note that
- * <code>anchor</code> can be less than, equal to, or greater than
+ * Adds the specified interval to the current selection. Note that
+ * <code>anchor</code> can be less than, equal to, or greater than
* <code>lead</code>.
- *
+ *
* @param anchor the index of the anchor item.
* @param lead the index of the lead item.
*/
@@ -2293,10 +2293,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Removes the specified interval from the current selection. Note that
- * <code>index0</code> can be less than, equal to, or greater than
+ * Removes the specified interval from the current selection. Note that
+ * <code>index0</code> can be less than, equal to, or greater than
* <code>index1</code>.
- *
+ *
* @param index0 an index for one end of the range.
* @param index1 an index for the other end of the range.
*/
@@ -2317,7 +2317,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Sets the <code>valueIsAdjusting</code> flag in the list's selection
+ * Sets the <code>valueIsAdjusting</code> flag in the list's selection
* model.
*
* @param isAdjusting the new value
@@ -2331,7 +2331,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Return the value of the <code>dragEnabled</code> property.
*
* @return the value
- *
+ *
* @since 1.4
*/
public boolean getDragEnabled()
@@ -2343,7 +2343,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Set the <code>dragEnabled</code> property.
*
* @param enabled new value
- *
+ *
* @since 1.4
*/
public void setDragEnabled(boolean enabled)
@@ -2352,7 +2352,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the layout orientation, which will be one of {@link #VERTICAL},
+ * Returns the layout orientation, which will be one of {@link #VERTICAL},
* {@link #VERTICAL_WRAP} and {@link #HORIZONTAL_WRAP}. The default value
* is {@link #VERTICAL}.
*
@@ -2368,7 +2368,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the layout orientation (this is a bound property with the name
- * 'layoutOrientation'). Valid orientations are {@link #VERTICAL},
+ * 'layoutOrientation'). Valid orientations are {@link #VERTICAL},
* {@link #VERTICAL_WRAP} and {@link #HORIZONTAL_WRAP}.
*
* @param orientation the orientation.
@@ -2414,7 +2414,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the index of the next list element (beginning at
+ * Returns the index of the next list element (beginning at
* <code>startIndex</code> and moving in the specified direction through the
* list, looping around if necessary) that starts with <code>prefix</code>
* (ignoring case).
@@ -2433,7 +2433,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @since 1.4
*/
- public int getNextMatch(String prefix, int startIndex,
+ public int getNextMatch(String prefix, int startIndex,
Position.Bias direction)
{
if (prefix == null)
@@ -2455,7 +2455,7 @@ public class JList extends JComponent implements Accessible, Scrollable
int itemCount = model.getSize();
boolean finished = false;
prefix = prefix.toUpperCase();
-
+
if (direction == Position.Bias.Forward)
delta = 1;
while (!finished)
@@ -2467,15 +2467,15 @@ public class JList extends JComponent implements Accessible, Scrollable
if (current == -1)
current += itemCount;
else
- current = current % itemCount;
+ current = current % itemCount;
finished = current == startIndex;
}
return result;
}
-
+
/**
* Returns a string describing the attributes for the <code>JList</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
diff --git a/javax/swing/JMenu.java b/javax/swing/JMenu.java
index 7e627f118..e715ff98d 100644
--- a/javax/swing/JMenu.java
+++ b/javax/swing/JMenu.java
@@ -74,7 +74,7 @@ import javax.swing.plaf.MenuItemUI;
* <p>
* JMenu's fires MenuEvents when this menu's selection changes. If this menu
* is selected, then fireMenuSelectedEvent() is invoked. In case when menu is
- * deselected or cancelled, then fireMenuDeselectedEvent() or
+ * deselected or cancelled, then fireMenuDeselectedEvent() or
* fireMenuCancelledEvent() is invoked, respectivelly.
* </p>
*/
@@ -156,7 +156,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
public JMenu(String text)
{
super(text);
- popupMenu = new JPopupMenu();
+ popupMenu = new JPopupMenu();
popupMenu.setInvoker(this);
setOpaque(false);
}
@@ -274,7 +274,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
{
if (index < 0 || (index > 0 && getMenuComponentCount() == 0))
throw new IllegalArgumentException();
-
+
if (getMenuComponentCount() > 0)
popupMenu.remove(index);
}
@@ -445,7 +445,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
/**
* Returns origin point of the popup menu. This takes the screen bounds
- * into account and places the popup where it fits best.
+ * into account and places the popup where it fits best.
*
* @return the origin of the popup menu
*/
@@ -459,7 +459,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
JPopupMenu popup = getPopupMenu();
Dimension popupSize = popup.getSize();
if (popupSize.width == 0 || popupSize.height == 0)
- popupSize = popup.getPreferredSize();
+ popupSize = popup.getPreferredSize();
// Determine screen bounds.
Toolkit tk = Toolkit.getDefaultToolkit();
@@ -652,7 +652,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
if (getItemCount() == 0)
return null;
-
+
Component c = popupMenu.getComponentAtIndex(index);
if (c instanceof JMenuItem)
@@ -680,7 +680,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
public boolean isTearOff()
{
- // NOT YET IMPLEMENTED
+ // NOT YET IMPLEMENTED
throw new Error("The method isTearOff() has not yet been implemented.");
}
@@ -706,7 +706,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
{
if (getPopupMenu() == null || getMenuComponentCount() == 0)
return null;
-
+
return popupMenu.getComponentAtIndex(index);
}
@@ -784,7 +784,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
* Returns all registered <code>MenuListener</code> objects.
*
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public MenuListener[] getMenuListeners()
@@ -853,7 +853,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
public void menuSelectionChanged(boolean changed)
{
- // if this menu selection is true, then activate this menu and
+ // if this menu selection is true, then activate this menu and
// display popup associated with this menu
setSelected(changed);
}
@@ -910,11 +910,11 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
getModel().setPressed(true);
try
{
- java.lang.Thread.sleep(time);
+ java.lang.Thread.sleep(time);
}
catch (java.lang.InterruptedException e)
{
- // probably harmless
+ // probably harmless
}
getModel().setPressed(false);
@@ -1237,7 +1237,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
Action a = menuItem.getAction();
if (a != null)
- a.addPropertyChangeListener(this);
+ a.addPropertyChangeListener(this);
}
/**This method is invoked when some change occures in menuItem's action*/
diff --git a/javax/swing/JMenuBar.java b/javax/swing/JMenuBar.java
index 030fc4cb8..1c5a448a0 100644
--- a/javax/swing/JMenuBar.java
+++ b/javax/swing/JMenuBar.java
@@ -61,14 +61,14 @@ import javax.swing.border.Border;
* components to container, one can use add() to add menu's to the menu bar.
* Menu's will be displayed in the menu bar in the order they were added.
* The JMenuBar uses selectionModel to keep track of selected menu index.
- * JMenuBar's selectionModel will fire ChangeEvents to its registered
+ * JMenuBar's selectionModel will fire ChangeEvents to its registered
* listeners when the selected index changes.
*/
public class JMenuBar extends JComponent implements Accessible, MenuElement
{
/**
* Provides accessibility support for <code>JMenuBar</code>.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
protected class AccessibleJMenuBar extends AccessibleJComponent
@@ -289,11 +289,11 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
for (int i = 0; i < comps.length; i++)
{
- if (comps[i].equals(c))
- {
- index = i;
- break;
- }
+ if (comps[i].equals(c))
+ {
+ index = i;
+ break;
+ }
}
return index;
@@ -306,18 +306,18 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
*/
public JMenu getHelpMenu()
{
- // the following error matches the behaviour of the reference
+ // the following error matches the behaviour of the reference
// implementation...
throw new Error("getHelpMenu() is not implemented");
}
/**
* Returns the margin between the menu bar's border and its menus. If the
- * margin is <code>null</code>, this method returns
+ * margin is <code>null</code>, this method returns
* <code>new Insets(0, 0, 0, 0)</code>.
*
* @return The margin (never <code>null</code>).
- *
+ *
* @see #setMargin(Insets)
*/
public Insets getMargin()
@@ -508,14 +508,14 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
}
/**
- * This method overrides JComponent.processKeyBinding to allow the
- * JMenuBar to check all the child components (recursiveley) to see
+ * This method overrides JComponent.processKeyBinding to allow the
+ * JMenuBar to check all the child components (recursiveley) to see
* if they'll consume the event.
- *
+ *
* @param ks the KeyStroke for the event
* @param e the KeyEvent for the event
* @param condition the focus condition for the binding
- * @param pressed true if the key is pressed
+ * @param pressed true if the key is pressed
*/
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition,
boolean pressed)
@@ -523,19 +523,19 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
// See if the regular JComponent behavior consumes the event
if (super.processKeyBinding(ks, e, condition, pressed))
return true;
-
- // If not, have to recursively check all the child menu elements to see
- // if they want it
+
+ // If not, have to recursively check all the child menu elements to see
+ // if they want it
MenuElement[] children = getSubElements();
for (int i = 0; i < children.length; i++)
if (processKeyBindingHelper(children[i], ks, e, condition, pressed))
return true;
return false;
}
-
+
/**
* This is a helper method to recursively check the children of this
- * JMenuBar to see if they will consume a key event via key bindings.
+ * JMenuBar to see if they will consume a key event via key bindings.
* This is used for menu accelerators.
* @param menuElement the menuElement to check (and check all its children)
* @param ks the KeyStroke for the event
@@ -558,7 +558,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
&& ((JComponent) menuElement).processKeyBinding(ks, e, condition,
pressed))
return true;
-
+
// If that didn't consume it, check all the children recursively
MenuElement[] children = menuElement.getSubElements();
for (int i = 0; i < children.length; i++)
@@ -566,7 +566,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
return true;
return false;
}
-
+
/**
* Process mouse events forwarded from MenuSelectionManager. This method
* doesn't do anything. It is here to conform to the MenuElement interface.
@@ -602,11 +602,11 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
{
if (b != borderPainted)
{
- boolean old = borderPainted;
- borderPainted = b;
- firePropertyChange("borderPainted", old, b);
- revalidate();
- repaint();
+ boolean old = borderPainted;
+ borderPainted = b;
+ firePropertyChange("borderPainted", old, b);
+ revalidate();
+ repaint();
}
}
@@ -629,7 +629,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
* bound property with the name 'margin').
*
* @param m the margin (<code>null</code> permitted).
- *
+ *
* @see #getMargin()
*/
public void setMargin(Insets m)
@@ -664,9 +664,9 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
{
if (selectionModel != model)
{
- SingleSelectionModel oldModel = selectionModel;
- selectionModel = model;
- firePropertyChange("model", oldModel, selectionModel);
+ SingleSelectionModel oldModel = selectionModel;
+ selectionModel = model;
+ firePropertyChange("model", oldModel, selectionModel);
}
}
diff --git a/javax/swing/JMenuItem.java b/javax/swing/JMenuItem.java
index ffdccdcef..fea3166a9 100644
--- a/javax/swing/JMenuItem.java
+++ b/javax/swing/JMenuItem.java
@@ -123,20 +123,20 @@ public class JMenuItem extends AbstractButton implements Accessible,
init(null, null);
if (action != null)
{
- String name = (String) action.getValue(Action.NAME);
- if (name != null)
+ String name = (String) action.getValue(Action.NAME);
+ if (name != null)
setName(name);
- KeyStroke accel = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
- if (accel != null)
+ KeyStroke accel = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
+ if (accel != null)
setAccelerator(accel);
- Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
- if (mnemonic != null)
+ Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
+ if (mnemonic != null)
setMnemonic(mnemonic.intValue());
- String command = (String) action.getValue(Action.ACTION_COMMAND_KEY);
- if (command != null)
+ String command = (String) action.getValue(Action.ACTION_COMMAND_KEY);
+ if (command != null)
setActionCommand(command);
}
}
@@ -180,7 +180,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
super.init(text, icon);
// Initializes properties for this menu item, that are different
- // from Abstract button properties.
+ // from Abstract button properties.
/* NOTE: According to java specifications paint_border should be set to false,
since menu item should not have a border. However running few java programs
it seems that menu items and menues can have a border. Commenting
@@ -201,7 +201,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
super.setUI(ui);
}
-
+
/**
* This method sets this menuItem's UI to the UIManager's default for the
* current look and feel.
@@ -265,11 +265,11 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
/**
- * Sets the key combination which invokes the menu item's action
- * listeners without navigating the menu hierarchy. Note that when the
- * keyboard accelerator is typed, it will work whether or not the
+ * Sets the key combination which invokes the menu item's action
+ * listeners without navigating the menu hierarchy. Note that when the
+ * keyboard accelerator is typed, it will work whether or not the
* menu is currently displayed.
- *
+ *
* @param keystroke accelerator for this menu item.
*/
public void setAccelerator(KeyStroke keystroke)
@@ -294,7 +294,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
setAccelerator((KeyStroke) (action.getValue(Action.ACCELERATOR_KEY)));
if (accelerator != null)
- super.registerKeyboardAction(action, accelerator,
+ super.registerKeyboardAction(action, accelerator,
JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
@@ -312,11 +312,11 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
return new PropertyChangeListener()
{
- public void propertyChange(PropertyChangeEvent e)
- {
- Action act = (Action) (e.getSource());
- configurePropertiesFromAction(act);
- }
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ Action act = (Action) (e.getSource());
+ configurePropertiesFromAction(act);
+ }
};
}
@@ -374,20 +374,20 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
case MouseEvent.MOUSE_ENTERED:
isDragging = false;
- fireMenuDragMouseEntered(event);
- break;
+ fireMenuDragMouseEntered(event);
+ break;
case MouseEvent.MOUSE_EXITED:
isDragging = false;
- fireMenuDragMouseExited(event);
- break;
+ fireMenuDragMouseExited(event);
+ break;
case MouseEvent.MOUSE_DRAGGED:
isDragging = true;
- fireMenuDragMouseDragged(event);
- break;
+ fireMenuDragMouseDragged(event);
+ break;
case MouseEvent.MOUSE_RELEASED:
if (isDragging)
fireMenuDragMouseReleased(event);
- break;
+ break;
}
}
@@ -524,17 +524,17 @@ public class JMenuItem extends AbstractButton implements Accessible,
Component parent = this.getParent();
if (changed)
{
- model.setArmed(true);
+ model.setArmed(true);
- if (parent != null && parent instanceof JPopupMenu)
- ((JPopupMenu) parent).setSelected(this);
+ if (parent != null && parent instanceof JPopupMenu)
+ ((JPopupMenu) parent).setSelected(this);
}
else
{
- model.setArmed(false);
+ model.setArmed(false);
- if (parent != null && parent instanceof JPopupMenu)
- ((JPopupMenu) parent).getSelectionModel().clearSelection();
+ if (parent != null && parent instanceof JPopupMenu)
+ ((JPopupMenu) parent).getSelectionModel().clearSelection();
}
}
@@ -630,7 +630,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
/**
* Returns a string describing the attributes for the <code>JMenuItem</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
@@ -646,14 +646,14 @@ public class JMenuItem extends AbstractButton implements Accessible,
* Returns the object that provides accessibility features for this
* <code>JMenuItem</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJMenuItem}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
{
- AccessibleJMenuItem ctx = new AccessibleJMenuItem();
+ AccessibleJMenuItem ctx = new AccessibleJMenuItem();
addChangeListener(ctx);
accessibleContext = ctx;
}
@@ -662,9 +662,9 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
/**
- * Provides the accessibility features for the <code>JMenuItem</code>
+ * Provides the accessibility features for the <code>JMenuItem</code>
* component.
- *
+ *
* @see JMenuItem#getAccessibleContext()
*/
protected class AccessibleJMenuItem extends AccessibleAbstractButton
diff --git a/javax/swing/JOptionPane.java b/javax/swing/JOptionPane.java
index 43caecd1a..8c765ed74 100644
--- a/javax/swing/JOptionPane.java
+++ b/javax/swing/JOptionPane.java
@@ -71,7 +71,7 @@ public class JOptionPane extends JComponent implements Accessible
protected class AccessibleJOptionPane extends JComponent.AccessibleJComponent
{
private static final long serialVersionUID = 686071432213084821L;
-
+
/**
* Creates a new <code>AccessibleJOptionPane</code> instance.
*/
@@ -477,7 +477,7 @@ public class JOptionPane extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* <code>JOptionPane</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJOptionPane}).
*/
public AccessibleContext getAccessibleContext()
@@ -700,9 +700,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (icon != newIcon)
{
- Icon old = icon;
- icon = newIcon;
- firePropertyChange(ICON_PROPERTY, old, icon);
+ Icon old = icon;
+ icon = newIcon;
+ firePropertyChange(ICON_PROPERTY, old, icon);
}
}
@@ -715,10 +715,10 @@ public class JOptionPane extends JComponent implements Accessible
{
if (initialSelectionValue != newValue)
{
- Object old = initialSelectionValue;
- initialSelectionValue = newValue;
- firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old,
- initialSelectionValue);
+ Object old = initialSelectionValue;
+ initialSelectionValue = newValue;
+ firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old,
+ initialSelectionValue);
}
}
@@ -731,9 +731,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (initialValue != newValue)
{
- Object old = initialValue;
- initialValue = newValue;
- firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue);
+ Object old = initialValue;
+ initialValue = newValue;
+ firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue);
}
}
@@ -746,9 +746,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (inputValue != newValue)
{
- Object old = inputValue;
- inputValue = newValue;
- firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue);
+ Object old = inputValue;
+ inputValue = newValue;
+ firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue);
}
}
@@ -761,9 +761,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (message != newMessage)
{
- Object old = message;
- message = newMessage;
- firePropertyChange(MESSAGE_PROPERTY, old, message);
+ Object old = message;
+ message = newMessage;
+ firePropertyChange(MESSAGE_PROPERTY, old, message);
}
}
@@ -780,9 +780,9 @@ public class JOptionPane extends JComponent implements Accessible
throw new IllegalArgumentException("Message Type not legal value.");
if (newType != messageType)
{
- int old = messageType;
- messageType = newType;
- firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType);
+ int old = messageType;
+ messageType = newType;
+ firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType);
}
}
@@ -795,9 +795,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (options != newOptions)
{
- Object[] old = options;
- options = newOptions;
- firePropertyChange(OPTIONS_PROPERTY, old, options);
+ Object[] old = options;
+ options = newOptions;
+ firePropertyChange(OPTIONS_PROPERTY, old, options);
}
}
@@ -814,9 +814,9 @@ public class JOptionPane extends JComponent implements Accessible
throw new IllegalArgumentException("Option Type not legal value.");
if (newType != optionType)
{
- int old = optionType;
- optionType = newType;
- firePropertyChange(OPTION_TYPE_PROPERTY, old, optionType);
+ int old = optionType;
+ optionType = newType;
+ firePropertyChange(OPTION_TYPE_PROPERTY, old, optionType);
}
}
@@ -840,11 +840,11 @@ public class JOptionPane extends JComponent implements Accessible
{
if (newValues != selectionValues)
{
- if (newValues != null)
- wantsInput = true;
- Object[] old = selectionValues;
- selectionValues = newValues;
- firePropertyChange(SELECTION_VALUES_PROPERTY, old, selectionValues);
+ if (newValues != null)
+ wantsInput = true;
+ Object[] old = selectionValues;
+ selectionValues = newValues;
+ firePropertyChange(SELECTION_VALUES_PROPERTY, old, selectionValues);
}
}
@@ -867,9 +867,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (value != newValue)
{
- Object old = value;
- value = newValue;
- firePropertyChange(VALUE_PROPERTY, old, value);
+ Object old = value;
+ value = newValue;
+ firePropertyChange(VALUE_PROPERTY, old, value);
}
}
@@ -882,9 +882,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (wantsInput != newValue)
{
- boolean old = wantsInput;
- wantsInput = newValue;
- firePropertyChange(WANTS_INPUT_PROPERTY, old, wantsInput);
+ boolean old = wantsInput;
+ wantsInput = newValue;
+ firePropertyChange(WANTS_INPUT_PROPERTY, old, wantsInput);
}
}
@@ -904,7 +904,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE);
JDialog dialog = pane.createDialog(parentComponent, "Select an Option");
dialog.show();
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1011,7 +1011,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1037,7 +1037,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1062,7 +1062,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, title);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1094,7 +1094,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setInitialSelectionValue(initialSelectionValue);
JDialog dialog = pane.createDialog(parentComponent, title);
dialog.show();
-
+
return pane.getInputValue();
}
@@ -1114,7 +1114,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(null, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1138,7 +1138,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setInitialSelectionValue(initialSelectionValue);
JDialog dialog = pane.createDialog(null, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1160,7 +1160,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
startModal(frame);
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1270,7 +1270,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
startModal(frame);
-
+
return (String) pane.getInputValue();
}
@@ -1296,7 +1296,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
return (String) pane.getInputValue();
}
@@ -1331,7 +1331,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
return pane.getInputValue();
}
@@ -1424,7 +1424,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1441,7 +1441,7 @@ public class JOptionPane extends JComponent implements Accessible
{
JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE);
JDialog dialog = pane.createDialog(parentComponent, null);
- dialog.show();
+ dialog.show();
}
/**
@@ -1539,7 +1539,7 @@ public class JOptionPane extends JComponent implements Accessible
case PLAIN_MESSAGE:
case QUESTION_MESSAGE:
case WARNING_MESSAGE:
- return true;
+ return true;
}
return false;
}
@@ -1559,7 +1559,7 @@ public class JOptionPane extends JComponent implements Accessible
case OK_CANCEL_OPTION:
case YES_NO_CANCEL_OPTION:
case YES_NO_OPTION:
- return true;
+ return true;
}
return false;
}
diff --git a/javax/swing/JPanel.java b/javax/swing/JPanel.java
index 3bd71d1c2..f2ff95690 100644
--- a/javax/swing/JPanel.java
+++ b/javax/swing/JPanel.java
@@ -91,10 +91,10 @@ public class JPanel extends JComponent implements Accessible
/**
* Creates a new panel with double-buffering enabled or disabled as
- * specified. The default layout manager is an instance of
+ * specified. The default layout manager is an instance of
* {@link FlowLayout}.
- *
- * @param isDoubleBuffered a flag that controls whether or not
+ *
+ * @param isDoubleBuffered a flag that controls whether or not
* double-buffering is enabled.
*/
public JPanel(boolean isDoubleBuffered)
@@ -105,7 +105,7 @@ public class JPanel extends JComponent implements Accessible
/**
* Creates a new panel with the specified layout manager. Double-buffering
* is enabled by default.
- *
+ *
* @param layout the layout manager (<code>null</code> permitted).
*/
public JPanel(LayoutManager layout)
@@ -114,24 +114,24 @@ public class JPanel extends JComponent implements Accessible
}
/**
- * Creates a new panel with the specified layout manager and
+ * Creates a new panel with the specified layout manager and
* double-buffering.
- *
+ *
* @param layout the layout manager (<code>null</code> permitted).
- * @param isDoubleBuffered a flag that controls whether or not
+ * @param isDoubleBuffered a flag that controls whether or not
* double-buffering is enabled.
*/
public JPanel(LayoutManager layout, boolean isDoubleBuffered)
{
- setLayout(layout);
+ setLayout(layout);
setOpaque(true);
setDoubleBuffered(isDoubleBuffered);
- updateUI();
- }
+ updateUI();
+ }
/**
- * Returns the suffix (<code>"PanelUI"</code> in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix (<code>"PanelUI"</code> in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a <code>JPanel</code>.
*
* @return <code>"PanelUI"</code>.
@@ -143,9 +143,9 @@ public class JPanel extends JComponent implements Accessible
/**
* Sets the UI delegate for the <code>JPanel</code> component.
- *
+ *
* @param ui the UI delegate.
- *
+ *
* @since 1.4
* @see #getUI()
*/
@@ -156,9 +156,9 @@ public class JPanel extends JComponent implements Accessible
/**
* Returns the UI delegate for the <code>JPanel</code> component.
- *
+ *
* @return The UI delegate.
- *
+ *
* @since 1.4
* @see #setUI(PanelUI)
*/
@@ -188,7 +188,7 @@ public class JPanel extends JComponent implements Accessible
accessibleContext = new AccessibleJPanel();
return accessibleContext;
}
-
+
/**
* Returns an implementation-dependent string describing the attributes of
* this <code>JPanel</code>.
@@ -198,6 +198,6 @@ public class JPanel extends JComponent implements Accessible
*/
protected String paramString()
{
- return super.paramString();
+ return super.paramString();
}
}
diff --git a/javax/swing/JPasswordField.java b/javax/swing/JPasswordField.java
index 11e45e8a5..e73993f62 100644
--- a/javax/swing/JPasswordField.java
+++ b/javax/swing/JPasswordField.java
@@ -48,7 +48,7 @@ import javax.swing.text.Document;
/**
* class JPasswordField
- *
+ *
* @author Andrew Selkirk
* @author Lillian Angel
* @version 1.0
@@ -72,7 +72,7 @@ public class JPasswordField extends JTextField
/**
* getAccessibleRole
- *
+ *
* @return AccessibleRole
*/
public AccessibleRole getAccessibleRole()
@@ -96,7 +96,7 @@ public class JPasswordField extends JTextField
/**
* Creates a <code>JPasswordField</code> object.
- *
+ *
* @param text the initial text
*/
public JPasswordField(String text)
@@ -106,7 +106,7 @@ public class JPasswordField extends JTextField
/**
* Creates a <code>JPasswordField</code> object.
- *
+ *
* @param columns the number of columns
*/
public JPasswordField(int columns)
@@ -116,7 +116,7 @@ public class JPasswordField extends JTextField
/**
* Creates a <code>JPasswordField</code> object.
- *
+ *
* @param text the initial text
* @param columns the number of columns
*/
@@ -127,7 +127,7 @@ public class JPasswordField extends JTextField
/**
* Creates a <code>JPasswordField</code> object.
- *
+ *
* @param document the document to use
* @param text the initial text
* @param columns the number of columns
@@ -139,9 +139,9 @@ public class JPasswordField extends JTextField
/**
* writeObject
- *
+ *
* @param stream the stream to write to
- *
+ *
* @exception IOException if an error occurs
*/
private void writeObject(ObjectOutputStream stream) throws IOException
@@ -151,7 +151,7 @@ public class JPasswordField extends JTextField
/**
* Returns the <code>UIClassID</code>
- *
+ *
* @return the string "PasswordFieldUI"
*/
public String getUIClassID()
@@ -161,7 +161,7 @@ public class JPasswordField extends JTextField
/**
* getEchoChar
- *
+ *
* @return the echo char
*/
public char getEchoChar()
@@ -171,7 +171,7 @@ public class JPasswordField extends JTextField
/**
* setEchoChar
- *
+ *
* @param echo the echo char
*/
public void setEchoChar(char echo)
@@ -180,9 +180,9 @@ public class JPasswordField extends JTextField
}
/**
- * Returns true if this JPasswordField has a character set for echoing.
+ * Returns true if this JPasswordField has a character set for echoing.
* A character is considered to be set if the echo character is not 0.
- *
+ *
* @return <code>true</code> if the echo char is set,
* <code>false</code> otherwise.
*/
@@ -210,11 +210,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns the text contained in this TextComponent. If the
+ * Returns the text contained in this TextComponent. If the
* underlying document is null, will give a NullPointerException.
- *
+ *
* @return String
- *
+ *
* @deprecated
*/
public String getText()
@@ -231,15 +231,15 @@ public class JPasswordField extends JTextField
}
/**
- * Fetches a portion of the text represented by the component.
- * Returns an empty string if length is 0. If the
+ * Fetches a portion of the text represented by the component.
+ * Returns an empty string if length is 0. If the
* underlying document is null, will give a NullPointerException.
- *
+ *
* @param offset TODO
* @param length TODO
- *
+ *
* @return String
- *
+ *
* @exception BadLocationException TODO
*
* @deprecated
@@ -250,11 +250,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns the text contained in this TextComponent. If the underlying
- * document is null, will give a NullPointerException.
- * For stronger security, it is recommended that the returned character
+ * Returns the text contained in this TextComponent. If the underlying
+ * document is null, will give a NullPointerException.
+ * For stronger security, it is recommended that the returned character
* array be cleared after use by setting each character to zero.
- *
+ *
* @return char[]
*/
public char[] getPassword()
@@ -263,11 +263,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns a string representation of this JPasswordField. This method is
- * intended to be used only for debugging purposes,
- * and the content and format of the returned string may vary between
+ * Returns a string representation of this JPasswordField. This method is
+ * intended to be used only for debugging purposes,
+ * and the content and format of the returned string may vary between
* implementations. The returned string may be empty but may not be null.
- *
+ *
* @return String
*/
protected String paramString()
@@ -284,7 +284,7 @@ public class JPasswordField extends JTextField
/**
* getAccessibleContext
- *
+ *
* @return the <code>AccessibleContext</code> object
*/
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java
index ac1a9ebf2..8f16aa2a7 100644
--- a/javax/swing/JPopupMenu.java
+++ b/javax/swing/JPopupMenu.java
@@ -79,10 +79,10 @@ import javax.swing.plaf.PopupMenuUI;
* popupMenuBecomeInvisible() or popupMenuCancelled() methods of
* PopupMenuListeners will be invoked.
*
- * JPopupMenu also fires PropertyChangeEvents when its bound properties
- * change.In addittion to inheritted bound properties, JPopupMenu has
+ * JPopupMenu also fires PropertyChangeEvents when its bound properties
+ * change.In addittion to inheritted bound properties, JPopupMenu has
* 'visible' bound property. When JPopupMenu becomes visible/invisible on
- * the screen it fires PropertyChangeEvents to its registered
+ * the screen it fires PropertyChangeEvents to its registered
* PropertyChangeListeners.
*/
public class JPopupMenu extends JComponent implements Accessible, MenuElement
@@ -139,7 +139,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
/* Field indicating if popup menu is visible or not */
private boolean visible = false;
-
+
/**
* Creates a new JPopupMenu object.
*/
@@ -326,7 +326,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
public void setSelectionModel(SingleSelectionModel model)
{
- selectionModel = model;
+ selectionModel = model;
}
/**
@@ -397,9 +397,9 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
{
if (label != this.label)
{
- String oldLabel = this.label;
- this.label = label;
- firePropertyChange("label", oldLabel, label);
+ String oldLabel = this.label;
+ this.label = label;
+ firePropertyChange("label", oldLabel, label);
}
}
@@ -408,40 +408,40 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
public void addSeparator()
{
- // insert separator at the end of the list of menu items
+ // insert separator at the end of the list of menu items
this.insert(new Separator(), -1);
}
/**
* Adds a MenuKeyListener to the popup.
- *
+ *
* @param l - the listener to add.
*/
public void addMenuKeyListener(MenuKeyListener l)
{
listenerList.add(MenuKeyListener.class, l);
}
-
+
/**
* Removes a MenuKeyListener from the popup.
- *
+ *
* @param l - the listener to remove.
*/
public void removeMenuKeyListener(MenuKeyListener l)
{
listenerList.remove(MenuKeyListener.class, l);
}
-
+
/**
* Returns array of getMenuKeyListeners that are listening to JPopupMenu.
- *
+ *
* @return array of getMenuKeyListeners that are listening to JPopupMenu
*/
public MenuKeyListener[] getMenuKeyListeners()
{
return ((MenuKeyListener[]) listenerList.getListeners(MenuKeyListener.class));
}
-
+
/**
* Adds popupMenuListener to listen for PopupMenuEvents fired
* by the JPopupMenu
@@ -691,8 +691,8 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
for (int i = 0; i < items.length; i++)
{
- if (items[i].equals(component))
- return i;
+ if (items[i].equals(component))
+ return i;
}
return -1;
@@ -783,7 +783,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
}
/**
- * Process mouse events forwarded from MenuSelectionManager. This method
+ * Process mouse events forwarded from MenuSelectionManager. This method
* doesn't do anything. It is here to conform to the MenuElement interface.
*
* @param event event forwarded from MenuSelectionManager
@@ -846,7 +846,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
for (int i = 0; i < items.length; i++)
if (items[i] instanceof MenuElement)
- subElements.add(items[i]);
+ subElements.add(items[i]);
return (MenuElement[])
subElements.toArray(new MenuElement[subElements.size()]);
diff --git a/javax/swing/JProgressBar.java b/javax/swing/JProgressBar.java
index b20b02a06..d24a380b0 100644
--- a/javax/swing/JProgressBar.java
+++ b/javax/swing/JProgressBar.java
@@ -57,8 +57,8 @@ import javax.swing.plaf.ProgressBarUI;
/**
* A component that displays a visual indicator of the progress of a task. The
* component has two modes: determinate and indeterminate. In determinate mode,
- * the <code>JProgressBar</code> fills a percentage of its bar based on its
- * current value. In indeterminate mode, it creates box and bounces it between
+ * the <code>JProgressBar</code> fills a percentage of its bar based on its
+ * current value. In indeterminate mode, it creates box and bounces it between
* its bounds.
* <p>
* This component has the following properties:
@@ -67,10 +67,10 @@ import javax.swing.plaf.ProgressBarUI;
* <tr><th> Property </th><th> Stored in </th><th> Bound? </th></tr>
* <tr><td> borderPainted </td><td> progressBar </td><td> yes </td></tr>
* <tr><td> changeListeners </td><td> progressBar </td><td> no </td></tr>
- * <tr><td> indeterminate </td><td> progressBar </td><td> yes </td></tr>
+ * <tr><td> indeterminate </td><td> progressBar </td><td> yes </td></tr>
* <tr><td> maximum </td><td> model </td><td> no </td></tr>
* <tr><td> minimum </td><td> model </td><td> no </td></tr>
- * <tr><td> model </td><td> progressBar </td><td> no </td></tr>
+ * <tr><td> model </td><td> progressBar </td><td> no </td></tr>
* <tr><td> orientation </td><td> progressBar </td><td> yes </td></tr>
* <tr><td> percentComplete </td><td> progressBar </td><td> no </td></tr>
* <tr><td> string </td><td> progressBar </td><td> yes </td></tr>
@@ -89,17 +89,17 @@ public class JProgressBar extends JComponent implements SwingConstants,
implements AccessibleValue
{
private static final long serialVersionUID = -2938130009392721813L;
-
+
/**
* Creates a new <code>AccessibleJProgressBar</code> instance.
*/
protected AccessibleJProgressBar()
{
// Nothing to do here.
- }
+ }
/**
- * Returns a set containing the current state of the {@link JProgressBar}
+ * Returns a set containing the current state of the {@link JProgressBar}
* component.
*
* @return The accessible state set.
@@ -112,7 +112,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
else if (orientation == JProgressBar.VERTICAL)
result.add(AccessibleState.VERTICAL);
return result;
- }
+ }
/**
* Returns the accessible role for the <code>JProgressBar</code> component.
@@ -122,10 +122,10 @@ public class JProgressBar extends JComponent implements SwingConstants,
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.PROGRESS_BAR;
- }
+ }
/**
- * Returns an object that provides access to the current, minimum and
+ * Returns an object that provides access to the current, minimum and
* maximum values.
*
* @return The accessible value.
@@ -133,7 +133,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
public AccessibleValue getAccessibleValue()
{
return this;
- }
+ }
/**
* Returns the current value of the {@link JProgressBar} component, as an
@@ -148,14 +148,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the current value of the {@link JProgressBar} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is <code>null</code>, this method
+ * listeners. If the supplied value is <code>null</code>, this method
* does nothing and returns <code>false</code>.
*
* @param value the new progress bar value (<code>null</code> permitted).
*
- * @return <code>true</code> if the slider value is updated, and
+ * @return <code>true</code> if the slider value is updated, and
* <code>false</code> otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -164,7 +164,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -190,63 +190,63 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
return new Integer(getMaximum());
}
- }
+ }
private static final long serialVersionUID = 1980046021813598781L;
-
- /**
- * A flag that determines the mode (<code>true</code> for indeterminate,
+
+ /**
+ * A flag that determines the mode (<code>true</code> for indeterminate,
* <code>false</code> for determinate).
*/
private transient boolean indeterminate = false;
- /**
- * The orientation of the <code>JProgressBar</code>
- * ({@link SwingConstants#HORIZONTAL} or {@link SwingConstants#VERTICAL}).
+ /**
+ * The orientation of the <code>JProgressBar</code>
+ * ({@link SwingConstants#HORIZONTAL} or {@link SwingConstants#VERTICAL}).
* Defaults to {@link SwingConstants#HORIZONTAL}.
* @see #setOrientation(int)
*/
protected int orientation;
- /**
+ /**
* A flag the controls whether or not the component's border is painted.
- * The default is <code>true</code>.
+ * The default is <code>true</code>.
* @see #setBorderPainted(boolean)
*/
protected boolean paintBorder = true;
- /**
+ /**
* The model defining the bounds and current value for the progress bar.
- * @see #setModel(BoundedRangeModel)
+ * @see #setModel(BoundedRangeModel)
*/
protected BoundedRangeModel model;
- /**
- * A custom string for display in the progress bar. If this is
- * <code>null</code>, a default string will be generated.
+ /**
+ * A custom string for display in the progress bar. If this is
+ * <code>null</code>, a default string will be generated.
* @see #setString(String)
*/
protected String progressString;
- /**
- * A flag that controls whether a string is displayed within the progress
- * bar.
+ /**
+ * A flag that controls whether a string is displayed within the progress
+ * bar.
* @see #setStringPainted(boolean)
*/
protected boolean paintString = false;
- /**
+ /**
* A single change event reused for all events.
- * @see #fireStateChanged()
+ * @see #fireStateChanged()
*/
protected transient ChangeEvent changeEvent;
- /**
+ /**
* The listener that is registered with the model. */
protected ChangeListener changeListener;
/**
- * Creates a new <code>JProgressBar</code> with default attributes. The
+ * Creates a new <code>JProgressBar</code> with default attributes. The
* following defaults are used:
* <p>
* <ul>
@@ -254,7 +254,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* <li><code>minimum</code>: 0;</li>
* <li><code>maximum</code>: 100;</li>
* <li><code>orientation</code>: {@link SwingConstants#HORIZONTAL}.</li>
- * </ul>
+ * </ul>
*/
public JProgressBar()
{
@@ -262,18 +262,18 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Creates a new <code>JProgressBar</code> with the specified
+ * Creates a new <code>JProgressBar</code> with the specified
* <code>orientation</code>. The following defaults are used:
* <p>
* <ul>
* <li><code>value</code>: 0;</li>
* <li><code>minimum</code>: 0;</li>
* <li><code>maximum</code>: 100;</li>
- * </ul>
- *
- * @param orientation the orientation ({@link #HORIZONTAL} or
+ * </ul>
+ *
+ * @param orientation the orientation ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not one of
* the specified values.
*/
@@ -289,8 +289,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
* <ul>
* <li><code>value</code>: <code>minimum</code>;</li>
* <li><code>orientation</code>: {@link SwingConstants#HORIZONTAL}.</li>
- * </ul>
- *
+ * </ul>
+ *
* @param minimum the lower bound of the value range.
* @param maximum the upper bound of the value range.
*/
@@ -305,13 +305,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
* <p>
* <ul>
* <li><code>value</code>: <code>minimum</code>;</li>
- * </ul>
- *
+ * </ul>
+ *
* @param minimum the lower bound of the value range.
* @param maximum the upper bound of the value range.
- * @param orientation the orientation ({@link #HORIZONTAL} or
+ * @param orientation the orientation ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not one of
* the specified values.
*/
@@ -320,7 +320,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
model = new DefaultBoundedRangeModel(minimum, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
throw new IllegalArgumentException(orientation
- + " is not a legal orientation");
+ + " is not a legal orientation");
this.orientation = orientation;
changeListener = createChangeListener();
model.addChangeListener(changeListener);
@@ -333,8 +333,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
* <p>
* <ul>
* <li><code>orientation</code>: {@link SwingConstants#HORIZONTAL}.</li>
- * </ul>
- *
+ * </ul>
+ *
* @param model the model (<code>null</code> not permitted).
*/
public JProgressBar(BoundedRangeModel model)
@@ -343,15 +343,15 @@ public class JProgressBar extends JComponent implements SwingConstants,
changeListener = createChangeListener();
if (model != null)
model.addChangeListener(changeListener);
- updateUI();
+ updateUI();
}
/**
- * Returns the current value for the <code>JProgressBar</code>. This value
+ * Returns the current value for the <code>JProgressBar</code>. This value
* is fetched from the model.
*
* @return The current value.
- *
+ *
* @see #setValue(int)
*/
public int getValue()
@@ -361,18 +361,18 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the current value for the <code>JProgressBar</code>. The value is
- * stored in the component's <code>model</code> (see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
+ * stored in the component's <code>model</code> (see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
* to this component's registered listeners.
* <p>
- * If <code>value</code> is outside the range <code>minimum</code> to
- * <code>maximum</code>, it will be set to the nearest of those boundary
+ * If <code>value</code> is outside the range <code>minimum</code> to
+ * <code>maximum</code>, it will be set to the nearest of those boundary
* values.
*
* @param value the new value.
- *
+ *
* @see #getValue()
*/
public void setValue(int value)
@@ -385,7 +385,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* returns <code>true</code>.
*
* @param graphics the graphics object to paint with.
- *
+ *
* @see #setBorderPainted(boolean)
*/
protected void paintBorder(Graphics graphics)
@@ -397,12 +397,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns the orientation of the <code>JProgressBar</code> component, which
- * is either {@link SwingConstants#HORIZONTAL} or
- * {@link SwingConstants#VERTICAL}. The default orientation is
+ * is either {@link SwingConstants#HORIZONTAL} or
+ * {@link SwingConstants#VERTICAL}. The default orientation is
* <code>HORIZONTAL</code>.
*
* @return The orientation.
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -412,22 +412,22 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the orientation for this <code>JProgressBar</code> component and,
- * if the value changes, sends a {@link PropertyChangeEvent} (with the
+ * if the value changes, sends a {@link PropertyChangeEvent} (with the
* property name <code>"orientation"</code>) to all registered listeners.
*
- * @param orientation the orientation ({@link #HORIZONTAL} or
+ * @param orientation the orientation ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not
* one of the listed values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
{
if (orientation != VERTICAL && orientation != HORIZONTAL)
throw new IllegalArgumentException(orientation
- + " is not a legal orientation");
+ + " is not a legal orientation");
if (this.orientation != orientation)
{
int oldOrientation = this.orientation;
@@ -438,12 +438,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns the flag that controls whether or not the string returned by
- * {@link #getString()} is displayed by the <code>JProgressBar</code>
+ * {@link #getString()} is displayed by the <code>JProgressBar</code>
* component.
*
- * @return <code>true</code> if the string should be displayed, and
+ * @return <code>true</code> if the string should be displayed, and
* <code>false</code> otherwise.
- *
+ *
* @see #setStringPainted(boolean)
*/
public boolean isStringPainted()
@@ -453,13 +453,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls whether or not the string returned by
- * {@link #getString()} is displayed by the <code>JProgressBar</code>
- * component. If the flag value changes, a {@link PropertyChangeEvent} (with
- * the property name <code>"stringPainted"</code>) is sent to all registered
+ * {@link #getString()} is displayed by the <code>JProgressBar</code>
+ * component. If the flag value changes, a {@link PropertyChangeEvent} (with
+ * the property name <code>"stringPainted"</code>) is sent to all registered
* listeners.
*
* @param painted the new flag value.
- *
+ *
* @see #isStringPainted()
* @see #setString(String)
*/
@@ -474,13 +474,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the string that is painted on the <code>JProgressBar</code> if
- * {@link #isStringPainted()} returns <code>true</code>. If no string has
- * been explicitly set, this method will return a string displaying the
+ * Returns the string that is painted on the <code>JProgressBar</code> if
+ * {@link #isStringPainted()} returns <code>true</code>. If no string has
+ * been explicitly set, this method will return a string displaying the
* value of {@link #getPercentComplete()}.
*
* @return The string.
- *
+ *
* @see #setString(String)
* @see #setStringPainted(boolean)
*/
@@ -494,13 +494,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the string to display within the progress bar and, if the new value
- * is different to the old value, sends a {@link PropertyChangeEvent} (with
- * the property name <code>"string"</code>) to all registered listeners. If
+ * is different to the old value, sends a {@link PropertyChangeEvent} (with
+ * the property name <code>"string"</code>) to all registered listeners. If
* the string is set to <code>null</code>, {@link #getString()} will return
* a default string.
*
* @param string the string (<code>null</code> permitted).
- *
+ *
* @see #getString()
* @see #setStringPainted(boolean)
*/
@@ -508,7 +508,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
if (((string == null || progressString == null) &&
string != progressString) || (string != null &&
- ! string.equals(progressString)))
+ ! string.equals(progressString)))
{
String oldString = progressString;
progressString = string;
@@ -517,7 +517,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the current value expressed as a percentage. This is calculated
+ * Returns the current value expressed as a percentage. This is calculated
* as <code>(value - min) / (max - min)</code>.
*
* @return The percentage (a value in the range 0.0 to 1.0).
@@ -527,7 +527,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
if (getMaximum() == getMinimum())
return 1.0;
else
- return (double) (model.getValue() - model.getMinimum())
+ return (double) (model.getValue() - model.getMinimum())
/ (model.getMaximum() - model.getMinimum());
}
@@ -537,7 +537,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
*
* @return <code>true</code> if the component's border should be painted,
* and <code>false</code> otherwise.
- *
+ *
* @see #setBorderPainted(boolean)
*/
public boolean isBorderPainted()
@@ -547,12 +547,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls whether or not the component's border is
- * painted. If the flag value is changed, this method sends a
- * {@link PropertyChangeEvent} (with the property name "borderPainted") to
+ * painted. If the flag value is changed, this method sends a
+ * {@link PropertyChangeEvent} (with the property name "borderPainted") to
* all registered listeners.
*
* @param painted the new flag value.
- *
+ *
* @see #isBorderPainted()
* @see #paintBorder
*/
@@ -587,7 +587,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Sets this <code>JProgressBar</code>'s UI delegate to the default
+ * Sets this <code>JProgressBar</code>'s UI delegate to the default
* (obtained from the {@link UIManager}) for the current look and feel.
*/
public void updateUI()
@@ -596,8 +596,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the suffix (<code>"ProgressBarUI"</code> in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix (<code>"ProgressBarUI"</code> in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a <code>JProgressBar</code>.
*
* @return <code>"ProgressBarUI"</code>.
@@ -608,11 +608,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Creates a new {@link ChangeListener} that calls
+ * Creates a new {@link ChangeListener} that calls
* {@link #fireStateChanged()} whenever it receives a {@link ChangeEvent}
- * (typically from the component's <code>model</code>). This listener is
- * registered with the progress bar's model, so that changes made to the
- * model directly will automatically result in the progress bar's listeners
+ * (typically from the component's <code>model</code>). This listener is
+ * registered with the progress bar's model, so that changes made to the
+ * model directly will automatically result in the progress bar's listeners
* being notified also.
*
* @return A new listener.
@@ -624,16 +624,16 @@ public class JProgressBar extends JComponent implements SwingConstants,
public void stateChanged(ChangeEvent ce)
{
fireStateChanged();
- }
+ }
};
}
/**
- * Registers a listener with this component so that it will receive
+ * Registers a listener with this component so that it will receive
* notification of component state changes.
*
* @param listener the listener.
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
public void addChangeListener(ChangeListener listener)
@@ -646,31 +646,31 @@ public class JProgressBar extends JComponent implements SwingConstants,
* component state changes.
*
* @param listener the listener.
- *
+ *
* @see #addChangeListener(ChangeListener)
*/
public void removeChangeListener(ChangeListener listener)
{
listenerList.remove(ChangeListener.class, listener);
}
-
+
/**
* Returns an array of the listeners that are registered with this component.
* The array may be empty, but is never <code>null</code>.
*
* @return An array of listeners.
- *
+ *
* @since 1.4
*/
public ChangeListener[] getChangeListeners()
{
return (ChangeListener[]) listenerList.getListeners(ChangeListener.class);
- }
+ }
/**
* Sends a {@link ChangeEvent} to all registered listeners to indicate that
- * the state of the <code>JProgressBar</code> has changed.
- *
+ * the state of the <code>JProgressBar</code> has changed.
+ *
* @see #createChangeListener()
*/
protected void fireStateChanged()
@@ -689,7 +689,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns the model for the <code>JProgressBar</code>.
*
* @return The model (never <code>null</code>).
- *
+ *
* @see #setModel(BoundedRangeModel)
*/
public BoundedRangeModel getModel()
@@ -698,11 +698,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Sets the model for the <code>JProgressBar</code> and sends a
+ * Sets the model for the <code>JProgressBar</code> and sends a
* {@link ChangeEvent} to all registered listeners.
*
* @param model the model (<code>null</code> not permitted).
- *
+ *
* @see #getModel()
*/
public void setModel(BoundedRangeModel model)
@@ -717,12 +717,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the minimum value for the <code>JProgressBar</code>. This defines
- * the lower bound for the current value, and is stored in the component's
+ * Returns the minimum value for the <code>JProgressBar</code>. This defines
+ * the lower bound for the current value, and is stored in the component's
* <code>model</code>.
*
* @return The minimum value.
- *
+ *
* @see #setMinimum(int)
*/
public int getMinimum()
@@ -732,14 +732,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the minimum value for the <code>JProgressBar</code>. The value is
- * stored in the component's <code>model</code> (see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
+ * stored in the component's <code>model</code> (see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
* to this component's registered listeners.
- *
+ *
* @param minimum the minimum value.
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(int minimum)
@@ -748,12 +748,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the maximum value for the <code>JProgressBar</code>. This defines
- * the upper bound for the current value, and is stored in the component's
+ * Returns the maximum value for the <code>JProgressBar</code>. This defines
+ * the upper bound for the current value, and is stored in the component's
* <code>model</code>.
*
* @return The maximum value.
- *
+ *
* @see #setMaximum(int)
*/
public int getMaximum()
@@ -763,14 +763,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the maximum value for the <code>JProgressBar</code>. The value is
- * stored in the component's <code>model</code> (see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
+ * stored in the component's <code>model</code> (see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a <code>ChangeEvent</code>
* to this component's registered listeners.
*
* @param maximum the maximum value.
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(int maximum)
@@ -782,7 +782,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns an implementation-dependent string describing the attributes of
* this <code>JProgressBar</code>.
*
- * @return A string describing the attributes of this
+ * @return A string describing the attributes of this
* <code>JProgressBar</code> (never <code>null</code>).
*/
protected String paramString()
@@ -806,17 +806,17 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls the mode for this <code>JProgressBar</code>
* (<code>true</code> for indeterminate mode, and <code>false</code> for
- * determinate mode). If the flag value changes, this method sends a
- * {@link PropertyChangeEvent} (with the property name
+ * determinate mode). If the flag value changes, this method sends a
+ * {@link PropertyChangeEvent} (with the property name
* <code>"indeterminate"</code>) to all registered listeners.
* <p>
* If the <code>JProgressBar</code> is determinate, it paints a percentage
- * of the bar described by its value. If it is indeterminate, it simply
- * bounces a box between the ends of the bar; the value of the
+ * of the bar described by its value. If it is indeterminate, it simply
+ * bounces a box between the ends of the bar; the value of the
* <code>JProgressBar</code> is ignored.
*
* @param flag the new flag value.
- *
+ *
* @see #isIndeterminate()
* @since 1.4
*/
@@ -831,11 +831,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns a flag that indicates the mode for this <code>JProgressBar</code>
- * (<code>true</code> for indeterminate mode, and <code>false</code> for
- * determinate mode).
+ * (<code>true</code> for indeterminate mode, and <code>false</code> for
+ * determinate mode).
*
* @return A flag indicating the mode for the <code>JProgressBar</code>.
- *
+ *
* @see #setIndeterminate(boolean)
* @since 1.4
*/
@@ -848,14 +848,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns the object that provides accessibility features for this
* <code>JProgressBar</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJProgressBar}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJProgressBar();
-
+
return accessibleContext;
- }
+ }
}
diff --git a/javax/swing/JRadioButton.java b/javax/swing/JRadioButton.java
index e0593f3a5..ae42f2c01 100644
--- a/javax/swing/JRadioButton.java
+++ b/javax/swing/JRadioButton.java
@@ -1,4 +1,4 @@
-/* JRadioButton.java --
+/* JRadioButton.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,12 +105,12 @@ public class JRadioButton extends JToggleButton
/**
* Constructs an unselected radio button with no text or icon.
- */
+ */
public JRadioButton()
{
this(null, null, false);
}
-
+
/**
* Constructs a radio button using the labelling, state
* and icon specified by the supplied action.
@@ -130,10 +130,10 @@ public class JRadioButton extends JToggleButton
* @param icon the icon to use.
*/
public JRadioButton(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
/**
* Constructs a radio button with the supplied icon and state.
*
@@ -142,10 +142,10 @@ public class JRadioButton extends JToggleButton
* selected state. Otherwise, the button is unselected.
*/
public JRadioButton(Icon icon, boolean selected)
- {
+ {
this(null, icon, selected);
- }
-
+ }
+
/**
* Constructs an unselected radio button using the supplied text
* and no icon.
@@ -168,7 +168,7 @@ public class JRadioButton extends JToggleButton
{
this(text, null, selected);
}
-
+
/**
* Constructs an unselected radio button with the supplied text
* and icon.
@@ -180,7 +180,7 @@ public class JRadioButton extends JToggleButton
{
this(text, icon, false);
}
-
+
/**
* Constructs a radio button with the supplied text, icon and state.
*
@@ -195,7 +195,7 @@ public class JRadioButton extends JToggleButton
setBorderPainted(false);
setHorizontalAlignment(LEADING);
}
-
+
/**
* Returns the accessible context for this <code>JRadioButton</code>,
* in the form of an instance of <code>AccessibleJRadioButton</code>.
@@ -209,23 +209,23 @@ public class JRadioButton extends JToggleButton
if (accessibleContext == null)
{
/* Create the context */
- accessibleContext = new AccessibleJRadioButton();
+ accessibleContext = new AccessibleJRadioButton();
}
return accessibleContext;
}
-
+
/**
* Returns a string specifying the name of the Look and Feel UI class
* that renders this component.
*
* @return the Look and Feel UI class for <code>JRadioButton</code>s
* as a <code>String</code>.
- */
+ */
public String getUIClassID()
{
return "RadioButtonUI";
}
-
+
/**
* Returns a string representation of this component for debugging use.
* Users should not depend on anything as regards the content or formatting
@@ -233,19 +233,19 @@ public class JRadioButton extends JToggleButton
* null (only empty).
*
* @return the component in <code>String</code> form for debugging.
- */
+ */
protected String paramString()
{
return super.paramString();
}
-
+
/**
* This method resets the radio button's UI delegate to the default UI for
* the current look and feel.
*/
public void updateUI()
{
- /*
+ /*
I can't see any difference between this and the superclass one,
but Sun reimplements it... there is no RadioButtonUI class for it
to be cast to.
@@ -254,6 +254,3 @@ public class JRadioButton extends JToggleButton
}
}
-
-
-
diff --git a/javax/swing/JRadioButtonMenuItem.java b/javax/swing/JRadioButtonMenuItem.java
index 13ef189a5..48fc9aeb6 100644
--- a/javax/swing/JRadioButtonMenuItem.java
+++ b/javax/swing/JRadioButtonMenuItem.java
@@ -169,12 +169,12 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Returns a string describing the attributes for the
- * <code>JRadioButtonMenuItem</code> component, for use in debugging. The
- * return value is guaranteed to be non-<code>null</code>, but the format of
+ * Returns a string describing the attributes for the
+ * <code>JRadioButtonMenuItem</code> component, for use in debugging. The
+ * return value is guaranteed to be non-<code>null</code>, but the format of
* the string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* <code>JRadioButtonMenuItem</code>.
*/
protected String paramString()
@@ -187,7 +187,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
* Returns the object that provides accessibility features for this
* <code>JRadioButtonMenuItem</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJRadioButtonMenuItem}).
*/
public AccessibleContext getAccessibleContext()
@@ -199,9 +199,9 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Provides the accessibility features for the
+ * Provides the accessibility features for the
* <code>JRadioButtonMenuItem</code> component.
- *
+ *
* @see JRadioButtonMenuItem#getAccessibleContext()
*/
protected class AccessibleJRadioButtonMenuItem extends AccessibleJMenuItem
@@ -217,7 +217,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Returns the accessible role for the <code>JRadioButtonMenuItem</code>
+ * Returns the accessible role for the <code>JRadioButtonMenuItem</code>
* component.
*
* @return {@link AccessibleRole#RADIO_BUTTON}.
diff --git a/javax/swing/JRootPane.java b/javax/swing/JRootPane.java
index 10fdf10c0..c74f4f520 100644
--- a/javax/swing/JRootPane.java
+++ b/javax/swing/JRootPane.java
@@ -93,7 +93,7 @@ public class JRootPane extends JComponent implements Accessible
}
}
- // Custom Layout Manager for JRootPane. It positions contentPane and
+ // Custom Layout Manager for JRootPane. It positions contentPane and
// menuBar withing its layeredPane.
protected class RootLayout implements LayoutManager2, Serializable
{
@@ -125,7 +125,7 @@ public class JRootPane extends JComponent implements Accessible
*/
protected RootLayout()
{
- // Nothing to do here.
+ // Nothing to do here.
}
/**
@@ -208,7 +208,7 @@ public class JRootPane extends JComponent implements Accessible
// 2. the layeredPane filles entire viewable region.
// 3. the menuBar is positioned at the upper edge of layeredPane.
// 4. the contentPane fills viewable region minus menuBar, if present.
-
+
// +-------------------------------+
// | JLayeredPane |
@@ -237,7 +237,7 @@ public class JRootPane extends JComponent implements Accessible
else
contentPaneBounds = new Rectangle(0, 0, containerWidth,
containerHeight);
-
+
glassPaneBounds = new Rectangle(i.left, i.top, containerWidth, containerHeight);
layeredPaneBounds = new Rectangle(i.left, i.top, containerWidth, containerHeight);
}
@@ -321,7 +321,7 @@ public class JRootPane extends JComponent implements Accessible
public static final int FILE_CHOOSER_DIALOG = 6;
public static final int QUESTION_DIALOG = 7;
public static final int WARNING_DIALOG = 8;
-
+
/** DOCUMENT ME! */
protected Component glassPane;
@@ -366,7 +366,7 @@ public class JRootPane extends JComponent implements Accessible
* @since 1.4
*/
private int windowDecorationStyle = NONE;
-
+
/**
* DOCUMENT ME!
*
@@ -432,7 +432,7 @@ public class JRootPane extends JComponent implements Accessible
/**
* Sets the JRootPane's content pane. The content pane should typically be
- * opaque for painting to work properly. This method also
+ * opaque for painting to work properly. This method also
* removes the old content pane from the layered pane.
*
* @param p the Container that will be the content pane
@@ -505,10 +505,10 @@ public class JRootPane extends JComponent implements Accessible
}
/**
- * Set the layered pane for the root pane.
+ * Set the layered pane for the root pane.
*
* @param f The JLayeredPane to be used.
- *
+ *
* @throws IllegalComponentStateException if JLayeredPane
* parameter is null.
*/
@@ -516,10 +516,10 @@ public class JRootPane extends JComponent implements Accessible
{
if (f == null)
throw new IllegalComponentStateException();
-
+
if (layeredPane != null)
remove(layeredPane);
-
+
layeredPane = f;
add(f, -1);
}
@@ -628,7 +628,7 @@ public class JRootPane extends JComponent implements Accessible
{
return defaultButton;
}
-
+
public void setDefaultButton(JButton newButton)
{
// We only change the default button if the new button is defaultCapable
@@ -665,7 +665,7 @@ public class JRootPane extends JComponent implements Accessible
&& style != WARNING_DIALOG
&& style != PLAIN_DIALOG)
throw new IllegalArgumentException("invalid style");
-
+
int oldStyle = windowDecorationStyle;
windowDecorationStyle = style;
firePropertyChange("windowDecorationStyle", oldStyle, style);
diff --git a/javax/swing/JScrollBar.java b/javax/swing/JScrollBar.java
index 371bb60c6..a60031670 100644
--- a/javax/swing/JScrollBar.java
+++ b/javax/swing/JScrollBar.java
@@ -57,7 +57,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.plaf.ScrollBarUI;
/**
- * The JScrollBar. Two buttons control how the values that the
+ * The JScrollBar. Two buttons control how the values that the
* scroll bar can take. You can also drag the thumb or click the track
* to move the scroll bar. Typically, the JScrollBar is used with
* other components to translate the value of the bar to the viewable
@@ -73,7 +73,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
implements AccessibleValue
{
private static final long serialVersionUID = -7758162392045586663L;
-
+
/**
* Creates a new <code>AccessibleJScrollBar</code> instance.
*/
@@ -83,7 +83,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Returns a set containing the current state of the {@link JScrollBar}
+ * Returns a set containing the current state of the {@link JScrollBar}
* component.
*
* @return The accessible state set.
@@ -109,7 +109,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Returns an object that provides access to the current, minimum and
+ * Returns an object that provides access to the current, minimum and
* maximum values.
*
* @return The accessible value.
@@ -132,14 +132,14 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* Sets the current value of the {@link JScrollBar} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is <code>null</code>, this method
+ * listeners. If the supplied value is <code>null</code>, this method
* does nothing and returns <code>false</code>.
*
* @param value the new slider value (<code>null</code> permitted).
*
- * @return <code>true</code> if the slider value is updated, and
+ * @return <code>true</code> if the slider value is updated, and
* <code>false</code> otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -148,7 +148,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -195,11 +195,11 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
m.getValueIsAdjusting());
}
}
-
+
}
private static final long serialVersionUID = -8195169869225066566L;
-
+
/** How much the thumb moves when moving in a block. */
protected int blockIncrement = 10;
@@ -218,7 +218,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
*/
private ChangeListener sbChangeListener;
- /**
+ /**
* Creates a new horizontal JScrollBar object with a minimum
* of 0, a maxmium of 100, a value of 0 and an extent of 10.
*/
@@ -228,7 +228,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Creates a new JScrollBar object with a minimum of 0, a
+ * Creates a new JScrollBar object with a minimum of 0, a
* maximum of 100, a value of 0, an extent of 10 and the given
* orientation.
*
@@ -240,7 +240,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Creates a new JScrollBar object with the given orientation,
+ * Creates a new JScrollBar object with the given orientation,
* value, min, max, and extent.
*
* @param orientation The orientation to use.
@@ -294,7 +294,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns an identifier to
+ * This method returns an identifier to
* choose the correct UI delegate for the
* scrollbar.
*
@@ -327,15 +327,15 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
throw new IllegalArgumentException("orientation must be one of HORIZONTAL or VERTICAL");
if (orientation != this.orientation)
{
- int oldOrientation = this.orientation;
- this.orientation = orientation;
- firePropertyChange("orientation", oldOrientation,
- this.orientation);
+ int oldOrientation = this.orientation;
+ this.orientation = orientation;
+ firePropertyChange("orientation", oldOrientation,
+ this.orientation);
}
}
/**
- * This method returns the model being used with
+ * This method returns the model being used with
* the scrollbar.
*
* @return The scrollbar's model.
@@ -364,7 +364,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* This method returns how much the scrollbar's value
- * should change for a unit increment depending on the
+ * should change for a unit increment depending on the
* given direction.
*
* @param direction The direction to scroll in.
@@ -385,10 +385,10 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
if (unitIncrement != this.unitIncrement)
{
- int oldInc = this.unitIncrement;
- this.unitIncrement = unitIncrement;
- firePropertyChange("unitIncrement", oldInc,
- this.unitIncrement);
+ int oldInc = this.unitIncrement;
+ this.unitIncrement = unitIncrement;
+ firePropertyChange("unitIncrement", oldInc,
+ this.unitIncrement);
}
}
@@ -415,10 +415,10 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
if (blockIncrement != this.blockIncrement)
{
- int oldInc = this.blockIncrement;
- this.blockIncrement = blockIncrement;
- firePropertyChange("blockIncrement", oldInc,
- this.blockIncrement);
+ int oldInc = this.blockIncrement;
+ this.blockIncrement = blockIncrement;
+ firePropertyChange("blockIncrement", oldInc,
+ this.blockIncrement);
}
}
@@ -463,8 +463,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns the visible amount (AKA extent).
- * The visible amount can be used by UI delegates to
+ * This method returns the visible amount (AKA extent).
+ * The visible amount can be used by UI delegates to
* determine the size of the thumb.
*
* @return The visible amount (AKA extent).
@@ -545,7 +545,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method sets the value, extent, minimum and
+ * This method sets the value, extent, minimum and
* maximum.
*
* @param newValue The new value.
@@ -570,7 +570,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method removes an AdjustmentListener from the scroll bar.
+ * This method removes an AdjustmentListener from the scroll bar.
*
* @param listener The listener to remove.
*/
@@ -580,7 +580,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns an arry of all AdjustmentListeners listening to
+ * This method returns an arry of all AdjustmentListeners listening to
* this scroll bar.
*
* @return An array of AdjustmentListeners listening to this scroll bar.
@@ -594,7 +594,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* This method is called to fired AdjustmentEvents to the listeners
* of this scroll bar. All AdjustmentEvents that are fired
* will have an ID of ADJUSTMENT_VALUE_CHANGED and a type of
- * TRACK.
+ * TRACK.
*
* @param id The ID of the adjustment event.
* @param type The Type of change.
@@ -658,14 +658,14 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
*/
public void setEnabled(boolean x)
{
- // nothing special needs to be done here since we
+ // nothing special needs to be done here since we
// just check the enabled setting before changing the value.
super.setEnabled(x);
}
/**
* Returns a string describing the attributes for the <code>JScrollBar</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
@@ -678,7 +678,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
sb.append(",orientation=");
if (this.orientation == JScrollBar.HORIZONTAL)
sb.append("HORIZONTAL");
- else
+ else
sb.append("VERTICAL");
sb.append(",unitIncrement=").append(unitIncrement);
return sb.toString();
@@ -688,7 +688,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* Returns the object that provides accessibility features for this
* <code>JScrollBar</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJScrollBar}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/JScrollPane.java b/javax/swing/JScrollPane.java
index f6d37c7b4..6d17857d3 100644
--- a/javax/swing/JScrollPane.java
+++ b/javax/swing/JScrollPane.java
@@ -1,4 +1,4 @@
-/* JScrollPane.java --
+/* JScrollPane.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -146,7 +146,7 @@ public class JScrollPane extends JComponent
}
private static final long serialVersionUID = 5203525440012340014L;
-
+
protected JViewport columnHeader;
protected JViewport rowHeader;
@@ -171,9 +171,9 @@ public class JScrollPane extends JComponent
return columnHeader;
}
- public Component getCorner(String key)
+ public Component getCorner(String key)
{
- if (getComponentOrientation()
+ if (getComponentOrientation()
== ComponentOrientation.LEFT_TO_RIGHT)
{
if (key == LOWER_LEADING_CORNER)
@@ -185,7 +185,7 @@ public class JScrollPane extends JComponent
else if (key == UPPER_TRAILING_CORNER)
key = UPPER_RIGHT_CORNER;
}
- else if (getComponentOrientation()
+ else if (getComponentOrientation()
== ComponentOrientation.RIGHT_TO_LEFT)
{
if (key == LOWER_LEADING_CORNER)
@@ -261,14 +261,14 @@ public class JScrollPane extends JComponent
else
{
Rectangle b = getViewport().getBounds();
- return new Rectangle(b.x - i.left,
+ return new Rectangle(b.x - i.left,
b.y - i.top,
- b.width + i.left + i.right,
+ b.width + i.left + i.right,
b.height + i.top + i.bottom);
}
}
}
-
+
public boolean isWheelScrollingEnabled()
{
return wheelScrollingEnabled;
@@ -310,7 +310,7 @@ public class JScrollPane extends JComponent
{
if (columnHeader == h)
return;
-
+
JViewport old = columnHeader;
removeNonNull(old);
columnHeader = h;
@@ -329,7 +329,7 @@ public class JScrollPane extends JComponent
public void setCorner(String key, Component c)
{
- if (getComponentOrientation()
+ if (getComponentOrientation()
== ComponentOrientation.LEFT_TO_RIGHT)
{
if (key == LOWER_LEADING_CORNER)
@@ -341,7 +341,7 @@ public class JScrollPane extends JComponent
else if (key == UPPER_TRAILING_CORNER)
key = UPPER_RIGHT_CORNER;
}
- else if (getComponentOrientation()
+ else if (getComponentOrientation()
== ComponentOrientation.RIGHT_TO_LEFT)
{
if (key == LOWER_LEADING_CORNER)
@@ -401,11 +401,11 @@ public class JScrollPane extends JComponent
{
if (horizontalScrollBarPolicy == h)
return;
-
+
if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED
&& h != HORIZONTAL_SCROLLBAR_NEVER
&& h != HORIZONTAL_SCROLLBAR_ALWAYS)
- throw new IllegalArgumentException("unknown horizontal scrollbar policy");
+ throw new IllegalArgumentException("unknown horizontal scrollbar policy");
int old = horizontalScrollBarPolicy;
horizontalScrollBarPolicy = h;
@@ -428,7 +428,7 @@ public class JScrollPane extends JComponent
{
if (rowHeader == v)
return;
-
+
JViewport old = rowHeader;
removeNonNull(old);
rowHeader = v;
@@ -449,7 +449,7 @@ public class JScrollPane extends JComponent
{
if (verticalScrollBar == v)
return;
-
+
JScrollBar old = verticalScrollBar;
removeNonNull(old);
verticalScrollBar = v;
@@ -462,12 +462,12 @@ public class JScrollPane extends JComponent
{
if (verticalScrollBarPolicy == v)
return;
-
+
if (v != VERTICAL_SCROLLBAR_AS_NEEDED
&& v != VERTICAL_SCROLLBAR_NEVER
&& v != VERTICAL_SCROLLBAR_ALWAYS)
- throw new IllegalArgumentException("unknown vertical scrollbar policy");
-
+ throw new IllegalArgumentException("unknown vertical scrollbar policy");
+
int old = verticalScrollBarPolicy;
verticalScrollBarPolicy = v;
firePropertyChange("verticalScrollBarPolicy", old, v);
@@ -479,7 +479,7 @@ public class JScrollPane extends JComponent
{
if (wheelScrollingEnabled == b)
return;
-
+
boolean old = wheelScrollingEnabled;
wheelScrollingEnabled = b;
firePropertyChange("wheelScrollingEnabled", old, b);
@@ -490,7 +490,7 @@ public class JScrollPane extends JComponent
{
if (viewport == v)
return;
-
+
JViewport old = viewport;
removeNonNull(old);
viewport = v;
@@ -510,20 +510,20 @@ public class JScrollPane extends JComponent
{
if (viewportBorder == b)
return;
-
+
Border old = viewportBorder;
viewportBorder = b;
firePropertyChange("viewportBorder", old, b);
sync();
}
-
+
public void setViewportView(Component view)
{
if (getViewport() == null)
{
setViewport(createViewport());
}
-
+
if (view != null)
{
getViewport().setView(view);
@@ -541,7 +541,7 @@ public class JScrollPane extends JComponent
* policy is set to {@link #VERTICAL_SCROLLBAR_AS_NEEDED} and
* {@link #HORIZONTAL_SCROLLBAR_AS_NEEDED}.
*/
- public JScrollPane()
+ public JScrollPane()
{
this(null);
}
@@ -553,10 +553,10 @@ public class JScrollPane extends JComponent
*
* @param view the component that is embedded inside the JScrollPane
*/
- public JScrollPane(Component view)
+ public JScrollPane(Component view)
{
- this(view,
- VERTICAL_SCROLLBAR_AS_NEEDED,
+ this(view,
+ VERTICAL_SCROLLBAR_AS_NEEDED,
HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
@@ -574,7 +574,7 @@ public class JScrollPane extends JComponent
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
*/
- public JScrollPane(int vsbPolicy, int hsbPolicy)
+ public JScrollPane(int vsbPolicy, int hsbPolicy)
{
this(null, vsbPolicy, hsbPolicy);
}
@@ -594,7 +594,7 @@ public class JScrollPane extends JComponent
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
*/
- public JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
+ public JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
{
wheelScrollingEnabled = true;
setVerticalScrollBarPolicy(vsbPolicy);
@@ -610,7 +610,7 @@ public class JScrollPane extends JComponent
updateUI();
}
-
+
public JScrollBar createHorizontalScrollBar()
{
return new ScrollBar(SwingConstants.HORIZONTAL);
@@ -620,7 +620,7 @@ public class JScrollPane extends JComponent
{
return new ScrollBar(SwingConstants.VERTICAL);
}
-
+
protected JViewport createViewport()
{
return new JViewport();
@@ -630,11 +630,11 @@ public class JScrollPane extends JComponent
{
return "ScrollPaneUI";
}
-
+
public void updateUI()
{
setUI((ScrollPaneUI) UIManager.getUI(this));
- }
+ }
/**
* This method returns the scrollpane's UI delegate.
@@ -656,7 +656,7 @@ public class JScrollPane extends JComponent
super.setUI(ui);
}
- protected class ScrollBar
+ protected class ScrollBar
extends JScrollBar
implements UIResource
{
@@ -675,7 +675,7 @@ public class JScrollPane extends JComponent
else
{
Scrollable s = (Scrollable) view;
- return s.getScrollableBlockIncrement(JScrollPane.this.getViewport().getViewRect(),
+ return s.getScrollableBlockIncrement(JScrollPane.this.getViewport().getViewRect(),
this.getOrientation(),
direction);
}
@@ -689,7 +689,7 @@ public class JScrollPane extends JComponent
else
{
Scrollable s = (Scrollable) view;
- return s.getScrollableUnitIncrement(JScrollPane.this.getViewport().getViewRect(),
+ return s.getScrollableUnitIncrement(JScrollPane.this.getViewport().getViewRect(),
this.getOrientation(),
direction);
}
diff --git a/javax/swing/JSeparator.java b/javax/swing/JSeparator.java
index c87783b73..15d15fd8b 100644
--- a/javax/swing/JSeparator.java
+++ b/javax/swing/JSeparator.java
@@ -58,7 +58,7 @@ public class JSeparator extends JComponent implements SwingConstants,
protected class AccessibleJSeparator extends AccessibleJComponent
{
private static final long serialVersionUID = 916332890553201095L;
-
+
/**
* Creates a new <code>AccessibleJSeparator</code> instance.
*/
@@ -79,7 +79,7 @@ public class JSeparator extends JComponent implements SwingConstants,
}
private static final long serialVersionUID = 125301223445282357L;
-
+
/** The orientation of the JSeparator. */
private transient int orientation = HORIZONTAL;
@@ -94,9 +94,9 @@ public class JSeparator extends JComponent implements SwingConstants,
/**
* Creates a new <code>JSeparator</code> object with the given orientation.
*
- * @param orientation the orientation (either {@link #HORIZONTAL} or
+ * @param orientation the orientation (either {@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not
* one of the specified values.
*/
@@ -139,8 +139,8 @@ public class JSeparator extends JComponent implements SwingConstants,
}
/**
- * Returns the suffix (<code>"SeparatorUI"</code> in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix (<code>"SeparatorUI"</code> in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a <code>JSeparator</code>.
*
* @return <code>"SeparatorUI"</code>.
@@ -154,7 +154,7 @@ public class JSeparator extends JComponent implements SwingConstants,
* Returns the orientation of the <code>JSeparator</code>.
*
* @return The orientation (one of {@link #HORIZONTAL} and {@link #VERTICAL}).
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -163,16 +163,16 @@ public class JSeparator extends JComponent implements SwingConstants,
}
/**
- * Sets the orientation for the <code>JSeparator</code> and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the orientation for the <code>JSeparator</code> and sends a
+ * {@link PropertyChangeEvent} (with the property name
* <code>orientation</code>) to all registered listeners.
*
- * @param orientation the orientation (either {@link #HORIZONTAL} or
+ * @param orientation the orientation (either {@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not
* one of the specified values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
@@ -205,14 +205,14 @@ public class JSeparator extends JComponent implements SwingConstants,
* Returns the object that provides accessibility features for this
* <code>JSeparator</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJSeparator}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSeparator();
-
+
return accessibleContext;
}
}
diff --git a/javax/swing/JSlider.java b/javax/swing/JSlider.java
index 979707a72..a6f51138d 100644
--- a/javax/swing/JSlider.java
+++ b/javax/swing/JSlider.java
@@ -67,17 +67,17 @@ import javax.swing.plaf.UIResource;
* <p>
* A <code>JSlider</code> component has the following properties:
* </p>
- *
+ *
* <table>
* <tr><th> Property </th><th> Stored in </th><th> Bound? </th></tr>
* <tr><td> extent </td><td> model </td><td> no </td></tr>
* <tr><td> inverted </td><td> slider </td><td> yes </td></tr>
* <tr><td> labelTable </td><td> slider </td><td> yes </td></tr>
- * <tr><td> majorTickSpacing </td><td> slider </td><td> yes </td></tr>
+ * <tr><td> majorTickSpacing </td><td> slider </td><td> yes </td></tr>
* <tr><td> maximum </td><td> model </td><td> yes </td></tr>
* <tr><td> minimum </td><td> model </td><td> yes </td></tr>
* <tr><td> minorTickSpacing </td><td> slider </td><td> yes </td></tr>
- * <tr><td> model </td><td> slider </td><td> yes </td></tr>
+ * <tr><td> model </td><td> slider </td><td> yes </td></tr>
* <tr><td> orientation </td><td> slider </td><td> yes </td></tr>
* <tr><td> paintLabels </td><td> slider </td><td> yes </td></tr>
* <tr><td> paintTicks </td><td> slider </td><td> yes </td></tr>
@@ -85,11 +85,11 @@ import javax.swing.plaf.UIResource;
* <tr><td> value </td><td> model </td><td> no </td></tr>
* <tr><td> valueIsAdjusting </td><td> model </td><td> no </td></tr>
* </table>
- *
+ *
* <p>
* The various behavioural aspects of these properties follows:
* </p>
- *
+ *
* <ul>
* <li>
* When a non-bound property stored in the slider changes, the slider fires
@@ -100,11 +100,11 @@ import javax.swing.plaf.UIResource;
* {@link PropertyChangeEvent} to its property change listeners.
* </li>
* <li>
- * If any of the model's properties change, it fires a {@link ChangeEvent} to
+ * If any of the model's properties change, it fires a {@link ChangeEvent} to
* its listeners, which include the slider.
* </li>
* <li>
- * If the slider receives a {@link ChangeEvent} from its model, it will
+ * If the slider receives a {@link ChangeEvent} from its model, it will
* propagate the event to its own change listeners, with the event's "source"
* property set to refer to the slider, rather than the model.
* </li>
@@ -140,7 +140,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
implements AccessibleValue
{
private static final long serialVersionUID = -6301740148041106789L;
-
+
/**
* Creates a new <code>AccessibleJSlider</code> instance.
*/
@@ -150,7 +150,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns a set containing the current state of the {@link JSlider}
+ * Returns a set containing the current state of the {@link JSlider}
* component.
*
* @return The accessible state set.
@@ -176,8 +176,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JSlider}. Since this class implements
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JSlider}. Since this class implements
* {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -200,14 +200,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the current value of the {@link JSlider} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is <code>null</code>, this method
+ * listeners. If the supplied value is <code>null</code>, this method
* does nothing and returns <code>false</code>.
*
* @param value the new slider value (<code>null</code> permitted).
*
- * @return <code>true</code> if the slider value is updated, and
+ * @return <code>true</code> if the slider value is updated, and
* <code>false</code> otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -216,7 +216,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -277,9 +277,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/** Whether the slider is inverted. */
private transient boolean isInverted;
- /**
+ /**
* The listener that monitors the slider's model and forwards events to the
- * slider's listeners (see <code>createChangeListener()</code>).
+ * slider's listeners (see <code>createChangeListener()</code>).
*/
protected ChangeListener changeListener;
@@ -287,7 +287,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
protected transient ChangeEvent changeEvent;
/**
- * Creates a new horizontal <code>JSlider</code> instance with a minimum of
+ * Creates a new horizontal <code>JSlider</code> instance with a minimum of
* 0, a maximum of 100, and a value of 50.
*/
public JSlider()
@@ -296,12 +296,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new <code>JSlider</code> instance with the given orientation
+ * Creates a new <code>JSlider</code> instance with the given orientation
* and a minimum of 0, a maximum of 100, and a value of 50.
*
* @param orientation The orientation of the slider ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not one of
* the specified values.
*/
@@ -311,13 +311,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal <code>JSlider</code> instance with the given
+ * Creates a new horizontal <code>JSlider</code> instance with the given
* maximum and minimum and a value that is halfway between the minimum and the
* maximum.
*
* @param minimum The minimum value.
* @param maximum The maximum value.
- *
+ *
* @throws IllegalArgumentException if <code>minimum</code> is greater than
* <code>maximum</code>.
*/
@@ -327,14 +327,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal <code>JSlider</code> instance with the given
+ * Creates a new horizontal <code>JSlider</code> instance with the given
* minimum, maximum, and value.
*
* @param minimum The minimum value.
* @param maximum The maximum value.
* @param value The initial value.
- *
- * @throws IllegalArgumentException if <code>value</code> is not in the
+ *
+ * @throws IllegalArgumentException if <code>value</code> is not in the
* specified range.
* @throws IllegalArgumentException if <code>minimum</code> is greater than
* <code>maximum</code>.
@@ -345,7 +345,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new <code>JSlider</code> instance with the given orientation,
+ * Creates a new <code>JSlider</code> instance with the given orientation,
* minimum, maximum, and value.
*
* @param orientation The orientation of the slider ({@link #HORIZONTAL} or
@@ -353,10 +353,10 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* @param minimum The minimum value of the JSlider.
* @param maximum The maximum value of the JSlider.
* @param value The initial value of the JSlider.
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not one of
* the specified values.
- * @throws IllegalArgumentException if <code>value</code> is not in the
+ * @throws IllegalArgumentException if <code>value</code> is not in the
* specified range.
* @throws IllegalArgumentException if <code>minimum</code> is greater than
* <code>maximum</code>.
@@ -365,7 +365,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
sliderModel = new DefaultBoundedRangeModel(value, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
- throw new IllegalArgumentException(orientation
+ throw new IllegalArgumentException(orientation
+ " is not a legal orientation");
this.orientation = orientation;
changeListener = createChangeListener();
@@ -374,11 +374,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal <code>JSlider</code> instance with the given
+ * Creates a new horizontal <code>JSlider</code> instance with the given
* model.
*
* @param model The model (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>model</code> is <code>null</code>.
*/
public JSlider(BoundedRangeModel model)
@@ -393,7 +393,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's value (from the slider's model).
*
* @return The value of the slider.
- *
+ *
* @see #setValue(int)
*/
public int getValue()
@@ -402,14 +402,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the slider's value and sends a {@link ChangeEvent} to all
+ * Sets the slider's value and sends a {@link ChangeEvent} to all
* registered listeners. Note that the model will fire a change event to all
* of its registered listeners first (with the model as the event source) and
* then the slider will fire another change event to all of its registered
* listeners (this time with the slider as the event source).
*
* @param value the new value.
- *
+ *
* @see #getValue()
*/
public void setValue(int value)
@@ -448,8 +448,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the suffix (<code>"SliderUI"</code> in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix (<code>"SliderUI"</code> in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a <code>JSlider</code>.
*
* @return <code>"SliderUI"</code>.
@@ -462,7 +462,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Creates a {@link ChangeListener} that is added to the slider's model and
* forwards change events generated by the model to the listeners that are
- * registered with the <code>JSlider</code> (by calling the
+ * registered with the <code>JSlider</code> (by calling the
* {@link #fireStateChanged} method).
*
* @return A new listener.
@@ -474,7 +474,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
public void stateChanged(ChangeEvent ce)
{
// No need to trigger a repaint since the UI listens to the model
- // as well. All we need to do is pass on the stateChanged event
+ // as well. All we need to do is pass on the stateChanged event
// to our listeners.
fireStateChanged();
}
@@ -482,13 +482,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Registers a listener with the slider so that it will receive
+ * Registers a listener with the slider so that it will receive
* {@link ChangeEvent} notifications. Note that change events generated
* by the slider's model will be forwarded automatically to the slider's
* listeners.
*
* @param listener the listener to register.
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
public void addChangeListener(ChangeListener listener)
@@ -501,7 +501,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* {@link ChangeEvent} notifications from the slider.
*
* @param listener The listener to remove.
- *
+ *
* @see #addChangeListener(ChangeListener)
*/
public void removeChangeListener(ChangeListener listener)
@@ -510,7 +510,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sends a {@link ChangeEvent} to all registered listeners, with this slider
+ * Sends a {@link ChangeEvent} to all registered listeners, with this slider
* as the source.
*/
protected void fireStateChanged()
@@ -526,12 +526,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns an array containing all the {@link ChangeListener} instances
+ * Returns an array containing all the {@link ChangeListener} instances
* registered with this slider. If no listeners are registered, this method
* returns an empty array.
*
- * @return An array array containing all the {@link ChangeListener} instances
- * registered with this slider (possibly empty, but never
+ * @return An array array containing all the {@link ChangeListener} instances
+ * registered with this slider (possibly empty, but never
* <code>null</code>).
*/
public ChangeListener[] getChangeListeners()
@@ -540,11 +540,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the slider's model, which stores the minimum, maximum and current
+ * Returns the slider's model, which stores the minimum, maximum and current
* values.
*
* @return The slider's model.
- *
+ *
* @see #setModel(BoundedRangeModel)
*/
public BoundedRangeModel getModel()
@@ -556,12 +556,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Sets the slider's model and sends a {@link PropertyChangeEvent} (with the
* property name "model") to all registered listeners. The change listener
* that the slider registered with the original model is removed and added
- * to the new model (this ensures that {@link ChangeEvent} notifications
+ * to the new model (this ensures that {@link ChangeEvent} notifications
* generated by the model are automatically forwarded to listeners that are
* registered with the slider).
*
* @param model The model to use with the slider.
- *
+ *
* @see #getModel()
*/
public void setModel(BoundedRangeModel model)
@@ -583,7 +583,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the minimum value of the slider (from the slider's model).
*
* @return The minimum value of the slider.
- *
+ *
* @see #setMinimum(int)
*/
public int getMinimum()
@@ -592,19 +592,19 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the minimum value of the slider and fires a
+ * Sets the minimum value of the slider and fires a
* {@link PropertyChangeEvent} (with the property name "minimum") to all
* registered listeners. Note that:
* <p>
* <ul>
- * <li>the minimum value is stored in the slider's model (see
+ * <li>the minimum value is stored in the slider's model (see
* {@link #getModel()});</li>
- * <li>in addition to the property change event, the slider also fires a
+ * <li>in addition to the property change event, the slider also fires a
* {@link ChangeEvent}.</li>
* </ul>
- *
+ *
* @param minimum The minimum value of the slider.
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(int minimum)
@@ -619,7 +619,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's maximum value (obtained from the slider's model).
*
* @return The maximum value of the slider.
- *
+ *
* @see #setMaximum(int)
*/
public int getMaximum()
@@ -628,19 +628,19 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the maximum value of the slider and fires a
+ * Sets the maximum value of the slider and fires a
* {@link PropertyChangeEvent} (with the property name "maximum") to all
* registered listeners. Note that:
* <p>
* <ul>
- * <li>the maximum value is stored in the slider's model (see
+ * <li>the maximum value is stored in the slider's model (see
* {@link #getModel()});</li>
- * <li>in addition to the property change event, the slider also fires a
+ * <li>in addition to the property change event, the slider also fires a
* {@link ChangeEvent}.</li>
* </ul>
*
* @param maximum The maximum value of the slider.
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(int maximum)
@@ -655,7 +655,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the <code>valueIsAdjusting</code> flag from the slider's model.
*
* @return The <code>valueIsAdjusting</code> flag from the slider's model.
- *
+ *
* @see #setValueIsAdjusting(boolean)
*/
public boolean getValueIsAdjusting()
@@ -664,11 +664,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the <code>valueIsAdjusting</code> flag in the slider's model, and
+ * Sets the <code>valueIsAdjusting</code> flag in the slider's model, and
* sends a {@link ChangeEvent} to all registered listeners.
*
* @param adjusting the new flag value.
- *
+ *
* @see #getValueIsAdjusting()
*/
public void setValueIsAdjusting(boolean adjusting)
@@ -680,7 +680,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's extent value, obtained from the slider's model.
*
* @return The extent value.
- *
+ *
* @see #setExtent(int)
*/
public int getExtent()
@@ -689,14 +689,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the slider's extent value and sends a {@link ChangeEvent} to all
+ * Sets the slider's extent value and sends a {@link ChangeEvent} to all
* registered listeners. Note that the model will fire a change event to all
* of its registered listeners first (with the model as the event source) and
* then the slider will fire another change event to all of its registered
* listeners (this time with the slider as the event source).
*
* @param extent The extent value for this slider.
- *
+ *
* @see #getExtent()
*/
public void setExtent(int extent)
@@ -709,7 +709,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* or {@link JSlider#VERTICAL}.
*
* @return The orientation of the slider.
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -718,16 +718,16 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the orientation for the slider and sends a
+ * Sets the orientation for the slider and sends a
* {@link PropertyChangeEvent} (with the property name "orientation") to all
* registered listeners.
*
* @param orientation the orientation (one of {@link JSlider#HORIZONTAL} or
* {@link JSlider#VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if <code>orientation</code> is not one of
* the permitted values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
@@ -748,7 +748,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the label table for the slider.
*
* @return The label table for the slider (possibly <code>null</code>).
- *
+ *
* @see #setLabelTable(Dictionary)
*/
public Dictionary getLabelTable()
@@ -757,12 +757,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the table of labels for the slider and sends a
- * {@link PropertyChangeEvent} (with the property name "labelTable") to all
+ * Sets the table of labels for the slider and sends a
+ * {@link PropertyChangeEvent} (with the property name "labelTable") to all
* registered listeners.
*
* @param table the table of labels (<code>null</code> permitted).
- *
+ *
* @see #getLabelTable()
*/
public void setLabelTable(Dictionary table)
@@ -779,7 +779,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Resets the UI delegates for the labels in the <code>labelTable</code> to
+ * Resets the UI delegates for the labels in the <code>labelTable</code> to
* the default for the current look and feel.
*/
protected void updateLabelUIs()
@@ -800,8 +800,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a hashtable of <code>(Integer, JLabel)</code> pairs that can be
- * used as a label table for this slider. The labels will start from the
+ * Creates a hashtable of <code>(Integer, JLabel)</code> pairs that can be
+ * used as a label table for this slider. The labels will start from the
* slider's minimum and increase by the increment. Each label will have a text
* string indicating its integer value.
*
@@ -818,9 +818,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a hashtable of <code>(Integer, JLabel)</code> pairs that can be
- * used as a label table for this slider. The labels will start from the
- * given start value and increase by the increment. Each label will have a
+ * Creates a hashtable of <code>(Integer, JLabel)</code> pairs that can be
+ * used as a label table for this slider. The labels will start from the
+ * given start value and increase by the increment. Each label will have a
* text string indicating its integer value.
*
* @param increment The increment between labels (must be > 0).
@@ -834,7 +834,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*/
public Hashtable createStandardLabels(int increment, int start)
{
- if (increment <= 0)
+ if (increment <= 0)
throw new IllegalArgumentException("Requires 'increment' > 0.");
if (start < getMinimum() || start > getMaximum())
throw new IllegalArgumentException("The 'start' value is out of range.");
@@ -855,7 +855,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*
* @return The flag that controls whether or not the value scale for the
* slider is inverted.
- *
+ *
* @see #setInverted(boolean)
*/
public boolean getInverted()
@@ -867,14 +867,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Sets the flag that controls whether or not the value scale for the
* slider is inverted and, if the new flag value is different to the old flag
* value, sends a {@link PropertyChangeEvent} to all registered listeners.
- * Typically, a horizontal slider will display a scale that increases from
- * left to right, but this is reversed if the 'inverted' flag is set to
+ * Typically, a horizontal slider will display a scale that increases from
+ * left to right, but this is reversed if the 'inverted' flag is set to
* <code>true</code>. Similarly, a vertical slider will display a scale that
* increases from bottom to top, and this is reversed if the 'inverted' flag
* is set to <code>true</code>.
*
* @param inverted the new flag value.
- *
+ *
* @see #getInverted()
*/
public void setInverted(boolean inverted)
@@ -889,11 +889,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the distance between major tick marks along the slider's value
+ * Returns the distance between major tick marks along the slider's value
* scale.
*
* @return The amount of units between each major tick mark.
- *
+ *
* @see #setMajorTickSpacing(int)
*/
public int getMajorTickSpacing()
@@ -902,12 +902,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the distance between major tick marks along the slider's value scale,
- * and sends a {@link PropertyChangeEvent} (with the property name
+ * Sets the distance between major tick marks along the slider's value scale,
+ * and sends a {@link PropertyChangeEvent} (with the property name
* "majorTickSpacing") to all registered listeners.
*
* @param spacing the distance between major tick marks.
- *
+ *
* @see #getMajorTickSpacing()
*/
public void setMajorTickSpacing(int spacing)
@@ -925,12 +925,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the distance between minor tick marks along the slider's value
+ * Returns the distance between minor tick marks along the slider's value
* scale.
*
- * @return The distance between minor tick marks along the slider's value
+ * @return The distance between minor tick marks along the slider's value
* scale.
- *
+ *
* @see #setMinorTickSpacing(int)
*/
public int getMinorTickSpacing()
@@ -939,12 +939,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the distance between minor tick marks along the slider's value scale,
- * and sends a {@link PropertyChangeEvent} (with the property name
+ * Sets the distance between minor tick marks along the slider's value scale,
+ * and sends a {@link PropertyChangeEvent} (with the property name
* "minorTickSpacing") to all registered listeners.
*
* @param spacing the distance between minor tick marks.
- *
+ *
* @see #getMinorTickSpacing()
*/
public void setMinorTickSpacing(int spacing)
@@ -961,11 +961,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Returns the flag that controls whether the slider thumb will snap to ticks.
- * Sliders that snap to ticks will automatically move the thumb to the
+ * Sliders that snap to ticks will automatically move the thumb to the
* nearest tick mark.
*
* @return <code>true</code> if the slider thumb automatically.
- *
+ *
* @see #setSnapToTicks(boolean)
*/
public boolean getSnapToTicks()
@@ -974,13 +974,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the flag that controls whether the slider thumb will snap to ticks
- * and sends a {@link PropertyChangeEvent} (with the property name
- * 'snapToTicks') to all registered listeners. Sliders that snap to ticks
+ * Sets the flag that controls whether the slider thumb will snap to ticks
+ * and sends a {@link PropertyChangeEvent} (with the property name
+ * 'snapToTicks') to all registered listeners. Sliders that snap to ticks
* will automatically move the thumb to the nearest tick mark.
*
* @param snap the new flag value.
- *
+ *
* @see #getSnapToTicks()
*/
public void setSnapToTicks(boolean snap)
@@ -996,9 +996,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the flag that controls whether or not tick marks are painted along
* the slider's value scale.
*
- * @return <code>true</code> if tick marks should be painted, and
+ * @return <code>true</code> if tick marks should be painted, and
* <code>false</code> if tick marks should not be painted.
- *
+ *
* @see #setPaintTicks(boolean)
*/
public boolean getPaintTicks()
@@ -1008,14 +1008,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the flag that controls whether or not tick marks are painted along
- * the slider's value scale, and sends a {@link PropertyChangeEvent} (with
+ * the slider's value scale, and sends a {@link PropertyChangeEvent} (with
* the property name "paintTicks") to all registered listeners. In
* addition to setting this property to <code>true</code>, one or both of the
- * minor tick spacing and major tick spacing attributes must be set to a
+ * minor tick spacing and major tick spacing attributes must be set to a
* value greater than 0 in order for ticks to be painted.
*
* @param paint Whether ticks will be painted.
- *
+ *
* @see #getPaintTicks()
*/
public void setPaintTicks(boolean paint)
@@ -1034,7 +1034,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the flag that controls whether or not the track is painted.
*
* @return Whether the track will be painted.
- *
+ *
* @see #setPaintTrack(boolean)
*/
public boolean getPaintTrack()
@@ -1048,7 +1048,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* registered listeners.
*
* @param paint Whether the track will be painted.
- *
+ *
* @see #getPaintTrack()
*/
public void setPaintTrack(boolean paint)
@@ -1066,7 +1066,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* tick marks along the slider.
*
* @return Whether labels will be painted.
- *
+ *
* @see #setPaintLabels(boolean)
*/
public boolean getPaintLabels()
@@ -1076,11 +1076,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the flag that controls whether or not labels are painted for the
- * tick marks along the slider and sends a {@link PropertyChangeEvent} (with
+ * tick marks along the slider and sends a {@link PropertyChangeEvent} (with
* the property name "paintLabels") to all registered listeners.
*
* @param paint Whether labels will be painted.
- *
+ *
* @see #getPaintLabels()
*/
public void setPaintLabels(boolean paint)
@@ -1119,7 +1119,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
sb.append(",paintTicks=").append(getPaintTicks());
sb.append(",paintTrack=").append(getPaintTrack());
sb.append(",snapToTicks=").append(getSnapToTicks());
-
+
// the following is output by the reference implementation. We don't
// strictly need to replicate this. Perhaps it has some meaning, but
// I couldn't determine it yet...
@@ -1138,7 +1138,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSlider();
-
+
return accessibleContext;
}
}
diff --git a/javax/swing/JSpinner.java b/javax/swing/JSpinner.java
index 16a210600..e942caead 100644
--- a/javax/swing/JSpinner.java
+++ b/javax/swing/JSpinner.java
@@ -66,18 +66,18 @@ import javax.swing.text.NumberFormatter;
* from a list.
*
* @author Ka-Hing Cheung
- *
+ *
* @since 1.4
*/
public class JSpinner extends JComponent
{
/**
- * The base class for the editor used by the {@link JSpinner} component.
+ * The base class for the editor used by the {@link JSpinner} component.
* The editor is in fact a panel containing a {@link JFormattedTextField}
* component.
*/
- public static class DefaultEditor
- extends JPanel
+ public static class DefaultEditor
+ extends JPanel
implements ChangeListener, PropertyChangeListener, LayoutManager
{
/** The spinner that the editor is allocated to. */
@@ -92,7 +92,7 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = -5317788736173368172L;
/**
- * Creates a new <code>DefaultEditor</code> object. The editor is
+ * Creates a new <code>DefaultEditor</code> object. The editor is
* registered with the spinner as a {@link ChangeListener} here.
*
* @param spinner the <code>JSpinner</code> associated with this editor
@@ -107,23 +107,23 @@ public class JSpinner extends JComponent
ftf.setValue(spinner.getValue());
ftf.addPropertyChangeListener(this);
if (getComponentOrientation().isLeftToRight())
- ftf.setHorizontalAlignment(JTextField.RIGHT);
+ ftf.setHorizontalAlignment(JTextField.RIGHT);
else
- ftf.setHorizontalAlignment(JTextField.LEFT);
+ ftf.setHorizontalAlignment(JTextField.LEFT);
spinner.addChangeListener(this);
}
/**
* Returns the <code>JSpinner</code> component that the editor is assigned
* to.
- *
+ *
* @return The spinner that the editor is assigned to.
*/
public JSpinner getSpinner()
{
return spinner;
}
-
+
/**
* DOCUMENT ME!
*/
@@ -144,7 +144,7 @@ public class JSpinner extends JComponent
}
/**
- * Returns the text field used to display and edit the current value in
+ * Returns the text field used to display and edit the current value in
* the spinner.
*
* @return The text field.
@@ -153,7 +153,7 @@ public class JSpinner extends JComponent
{
return ftf;
}
-
+
/**
* Sets the bounds for the child components in this container. In this
* case, the text field is the only component to be laid out.
@@ -168,7 +168,7 @@ public class JSpinner extends JComponent
size.width - insets.left - insets.right,
size.height - insets.top - insets.bottom);
}
-
+
/**
* Calculates the minimum size for this component. In this case, the
* text field is the only subcomponent, so the return value is the minimum
@@ -185,10 +185,10 @@ public class JSpinner extends JComponent
return new Dimension(minSize.width + insets.left + insets.right,
minSize.height + insets.top + insets.bottom);
}
-
+
/**
* Calculates the preferred size for this component. In this case, the
- * text field is the only subcomponent, so the return value is the
+ * text field is the only subcomponent, so the return value is the
* preferred size of the text field plus the insets of this component.
*
* @param parent the parent container.
@@ -202,26 +202,26 @@ public class JSpinner extends JComponent
return new Dimension(prefSize.width + insets.left + insets.right,
prefSize.height + insets.top + insets.bottom);
}
-
+
/**
- * Receives notification of property changes. If the text field's 'value'
+ * Receives notification of property changes. If the text field's 'value'
* property changes, the spinner's model is updated accordingly.
*
* @param event the event.
*/
public void propertyChange(PropertyChangeEvent event)
{
- if (event.getSource() == ftf)
+ if (event.getSource() == ftf)
{
if (event.getPropertyName().equals("value"))
spinner.getModel().setValue(event.getNewValue());
}
}
-
+
/**
* Receives notification of changes in the state of the {@link JSpinner}
* that the editor belongs to - the content of the text field is updated
- * accordingly.
+ * accordingly.
*
* @param event the change event.
*/
@@ -229,12 +229,12 @@ public class JSpinner extends JComponent
{
ftf.setValue(spinner.getValue());
}
-
+
/**
* This method does nothing. It is required by the {@link LayoutManager}
* interface, but since this component has a single child, there is no
* need to use this method.
- *
+ *
* @param child the child component to remove.
*/
public void removeLayoutComponent(Component child)
@@ -246,7 +246,7 @@ public class JSpinner extends JComponent
* This method does nothing. It is required by the {@link LayoutManager}
* interface, but since this component has a single child, there is no
* need to use this method.
- *
+ *
* @param name the name.
* @param child the child component to add.
*/
@@ -260,7 +260,7 @@ public class JSpinner extends JComponent
* A panel containing a {@link JFormattedTextField} that is configured for
* displaying and editing numbers. The panel is used as a subcomponent of
* a {@link JSpinner}.
- *
+ *
* @see JSpinner#createEditor(SpinnerModel)
*/
public static class NumberEditor extends DefaultEditor
@@ -271,8 +271,8 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = 3791956183098282942L;
/**
- * Creates a new <code>NumberEditor</code> object for the specified
- * <code>spinner</code>. The editor is registered with the spinner as a
+ * Creates a new <code>NumberEditor</code> object for the specified
+ * <code>spinner</code>. The editor is registered with the spinner as a
* {@link ChangeListener}.
*
* @param spinner the component the editor will be used with.
@@ -295,7 +295,7 @@ public class JSpinner extends JComponent
public NumberEditor(JSpinner spinner, String decimalFormatPattern)
{
super(spinner);
- NumberEditorFormatter nef
+ NumberEditorFormatter nef
= new NumberEditorFormatter(decimalFormatPattern);
nef.setMinimum(getModel().getMinimum());
nef.setMaximum(getModel().getMaximum());
@@ -316,7 +316,7 @@ public class JSpinner extends JComponent
/**
* Returns the model used by the editor's {@link JSpinner} component,
* cast to a {@link SpinnerNumberModel}.
- *
+ *
* @return The model.
*/
public SpinnerNumberModel getModel()
@@ -324,11 +324,11 @@ public class JSpinner extends JComponent
return (SpinnerNumberModel) getSpinner().getModel();
}
}
-
- static class NumberEditorFormatter
+
+ static class NumberEditorFormatter
extends NumberFormatter
{
- public NumberEditorFormatter()
+ public NumberEditorFormatter()
{
super(NumberFormat.getInstance());
}
@@ -359,7 +359,7 @@ public class JSpinner extends JComponent
/**
* Returns the spinner's model cast as a {@link SpinnerListModel}.
- *
+ *
* @return The spinner's model.
*/
public SpinnerListModel getModel()
@@ -442,10 +442,10 @@ public class JSpinner extends JComponent
}
}
- static class DateEditorFormatter
+ static class DateEditorFormatter
extends DateFormatter
{
- public DateEditorFormatter()
+ public DateEditorFormatter()
{
super(DateFormat.getInstance());
}
@@ -455,9 +455,9 @@ public class JSpinner extends JComponent
}
}
- /**
+ /**
* A listener that forwards {@link ChangeEvent} notifications from the model
- * to the {@link JSpinner}'s listeners.
+ * to the {@link JSpinner}'s listeners.
*/
class ModelListener implements ChangeListener
{
@@ -468,10 +468,10 @@ public class JSpinner extends JComponent
{
// nothing to do here
}
-
+
/**
* Receives notification from the model that its state has changed.
- *
+ *
* @param event the event (ignored).
*/
public void stateChanged(ChangeEvent event)
@@ -480,9 +480,9 @@ public class JSpinner extends JComponent
}
}
- /**
- * The model that defines the current value and permitted values for the
- * spinner.
+ /**
+ * The model that defines the current value and permitted values for the
+ * spinner.
*/
private SpinnerModel model;
@@ -492,8 +492,8 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = 3412663575706551720L;
/**
- * Creates a new <code>JSpinner</code> with default instance of
- * {@link SpinnerNumberModel} (that is, a model with value 0, step size 1,
+ * Creates a new <code>JSpinner</code> with default instance of
+ * {@link SpinnerNumberModel} (that is, a model with value 0, step size 1,
* and no upper or lower limit).
*
* @see javax.swing.SpinnerNumberModel
@@ -504,12 +504,12 @@ public class JSpinner extends JComponent
}
/**
- * Creates a new <code>JSpinner with the specified model. The
+ * Creates a new <code>JSpinner with the specified model. The
* {@link #createEditor(SpinnerModel)} method is used to create an editor
* that is suitable for the model.
*
* @param model the model (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>model</code> is <code>null</code>.
*/
public JSpinner(SpinnerModel model)
@@ -550,7 +550,7 @@ public class JSpinner extends JComponent
*
* @param editor the new editor (<code>null</code> not permitted.
*
- * @throws IllegalArgumentException if <code>editor</code> is
+ * @throws IllegalArgumentException if <code>editor</code> is
* <code>null</code>.
*
* @see #getEditor
@@ -565,7 +565,7 @@ public class JSpinner extends JComponent
((DefaultEditor) oldEditor).dismiss(this);
else if (oldEditor instanceof ChangeListener)
removeChangeListener((ChangeListener) oldEditor);
-
+
this.editor = editor;
firePropertyChange("editor", oldEditor, editor);
}
@@ -574,7 +574,7 @@ public class JSpinner extends JComponent
* Returns the model used by the {@link JSpinner} component.
*
* @return The model.
- *
+ *
* @see #setModel(SpinnerModel)
*/
public SpinnerModel getModel()
@@ -593,7 +593,7 @@ public class JSpinner extends JComponent
{
if (newModel == null)
throw new IllegalArgumentException();
-
+
if (model == newModel)
return;
diff --git a/javax/swing/JSplitPane.java b/javax/swing/JSplitPane.java
index 5b6ec158e..856b2e5c5 100644
--- a/javax/swing/JSplitPane.java
+++ b/javax/swing/JSplitPane.java
@@ -1,4 +1,4 @@
-/* JSplitPane.java --
+/* JSplitPane.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,7 +69,7 @@ public class JSplitPane extends JComponent implements Accessible
implements AccessibleValue
{
private static final long serialVersionUID = -1788116871416305366L;
-
+
/**
* Creates a new <code>AccessibleJSplitPane</code> instance.
*/
@@ -79,7 +79,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns a set containing the current state of the {@link JSplitPane}
+ * Returns a set containing the current state of the {@link JSplitPane}
* component.
*
* @return The accessible state set.
@@ -109,8 +109,8 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JSplitPane}. Since this class implements
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JSplitPane}. Since this class implements
* {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -121,7 +121,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns the current divider location for the {@link JSplitPane}
+ * Returns the current divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The current divider location.
@@ -132,15 +132,15 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Sets the divider location for the {@link JSplitPane} component and sends
- * a {@link PropertyChangeEvent} (with the property name
+ * Sets the divider location for the {@link JSplitPane} component and sends
+ * a {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is <code>null</code>, this method
+ * listeners. If the supplied value is <code>null</code>, this method
* does nothing and returns <code>false</code>.
*
* @param value the new divider location (<code>null</code> permitted).
*
- * @return <code>true</code> if the divider location value is updated, and
+ * @return <code>true</code> if the divider location value is updated, and
* <code>false</code> otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -149,13 +149,13 @@ public class JSplitPane extends JComponent implements Accessible
return false;
Number oldValue = getCurrentAccessibleValue();
setDividerLocation(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(value.intValue()));
return true;
}
/**
- * Returns the minimum divider location for the {@link JSplitPane}
+ * Returns the minimum divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The minimum divider location.
@@ -166,7 +166,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns the maximum divider location for the {@link JSplitPane}
+ * Returns the maximum divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The maximum divider location.
@@ -178,7 +178,7 @@ public class JSplitPane extends JComponent implements Accessible
}
private static final long serialVersionUID = -5634142046175988380L;
-
+
/** The constraints string used to add components to the bottom. */
public static final String BOTTOM = "bottom";
@@ -200,14 +200,14 @@ public class JSplitPane extends JComponent implements Accessible
public static final int HORIZONTAL_SPLIT = 1;
/** The property fired when the last divider location property changes. */
- public static final String LAST_DIVIDER_LOCATION_PROPERTY =
+ public static final String LAST_DIVIDER_LOCATION_PROPERTY =
"lastDividerLocation";
/** The constraints string used to add components to the left. */
public static final String LEFT = "left";
/** The property fired when the one touch expandable property changes. */
- public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
+ public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
"oneTouchExpandable";
/** The property fired when the orientation property changes. */
@@ -231,7 +231,7 @@ public class JSplitPane extends JComponent implements Accessible
/** Whether the JSplitPane uses one touch expandable buttons. */
protected boolean oneTouchExpandable = false;
- // This is the master dividerSize variable and sets the
+ // This is the master dividerSize variable and sets the
// BasicSplitPaneDivider one accordingly
/** The size of the divider. */
@@ -357,7 +357,7 @@ public class JSplitPane extends JComponent implements Accessible
* @param constraints The constraints string to use.
* @param index Where to place to component in the list of components.
*
- * @throws IllegalArgumentException When the constraints is not a known
+ * @throws IllegalArgumentException When the constraints is not a known
* identifier.
*/
protected void addImpl(Component comp, Object constraints, int index)
@@ -389,7 +389,7 @@ public class JSplitPane extends JComponent implements Accessible
else if (placement.equals(DIVIDER))
constraints = null;
else
- throw new
+ throw new
IllegalArgumentException("Constraints is not a known identifier.");
// If no dividerLocation has been set, then we need to trigger an
@@ -405,14 +405,14 @@ public class JSplitPane extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* <code>JSplitPane</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJSplitPane}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSplitPane();
-
+
return accessibleContext;
}
@@ -715,7 +715,7 @@ public class JSplitPane extends JComponent implements Accessible
/**
* This method sets the location of the divider.
- *
+ *
* @param location The location of the divider. The negative value forces to
* compute the new location from the preferred sizes of the split
* pane components.
@@ -727,7 +727,7 @@ public class JSplitPane extends JComponent implements Accessible
SplitPaneUI ui = getUI();
if (ui != null)
ui.setDividerLocation(this, location);
- firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation,
+ firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation,
location);
}
@@ -773,7 +773,7 @@ public class JSplitPane extends JComponent implements Accessible
* @param comp The left component.
*/
public void setLeftComponent(Component comp)
- {
+ {
if (comp != null)
add(comp, LEFT);
else
@@ -801,8 +801,8 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Sets the orientation for the <code>JSplitPane</code> and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the orientation for the <code>JSplitPane</code> and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #ORIENTATION_PROPERTY}) to all registered listeners.
*
* @param orientation the orientation (either {@link #HORIZONTAL_SPLIT}
@@ -839,7 +839,7 @@ public class JSplitPane extends JComponent implements Accessible
if (value < 0.0 || value > 1.0)
throw new IllegalArgumentException("Value outside permitted range.");
if (this.resizeWeight != value)
- {
+ {
double old = resizeWeight;
resizeWeight = value;
firePropertyChange(RESIZE_WEIGHT_PROPERTY, old, value);
@@ -905,7 +905,7 @@ public class JSplitPane extends JComponent implements Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/JTabbedPane.java b/javax/swing/JTabbedPane.java
index 79521be3f..18055e8a9 100644
--- a/javax/swing/JTabbedPane.java
+++ b/javax/swing/JTabbedPane.java
@@ -64,7 +64,7 @@ import javax.swing.plaf.UIResource;
* This is a container for components where only one component is displayed at
* a given time and the displayed component can be switched by clicking on
* tabs.
- *
+ *
* <p>
* Tabs can be oriented in several ways. They can be above, below, left and
* right of the component. Tabs can either wrap around (by creating multiple
@@ -185,7 +185,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Returns the number of selected child components of the
* <code>JTabbedPane</code>. The reference implementation appears
- * to return <code>1</code> always and we do the same.
+ * to return <code>1</code> always and we do the same.
*
* @return <code>1</code>
*/
@@ -195,7 +195,7 @@ public class JTabbedPane extends JComponent implements Serializable,
}
/**
- * Returns the selected tab, or <code>null</code> if there is no
+ * Returns the selected tab, or <code>null</code> if there is no
* selection.
*
* @param i the selection index (ignored here).
@@ -239,7 +239,7 @@ public class JTabbedPane extends JComponent implements Serializable,
* tabbed pane, since one tab must always be selected.
*
* @param i the item index.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void removeAccessibleSelection(int i)
@@ -250,7 +250,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Does nothing - it makes no sense to clear the selection for
* a tabbed pane, since one tab must always be selected.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void clearAccessibleSelection()
@@ -261,7 +261,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Does nothing - it makes no sense to select all for a tabbed
* pane, since only one tab can be selected at a time.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void selectAllAccessibleSelection()
@@ -464,7 +464,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
title = text;
if (title != null && title.length() <= underlinedChar)
- setDisplayedMnemonicIndex(title.length() - 1);
+ setDisplayedMnemonicIndex(title.length() - 1);
}
/**
@@ -495,7 +495,7 @@ public class JTabbedPane extends JComponent implements Serializable,
public Icon getDisabledIcon()
{
if (disabledIcon == null && icon instanceof ImageIcon)
- setDisabledIcon(icon);
+ setDisabledIcon(icon);
return disabledIcon;
}
@@ -560,7 +560,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
mnemonicKey = aChar;
if (title != null)
- setDisplayedMnemonicIndex(title.indexOf(mnemonicKey));
+ setDisplayedMnemonicIndex(title.indexOf(mnemonicKey));
}
/**
@@ -585,10 +585,10 @@ public class JTabbedPane extends JComponent implements Serializable,
throws IllegalArgumentException
{
if (index < -1 || title != null && index >= title.length())
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException();
if (title == null || mnemonicKey == 0 || (index > -1 && title.charAt(index) != mnemonicKey))
- index = -1;
+ index = -1;
underlinedChar = index;
}
@@ -605,7 +605,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Returns the accessible name for this tab.
- *
+ *
* @return The accessible name.
*/
public String getAccessibleName()
@@ -615,7 +615,7 @@ public class JTabbedPane extends JComponent implements Serializable,
else
return title;
}
-
+
/**
* Returns the accessible role of this tab, which is always
* {@link AccessibleRole#PAGE_TAB}.
@@ -634,7 +634,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public AccessibleStateSet getAccessibleStateSet()
{
- AccessibleContext parentCtx = JTabbedPane.this.getAccessibleContext();
+ AccessibleContext parentCtx = JTabbedPane.this.getAccessibleContext();
AccessibleStateSet state = parentCtx.getAccessibleStateSet();
state.add(AccessibleState.SELECTABLE);
if (component == getSelectedComponent())
@@ -761,7 +761,7 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabLayoutPolicy is not valid.");
this.tabPlacement = tabPlacement;
layoutPolicy = tabLayoutPolicy;
-
+
setModel(new DefaultSingleSelectionModel());
updateUI();
@@ -847,8 +847,8 @@ public class JTabbedPane extends JComponent implements Serializable,
changeEvent = new ChangeEvent(this);
for (int i = changeListeners.length - 2; i >= 0; i -= 2)
{
- if (changeListeners[i] == ChangeListener.class)
- ((ChangeListener) changeListeners[i + 1]).stateChanged(changeEvent);
+ if (changeListeners[i] == ChangeListener.class)
+ ((ChangeListener) changeListeners[i + 1]).stateChanged(changeEvent);
}
}
@@ -881,11 +881,11 @@ public class JTabbedPane extends JComponent implements Serializable,
{
if (m != model)
{
- SingleSelectionModel oldModel = this.model;
+ SingleSelectionModel oldModel = this.model;
if (oldModel != null && changeListener != null)
oldModel.removeChangeListener(changeListener);
- model = m;
+ model = m;
if (model != null)
{
@@ -893,7 +893,7 @@ public class JTabbedPane extends JComponent implements Serializable,
changeListener = createChangeListener();
model.addChangeListener(changeListener);
}
- firePropertyChange("model", oldModel, this.model);
+ firePropertyChange("model", oldModel, this.model);
}
}
@@ -922,9 +922,9 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabPlacement is not valid.");
if (tabPlacement != this.tabPlacement)
{
- int oldPlacement = this.tabPlacement;
- this.tabPlacement = tabPlacement;
- firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement);
+ int oldPlacement = this.tabPlacement;
+ this.tabPlacement = tabPlacement;
+ firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement);
}
}
@@ -953,9 +953,9 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabLayoutPolicy is not valid.");
if (tabLayoutPolicy != layoutPolicy)
{
- int oldPolicy = layoutPolicy;
- layoutPolicy = tabLayoutPolicy;
- firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy);
+ int oldPolicy = layoutPolicy;
+ layoutPolicy = tabLayoutPolicy;
+ firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy);
}
}
@@ -998,7 +998,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
// Hiding and showing the involved components
// is done by the JTabbedPane's UI.
- model.setSelectedIndex(index);
+ model.setSelectedIndex(index);
}
}
@@ -1051,8 +1051,8 @@ public class JTabbedPane extends JComponent implements Serializable,
// so we don't trigger a repaint.
if (component != null)
{
- component.hide();
- super.add(component);
+ component.hide();
+ super.add(component);
}
if (getSelectedIndex() == -1)
@@ -1117,7 +1117,7 @@ public class JTabbedPane extends JComponent implements Serializable,
super.add(component);
else
insertTab(component.getName(), null, component, null, tabs.size());
-
+
return component;
}
@@ -1191,18 +1191,18 @@ public class JTabbedPane extends JComponent implements Serializable,
super.add(component);
else
{
- if (constraints instanceof String)
- insertTab((String) constraints, null, component, null, index);
- else
- insertTab(component.getName(),
- (constraints instanceof Icon) ? (Icon) constraints : null,
- component, null, index);
+ if (constraints instanceof String)
+ insertTab((String) constraints, null, component, null, index);
+ else
+ insertTab(component.getName(),
+ (constraints instanceof Icon) ? (Icon) constraints : null,
+ component, null, index);
}
}
/**
- * Removes the tab at index. After the component associated with
- * index is removed, its visibility is reset to true to ensure it
+ * Removes the tab at index. After the component associated with
+ * index is removed, its visibility is reset to true to ensure it
* will be visible if added to other containers.
*
* @param index The index of the tab to remove.
@@ -1261,7 +1261,7 @@ public class JTabbedPane extends JComponent implements Serializable,
// Since components implementing UIResource
// are not added as regular tabs by the add()
// methods we have to take special care when
- // removing these object. Especially
+ // removing these object. Especially
// Container.remove(Component) cannot be used
// because it will call JTabbedPane.remove(int)
// later which is overridden and can only
@@ -1270,7 +1270,7 @@ public class JTabbedPane extends JComponent implements Serializable,
// situation that someone called insertTab()
// with a component that implements UIResource.
int index = indexOfComponent(component);
-
+
// If the component is not a tab component
// find out its Container-given index
// and call that class' implementation
@@ -1603,11 +1603,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getTitle().equals(title))
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getTitle().equals(title))
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1624,11 +1624,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getIcon() == icon)
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getIcon() == icon)
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1645,11 +1645,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getComponent() == component)
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getComponent() == component)
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1684,12 +1684,12 @@ public class JTabbedPane extends JComponent implements Serializable,
}
/**
- * Returns a string describing the attributes for the
- * <code>JTabbedPane</code> component, for use in debugging. The return
- * value is guaranteed to be non-<code>null</code>, but the format of the
+ * Returns a string describing the attributes for the
+ * <code>JTabbedPane</code> component, for use in debugging. The return
+ * value is guaranteed to be non-<code>null</code>, but the format of the
* string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* <code>JTabbedPane</code>.
*/
protected String paramString()
@@ -1711,7 +1711,7 @@ public class JTabbedPane extends JComponent implements Serializable,
* Returns the object that provides accessibility features for this
* <code>JTabbedPane</code> component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJTabbedPane}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/JTable.java b/javax/swing/JTable.java
index 42563e6a2..b60c67aa3 100644
--- a/javax/swing/JTable.java
+++ b/javax/swing/JTable.java
@@ -1,4 +1,4 @@
-/* JTable.java --
+/* JTable.java --
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -90,9 +90,9 @@ import javax.swing.table.TableModel;
* The table component, displaying information, organized in rows and columns.
* The table can be placed in the scroll bar and have the optional header
* that is always visible. Cell values may be editable after double clicking
- * on the cell. Cell columns may have various data types, that are
+ * on the cell. Cell columns may have various data types, that are
* displayed and edited by the different renderers and editors. It is possible
- * to set different column width. The columns are also resizeable by
+ * to set different column width. The columns are also resizeable by
* dragging the column boundary in the header.
*/
public class JTable
@@ -271,7 +271,7 @@ public class JTable
* Sets the background of the cell. Since table cells cannot have
* individual background colors, this method does nothing. Set the
* background directly on the table instead.
- *
+ *
* @param color not used
*/
public void setBackground(Color color)
@@ -293,7 +293,7 @@ public class JTable
* Sets the foreground of the cell. Since table cells cannot have
* individual foreground colors, this method does nothing. Set the
* foreground directly on the table instead.
- *
+ *
* @param color not used
*/
public void setForeground(Color color)
@@ -315,7 +315,7 @@ public class JTable
* Sets the cursor of the cell. Since table cells cannot have
* individual cursors, this method does nothing. Set the
* cursor directly on the table instead.
- *
+ *
* @param cursor not used
*/
public void setCursor(Cursor cursor)
@@ -337,7 +337,7 @@ public class JTable
* Sets the font of the cell. Since table cells cannot have
* individual fonts, this method does nothing. Set the
* font directly on the table instead.
- *
+ *
* @param font not used
*/
public void setFont(Font font)
@@ -568,7 +568,7 @@ public class JTable
{
table.removeFocusListener(listener);
}
-
+
}
protected class AccessibleJTableModelChange
@@ -748,7 +748,7 @@ public class JTable
public void setAccessibleRowHeader(AccessibleTable header)
{
// TODO Auto-generated method stub
-
+
}
public AccessibleTable getAccessibleColumnHeader()
@@ -760,7 +760,7 @@ public class JTable
public void setAccessibleColumnHeader(AccessibleTable header)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleRowDescription(int r)
@@ -772,7 +772,7 @@ public class JTable
public void setAccessibleRowDescription(int r, Accessible description)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleColumnDescription(int c)
@@ -784,7 +784,7 @@ public class JTable
public void setAccessibleColumnDescription(int c, Accessible description)
{
// TODO Auto-generated method stub
-
+
}
public boolean isAccessibleSelected(int r, int c)
@@ -816,7 +816,7 @@ public class JTable
// TODO Auto-generated method stub
return null;
}
-
+
}
/**
@@ -830,11 +830,11 @@ public class JTable
{
JTableHeader header;
-
+
int columnIndex;
-
+
/**
- *
+ *
* @param h the table header.
* @param comp
* @param r
@@ -849,7 +849,7 @@ public class JTable
/**
* Returns the header renderer.
- *
+ *
* @return The header renderer.
*/
Component getColumnHeaderRenderer()
@@ -858,13 +858,13 @@ public class JTable
TableCellRenderer r = tc.getHeaderRenderer();
if (r == null)
r = header.getDefaultRenderer();
- return r.getTableCellRendererComponent(header.getTable(),
+ return r.getTableCellRendererComponent(header.getTable(),
tc.getHeaderValue(), false, false, -1, columnIndex);
}
-
+
/**
* Returns the accessible role for the table header cell.
- *
+ *
* @return The accessible role.
*/
public AccessibleRole getAccessibleRole()
@@ -910,7 +910,7 @@ public class JTable
/**
* Returns the accessible context.
- *
+ *
* @return <code>this</code>.
*/
public AccessibleContext getAccessibleContext()
@@ -927,7 +927,7 @@ public class JTable
public void setBackground(Color color)
{
// TODO Auto-generated method stub
-
+
}
public Color getForeground()
@@ -939,7 +939,7 @@ public class JTable
public void setForeground(Color color)
{
// TODO Auto-generated method stub
-
+
}
public Cursor getCursor()
@@ -951,7 +951,7 @@ public class JTable
public void setCursor(Cursor cursor)
{
// TODO Auto-generated method stub
-
+
}
public Font getFont()
@@ -963,7 +963,7 @@ public class JTable
public void setFont(Font font)
{
// TODO Auto-generated method stub
-
+
}
public FontMetrics getFontMetrics(Font font)
@@ -981,7 +981,7 @@ public class JTable
public void setEnabled(boolean b)
{
// TODO Auto-generated method stub
-
+
}
public boolean isVisible()
@@ -993,7 +993,7 @@ public class JTable
public void setVisible(boolean b)
{
// TODO Auto-generated method stub
-
+
}
public boolean isShowing()
@@ -1023,7 +1023,7 @@ public class JTable
public void setLocation(Point point)
{
// TODO Auto-generated method stub
-
+
}
public Rectangle getBounds()
@@ -1035,7 +1035,7 @@ public class JTable
public void setBounds(Rectangle rectangle)
{
// TODO Auto-generated method stub
-
+
}
public Dimension getSize()
@@ -1047,7 +1047,7 @@ public class JTable
public void setSize(Dimension dimension)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleAt(Point point)
@@ -1065,21 +1065,21 @@ public class JTable
public void requestFocus()
{
// TODO Auto-generated method stub
-
+
}
public void addFocusListener(FocusListener listener)
{
// TODO Auto-generated method stub
-
+
}
public void removeFocusListener(FocusListener listener)
{
// TODO Auto-generated method stub
-
+
}
-
+
}
/**
@@ -1140,17 +1140,17 @@ public class JTable
{
return AccessibleRole.TABLE;
}
-
+
/**
* Returns the accessible table.
- *
+ *
* @return <code>this</code>.
*/
public AccessibleTable getAccessibleTable()
{
return this;
}
-
+
/**
* Returns the number of selected items in this table.
*/
@@ -1489,7 +1489,7 @@ public class JTable
*/
public void propertyChange(PropertyChangeEvent e)
{
- String propName = e.getPropertyName();
+ String propName = e.getPropertyName();
if (propName.equals("tableModel"))
{
TableModel oldModel = (TableModel) e.getOldValue();
@@ -1525,9 +1525,9 @@ public class JTable
* index.
*
* @param index the index of the cell of which the row number is queried
- *
+ *
* @return the row number of an accessible child (cell) with the specified
- * index
+ * index
*/
public int getAccessibleRow(int index)
{
@@ -1539,9 +1539,9 @@ public class JTable
* specified index.
*
* @param index the index of the cell of which the column number is queried
- *
+ *
* @return the column number of an accessible child (cell) with the
- * specified index
+ * specified index
*/
public int getAccessibleColumn(int index)
{
@@ -1629,16 +1629,16 @@ public class JTable
* Returns the accessible child at the given index.
*
* @param index the child index.
- *
+ *
* @return The accessible child.
*/
public Accessible getAccessibleChild(int index)
{
int r = getAccessibleRow(index);
int c = getAccessibleColumn(index);
- return getAccessibleAt(r, c);
+ return getAccessibleAt(r, c);
}
-
+
/**
* Returns the accessible child (table cell) at the specified row and
* column.
@@ -1707,7 +1707,7 @@ public class JTable
*/
public void setAccessibleRowHeader(AccessibleTable header)
{
- // In the RI this seems to be a no-op.
+ // In the RI this seems to be a no-op.
}
/**
@@ -1912,7 +1912,7 @@ public class JTable
/**
* Receives notification that a property of the observed TableColumns has
* changed.
- *
+ *
* @param ev the property change event
*/
public void propertyChange(PropertyChangeEvent ev)
@@ -1943,7 +1943,7 @@ public class JTable
* The CheckBox that is used for rendering.
*/
private final JCheckBox checkBox;
-
+
/**
* Creates a new checkbox based boolean cell renderer. The checkbox is
* centered by default.
@@ -1953,7 +1953,7 @@ public class JTable
checkBox = new JCheckBox();
checkBox.setHorizontalAlignment(SwingConstants.CENTER);
}
-
+
/**
* Get the check box.
*/
@@ -1964,7 +1964,7 @@ public class JTable
/**
* Returns the component that is used for rendering the value.
- *
+ *
* @param table the JTable
* @param value the value of the object
* @param isSelected is the cell selected?
@@ -2031,7 +2031,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2074,7 +2074,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2117,7 +2117,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2162,8 +2162,8 @@ public class JTable
{
setHorizontalAlignment(SwingConstants.CENTER);
}
-
-
+
+
/**
* Returns the component that is used for rendering the value.
*
@@ -2173,7 +2173,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2196,7 +2196,7 @@ public class JTable
return this;
}
}
-
+
/**
* The JTable text component (used in editing) always has the table
* as its parent. The scrollRectToVisible must be adjusted taking the
@@ -2213,11 +2213,11 @@ public class JTable
{
setBorder(BorderFactory.createLineBorder(getGridColor(), 2));
}
- }
-
+ }
+
private static final long serialVersionUID = 3876025080382781659L;
-
+
/**
* This table, for referring identically name methods from inner classes.
*/
@@ -2244,7 +2244,7 @@ public class JTable
* n)</code>, uniformly, to provide or absorb excess space requirements.
*/
public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS = 2;
-
+
/**
* When resizing column <code>i</code> in a table of <code>n</code>
* columns, automatically change all columns in the range <code>[0,
@@ -2261,15 +2261,15 @@ public class JTable
public static final int AUTO_RESIZE_LAST_COLUMN = 3;
/**
- * A table mapping {@link java.lang.Class} objects to
- * {@link TableCellEditor} objects. This table is consulted by the
+ * A table mapping {@link java.lang.Class} objects to
+ * {@link TableCellEditor} objects. This table is consulted by the
* FIXME
*/
protected Hashtable defaultEditorsByColumnClass = new Hashtable();
/**
- * A table mapping {@link java.lang.Class} objects to
- * {@link TableCellEditor} objects. This table is consulted by the
+ * A table mapping {@link java.lang.Class} objects to
+ * {@link TableCellEditor} objects. This table is consulted by the
* FIXME
*/
protected Hashtable defaultRenderersByColumnClass = new Hashtable();
@@ -2295,7 +2295,7 @@ public class JTable
/**
* Whether or not the table should automatically compute a matching
* {@link TableColumnModel} and assign it to the {@link #columnModel}
- * property when the {@link #dataModel} property is changed.
+ * property when the {@link #dataModel} property is changed.
*
* @see #setModel(TableModel)
* @see #createDefaultColumnsFromModel()
@@ -2310,7 +2310,7 @@ public class JTable
* one of {@link #AUTO_RESIZE_ALL_COLUMNS} (the default), {@link
* #AUTO_RESIZE_LAST_COLUMN}, {@link #AUTO_RESIZE_NEXT_COLUMN}, {@link
* #AUTO_RESIZE_SUBSEQUENT_COLUMNS}, or {@link #AUTO_RESIZE_OFF}.
- *
+ *
* @see #doLayout()
* @see #setAutoResizeMode(int)
* @see #getAutoResizeMode()
@@ -2322,7 +2322,7 @@ public class JTable
* of uniform height. This differs from column width, which varies on a
* per-column basis, and is stored in the individual columns of the
* {@link #columnModel}.
- *
+ *
* @see #getRowHeight()
* @see #setRowHeight(int)
* @see TableColumn#getWidth()
@@ -2331,8 +2331,8 @@ public class JTable
protected int rowHeight;
/**
- * The height in pixels of the gap left between any two rows of the table.
- *
+ * The height in pixels of the gap left between any two rows of the table.
+ *
* @see #setRowMargin(int)
* @see #getRowHeight()
* @see #getIntercellSpacing()
@@ -2358,12 +2358,12 @@ public class JTable
protected boolean rowSelectionAllowed;
/**
- * Obsolete. Use {@link #rowSelectionAllowed}, {@link
+ * Obsolete. Use {@link #rowSelectionAllowed}, {@link
* #getColumnSelectionAllowed}, or the combined methods {@link
* #getCellSelectionEnabled} and {@link #setCellSelectionEnabled(boolean)}.
*/
protected boolean cellSelectionEnabled;
-
+
/**
* The model for data stored in the table. Confusingly, the published API
* requires that this field be called <code>dataModel</code>, despite its
@@ -2393,7 +2393,7 @@ public class JTable
* at all: setting {@link #autoCreateColumnsFromModel} will construct the
* columnModel automatically, and the table acts as a facade for most of
* the interesting properties of the columnModel anyways.</p>
- *
+ *
* @see #setColumnModel(TableColumnModel)
* @see #getColumnModel()
*/
@@ -2409,12 +2409,12 @@ public class JTable
* @see #setSelectionModel(ListSelectionModel)
* @see #getSelectionModel()
* @see TableColumnModel#getSelectionModel()
- * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)
+ * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)
*/
protected ListSelectionModel selectionModel;
/**
- * The current cell editor.
+ * The current cell editor.
*/
protected TableCellEditor cellEditor;
@@ -2504,7 +2504,7 @@ public class JTable
private boolean surrendersFocusOnKeystroke = false;
/**
- * A Rectangle object to be reused in {@link #getCellRect}.
+ * A Rectangle object to be reused in {@link #getCellRect}.
*/
private Rectangle rectCache = new Rectangle();
@@ -2531,13 +2531,13 @@ public class JTable
* @see #setRowHeight(int, int)
*/
private SizeSequence rowHeights;
-
+
/**
* This editor serves just a marker that the value must be simply changed to
* the opposite one instead of starting the editing session.
*/
- private transient TableCellEditor booleanInvertingEditor;
-
+ private transient TableCellEditor booleanInvertingEditor;
+
/**
* Creates a new <code>JTable</code> instance.
*/
@@ -2559,7 +2559,7 @@ public class JTable
}
/**
- * Creates a new <code>JTable</code> instance, storing the given data
+ * Creates a new <code>JTable</code> instance, storing the given data
* array and heaving the given column names. To see the column names,
* you must place the JTable into the {@link JScrollPane}.
*
@@ -2576,7 +2576,7 @@ public class JTable
* object that provides information about the table content. The table model
* object is asked for the table size, other features and also receives
* notifications in the case when the table has been edited by the user.
- *
+ *
* @param model
* the table model.
*/
@@ -2592,7 +2592,7 @@ public class JTable
* notifications in the case when the table has been edited by the user. The
* table column model provides more detailed control on the table column
* related features.
- *
+ *
* @param dm
* the table data mode
* @param cm
@@ -2618,24 +2618,24 @@ public class JTable
TableColumnModel columnModel;
if (cm != null)
columnModel = cm;
- else
+ else
{
columnModel = createDefaultColumnModel();
autoCreate = true;
}
-
+
// Initialise the intercelar spacing before setting the column model to
// avoid firing unnecessary events.
- // The initial incellar spacing is new Dimenstion(1,1).
+ // The initial incellar spacing is new Dimenstion(1,1).
rowMargin = 1;
columnModel.setColumnMargin(1);
setColumnModel(columnModel);
-
+
setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
setModel(dm == null ? createDefaultDataModel() : dm);
setAutoCreateColumnsFromModel(autoCreate);
initializeLocalVars();
-
+
// The following four lines properly set the lead selection indices.
// After this, the UI will handle the lead selection indices.
// FIXME: this should probably not be necessary, if the UI is installed
@@ -2649,9 +2649,9 @@ public class JTable
// selectionModel.setLeadSelectionIndex(-1);
// columnModel.getSelectionModel().setAnchorSelectionIndex(-1);
// columnModel.getSelectionModel().setLeadSelectionIndex(-1);
- updateUI();
+ updateUI();
}
-
+
/**
* Creates a new <code>JTable</code> instance that uses data and column
* names, stored in {@link Vector}s.
@@ -2662,8 +2662,8 @@ public class JTable
public JTable(Vector data, Vector columnNames)
{
this(new DefaultTableModel(data, columnNames));
- }
-
+ }
+
/**
* Initialize local variables to default values.
*/
@@ -2678,10 +2678,10 @@ public class JTable
setRowHeight(16);
this.rowMargin = 1;
this.rowSelectionAllowed = true;
-
+
// this.accessibleContext = new AccessibleJTable();
this.cellEditor = null;
-
+
// COMPAT: Both Sun and IBM have drag enabled
this.dragEnabled = false;
this.preferredViewportSize = new Dimension(450,400);
@@ -2690,15 +2690,15 @@ public class JTable
this.editingColumn = -1;
this.editingRow = -1;
}
-
+
/**
* Add the new table column. The table column class allows to specify column
* features more precisely, setting the preferred width, column data type
* (column class) and table headers.
- *
- * There is no need the add columns to the table if the default column
+ *
+ * There is no need the add columns to the table if the default column
* handling is sufficient.
- *
+ *
* @param column
* the new column to add.
*/
@@ -2709,15 +2709,15 @@ public class JTable
String name = dataModel.getColumnName(column.getModelIndex());
column.setHeaderValue(name);
}
-
+
columnModel.addColumn(column);
column.addPropertyChangeListener(tableColumnPropertyChangeHandler);
}
-
+
/**
* Create the default editors for this table. The default method creates
* the editor for Booleans.
- *
+ *
* Other fields are edited as strings at the moment.
*/
protected void createDefaultEditors()
@@ -2725,10 +2725,10 @@ public class JTable
JCheckBox box = new BooleanCellRenderer().getCheckBox();
box.setBorder(BorderFactory.createLineBorder(getGridColor(), 2));
box.setBorderPainted(true);
- booleanInvertingEditor = new DefaultCellEditor(box);
+ booleanInvertingEditor = new DefaultCellEditor(box);
setDefaultEditor(Boolean.class, booleanInvertingEditor);
}
-
+
/**
* Create the default renderers for this table. The default method creates
* renderers for Boolean, Number, Double, Date, Icon and ImageIcon.
@@ -2742,9 +2742,9 @@ public class JTable
setDefaultRenderer(Double.class, new FloatCellRenderer());
setDefaultRenderer(Date.class, new DateCellRenderer());
setDefaultRenderer(Icon.class, new IconCellRenderer());
- setDefaultRenderer(ImageIcon.class, new IconCellRenderer());
+ setDefaultRenderer(ImageIcon.class, new IconCellRenderer());
}
-
+
/**
* @deprecated 1.0.2, replaced by <code>new JScrollPane(JTable)</code>
*/
@@ -2752,12 +2752,12 @@ public class JTable
{
return new JScrollPane(table);
}
-
+
/**
* Create the default table column model that is used if the user-defined
* column model is not provided. The default method creates
* {@link DefaultTableColumnModel}.
- *
+ *
* @return the created table column model.
*/
protected TableColumnModel createDefaultColumnModel()
@@ -2769,7 +2769,7 @@ public class JTable
* Create the default table data model that is used if the user-defined
* data model is not provided. The default method creates
* {@link DefaultTableModel}.
- *
+ *
* @return the created table data model.
*/
protected TableModel createDefaultDataModel()
@@ -2781,25 +2781,25 @@ public class JTable
* Create the default table selection model that is used if the user-defined
* selection model is not provided. The default method creates
* {@link DefaultListSelectionModel}.
- *
+ *
* @return the created table data model.
*/
protected ListSelectionModel createDefaultSelectionModel()
{
return new DefaultListSelectionModel();
}
-
+
/**
* Create the default table header, if the user - defined table header is not
* provided.
- *
+ *
* @return the default table header.
*/
protected JTableHeader createDefaultTableHeader()
{
return new JTableHeader(columnModel);
}
-
+
/**
* Invoked when the column is added. Revalidates and repains the table.
*/
@@ -2810,7 +2810,7 @@ public class JTable
}
/**
- * Invoked when the column margin is changed.
+ * Invoked when the column margin is changed.
* Revalidates and repains the table.
*/
public void columnMarginChanged (ChangeEvent event)
@@ -2838,7 +2838,7 @@ public class JTable
revalidate();
repaint();
}
-
+
/**
* Invoked when the the column selection changes, repaints the changed
* columns. It is not recommended to override this method, register the
@@ -2887,7 +2887,7 @@ public class JTable
repaint(dirty);
}
}
-
+
/**
* Invoked when the editing is cancelled.
*/
@@ -2896,23 +2896,23 @@ public class JTable
if (editorComp!=null)
{
remove(editorComp);
- repaint(editorComp.getBounds());
+ repaint(editorComp.getBounds());
editorComp = null;
}
}
-
+
/**
* Finish the current editing session and update the table with the
* new value by calling {@link #setValueAt}.
- *
+ *
* @param event the change event
*/
public void editingStopped (ChangeEvent event)
{
if (editorComp!=null)
{
- remove(editorComp);
- setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn);
+ remove(editorComp);
+ setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn);
repaint(editorComp.getBounds());
editorComp = null;
}
@@ -3051,7 +3051,7 @@ public class JTable
Rectangle dirty;
if (col == TableModelEvent.ALL_COLUMNS)
{
- // All columns changed.
+ // All columns changed.
dirty = new Rectangle(0, firstRow * getRowHeight(),
getColumnModel().getTotalColumnWidth(), 0);
}
@@ -3121,7 +3121,7 @@ public class JTable
// If we are in the editing process, end the editing session.
if (isEditing())
editingStopped(null);
-
+
// Repaint the changed region.
int first = Math.max(0, Math.min(getRowCount() - 1, event.getFirstIndex()));
int last = Math.max(0, Math.min(getRowCount() - 1, event.getLastIndex()));
@@ -3134,11 +3134,11 @@ public class JTable
}
/**
- * Returns index of the column that contains specified point
+ * Returns index of the column that contains specified point
* or -1 if this table doesn't contain this point.
*
* @param point point to identify the column
- * @return index of the column that contains specified point or
+ * @return index of the column that contains specified point or
* -1 if this table doesn't contain this point.
*/
public int columnAtPoint(Point point)
@@ -3162,7 +3162,7 @@ public class JTable
/**
* Returns index of the row that contains specified point or -1 if this table
* doesn't contain this point.
- *
+ *
* @param point point to identify the row
* @return index of the row that contains specified point or -1 if this table
* doesn't contain this point.
@@ -3191,7 +3191,7 @@ public class JTable
return -1;
}
- /**
+ /**
* Calculate the visible rectangle for a particular row and column. The
* row and column are specified in visual terms; the column may not match
* the {@link #dataModel} column.
@@ -3272,7 +3272,7 @@ public class JTable
cellRect.x += cMargin / 2;
cellRect.width -= cMargin;
}
- }
+ }
return cellRect;
}
@@ -3291,10 +3291,10 @@ public class JTable
* @return The current value of the selectedRow property
*/
public int getSelectedRow ()
- {
+ {
return selectionModel.getMinSelectionIndex();
}
-
+
/**
* Get the value of the {@link #selectionModel} property.
*
@@ -3305,7 +3305,7 @@ public class JTable
//Neither Sun nor IBM returns null if rowSelection not allowed
return selectionModel;
}
-
+
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
{
int block;
@@ -3334,7 +3334,7 @@ public class JTable
{
return false;
}
-
+
/**
* Get the value of the <code>scrollableTracksViewportWidth</code> property.
*
@@ -3348,20 +3348,20 @@ public class JTable
else
return true;
}
-
+
/**
* Return the preferred scrolling amount (in pixels) for the given scrolling
* direction and orientation. This method handles a partially exposed row by
* returning the distance required to completely expose the item. When
* scrolling the top item is completely exposed.
- *
+ *
* @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
* The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation,
@@ -3403,7 +3403,7 @@ public class JTable
* not provide the editor, the call is forwarded to the
* {@link #getDefaultEditor(Class)} with the parameter, obtained from
* {@link TableModel#getColumnClass(int)}.
- *
+ *
* @param row the cell row
* @param column the cell column
* @return the editor to edit that cell
@@ -3420,13 +3420,13 @@ public class JTable
return editor;
}
-
+
/**
* Get the default editor for editing values of the given type
* (String, Boolean and so on).
- *
+ *
* @param columnClass the class of the value that will be edited.
- *
+ *
* @return the editor, suitable for editing this data type
*/
public TableCellEditor getDefaultEditor(Class<?> columnClass)
@@ -3435,7 +3435,7 @@ public class JTable
return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass);
else
{
- JTextField t = new TableTextField();
+ JTextField t = new TableTextField();
TableCellEditor r = new DefaultCellEditor(t);
defaultEditorsByColumnClass.put(columnClass, r);
return r;
@@ -3444,7 +3444,7 @@ public class JTable
/**
* Get the cell renderer for rendering the given cell.
- *
+ *
* @param row the cell row
* @param column the cell column
* @return the cell renderer to render that cell.
@@ -3464,7 +3464,7 @@ public class JTable
/**
* Set default renderer for rendering the given data type.
- *
+ *
* @param columnClass the data type (String, Boolean and so on) that must be
* rendered.
* @param rend the renderer that will rend this data type
@@ -3476,9 +3476,9 @@ public class JTable
/**
* Get the default renderer for rendering the given data type.
- *
+ *
* @param columnClass the data that must be rendered
- *
+ *
* @return the appropriate defauld renderer for rendering that data type.
*/
public TableCellRenderer getDefaultRenderer(Class<?> columnClass)
@@ -3492,7 +3492,7 @@ public class JTable
return r;
}
}
-
+
/**
* Convert the table model index into the table column number.
* The model number need not match the real column position. The columns
@@ -3500,9 +3500,9 @@ public class JTable
* column headers.
*
* @param vc the column number (0=first).
- *
+ *
* @return the table column model index of this column.
- *
+ *
* @see TableColumn#getModelIndex()
*/
public int convertColumnIndexToModel(int vc)
@@ -3512,18 +3512,18 @@ public class JTable
else
return columnModel.getColumn(vc).getModelIndex();
}
-
+
/**
* Convert the table column number to the table column model index.
* The model number need not match the real column position. The columns
* may be rearranged by the user with mouse at any time by dragging the
* column headers.
- *
+ *
* @param mc the table column index (0=first).
- *
+ *
* @return the table column number in the model
- *
- * @see TableColumn#getModelIndex()
+ *
+ * @see TableColumn#getModelIndex()
*/
public int convertColumnIndexToView(int mc)
{
@@ -3537,14 +3537,14 @@ public class JTable
}
return -1;
}
-
+
/**
* Prepare the renderer for rendering the given cell.
- *
+ *
* @param renderer the renderer being prepared
* @param row the row of the cell being rendered
* @param column the column of the cell being rendered
- *
+ *
* @return the component which .paint() method will paint the cell.
*/
public Component prepareRenderer(TableCellRenderer renderer,
@@ -3569,7 +3569,7 @@ public class JTable
&& colSel.getLeadSelectionIndex() == column;
return renderer.getTableCellRendererComponent(this,
- dataModel.getValueAt(row,
+ dataModel.getValueAt(row,
convertColumnIndexToModel(column)),
isSel,
hasFocus,
@@ -3635,7 +3635,7 @@ public class JTable
* Get the value of the {@link #rowSelectionAllowed} property.
*
* @return The current value of the property
- *
+ *
* @see #setRowSelectionAllowed(boolean)
*/
public boolean getRowSelectionAllowed()
@@ -3671,7 +3671,7 @@ public class JTable
*/
public int getColumnCount()
{
- return columnModel.getColumnCount();
+ return columnModel.getColumnCount();
}
/**
@@ -3718,14 +3718,14 @@ public class JTable
case ListSelectionModel.SINGLE_SELECTION:
sum = 1;
break;
-
+
case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
sum = hi - lo + 1;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
++sum;
break;
}
@@ -3747,16 +3747,16 @@ public class JTable
{
case ListSelectionModel.SINGLE_SELECTION:
ret[0] = lo;
- break;
-
- case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
+ break;
+
+ case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
ret[j++] = i;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
ret[j++] = i;
break;
}
@@ -3769,7 +3769,7 @@ public class JTable
* delegation to the {@link #columnModel} field.
*
* @return The current value of the selectedColumnCount property
- */
+ */
public int getSelectedColumnCount()
{
return countSelections(columnModel.getSelectionModel());
@@ -3790,7 +3790,7 @@ public class JTable
* Get the value of the <code>columnSelectionAllowed</code> property.
*
* @return The current value of the columnSelectionAllowed property
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
public boolean getColumnSelectionAllowed()
@@ -3835,7 +3835,7 @@ public class JTable
tcm.addColumnModelListener(ctx);
tcm.getSelectionModel().addListSelectionListener(ctx);
getSelectionModel().addListSelectionListener(ctx);
-
+
accessibleContext = ctx;
}
return accessibleContext;
@@ -3947,7 +3947,7 @@ public class JTable
* @param column column to removed
*/
public void removeColumn(TableColumn column)
- {
+ {
columnModel.removeColumn(column);
}
@@ -3956,8 +3956,8 @@ public class JTable
*
* @param column index of the column to move
* @param targetColumn index specifying new location of the column
- */
- public void moveColumn(int column,int targetColumn)
+ */
+ public void moveColumn(int column,int targetColumn)
{
columnModel.moveColumn(column, targetColumn);
}
@@ -3968,7 +3968,7 @@ public class JTable
* {@link #createDefaultColumnsFromModel()} method is called.
*
* @param autoCreate the new value of the flag.
- */
+ */
public void setAutoCreateColumnsFromModel(boolean autoCreate)
{
if (autoCreateColumnsFromModel != autoCreate)
@@ -3983,7 +3983,7 @@ public class JTable
* Set the value of the {@link #autoResizeMode} property.
*
* @param a The new value of the autoResizeMode property
- */
+ */
public void setAutoResizeMode(int a)
{
autoResizeMode = a;
@@ -4000,7 +4000,7 @@ public class JTable
* @see #getRowHeight()
* @see #setRowHeight(int, int)
* @see #getRowHeight(int)
- */
+ */
public void setRowHeight(int r)
{
if (r < 1)
@@ -4013,10 +4013,10 @@ public class JTable
revalidate();
repaint();
}
-
+
/**
* Sets the height of a single row in the table.
- *
+ *
* @param rh the new row height
* @param row the row to change the height of
*/
@@ -4028,12 +4028,12 @@ public class JTable
}
rowHeights.setSize(row, rh);
}
-
+
/**
* Set the value of the {@link #rowMargin} property.
*
* @param r The new value of the rowMargin property
- */
+ */
public void setRowMargin(int r)
{
rowMargin = r;
@@ -4045,12 +4045,12 @@ public class JTable
* Set the value of the {@link #rowSelectionAllowed} property.
*
* @param r The new value of the rowSelectionAllowed property
- *
+ *
* @see #getRowSelectionAllowed()
- */
+ */
public void setRowSelectionAllowed(boolean r)
{
- if (rowSelectionAllowed != r)
+ if (rowSelectionAllowed != r)
{
rowSelectionAllowed = r;
firePropertyChange("rowSelectionAllowed", !r, r);
@@ -4062,7 +4062,7 @@ public class JTable
* Set the value of the {@link #cellSelectionEnabled} property.
*
* @param c The new value of the cellSelectionEnabled property
- */
+ */
public void setCellSelectionEnabled(boolean c)
{
setColumnSelectionAllowed(c);
@@ -4079,13 +4079,13 @@ public class JTable
* <code>m</code>.</p>
*
* @param m The new value of the model property
- */
+ */
public void setModel(TableModel m)
{
// Throw exception is m is null.
if (m == null)
throw new IllegalArgumentException();
-
+
// Don't do anything if setting the current model again.
if (dataModel == m)
return;
@@ -4095,7 +4095,7 @@ public class JTable
// Remove table as TableModelListener from old model.
if (dataModel != null)
dataModel.removeTableModelListener(this);
-
+
if (m != null)
{
// Set property.
@@ -4129,7 +4129,7 @@ public class JTable
* <code>c</code>.</p>
*
* @param c The new value of the columnModel property
- */
+ */
public void setColumnModel(TableColumnModel c)
{
if (c == null)
@@ -4146,7 +4146,7 @@ public class JTable
TableColumn column;
for (int i = 0; i < ncols; ++i)
{
- column = columnModel.getColumn(i);
+ column = columnModel.getColumn(i);
if (column.getHeaderValue()==null)
column.setHeaderValue(dataModel.getColumnName(i));
}
@@ -4165,9 +4165,9 @@ public class JTable
* Set the value of the <code>columnSelectionAllowed</code> property.
*
* @param c The new value of the property
- *
+ *
* @see #getColumnSelectionAllowed()
- */
+ */
public void setColumnSelectionAllowed(boolean c)
{
if (columnModel.getColumnSelectionAllowed() != c)
@@ -4186,7 +4186,7 @@ public class JTable
* parameter <code>s</code>.</p>
*
* @param s The new value of the selectionModel property
- */
+ */
public void setSelectionModel(ListSelectionModel s)
{
if (s == null)
@@ -4206,12 +4206,12 @@ public class JTable
* mode is set for row and column selection models.
*
* @param s The new value of the property
- */
+ */
public void setSelectionMode(int s)
- {
- selectionModel.setSelectionMode(s);
+ {
+ selectionModel.setSelectionMode(s);
columnModel.getSelectionModel().setSelectionMode(s);
-
+
repaint();
}
@@ -4223,7 +4223,7 @@ public class JTable
* <code>c</code>.</p>
*
* @param c The new value of the cellEditor property
- */
+ */
public void setCellEditor(TableCellEditor c)
{
TableCellEditor tmp = cellEditor;
@@ -4238,7 +4238,7 @@ public class JTable
* Set the value of the {@link #dragEnabled} property.
*
* @param d The new value of the dragEnabled property
- */
+ */
public void setDragEnabled(boolean d)
{
dragEnabled = d;
@@ -4248,7 +4248,7 @@ public class JTable
* Set the value of the {@link #gridColor} property.
*
* @param g The new value of the gridColor property
- */
+ */
public void setGridColor(Color g)
{
gridColor = g;
@@ -4259,7 +4259,7 @@ public class JTable
* Set the value of the <code>intercellSpacing</code> property.
*
* @param i The new value of the intercellSpacing property
- */
+ */
public void setIntercellSpacing(Dimension i)
{
rowMargin = i.height;
@@ -4271,7 +4271,7 @@ public class JTable
* Set the value of the {@link #preferredViewportSize} property.
*
* @param p The new value of the preferredViewportSize property
- */
+ */
public void setPreferredScrollableViewportSize(Dimension p)
{
preferredViewportSize = p;
@@ -4287,7 +4287,7 @@ public class JTable
* selectionBackground changed.</p>
*
* @param s The new value of the selectionBackground property
- */
+ */
public void setSelectionBackground(Color s)
{
Color tmp = selectionBackground;
@@ -4307,7 +4307,7 @@ public class JTable
* selectionForeground changed.</p>
*
* @param s The new value of the selectionForeground property
- */
+ */
public void setSelectionForeground(Color s)
{
Color tmp = selectionForeground;
@@ -4323,7 +4323,7 @@ public class JTable
* Set the value of the <code>showGrid</code> property.
*
* @param s The new value of the showGrid property
- */
+ */
public void setShowGrid(boolean s)
{
setShowVerticalLines(s);
@@ -4334,7 +4334,7 @@ public class JTable
* Set the value of the {@link #showHorizontalLines} property.
*
* @param s The new value of the showHorizontalLines property
- */
+ */
public void setShowHorizontalLines(boolean s)
{
showHorizontalLines = s;
@@ -4345,7 +4345,7 @@ public class JTable
* Set the value of the {@link #showVerticalLines} property.
*
* @param s The new value of the showVerticalLines property
- */
+ */
public void setShowVerticalLines(boolean s)
{
showVerticalLines = s;
@@ -4356,7 +4356,7 @@ public class JTable
* Set the value of the {@link #tableHeader} property.
*
* @param t The new value of the tableHeader property
- */
+ */
public void setTableHeader(JTableHeader t)
{
if (tableHeader != null)
@@ -4383,7 +4383,7 @@ public class JTable
if (jsp != null)
{
jsp.setColumnHeaderView(null);
- }
+ }
}
@@ -4417,7 +4417,7 @@ public class JTable
cols[i].setWidth(cols[i].getPreferredWidth() + average);
}
}
-
+
/**
* This distributes the superfluous width in a table, setting the width of the
* column being resized strictly to its preferred width.
@@ -4434,20 +4434,20 @@ public class JTable
cols[i].setWidth(cols[i].getPreferredWidth() + average);
}
resizeIt.setWidth(resizeIt.getPreferredWidth());
- }
-
+ }
+
/**
* Set the widths of all columns, taking they preferred widths into
* consideration. The excess space, if any, will be distrubuted between
* all columns. This method also handles special cases when one of the
* collumns is currently being resized.
- *
+ *
* @see TableColumn#setPreferredWidth(int)
*/
public void doLayout()
{
TableColumn resizingColumn = null;
-
+
int ncols = columnModel.getColumnCount();
if (ncols < 1)
return;
@@ -4457,7 +4457,7 @@ public class JTable
if (tableHeader != null)
resizingColumn = tableHeader.getResizingColumn();
-
+
for (int i = 0; i < ncols; ++i)
{
TableColumn col = columnModel.getColumn(i);
@@ -4466,21 +4466,21 @@ public class JTable
if (resizingColumn == col)
rCol = i;
}
-
+
int spill = getWidth() - prefSum;
if (resizingColumn != null)
{
TableColumn col;
TableColumn [] cols;
-
+
switch (getAutoResizeMode())
{
case AUTO_RESIZE_LAST_COLUMN:
col = columnModel.getColumn(ncols-1);
col.setWidth(col.getPreferredWidth() + spill);
break;
-
+
case AUTO_RESIZE_NEXT_COLUMN:
col = columnModel.getColumn(ncols-1);
col.setWidth(col.getPreferredWidth() + spill);
@@ -4494,7 +4494,7 @@ public class JTable
break;
case AUTO_RESIZE_SUBSEQUENT_COLUMNS:
-
+
// Subtract the width of the non-resized columns from the spill.
int w = 0;
int wp = 0;
@@ -4513,7 +4513,7 @@ public class JTable
// If there are any columns on the right sied to resize.
spill = (getWidth()-w) - (prefSum-wp);
int average = spill / n;
-
+
// For all columns right from the column being resized:
for (int i = rCol+1; i < ncols; i++)
{
@@ -4539,17 +4539,17 @@ public class JTable
distributeSpill(cols, spill);
}
-
+
if (editorComp!=null)
moveToCellBeingEdited(editorComp);
-
+
int leftBoundary = getLeftResizingBoundary();
int width = getWidth() - leftBoundary;
repaint(leftBoundary, 0, width, getHeight());
if (tableHeader != null)
tableHeader.repaint(leftBoundary, 0, width, tableHeader.getHeight());
}
-
+
/**
* Get the left boundary of the rectangle which changes during the column
* resizing.
@@ -4569,12 +4569,12 @@ public class JTable
for (int i = 0; i < rc; i++)
p += columnModel.getColumn(i).getWidth();
-
+
return p;
}
}
-
-
+
+
/**
* @deprecated Replaced by <code>doLayout()</code>
*/
@@ -4582,7 +4582,7 @@ public class JTable
{
doLayout();
}
-
+
/**
* Obsolete since JDK 1.4. Please use <code>doLayout()</code>.
*/
@@ -4628,9 +4628,9 @@ public class JTable
/**
* Get the class (datatype) of the column. The cells are rendered and edited
* differently, depending from they data type.
- *
+ *
* @param column the column (not the model index).
- *
+ *
* @return the class, defining data type of that column (String.class for
* String, Boolean.class for boolean and so on).
*/
@@ -4638,16 +4638,16 @@ public class JTable
{
return getModel().getColumnClass(convertColumnIndexToModel(column));
}
-
+
/**
* Get the name of the column. If the column has the column identifier set,
* the return value is the result of the .toString() method call on that
* identifier. If the identifier is not explicitly set, the returned value
- * is calculated by
+ * is calculated by
* {@link javax.swing.table.AbstractTableModel#getColumnName(int)}.
- *
+ *
* @param column the column
- *
+ *
* @return the name of that column.
*/
public String getColumnName(int column)
@@ -4658,7 +4658,7 @@ public class JTable
/**
* Get the column, currently being edited
- *
+ *
* @return the column, currently being edited.
*/
public int getEditingColumn()
@@ -4668,17 +4668,17 @@ public class JTable
/**
* Set the column, currently being edited
- *
+ *
* @param column the column, currently being edited.
*/
public void setEditingColumn(int column)
{
editingColumn = column;
}
-
+
/**
* Get the row currently being edited.
- *
+ *
* @return the row, currently being edited.
*/
public int getEditingRow()
@@ -4688,17 +4688,17 @@ public class JTable
/**
* Set the row currently being edited.
- *
+ *
* @param row the row, that will be edited
*/
public void setEditingRow(int row)
{
editingRow = row;
}
-
+
/**
* Get the editor component that is currently editing one of the cells
- *
+ *
* @return the editor component or null, if none of the cells is being
* edited.
*/
@@ -4706,10 +4706,10 @@ public class JTable
{
return editorComp;
}
-
+
/**
* Check if one of the table cells is currently being edited.
- *
+ *
* @return true if there is a cell being edited.
*/
public boolean isEditing()
@@ -4721,10 +4721,10 @@ public class JTable
* Set the default editor for the given column class (column data type).
* By default, String is handled by text field and Boolean is handled by
* the check box.
- *
+ *
* @param columnClass the column data type
* @param editor the editor that will edit this data type
- *
+ *
* @see TableModel#getColumnClass(int)
*/
public void setDefaultEditor(Class<?> columnClass, TableCellEditor editor)
@@ -4734,25 +4734,25 @@ public class JTable
else
defaultEditorsByColumnClass.remove(columnClass);
}
-
+
public void addColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
|| index1 < 0 || index1 > (getColumnCount()-1)))
throw new IllegalArgumentException("Column index out of range.");
-
+
getColumnModel().getSelectionModel().addSelectionInterval(index0, index1);
}
-
+
public void addRowSelectionInterval(int index0, int index1)
- {
+ {
if ((index0 < 0 || index0 > (getRowCount()-1)
|| index1 < 0 || index1 > (getRowCount()-1)))
throw new IllegalArgumentException("Row index out of range.");
-
+
getSelectionModel().addSelectionInterval(index0, index1);
}
-
+
public void setColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
@@ -4761,17 +4761,17 @@ public class JTable
getColumnModel().getSelectionModel().setSelectionInterval(index0, index1);
}
-
+
public void setRowSelectionInterval(int index0, int index1)
- {
+ {
if ((index0 < 0 || index0 > (getRowCount()-1)
|| index1 < 0 || index1 > (getRowCount()-1)))
throw new IllegalArgumentException("Row index out of range.");
getSelectionModel().setSelectionInterval(index0, index1);
}
-
- public void removeColumnSelectionInterval(int index0, int index1)
+
+ public void removeColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
|| index1 < 0 || index1 > (getColumnCount()-1)))
@@ -4779,7 +4779,7 @@ public class JTable
getColumnModel().getSelectionModel().removeSelectionInterval(index0, index1);
}
-
+
public void removeRowSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getRowCount()-1)
@@ -4788,12 +4788,12 @@ public class JTable
getSelectionModel().removeSelectionInterval(index0, index1);
}
-
+
/**
* Checks if the given column is selected.
- *
+ *
* @param column the column
- *
+ *
* @return true if the column is selected (as reported by the selection
* model, associated with the column model), false otherwise.
*/
@@ -4801,12 +4801,12 @@ public class JTable
{
return getColumnModel().getSelectionModel().isSelectedIndex(column);
}
-
+
/**
* Checks if the given row is selected.
- *
+ *
* @param row the row
- *
+ *
* @return true if the row is selected (as reported by the selection model),
* false otherwise.
*/
@@ -4814,21 +4814,21 @@ public class JTable
{
return getSelectionModel().isSelectedIndex(row);
}
-
+
/**
* Checks if the given cell is selected. The cell is selected if both
* the cell row and the cell column are selected.
- *
+ *
* @param row the cell row
* @param column the cell column
- *
+ *
* @return true if the cell is selected, false otherwise
*/
public boolean isCellSelected(int row, int column)
{
return isRowSelected(row) && isColumnSelected(column);
}
-
+
/**
* Select all table.
*/
@@ -4837,7 +4837,7 @@ public class JTable
// The table is empty - nothing to do!
if (getRowCount() == 0 || getColumnCount() == 0)
return;
-
+
// rowLead and colLead store the current lead selection indices
int rowLead = selectionModel.getLeadSelectionIndex();
int colLead = getColumnModel().getSelectionModel().getLeadSelectionIndex();
@@ -4850,25 +4850,25 @@ public class JTable
addColumnSelectionInterval(colLead,colLead);
addRowSelectionInterval(rowLead, rowLead);
}
-
+
/**
* Get the cell value at the given position.
- *
+ *
* @param row the row to get the value
- * @param column the actual column number (not the model index)
+ * @param column the actual column number (not the model index)
* to get the value.
- *
+ *
* @return the cell value, as returned by model.
*/
public Object getValueAt(int row, int column)
{
return dataModel.getValueAt(row, convertColumnIndexToModel(column));
}
-
+
/**
* Set value for the cell at the given position. The modified cell is
* repainted.
- *
+ *
* @param value the value to set
* @param row the row of the cell being modified
* @param column the column of the cell being modified
@@ -4876,20 +4876,20 @@ public class JTable
public void setValueAt(Object value, int row, int column)
{
dataModel.setValueAt(value, row, convertColumnIndexToModel(column));
-
+
repaint(getCellRect(row, column, true));
}
-
+
/**
* Get table column with the given identified.
- *
+ *
* @param identifier the column identifier
- *
+ *
* @return the table column with this identifier
- *
- * @throws IllegalArgumentException if <code>identifier</code> is
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
* <code>null</code> or there is no column with that identifier.
- *
+ *
* @see TableColumn#setIdentifier(Object)
*/
public TableColumn getColumn(Object identifier)
@@ -4929,7 +4929,7 @@ public class JTable
columnModel.removeColumn(columnModel.getColumn(columnIndex));
columnIndex--;
}
-
+
// add new columns to match the TableModel
int columnCount = dataModel.getColumnCount();
for (int c = 0; c < columnCount; c++)
@@ -4967,7 +4967,7 @@ public class JTable
}
else if (extend)
{
- // Extend the previous selection from the anchor to the
+ // Extend the previous selection from the anchor to the
// specified cell, clearing all other selections
selectionModel.setLeadSelectionIndex(rowIndex);
getColumnModel().getSelectionModel().setLeadSelectionIndex(columnIndex);
@@ -4980,14 +4980,14 @@ public class JTable
selectionModel.setSelectionInterval(rowIndex,rowIndex);
getColumnModel().getSelectionModel().clearSelection();
getColumnModel().getSelectionModel().setSelectionInterval(columnIndex, columnIndex);
-
-
+
+
}
}
/**
* Programmatically starts editing the specified cell.
- *
+ *
* @param row the row of the cell to edit.
* @param column the column of the cell to edit.
*/
@@ -4998,7 +4998,7 @@ public class JTable
editingStopped(new ChangeEvent("editingStopped"));
TableCellEditor editor = getCellEditor(row, column);
-
+
// The boolean values are inverted by the single click without the
// real editing session.
if (editor == booleanInvertingEditor && isCellEditable(row, column))
@@ -5024,16 +5024,16 @@ public class JTable
moveToCellBeingEdited(editorComp);
scrollRectToVisible(editorComp.getBounds());
editorComp.requestFocusInWindow();
-
+
// Deliver the should select event.
- return editor.shouldSelectCell(null);
+ return editor.shouldSelectCell(null);
}
}
/**
- * Move the given component under the cell being edited.
+ * Move the given component under the cell being edited.
* The table must be in the editing mode.
- *
+ *
* @param component the component to move.
*/
private void moveToCellBeingEdited(Component component)
@@ -5107,7 +5107,7 @@ public class JTable
// TODO: Implement functionality of this property (in UI impl).
surrendersFocusOnKeystroke = value;
}
-
+
/**
* Returns whether cell editors of this table should receive keyboard focus
* when the editor is activated by a keystroke. The default setting is
@@ -5128,7 +5128,7 @@ public class JTable
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/JTextArea.java b/javax/swing/JTextArea.java
index 9b50febe3..51921cc89 100644
--- a/javax/swing/JTextArea.java
+++ b/javax/swing/JTextArea.java
@@ -1,4 +1,4 @@
-/* JTextArea.java --
+/* JTextArea.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -126,7 +126,7 @@ public class JTextArea extends JTextComponent
* Compatible with Sun's JDK
*/
private static final long serialVersionUID = -6141680179310439825L;
-
+
/**
* The number of rows used by the component.
*/
@@ -235,14 +235,14 @@ public class JTextArea extends JTextComponent
public void append(String toAppend)
{
try
- {
- getDocument().insertString(getText().length(), toAppend, null);
- }
+ {
+ getDocument().insertString(getText().length(), toAppend, null);
+ }
catch (BadLocationException exception)
- {
- /* This shouldn't happen in theory -- but, if it does... */
- throw new RuntimeException("Unexpected exception occurred.", exception);
- }
+ {
+ /* This shouldn't happen in theory -- but, if it does... */
+ throw new RuntimeException("Unexpected exception occurred.", exception);
+ }
if (toAppend != null && toAppend.length() > 0)
revalidate();
}
@@ -337,7 +337,7 @@ public class JTextArea extends JTextComponent
{
return columns;
}
-
+
/**
* Sets the number of rows.
*
@@ -349,7 +349,7 @@ public class JTextArea extends JTextComponent
{
if (columns < 0)
throw new IllegalArgumentException();
-
+
if (columns != this.columns)
{
this.columns = columns;
@@ -378,7 +378,7 @@ public class JTextArea extends JTextComponent
{
if (rows < 0)
throw new IllegalArgumentException();
-
+
if (rows != this.rows)
{
this.rows = rows;
@@ -423,7 +423,7 @@ public class JTextArea extends JTextComponent
{
return wrapStyleWord;
}
-
+
/**
* Enables/Disables word style wrapping.
*
@@ -434,12 +434,12 @@ public class JTextArea extends JTextComponent
{
if (wrapStyleWord == flag)
return;
-
+
boolean oldValue = wrapStyleWord;
wrapStyleWord = flag;
firePropertyChange("wrapStyleWord", oldValue, wrapStyleWord);
}
-
+
/**
* Returns the number of characters used for a tab.
* This defaults to 8.
@@ -456,14 +456,14 @@ public class JTextArea extends JTextComponent
* supplied value. If a change to the tab size property
* occurs (i.e. newSize != tabSize), a property change event
* is fired.
- *
+ *
* @param newSize The new number of characters to use for a tab.
*/
public void setTabSize(int newSize)
{
if (tabSize == newSize)
return;
-
+
int oldValue = tabSize;
tabSize = newSize;
firePropertyChange("tabSize", oldValue, tabSize);
@@ -484,7 +484,7 @@ public class JTextArea extends JTextComponent
throws BadLocationException
{
int lineCount = getLineCount();
-
+
if (line < 0 || line > lineCount)
throw new BadLocationException("Non-existing line number", line);
@@ -496,7 +496,7 @@ public class JTextArea extends JTextComponent
throws BadLocationException
{
int lineCount = getLineCount();
-
+
if (line < 0 || line > lineCount)
throw new BadLocationException("Non-existing line number", line);
@@ -510,7 +510,7 @@ public class JTextArea extends JTextComponent
Document doc = getDocument();
if (offset < doc.getStartPosition().getOffset()
- || offset >= doc.getEndPosition().getOffset())
+ || offset >= doc.getEndPosition().getOffset())
throw new BadLocationException("offset outside of document", offset);
return doc.getDefaultRootElement().getElementIndex(offset);
@@ -536,32 +536,32 @@ public class JTextArea extends JTextComponent
{
// Retrieve the document model.
Document doc = getDocument();
-
+
// Check the model and string for validity.
if (doc == null
- || string == null
- || string.length() == 0)
+ || string == null
+ || string.length() == 0)
return;
// Insert the text into the model.
try
{
- doc.insertString(position, string, null);
+ doc.insertString(position, string, null);
}
catch (BadLocationException e)
{
- throw new IllegalArgumentException("The supplied position, "
- + position + ", was invalid.");
+ throw new IllegalArgumentException("The supplied position, "
+ + position + ", was invalid.");
}
}
public void replaceRange(String text, int start, int end)
{
Document doc = getDocument();
-
+
if (start > end
- || start < doc.getStartPosition().getOffset()
- || end >= doc.getEndPosition().getOffset())
+ || start < doc.getStartPosition().getOffset()
+ || end >= doc.getEndPosition().getOffset())
throw new IllegalArgumentException();
try
@@ -571,7 +571,7 @@ public class JTextArea extends JTextComponent
}
catch (BadLocationException e)
{
- // This cannot happen as we check offset above.
+ // This cannot happen as we check offset above.
}
}
diff --git a/javax/swing/JTextField.java b/javax/swing/JTextField.java
index ace358f89..69b70b068 100644
--- a/javax/swing/JTextField.java
+++ b/javax/swing/JTextField.java
@@ -95,7 +95,7 @@ public class JTextField extends JTextComponent
* gets accepted.
*/
public static final String notifyAction = "notify-field-accept";
-
+
static
{
actions = new Action[1];
@@ -108,16 +108,16 @@ public class JTextField extends JTextComponent
}
};
}
-
+
private int columns;
private int align;
-
+
/** @since 1.3 */
private Action action;
/** @since 1.3 */
private String actionCommand;
-
+
private PropertyChangeListener actionPropertyChangeListener;
/**
@@ -142,7 +142,7 @@ public class JTextField extends JTextComponent
{
this(null, text, 0);
}
-
+
/**
* Creates a new instance of <code>JTextField</code>.
*
@@ -270,7 +270,7 @@ public class JTextField extends JTextComponent
*/
protected void fireActionPerformed()
{
- ActionEvent event = new ActionEvent(this, 0,
+ ActionEvent event = new ActionEvent(this, 0,
actionCommand == null ? getText() : actionCommand);
ActionListener[] listeners = getActionListeners();
@@ -305,8 +305,8 @@ public class JTextField extends JTextComponent
}
/**
- * Returns the horizontal alignment, which is one of: JTextField.LEFT,
- * JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING,
+ * Returns the horizontal alignment, which is one of: JTextField.LEFT,
+ * JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING,
* JTextField.TRAILING.
* @return the horizontal alignment
*/
@@ -345,7 +345,7 @@ public class JTextField extends JTextComponent
}
/**
- * Returns the preferred size. If there is a non-zero number of columns,
+ * Returns the preferred size. If there is a non-zero number of columns,
* this is the number of columns multiplied by the column width, otherwise
* it returns super.getPreferredSize().
*/
@@ -374,7 +374,7 @@ public class JTextField extends JTextComponent
/**
* Sets the scroll offset in pixels.
- *
+ *
* @param offset the scroll offset
*/
public void setScrollOffset(int offset)
@@ -385,7 +385,7 @@ public class JTextField extends JTextComponent
Math.min(horizontalVisibility.getMaximum()
- horizontalVisibility.getExtent(),
offset));
-
+
}
/**
@@ -407,7 +407,7 @@ public class JTextField extends JTextComponent
for (int index = 0; index < listeners.length; ++index)
listeners[index].actionPerformed(event);
}
-
+
/**
* @since 1.3
*/
@@ -480,7 +480,7 @@ public class JTextField extends JTextComponent
}
/**
- *
+ *
* @since 1.3
*/
protected void configurePropertiesFromAction(Action action)
@@ -546,15 +546,15 @@ public class JTextField extends JTextComponent
{
return ! (getParent() instanceof JViewport);
}
-
+
public void scrollRectToVisible(Rectangle r)
{
int v = horizontalVisibility.getValue();
-
+
// The extent value is the inner width of the text field.
int e = horizontalVisibility.getExtent();
Insets i = getInsets();
-
+
// The x value in the rectangle (usually) denotes the new location
// of the caret. We check whether the location lies inside the left or
// right border and scroll into the appropriate direction.
@@ -566,5 +566,5 @@ public class JTextField extends JTextComponent
else if (r.x > e + i.left)
setScrollOffset(r.x + v - e - i.left);
}
-
+
}
diff --git a/javax/swing/JTextPane.java b/javax/swing/JTextPane.java
index 05968fc8c..4fef0020b 100644
--- a/javax/swing/JTextPane.java
+++ b/javax/swing/JTextPane.java
@@ -179,7 +179,7 @@ public class JTextPane
catch (BadLocationException e)
{
throw new AssertionError
- ("No BadLocationException should be thrown here");
+ ("No BadLocationException should be thrown here");
}
}
@@ -326,7 +326,7 @@ public class JTextPane
}
else
getStyledDocument().setCharacterAttributes(start, end - start, attribute,
- replace);
+ replace);
}
/**
diff --git a/javax/swing/JToggleButton.java b/javax/swing/JToggleButton.java
index 60c448960..2ee4187c3 100644
--- a/javax/swing/JToggleButton.java
+++ b/javax/swing/JToggleButton.java
@@ -1,4 +1,4 @@
-/* JToggleButton.java --
+/* JToggleButton.java --
Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -92,7 +92,7 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return AccessibleRole.TOGGLE_BUTTON;
}
-
+
/**
* Monitors the toggle button for state changes and fires accessible
* property change events when they occur.
@@ -106,14 +106,14 @@ public class JToggleButton extends AbstractButton implements Accessible
{
/* State has changed from unselected (null) to selected */
firePropertyChange(ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.SELECTED);
- }
+ }
else
{
/* State has changed from selected to unselected (null) */
firePropertyChange(ACCESSIBLE_STATE_PROPERTY, AccessibleState.ENABLED, null);
}
}
-
+
}
/**
@@ -129,19 +129,19 @@ public class JToggleButton extends AbstractButton implements Accessible
* Compatible with Sun's JDK.
*/
private static final long serialVersionUID = -1589950750899943974L;
-
+
/**
* Sets the pressed state of the button. The selected state
* of the button also changes follwing the button being pressed.
*
* @param p true if the button is pressed down.
*/
- public void setPressed(boolean p)
+ public void setPressed(boolean p)
{
// cannot change PRESSED state unless button is enabled
if (! isEnabled())
return;
-
+
// if this call does not represent a CHANGE in state, then return
if ((p && isPressed()) || (!p && !isPressed()))
return;
@@ -164,7 +164,7 @@ public class JToggleButton extends AbstractButton implements Accessible
stateMask = stateMask | PRESSED;
else
stateMask = stateMask & (~PRESSED);
-
+
// notify interested ChangeListeners
fireStateChanged();
@@ -175,36 +175,36 @@ public class JToggleButton extends AbstractButton implements Accessible
actionCommand));
}
}
-
+
/**
* Checks if the button is selected.
- *
+ *
* @return <code>true</code> if the button is selected.
*/
public boolean isSelected()
{
return super.isSelected();
}
-
+
/**
* Sets the selected state of the button.
- *
+ *
* @param b true if button is selected
*/
public void setSelected(boolean b)
{
super.setSelected(b);
- }
+ }
}
/**
* Compatible with Sun's JDK.
*/
private static final long serialVersionUID = -3128248873429850443L;
-
+
/**
* Constructs an unselected toggle button with no text or icon.
- */
+ */
public JToggleButton()
{
this(null, null, false);
@@ -229,10 +229,10 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param icon the icon to use.
*/
public JToggleButton(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
/**
* Constructs a toggle button with the supplied icon and state.
*
@@ -240,22 +240,22 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param selected if true, the toggle button is initially in the
* selected state. Otherwise, the button is unselected.
*/
- public JToggleButton(Icon icon, boolean selected)
+ public JToggleButton(Icon icon, boolean selected)
{
this(null, icon, selected);
}
-
+
/**
* Constructs an unselected toggle button using the supplied text
* and no icon.
*
* @param text the text to use.
- */
+ */
public JToggleButton(String text)
{
this(text, null, false);
}
-
+
/**
* Constructs a toggle button with the supplied text and state.
*
@@ -288,10 +288,10 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param selected if true, the toggle button is initially in the
* selected state. Otherwise, the button is unselected.
*/
- public JToggleButton (String text, Icon icon, boolean selected)
+ public JToggleButton (String text, Icon icon, boolean selected)
{
super();
- setModel(new ToggleButtonModel());
+ setModel(new ToggleButtonModel());
init(text, icon);
model.setSelected(selected);
setAlignmentX(LEFT_ALIGNMENT);
@@ -309,11 +309,11 @@ public class JToggleButton extends AbstractButton implements Accessible
if (accessibleContext == null)
{
/* Create the context */
- accessibleContext = new AccessibleJToggleButton();
+ accessibleContext = new AccessibleJToggleButton();
}
return accessibleContext;
}
-
+
/**
* Returns a string that specifies the name of the Look and Feel
* class that renders this component.
@@ -324,7 +324,7 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return "ToggleButtonUI";
}
-
+
/**
* Returns a textual representation of this component for debugging.
* Users should not depend on anything as regards the content or formatting
@@ -337,17 +337,14 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return super.paramString();
}
-
+
/**
* This method resets the toggle button's UI delegate to the default UI for
* the current look and feel.
*/
public void updateUI()
- {
+ {
setUI((ButtonUI)UIManager.getUI(this));
}
}
-
-
-
diff --git a/javax/swing/JToolBar.java b/javax/swing/JToolBar.java
index 33ebcfcaf..5f4816f04 100644
--- a/javax/swing/JToolBar.java
+++ b/javax/swing/JToolBar.java
@@ -83,7 +83,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
}
/**
- * Returns a set containing the current state of the {@link JToolBar}
+ * Returns a set containing the current state of the {@link JToolBar}
* component. The current implementation simply calls the superclass.
*
* @return The accessible state set.
@@ -134,16 +134,16 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
public void layoutContainer(Container c)
{
if (! (c instanceof JToolBar))
- throw new Error("DefaultToolBarLayout can only be used on JToolBars.");
+ throw new Error("DefaultToolBarLayout can only be used on JToolBars.");
Insets insets = getInsets();
Insets margin = getMargin();
int middle;
if (margin != null)
{
- insets.left += margin.left;
- insets.top += margin.top;
- insets.bottom += margin.bottom;
- insets.right += margin.right;
+ insets.left += margin.left;
+ insets.top += margin.top;
+ insets.bottom += margin.bottom;
+ insets.right += margin.right;
}
Component[] components = c.getComponents();
Dimension tdims = c.getSize();
@@ -152,39 +152,39 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (getOrientation() == SwingUtilities.HORIZONTAL)
{
- start += insets.left;
- for (int i = 0; i < components.length; i++)
- {
- if (components[i] != null && components[i].isVisible())
- {
- pref = components[i].getPreferredSize();
- if (pref != null)
- {
- middle = (tdims.height - pref.height) / 2;
- components[i].setBounds(start, middle, pref.width,
- pref.height);
- start += pref.width;
- }
- }
- }
+ start += insets.left;
+ for (int i = 0; i < components.length; i++)
+ {
+ if (components[i] != null && components[i].isVisible())
+ {
+ pref = components[i].getPreferredSize();
+ if (pref != null)
+ {
+ middle = (tdims.height - pref.height) / 2;
+ components[i].setBounds(start, middle, pref.width,
+ pref.height);
+ start += pref.width;
+ }
+ }
+ }
}
else
{
- start += insets.top;
- for (int i = 0; i < components.length; i++)
- {
- if (components[i] != null && components[i].isVisible())
- {
- pref = components[i].getPreferredSize();
- if (pref != null)
- {
- middle = (tdims.width - pref.width) / 2;
- components[i].setBounds(middle, start, pref.width,
- pref.height);
- start += pref.height;
- }
- }
- }
+ start += insets.top;
+ for (int i = 0; i < components.length; i++)
+ {
+ if (components[i] != null && components[i].isVisible())
+ {
+ pref = components[i].getPreferredSize();
+ if (pref != null)
+ {
+ middle = (tdims.width - pref.width) / 2;
+ components[i].setBounds(middle, start, pref.width,
+ pref.height);
+ start += pref.height;
+ }
+ }
+ }
}
}
@@ -223,33 +223,33 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (orientation == SwingConstants.HORIZONTAL)
{
- for (int i = 0; i < components.length; i++)
- {
- dims = components[i].getPreferredSize();
- if (dims != null)
- {
- if (dims.height > limit)
- limit = dims.height;
- total += dims.width;
- }
- }
- w = total;
- h = limit;
+ for (int i = 0; i < components.length; i++)
+ {
+ dims = components[i].getPreferredSize();
+ if (dims != null)
+ {
+ if (dims.height > limit)
+ limit = dims.height;
+ total += dims.width;
+ }
+ }
+ w = total;
+ h = limit;
}
else
{
- for (int i = 0; i < components.length; i++)
- {
- dims = components[i].getPreferredSize();
- if (dims != null)
- {
- if (dims.width > limit)
- limit = dims.width;
- total += dims.height;
- }
- }
- w = limit;
- h = total;
+ for (int i = 0; i < components.length; i++)
+ {
+ dims = components[i].getPreferredSize();
+ if (dims != null)
+ {
+ if (dims.width > limit)
+ limit = dims.width;
+ total += dims.height;
+ }
+ }
+ w = limit;
+ h = total;
}
Insets insets = getInsets();
@@ -259,8 +259,8 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
Insets margin = getMargin();
if (margin != null)
{
- w += margin.left + margin.right;
- h += margin.top + margin.bottom;
+ w += margin.left + margin.right;
+ h += margin.top + margin.bottom;
}
return new Dimension(w, h);
@@ -509,10 +509,10 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (b != rollover)
{
- rollover = b;
- firePropertyChange("rollover", ! rollover, rollover);
- revalidate();
- repaint();
+ rollover = b;
+ firePropertyChange("rollover", ! rollover, rollover);
+ revalidate();
+ repaint();
}
}
@@ -541,7 +541,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
for (int i = 0; i < components.length; i++)
if (components[i] == component)
- return i;
+ return i;
return -1;
} // getComponentIndex()
@@ -584,11 +584,11 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
|| margin.right != this.margin.right || margin.top != this.margin.top
|| margin.bottom != this.margin.bottom)))
{
- Insets oldMargin = this.margin;
- this.margin = margin;
- firePropertyChange("margin", oldMargin, this.margin);
- revalidate();
- repaint();
+ Insets oldMargin = this.margin;
+ this.margin = margin;
+ firePropertyChange("margin", oldMargin, this.margin);
+ revalidate();
+ repaint();
}
} // setMargin()
@@ -612,10 +612,10 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (painted != paintBorder)
{
- paintBorder = painted;
- firePropertyChange("borderPainted", ! paintBorder,
- paintBorder);
- repaint();
+ paintBorder = painted;
+ firePropertyChange("borderPainted", ! paintBorder,
+ paintBorder);
+ repaint();
}
} // setBorderPainted()
@@ -639,8 +639,8 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (floatable != this.floatable)
{
- this.floatable = floatable;
- firePropertyChange("floatable", ! floatable, floatable);
+ this.floatable = floatable;
+ firePropertyChange("floatable", ! floatable, floatable);
}
} // setFloatable()
@@ -681,11 +681,11 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
+ " is not a legal orientation");
if (orientation != this.orientation)
{
- int oldOrientation = this.orientation;
- this.orientation = orientation;
- firePropertyChange("orientation", oldOrientation, this.orientation);
- revalidate();
- repaint();
+ int oldOrientation = this.orientation;
+ this.orientation = orientation;
+ firePropertyChange("orientation", oldOrientation, this.orientation);
+ revalidate();
+ repaint();
}
} // setOrientation()
@@ -760,7 +760,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
/**
* Returns a string describing the attributes for the <code>JToolBar</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
diff --git a/javax/swing/JToolTip.java b/javax/swing/JToolTip.java
index f59ec95fb..6f226e780 100644
--- a/javax/swing/JToolTip.java
+++ b/javax/swing/JToolTip.java
@@ -117,7 +117,7 @@ public class JToolTip extends JComponent implements Accessible
* Returns the text displayed by the tool tip.
*
* @return The text (possibly <code>null</code>).
- *
+ *
* @see #setTipText(String)
*/
public String getTipText()
@@ -142,7 +142,7 @@ public class JToolTip extends JComponent implements Accessible
* Returns the component that the tool tip is associated with.
*
* @return The component (possibly <code>null</code>).
- *
+ *
* @see #setComponent(JComponent)
*/
public JComponent getComponent()
@@ -173,7 +173,7 @@ public class JToolTip extends JComponent implements Accessible
/**
* Returns a string describing the attributes for the <code>JToolTip</code>
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-<code>null</code>, but the format of the string may vary between
* implementations.
*
@@ -189,12 +189,12 @@ public class JToolTip extends JComponent implements Accessible
}
/**
- * Sets the component that the tool tip is associated with and sends a
- * {@link PropertyChangeEvent} (with the property name 'component') to all
+ * Sets the component that the tool tip is associated with and sends a
+ * {@link PropertyChangeEvent} (with the property name 'component') to all
* registered listeners.
*
* @param c the component (<code>null</code> permitted).
- *
+ *
* @see #getComponent()
*/
public void setComponent(JComponent c)
@@ -205,12 +205,12 @@ public class JToolTip extends JComponent implements Accessible
}
/**
- * Sets the text to be displayed by the tool tip and sends a
- * {@link PropertyChangeEvent} (with the property name 'tiptext') to all
+ * Sets the text to be displayed by the tool tip and sends a
+ * {@link PropertyChangeEvent} (with the property name 'tiptext') to all
* registered listeners.
*
* @param tipText the text (<code>null</code> permitted).
- *
+ *
* @see #getTipText()
*/
public void setTipText(String tipText)
diff --git a/javax/swing/JTree.java b/javax/swing/JTree.java
index c0365bc38..d89adad5e 100644
--- a/javax/swing/JTree.java
+++ b/javax/swing/JTree.java
@@ -1,6 +1,6 @@
-/* JTree.java
+/* JTree.java
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -87,24 +87,24 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
/**
- * This class implements accessibility support for the JTree class. It
- * provides an implementation of the Java Accessibility API appropriate
+ * This class implements accessibility support for the JTree class. It
+ * provides an implementation of the Java Accessibility API appropriate
* to tree user-interface elements.
*/
protected class AccessibleJTree extends JComponent.AccessibleJComponent
implements AccessibleSelection, TreeSelectionListener, TreeModelListener,
TreeExpansionListener
{
-
+
/**
- * This class implements accessibility support for the JTree child. It provides
+ * This class implements accessibility support for the JTree child. It provides
* an implementation of the Java Accessibility API appropriate to tree nodes.
*/
- protected class AccessibleJTreeNode extends AccessibleContext
- implements Accessible, AccessibleComponent, AccessibleSelection,
+ protected class AccessibleJTreeNode extends AccessibleContext
+ implements Accessible, AccessibleComponent, AccessibleSelection,
AccessibleAction
{
-
+
private JTree tree;
private TreePath tp;
private Accessible acc;
@@ -113,10 +113,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
private Vector actionList;
private TreeModel mod;
private Cursor cursor;
-
+
/**
* Constructs an AccessibleJTreeNode
- *
+ *
* @param t - the current tree
* @param p - the current path to be dealt with
* @param ap - the accessible object to use
@@ -128,11 +128,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
actionList = new Vector();
mod = tree.getModel();
cursor = JTree.this.getCursor();
-
+
tree = t;
tp = p;
acc = ap;
-
+
// Add all the children of this path that may already be
// selected to the selection list.
TreePath[] selected = tree.getSelectionPaths();
@@ -142,20 +142,20 @@ public class JTree extends JComponent implements Scrollable, Accessible
if ((sel.getParentPath()).equals(tp))
selectionList.add(sel);
}
-
- // Add all the actions available for a node to
+
+ // Add all the actions available for a node to
// the action list.
actionList.add("EXPAND");
actionList.add("COLLAPSE");
actionList.add("EDIT");
actionList.add("SELECT");
actionList.add("DESELECT");
- }
-
+ }
+
/**
* Adds the specified selected item in the object to the object's
* selection.
- *
+ *
* @param i - the i-th child of this node.
*/
public void addAccessibleSelection(int i)
@@ -167,47 +167,47 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (!states.contains(AccessibleState.MULTISELECTABLE))
clearAccessibleSelection();
- selectionList.add(child);
+ selectionList.add(child);
tree.addSelectionPath(tp.pathByAddingChild(child));
}
}
}
-
+
/**
- * Adds the specified focus listener to receive focus events
+ * Adds the specified focus listener to receive focus events
* from this component.
- *
+ *
* @param l - the new focus listener
*/
public void addFocusListener(FocusListener l)
{
tree.addFocusListener(l);
}
-
+
/**
* Add a PropertyChangeListener to the listener list.
- *
+ *
* @param l - the new property change listener
*/
public void addPropertyChangeListener(PropertyChangeListener l)
{
// Nothing to do here.
}
-
+
/**
- * Clears the selection in the object, so that nothing in the
+ * Clears the selection in the object, so that nothing in the
* object is selected.
*/
public void clearAccessibleSelection()
{
selectionList.clear();
}
-
+
/**
- * Checks whether the specified point is within this object's
- * bounds, where the point's x and y coordinates are defined to be
- * relative to the coordinate system of the object.
- *
+ * Checks whether the specified point is within this object's
+ * bounds, where the point's x and y coordinates are defined to be
+ * relative to the coordinate system of the object.
+ *
* @param p - the point to check
* @return true if p is in the bounds
*/
@@ -215,10 +215,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return getBounds().contains(p);
}
-
+
/**
* Perform the specified Action on the tree node.
- *
+ *
* @param i - the i-th action to perform
* @return true if the the action was performed; else false.
*/
@@ -226,7 +226,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (i >= actionList.size() || i < 0)
return false;
-
+
if (actionList.get(i).equals("EXPAND"))
tree.expandPath(tp);
else if (actionList.get(i).equals("COLLAPSE"))
@@ -241,30 +241,30 @@ public class JTree extends JComponent implements Scrollable, Accessible
return false;
return true;
}
-
+
/**
* Get the AccessibleAction associated with this object.
- *
+ *
* @return the action
*/
public AccessibleAction getAccessibleAction()
{
return this;
}
-
+
/**
* Returns the number of accessible actions available in this tree node.
- *
+ *
* @return the number of actions
*/
public int getAccessibleActionCount()
{
return actionList.size();
}
-
+
/**
* Return a description of the specified action of the tree node.
- *
+ *
* @param i - the i-th action's description
* @return a description of the action
*/
@@ -274,11 +274,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
return (actionList.get(i)).toString();
return super.getAccessibleDescription();
}
-
+
/**
- * Returns the Accessible child, if one exists, contained at the
+ * Returns the Accessible child, if one exists, contained at the
* local coordinate Point.
- *
+ *
* @param p - the point of the accessible
* @return the accessible at point p if it exists
*/
@@ -289,10 +289,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
return new AccessibleJTreeNode(tree, acc, this);
return null;
}
-
+
/**
* Return the specified Accessible child of the object.
- *
+ *
* @param i - the i-th child of the current path
* @return the child if it exists
*/
@@ -307,10 +307,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return null;
}
-
+
/**
* Returns the number of accessible children in the object.
- *
+ *
* @return the number of children the current node has
*/
public int getAccessibleChildrenCount()
@@ -320,40 +320,40 @@ public class JTree extends JComponent implements Scrollable, Accessible
return mod.getChildCount(tp.getLastPathComponent());
return 0;
}
-
+
/**
* Get the AccessibleComponent associated with this object.
- *
+ *
* @return the accessible component if it is supported.
*/
public AccessibleComponent getAccessibleComponent()
{
return this;
}
-
+
/**
* Get the AccessibleContext associated with this tree node.
- *
+ *
* @return an instance of this class
*/
public AccessibleContext getAccessibleContext()
{
return this;
}
-
+
/**
* Get the accessible description of this object.
- *
+ *
* @return the accessible description
*/
public String getAccessibleDescription()
{
return super.getAccessibleDescription();
}
-
+
/**
* Get the index of this object in its accessible parent.
- *
+ *
* @return the index of this in the parent.
*/
public int getAccessibleIndexInParent()
@@ -367,74 +367,74 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return -1;
}
-
+
/**
* Get the accessible name of this object.
- *
+ *
* @return the accessible name
*/
public String getAccessibleName()
{
return super.getAccessibleName();
}
-
+
/**
* Get the Accessible parent of this object.
- *
+ *
* @return the accessible parent if it exists.
*/
public Accessible getAccessibleParent()
{
return super.getAccessibleParent();
}
-
+
/**
* Get the role of this object.
- *
+ *
* @return the accessible role
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleJTree.this.getAccessibleRole();
}
-
+
/**
* Get the AccessibleSelection associated with this object if one exists.
- *
+ *
* @return the accessible selection for this.
*/
public AccessibleSelection getAccessibleSelection()
{
return this;
}
-
+
/**
- * Returns an Accessible representing the specified selected item
+ * Returns an Accessible representing the specified selected item
* in the object.
- *
+ *
* @return the accessible representing a certain selected item.
*/
public Accessible getAccessibleSelection(int i)
{
if (i > 0 && i < getAccessibleSelectionCount())
- return new AccessibleJTreeNode(tree,
+ return new AccessibleJTreeNode(tree,
tp.pathByAddingChild(selectionList.get(i)), acc);
return null;
}
-
+
/**
* Returns the number of items currently selected.
- *
+ *
* @return the number of items selected.
*/
public int getAccessibleSelectionCount()
{
return selectionList.size();
}
-
+
/**
* Get the state set of this object.
- *
+ *
* @return the state set for this object
*/
public AccessibleStateSet getAccessibleStateSet()
@@ -445,7 +445,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.COLLAPSED);
if (tree.isEditable())
states.add(AccessibleState.EDITABLE);
- if (mod != null &&
+ if (mod != null &&
!mod.isLeaf(tp.getLastPathComponent()))
states.add(AccessibleState.EXPANDABLE);
if (tree.isExpanded(tp))
@@ -454,7 +454,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.FOCUSABLE);
if (hasFocus())
states.add(AccessibleState.FOCUSED);
- if (tree.getSelectionModel().getSelectionMode() !=
+ if (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION)
states.add(AccessibleState.MULTISELECTABLE);
if (tree.isOpaque())
@@ -467,70 +467,70 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.SELECTABLE);
return states;
}
-
+
/**
* Get the AccessibleText associated with this object if one exists.
- *
+ *
* @return the accessible text
*/
public AccessibleText getAccessibleText()
{
return super.getAccessibleText();
}
-
+
/**
* Get the AccessibleValue associated with this object if one exists.
- *
+ *
* @return the accessible value if it exists
*/
public AccessibleValue getAccessibleValue()
{
return super.getAccessibleValue();
}
-
+
/**
* Get the background color of this object.
- *
+ *
* @return the color of the background.
*/
public Color getBackground()
{
return tree.getBackground();
}
-
+
/**
* Gets the bounds of this object in the form of a Rectangle object.
- *
+ *
* @return the bounds of the current node.
*/
public Rectangle getBounds()
{
return tree.getPathBounds(tp);
}
-
+
/**
* Gets the Cursor of this object.
- *
+ *
* @return the cursor for the current node
*/
public Cursor getCursor()
{
return cursor;
}
-
+
/**
* Gets the Font of this object.
- *
+ *
* @return the font for the current node
*/
public Font getFont()
{
return tree.getFont();
}
-
+
/**
* Gets the FontMetrics of this object.
- *
+ *
* @param f - the current font.
* @return the font metrics for the given font.
*/
@@ -538,42 +538,42 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return tree.getFontMetrics(f);
}
-
+
/**
* Get the foreground color of this object.
- *
+ *
* @return the foreground for this object.
*/
public Color getForeground()
{
return tree.getForeground();
}
-
+
/**
* Gets the locale of the component.
- *
+ *
* @return the locale of the component.
*/
public Locale getLocale()
{
return tree.getLocale();
}
-
+
/**
- * Gets the location of the object relative to the
- * parent in the form of a point specifying the object's
- * top-left corner in the screen's coordinate space.
- *
+ * Gets the location of the object relative to the
+ * parent in the form of a point specifying the object's
+ * top-left corner in the screen's coordinate space.
+ *
* @return the location of the current node.
*/
public Point getLocation()
{
return getLocationInJTree();
}
-
+
/**
* Returns the location in the tree.
- *
+ *
* @return the location in the JTree.
*/
protected Point getLocationInJTree()
@@ -581,10 +581,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
Rectangle bounds = tree.getPathBounds(tp);
return new Point(bounds.x, bounds.y);
}
-
+
/**
* Returns the location of the object on the screen.
- *
+ *
* @return the location of the object on the screen.
*/
public Point getLocationOnScreen()
@@ -593,10 +593,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
SwingUtilities.convertPointToScreen(loc, tree);
return loc;
}
-
+
/**
* Returns the size of this object in the form of a Dimension object.
- *
+ *
* @return the size of the object
*/
public Dimension getSize()
@@ -604,10 +604,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
Rectangle b = getBounds();
return b.getSize();
}
-
+
/**
* Returns true if the current child of this object is selected.
- *
+ *
* @param i - the child of the current node
* @return true if the child is selected.
*/
@@ -618,30 +618,30 @@ public class JTree extends JComponent implements Scrollable, Accessible
return tree.isPathSelected(tp.pathByAddingChild(child));
return false;
}
-
+
/**
* Determines if the object is enabled.
- *
+ *
* @return true if the tree is enabled
*/
public boolean isEnabled()
{
return tree.isEnabled();
}
-
+
/**
* Returns whether this object can accept focus or not.
- *
+ *
* @return true, it is always focus traversable
*/
public boolean isFocusTraversable()
{
return true;
}
-
+
/**
* Determines if the object is showing.
- *
+ *
* @return true if the object is visible and the
* parent is visible.
*/
@@ -649,21 +649,21 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return isVisible() && tree.isShowing();
}
-
+
/**
* Determines if the object is visible.
- *
+ *
* @return true if the object is visible.
*/
public boolean isVisible()
{
return tree.isVisible(tp);
}
-
+
/**
* Removes the specified selected item in the object from the
* object's selection.
- *
+ *
* @param i - the specified item to remove
*/
public void removeAccessibleSelection(int i)
@@ -677,34 +677,34 @@ public class JTree extends JComponent implements Scrollable, Accessible
clearAccessibleSelection();
if (selectionList.contains(child))
{
- selectionList.remove(child);
+ selectionList.remove(child);
tree.removeSelectionPath(tp.pathByAddingChild(child));
}
}
}
}
-
+
/**
- * Removes the specified focus listener so it no longer receives focus
+ * Removes the specified focus listener so it no longer receives focus
* events from this component.
- *
+ *
* @param l - the focus listener to remove
*/
public void removeFocusListener(FocusListener l)
{
tree.removeFocusListener(l);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
- *
+ *
* @param l - the property change listener to remove.
*/
public void removePropertyChangeListener(PropertyChangeListener l)
{
// Nothing to do here.
}
-
+
/**
* Requests focus for this object.
*/
@@ -712,9 +712,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
tree.requestFocus();
}
-
+
/**
- * Causes every selected item in the object to be selected if the object
+ * Causes every selected item in the object to be selected if the object
* supports multiple selections.
*/
public void selectAllAccessibleSelection()
@@ -738,110 +738,110 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
}
}
-
+
/**
* Set the accessible description of this object.
- *
+ *
* @param s - the string to set the accessible description to.
*/
public void setAccessibleDescription(String s)
{
super.setAccessibleDescription(s);
}
-
+
/**
* Set the localized accessible name of this object.
- *
+ *
* @param s - the string to set the accessible name to.
*/
public void setAccessibleName(String s)
{
super.setAccessibleName(s);
}
-
+
/**
* Set the background color of this object.
- *
+ *
* @param c - the color to set the background to.
*/
public void setBackground(Color c)
{
// Nothing to do here.
}
-
+
/**
* Sets the bounds of this object in the form of a Rectangle object.
- *
+ *
* @param r - the bounds to set the object o
*/
public void setBounds(Rectangle r)
{
// Nothing to do here.
}
-
+
/**
* Sets the Cursor of this object.
- *
+ *
* @param c - the new cursor
*/
public void setCursor(Cursor c)
{
cursor = c;
}
-
+
/**
* Sets the enabled state of the object.
- *
+ *
* @param b - boolean to enable or disable object
*/
public void setEnabled(boolean b)
{
// Nothing to do here.
}
-
+
/**
* Sets the Font of this object.
- *
+ *
* @param f - the new font.
*/
public void setFont(Font f)
{
// Nothing to do here.
}
-
+
/**
* Sets the foreground color of this object.
- *
+ *
* @param c - the new foreground color.
*/
public void setForeground(Color c)
{
// Nothing to do here.
}
-
+
/**
* Sets the location of the object relative to the parent.
- *
+ *
* @param p - the new location for the object.
*/
public void setLocation(Point p)
{
// Nothing to do here.
}
-
+
/**
* Resizes this object so that it has width and height.
- *
+ *
* @param d - the new size for the object.
*/
public void setSize(Dimension d)
{
// Nothing to do here.
}
-
+
/**
* Sets the visible state of the object.
- *
+ *
* @param b - sets the objects visibility.
*/
public void setVisible(boolean b)
@@ -849,7 +849,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
// Nothing to do here.
}
}
-
+
/**
* Constructor
*/
@@ -857,17 +857,17 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
// Nothing to do here.
}
-
+
/**
* Adds the specified selected item in the object to the object's selection.
- *
+ *
* @param i - the row to add to the tree's selection
*/
public void addAccessibleSelection(int i)
{
addSelectionInterval(i, i);
}
-
+
/**
* Clears the selection in the object, so that nothing in the object is selected.
*/
@@ -875,7 +875,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
clearSelection();
}
-
+
/**
* Fire a visible data property change notification.
*/
@@ -883,11 +883,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
treeDidChange();
}
-
+
/**
- * Returns the Accessible child, if one exists, contained at the local
+ * Returns the Accessible child, if one exists, contained at the local
* coordinate Point.
- *
+ *
* @param p - the point of the accessible to get.
* @return the accessible at point p.
*/
@@ -898,10 +898,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
return new AccessibleJTreeNode(JTree.this, tp, null);
return null;
}
-
+
/**
* Return the nth Accessible child of the object.
- *
+ *
* @param i - the accessible child to get
* @return the i-th child
*/
@@ -909,10 +909,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return null;
}
-
+
/**
* Returns the number of top-level children nodes of this JTree.
- *
+ *
* @return the number of top-level children
*/
public int getAccessibleChildrenCount()
@@ -922,68 +922,68 @@ public class JTree extends JComponent implements Scrollable, Accessible
return model.getChildCount(model.getRoot());
return 0;
}
-
+
/**
* Get the index of this object in its accessible parent.
- *
+ *
* @return the index of this object.
*/
public int getAccessibleIndexInParent()
{
return 0;
}
-
+
/**
* Get the role of this object.
- *
+ *
* @return the role of this object
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.TREE;
}
-
+
/**
* Get the AccessibleSelection associated with this object.
- *
+ *
* @return the accessible selection of the tree
*/
public AccessibleSelection getAccessibleSelection()
{
TreeModel mod = getModel();
if (mod != null)
- return (new AccessibleJTreeNode(JTree.this,
+ return (new AccessibleJTreeNode(JTree.this,
new TreePath(mod.getRoot()), null)).getAccessibleSelection();
return null;
}
-
+
/**
* Returns an Accessible representing the specified selected item in the object.
- *
+ *
* @return the i-th accessible in the selection
*/
public Accessible getAccessibleSelection(int i)
{
TreeModel mod = getModel();
if (mod != null)
- return (new AccessibleJTreeNode(JTree.this,
+ return (new AccessibleJTreeNode(JTree.this,
new TreePath(mod.getRoot()), null)).getAccessibleSelection(i);
return null;
}
-
+
/**
* Returns the number of items currently selected.
- *
+ *
* @return the number of selected accessibles.
*/
public int getAccessibleSelectionCount()
{
return getSelectionCount();
}
-
+
/**
* Returns true if the current child of this object is selected.
- *
+ *
* @param i - the child of this object
* @return true if the i-th child is selected.
*/
@@ -992,92 +992,92 @@ public class JTree extends JComponent implements Scrollable, Accessible
// Nothing to do here.
return false;
}
-
+
/**
* Removes the specified selected item in the object from the object's
* selection.
- *
+ *
* @param i - the i-th selected item to remove
*/
public void removeAccessibleSelection(int i)
{
removeSelectionInterval(i, i);
}
-
+
/**
* Causes every selected item in the object to be selected if the object
* supports multiple selections.
*/
public void selectAllAccessibleSelection()
{
- if (getSelectionModel().getSelectionMode() !=
+ if (getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION)
addSelectionInterval(0, getVisibleRowCount());
}
-
+
/**
* Tree Collapsed notification
- *
+ *
* @param e - the event
*/
public void treeCollapsed(TreeExpansionEvent e)
{
fireTreeCollapsed(e.getPath());
}
-
+
/**
* Tree Model Expansion notification.
- *
+ *
* @param e - the event
*/
public void treeExpanded(TreeExpansionEvent e)
{
fireTreeExpanded(e.getPath());
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesChanged(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesInserted(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesRemoved(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model structure change change notification.
- *
+ *
* @param e - the event
*/
public void treeStructureChanged(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Selection Listener value change method.
- *
+ *
* @param e - the event
*/
public void valueChanged(TreeSelectionEvent e)
@@ -1085,7 +1085,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
fireValueChanged(e);
}
}
-
+
public static class DynamicUtilTreeNode extends DefaultMutableTreeNode
{
protected Object childValue;
@@ -1129,9 +1129,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the child node at position <code>pos</code>. Subclassed
* here to load the children if necessary.
- *
+ *
* @param pos the position of the child node to fetch
- *
+ *
* @return the childnode at the specified position
*/
public TreeNode getChildAt(int pos)
@@ -1143,7 +1143,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public boolean isLeaf()
{
return childValue == null || !(childValue instanceof Hashtable
- || childValue instanceof Vector
+ || childValue instanceof Vector
|| childValue.getClass().isArray());
}
@@ -1180,7 +1180,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
/**
- * Listens to the model of the JTree and updates the property
+ * Listens to the model of the JTree and updates the property
* <code>expandedState</code> if nodes are removed or changed.
*/
protected class TreeModelHandler implements TreeModelListener
@@ -1199,9 +1199,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
* that a node has changed its location or changed it's children. It
* only means that some attributes of the node have changed that might
* affect its presentation.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeNodesChanged(TreeModelEvent ev)
@@ -1211,9 +1211,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when a node is inserted into the tree.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeNodesInserted(TreeModelEvent ev)
@@ -1223,11 +1223,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when a node is removed from the tree.
- *
+ *
* This method is called after the actual change occured.
*
* @param ev the TreeModelEvent describing the change
- */
+ */
public void treeNodesRemoved(TreeModelEvent ev)
{
if (ev != null)
@@ -1260,9 +1260,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when the structure of the tree is changed.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeStructureChanged(TreeModelEvent ev)
@@ -1324,12 +1324,12 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when the tree selection changes.
- *
+ *
* @param ev the TreeSelectionEvent that describes the change
*/
public void valueChanged(TreeSelectionEvent ev)
{
- TreeSelectionEvent rewritten =
+ TreeSelectionEvent rewritten =
(TreeSelectionEvent) ev.cloneWithSource(JTree.this);
fireValueChanged(rewritten);
}
@@ -1359,7 +1359,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the shared instance of EmptySelectionModel.
- *
+ *
* @return the shared instance of EmptySelectionModel
*/
public static EmptySelectionModel sharedInstance()
@@ -1369,7 +1369,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to set a selection and sets nothing instead.
- *
+ *
* @param paths not used here
*/
public void setSelectionPaths(TreePath[] paths)
@@ -1379,7 +1379,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to add something to the selection.
- *
+ *
* @param paths not used here
*/
public void addSelectionPaths(TreePath[] paths)
@@ -1389,7 +1389,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to remove something from the selection.
- *
+ *
* @param paths not used here
*/
public void removeSelectionPaths(TreePath[] paths)
@@ -1431,7 +1431,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public static final String ANCHOR_SELECTION_PATH_PROPERTY =
"anchorSelectionPath";
- /** @since 1.3 */
+ /** @since 1.3 */
public static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
/** @since 1.3 */
@@ -1531,7 +1531,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Hashtable<?, ?> value)
@@ -1541,7 +1541,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Object[] value)
@@ -1551,14 +1551,14 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param model the model to use
*/
public JTree(TreeModel model)
{
setRootVisible(true);
setSelectionModel( new DefaultTreeSelectionModel() );
-
+
// The root node appears expanded by default.
nodeStates = new Hashtable();
@@ -1575,7 +1575,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param root the root node
*/
public JTree(TreeNode root)
@@ -1585,7 +1585,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param root the root node
* @param asksAllowChildren if false, all nodes without children are leaf
* nodes. If true, only nodes that do not allow children are leaf
@@ -1598,7 +1598,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>JTree</code> object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Vector<?> value)
@@ -1621,13 +1621,13 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreeUI ui = getUI();
return ui != null ? ui.getPathForRow(this, row) : null;
}
-
+
/**
* Get the pathes that are displayes between the two given rows.
- *
+ *
* @param index0 the starting row, inclusive
* @param index1 the ending row, inclusive
- *
+ *
* @return the array of the tree pathes
*/
protected TreePath[] getPathBetweenRows(int index0, int index1)
@@ -1649,7 +1649,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new <code>TreeModel</code> object.
- *
+ *
* @param value the values stored in the model
*/
protected static TreeModel createTreeModel(Object value)
@@ -1659,7 +1659,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Return the UI associated with this <code>JTree</code> object.
- *
+ *
* @return the associated <code>TreeUI</code> object
*/
public TreeUI getUI()
@@ -1669,7 +1669,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the UI associated with this <code>JTree</code> object.
- *
+ *
* @param ui the <code>TreeUI</code> to associate
*/
public void setUI(TreeUI ui)
@@ -1687,7 +1687,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This method returns the String ID of the UI class of Separator.
- *
+ *
* @return The UI class' String ID.
*/
public String getUIClassID()
@@ -1698,7 +1698,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Gets the AccessibleContext associated with this
* <code>JTree</code>.
- *
+ *
* @return the associated context
*/
public AccessibleContext getAccessibleContext()
@@ -1708,19 +1708,19 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the preferred viewport size.
- *
+ *
* @return the preferred size
*/
public Dimension getPreferredScrollableViewportSize()
{
return getPreferredSize();
}
-
+
/**
* Return the preferred scrolling amount (in pixels) for the given scrolling
* direction and orientation. This method handles a partially exposed row by
* returning the distance required to completely expose the item.
- *
+ *
* @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
@@ -1796,7 +1796,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a <code>TreeExpansionListener</code> object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeExpansionListener(TreeExpansionListener listener)
@@ -1806,7 +1806,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a <code>TreeExpansionListener</code> object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeExpansionListener(TreeExpansionListener listener)
@@ -1816,7 +1816,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added <code>TreeExpansionListener</code> objects.
- *
+ *
* @return an array of listeners
*/
public TreeExpansionListener[] getTreeExpansionListeners()
@@ -1826,7 +1826,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree was collapsed.
- *
+ *
* @param path the path to the node that was collapsed
*/
public void fireTreeCollapsed(TreePath path)
@@ -1840,7 +1840,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree was expanded.
- *
+ *
* @param path the path to the node that was expanded
*/
public void fireTreeExpanded(TreePath path)
@@ -1854,7 +1854,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a <code>TreeSelctionListener</code> object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeSelectionListener(TreeSelectionListener listener)
@@ -1864,7 +1864,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a <code>TreeSelectionListener</code> object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeSelectionListener(TreeSelectionListener listener)
@@ -1874,18 +1874,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added <code>TreeSelectionListener</code> objects.
- *
+ *
* @return an array of listeners
*/
public TreeSelectionListener[] getTreeSelectionListeners()
{
- return (TreeSelectionListener[])
+ return (TreeSelectionListener[])
getListeners(TreeSelectionListener.class);
}
/**
* Notifies all listeners when the selection of the tree changed.
- *
+ *
* @param event the event to send
*/
protected void fireValueChanged(TreeSelectionEvent event)
@@ -1898,7 +1898,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a <code>TreeWillExpandListener</code> object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeWillExpandListener(TreeWillExpandListener listener)
@@ -1908,7 +1908,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a <code>TreeWillExpandListener</code> object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeWillExpandListener(TreeWillExpandListener listener)
@@ -1918,18 +1918,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added <code>TreeWillExpandListener</code> objects.
- *
+ *
* @return an array of listeners
*/
public TreeWillExpandListener[] getTreeWillExpandListeners()
{
- return (TreeWillExpandListener[])
+ return (TreeWillExpandListener[])
getListeners(TreeWillExpandListener.class);
}
/**
* Notifies all listeners that the tree will collapse.
- *
+ *
* @param path the path to the node that will collapse
*/
public void fireTreeWillCollapse(TreePath path) throws ExpandVetoException
@@ -1943,7 +1943,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree will expand.
- *
+ *
* @param path the path to the node that will expand
*/
public void fireTreeWillExpand(TreePath path) throws ExpandVetoException
@@ -1957,7 +1957,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the model of this <code>JTree</code> object.
- *
+ *
* @return the associated <code>TreeModel</code>
*/
public TreeModel getModel()
@@ -1967,7 +1967,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the model to use in <code>JTree</code>.
- *
+ *
* @param model the <code>TreeModel</code> to use
*/
public void setModel(TreeModel model)
@@ -2007,7 +2007,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Checks if this <code>JTree</code> object is editable.
- *
+ *
* @return <code>true</code> if this tree object is editable,
* <code>false</code> otherwise
*/
@@ -2018,7 +2018,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the <code>editable</code> property.
- *
+ *
* @param flag <code>true</code> to make this tree object editable,
* <code>false</code> otherwise
*/
@@ -2034,7 +2034,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Checks if the root element is visible.
- *
+ *
* @return <code>true</code> if the root element is visible,
* <code>false</code> otherwise
*/
@@ -2056,11 +2056,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreePath rootPath = getPathForRow(0);
model.removeSelectionPath(rootPath);
}
-
+
boolean oldValue = rootVisible;
rootVisible = flag;
firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, flag);
-
+
}
public boolean getShowsRootHandles()
@@ -2074,7 +2074,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
if (showsRootHandles == flag)
return;
-
+
boolean oldValue = showsRootHandles;
showsRootHandles = flag;
firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag);
@@ -2200,7 +2200,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
boolean oldValue = invokesStopCellEditing;
invokesStopCellEditing = invoke;
- firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY,
+ firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY,
oldValue, invoke);
}
@@ -2265,11 +2265,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
clearSelectionPathStates();
selectionModel.setSelectionPaths(paths);
}
-
+
/**
* This method, and all calls to it, should be removed once the
* DefaultTreeModel fires events properly. Maintenance of the nodeStates
- * table should really be done in the TreeModelHandler.
+ * table should really be done in the TreeModelHandler.
*/
private void clearSelectionPathStates()
{
@@ -2340,12 +2340,12 @@ public class JTree extends JComponent implements Scrollable, Accessible
addSelectionPaths(paths);
}
-
+
/**
* Select all rows between the two given indexes, inclusive. The method
* will not select the inner leaves and braches of the currently collapsed
* nodes in this interval.
- *
+ *
* @param index0 the starting row, inclusive
* @param index1 the ending row, inclusive
*/
@@ -2422,17 +2422,17 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreePath oldValue = selectionModel.getLeadSelectionPath();
if (path == oldValue || path != null && path.equals(oldValue))
return;
-
+
// Repaint the previous and current rows with the lead selection path.
if (path != null)
{
repaint(getPathBounds(path));
selectionModel.addSelectionPath(path);
}
-
+
if (oldValue != null)
repaint(getPathBounds(oldValue));
-
+
firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path);
}
}
@@ -2520,9 +2520,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Return the value of the <code>dragEnabled</code> property.
- *
+ *
* @return the value
- *
+ *
* @since 1.4
*/
public boolean getDragEnabled()
@@ -2532,9 +2532,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Set the <code>dragEnabled</code> property.
- *
+ *
* @param enabled new value
- *
+ *
* @since 1.4
*/
public void setDragEnabled(boolean enabled)
@@ -2722,7 +2722,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public void cancelEditing()
{
TreeUI ui = getUI();
-
+
if (isEditing())
if (ui != null)
ui.cancelEditing(this);
@@ -2803,11 +2803,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
private void doExpandParents(TreePath path, boolean state)
{
- TreePath parent = path.getParentPath();
+ TreePath parent = path.getParentPath();
if (!isExpanded(parent) && parent != null)
doExpandParents(parent, false);
-
+
nodeStates.put(path, state ? EXPANDED : COLLAPSED);
}
@@ -2868,7 +2868,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (path == null)
return;
-
+
expandPath(path.getParentPath());
}
@@ -2879,7 +2879,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates and returns an instance of {@link TreeModelHandler}.
- *
+ *
* @return an instance of {@link TreeModelHandler}
*/
protected TreeModelListener createTreeModelListener()
@@ -2890,7 +2890,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns a sample TreeModel that can be used in a JTree. This can be used
* in Bean- or GUI-Builders to show something interesting.
- *
+ *
* @return a sample TreeModel that can be used in a JTree
*/
protected static TreeModel getDefaultTreeModel()
@@ -2930,11 +2930,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Converts the specified value to a String. This is used by the renderers
* of this JTree and its nodes.
- *
+ *
* This implementation simply returns <code>value.toString()</code> and
* ignores all other parameters. Subclass this method to control the
* conversion.
- *
+ *
* @param value the value that is converted to a String
* @param selected indicates if that value is selected or not
* @param expanded indicates if that value is expanded or not
@@ -2952,7 +2952,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* A String representation of this JTree. This is intended to be used for
* debugging. The returned string may be empty but may not be
* <code>null</code>.
- *
+ *
* @return a String representation of this JTree
*/
protected String paramString()
@@ -2968,7 +2968,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* and are exapanded at the moment of the execution of this method. If the
* state of any node is beeing toggled while this method is executing this
* change may be left unaccounted.
- *
+ *
* @param path The parent of this request
*
* @return An Enumeration containing TreePath objects
@@ -2993,18 +2993,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
* Returns the next table element (beginning from the row
* <code>startingRow</code> that starts with <code>prefix</code>.
* Searching is done in the direction specified by <code>bias</code>.
- *
+ *
* @param prefix the prefix to search for in the cell values
* @param startingRow the index of the row where to start searching from
* @param bias the search direction, either {@link Position.Bias#Forward} or
* {@link Position.Bias#Backward}
- *
+ *
* @return the path to the found element or -1 if no such element has been
* found
- *
+ *
* @throws IllegalArgumentException if prefix is <code>null</code> or
* startingRow is not valid
- *
+ *
* @since 1.4
*/
public TreePath getNextMatch(String prefix, int startingRow,
@@ -3067,14 +3067,14 @@ public class JTree extends JComponent implements Scrollable, Accessible
* descendants of <code>path</code>. If <code>includePath</code> is set
* to <code>true</code> and <code>path</code> itself is selected, then
* it will be removed too.
- *
+ *
* @param path the path from which selected descendants are to be removed
* @param includeSelected if <code>true</code> then <code>path</code> itself
* will also be remove if it's selected
- *
+ *
* @return <code>true</code> if something has been removed,
* <code>false</code> otherwise
- *
+ *
* @since 1.3
*/
protected boolean removeDescendantSelectedPaths(TreePath path,
@@ -3093,11 +3093,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return removedSomething;
}
-
+
/**
- * Removes any descendants of the TreePaths in toRemove that have been
+ * Removes any descendants of the TreePaths in toRemove that have been
* expanded.
- *
+ *
* @param toRemove - Enumeration of TreePaths that need to be removed from
* cache of toggled tree paths.
*/
@@ -3107,7 +3107,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
TreePath current = toRemove.nextElement();
Enumeration descendants = getDescendantToggledPaths(current);
-
+
while (descendants.hasMoreElements())
{
TreePath currentDes = (TreePath) descendants.nextElement();
@@ -3130,7 +3130,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* {@link DefaultTreeModel#reload()} after adding or removing nodes. Following
* the official Java 1.5 API standard, just calling treeDidChange, repaint()
* or revalidate() does <i>not</i> update the tree appearance properly.
- *
+ *
* @see DefaultTreeModel#reload()
*/
public void treeDidChange()
@@ -3141,7 +3141,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/javax/swing/JViewport.java b/javax/swing/JViewport.java
index 023948032..729fac671 100644
--- a/javax/swing/JViewport.java
+++ b/javax/swing/JViewport.java
@@ -1,4 +1,4 @@
-/* JViewport.java --
+/* JViewport.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,7 +62,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.plaf.ViewportUI;
/**
- *
+ *
* <pre>
* _
* +-------------------------------+ ...........Y1 \
@@ -89,7 +89,7 @@ import javax.swing.plaf.ViewportUI;
* \/
* VX = X2-X1
*</pre>
- *
+ *
* <p>A viewport is, like all swing components, located at some position in
* the swing component tree; that location is exactly the same as any other
* components: the viewport's "bounds".</p>
@@ -226,7 +226,7 @@ public class JViewport extends JComponent implements Accessible
/**
* Stores the bounds of the area that needs to be repainted. This is a cached
- * Rectangle object used in blitting calculations.
+ * Rectangle object used in blitting calculations.
*/
Rectangle cachedBlitPaint;
@@ -308,14 +308,14 @@ public class JViewport extends JComponent implements Accessible
*/
public Dimension getViewSize()
{
- Dimension size;
+ Dimension size;
Component view = getView();
if (view != null)
{
if (isViewSizeSet)
size = view.getSize();
else
- size = view.getPreferredSize();
+ size = view.getPreferredSize();
}
else
size = new Dimension(0, 0);
@@ -409,7 +409,7 @@ public class JViewport extends JComponent implements Accessible
{
if (getComponentCount() == 0)
return null;
-
+
return getComponents()[0];
}
@@ -458,7 +458,7 @@ public class JViewport extends JComponent implements Accessible
insets.right = 0;
return insets;
}
-
+
/**
* Overridden to return <code>false</code>, so the JViewport's paint method
@@ -482,7 +482,7 @@ public class JViewport extends JComponent implements Accessible
Rectangle viewBounds = view.getBounds();
Rectangle portBounds = getBounds();
- if (viewBounds.width == 0
+ if (viewBounds.width == 0
|| viewBounds.height == 0
|| portBounds.width == 0
|| portBounds.height == 0)
@@ -515,7 +515,7 @@ public class JViewport extends JComponent implements Accessible
listenerList.remove(ChangeListener.class, listener);
}
- public ChangeListener[] getChangeListeners()
+ public ChangeListener[] getChangeListeners()
{
return (ChangeListener[]) getListeners(ChangeListener.class);
}
@@ -536,7 +536,7 @@ public class JViewport extends JComponent implements Accessible
public void updateUI()
{
setUI((ViewportUI) UIManager.getUI(this));
- }
+ }
/**
* This method returns the viewport's UI delegate.
@@ -573,7 +573,7 @@ public class JViewport extends JComponent implements Accessible
{
Component view = getView();
if (view == null)
- return;
+ return;
Point pos = getViewPosition();
// We get the contentRect in the viewport coordinates. But we want to
@@ -582,7 +582,7 @@ public class JViewport extends JComponent implements Accessible
int contentY = contentRect.y + pos.y;
Rectangle viewBounds = getView().getBounds();
Rectangle portBounds = getBounds();
-
+
if (isShowing())
getView().validate();
@@ -641,7 +641,7 @@ public class JViewport extends JComponent implements Accessible
{
if (getComponentCount() > 0)
remove(getComponents()[0]);
-
+
super.addImpl(comp, constraints, index);
}
@@ -796,7 +796,7 @@ public class JViewport extends JComponent implements Accessible
g.translate(-pos.x, -pos.y);
translated = true;
view.paint(g);
- }
+ }
finally
{
if (translated)
@@ -861,7 +861,7 @@ public class JViewport extends JComponent implements Accessible
// clip must be updated in the buffer.
if (dx == 0 && dy == 0)
g2.setClip(g.getClip());
-
+
paintSimple(g2);
}
g2.dispose();
diff --git a/javax/swing/JWindow.java b/javax/swing/JWindow.java
index b36b8cf2a..91e0b5069 100644
--- a/javax/swing/JWindow.java
+++ b/javax/swing/JWindow.java
@@ -77,7 +77,7 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
}
private static final long serialVersionUID = 5420698392125238833L;
-
+
protected JRootPane rootPane;
/**
diff --git a/javax/swing/KeyStroke.java b/javax/swing/KeyStroke.java
index b57a71192..94bc334b0 100644
--- a/javax/swing/KeyStroke.java
+++ b/javax/swing/KeyStroke.java
@@ -42,18 +42,18 @@ import java.awt.AWTKeyStroke;
import java.awt.event.KeyEvent;
import java.io.Serializable;
-public class KeyStroke
+public class KeyStroke
extends AWTKeyStroke
implements Serializable
{
private static final long serialVersionUID = -9060180771037902530L;
-
+
// Called by java.awt.AWTKeyStroke.registerSubclass via reflection.
private KeyStroke()
{
// Nothing to do here.
}
-
+
private KeyStroke(char keyChar, int keyCode, int modifiers,
boolean onKeyRelease)
{
@@ -65,34 +65,34 @@ public class KeyStroke
AWTKeyStroke.registerSubclass(KeyStroke.class);
}
- public static KeyStroke getKeyStroke(char keyChar)
+ public static KeyStroke getKeyStroke(char keyChar)
{
return (KeyStroke) getAWTKeyStroke(keyChar);
}
- /**
+ /**
* @deprecated Use {@link #getKeyStroke(char)}
*
* This method, unlike all the other factory methods on this object,
* returns a non-cached, non-shared object. New code should not use it.
*/
- public static KeyStroke getKeyStroke(char keyChar, boolean onKeyRelease)
+ public static KeyStroke getKeyStroke(char keyChar, boolean onKeyRelease)
{
return new KeyStroke(keyChar, KeyEvent.VK_UNDEFINED, 0, onKeyRelease);
}
- public static KeyStroke getKeyStroke(Character keyChar, int modifiers)
+ public static KeyStroke getKeyStroke(Character keyChar, int modifiers)
{
return (KeyStroke) getAWTKeyStroke(keyChar, modifiers);
}
- public static KeyStroke getKeyStroke(int keyCode, int modifiers,
- boolean onKeyRelease)
+ public static KeyStroke getKeyStroke(int keyCode, int modifiers,
+ boolean onKeyRelease)
{
return (KeyStroke) getAWTKeyStroke(keyCode, modifiers, onKeyRelease);
}
- public static KeyStroke getKeyStroke(int keyCode, int modifiers)
+ public static KeyStroke getKeyStroke(int keyCode, int modifiers)
{
return (KeyStroke) getAWTKeyStroke(keyCode, modifiers);
}
@@ -103,19 +103,19 @@ public class KeyStroke
* <code>IllegalArugmentException</code> when
* the keystoke sequence cannot be parsed from the given string.
*/
- public static KeyStroke getKeyStroke(String str)
+ public static KeyStroke getKeyStroke(String str)
{
try
{
- return (KeyStroke) getAWTKeyStroke(str);
+ return (KeyStroke) getAWTKeyStroke(str);
}
catch (IllegalArgumentException iae)
{
- return null;
+ return null;
}
}
- public static KeyStroke getKeyStrokeForEvent(KeyEvent event)
+ public static KeyStroke getKeyStrokeForEvent(KeyEvent event)
{
return (KeyStroke) getAWTKeyStrokeForEvent(event);
}
diff --git a/javax/swing/KeyboardManager.java b/javax/swing/KeyboardManager.java
index f7ac9496c..5c1c09eab 100644
--- a/javax/swing/KeyboardManager.java
+++ b/javax/swing/KeyboardManager.java
@@ -1,4 +1,4 @@
-/* KeyboardManager.java --
+/* KeyboardManager.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,11 +49,11 @@ import java.util.Vector;
import java.util.WeakHashMap;
/**
- * This class maintains a mapping from top-level containers to a
- * Hashtable. The Hashtable maps KeyStrokes to Components to be used when
+ * This class maintains a mapping from top-level containers to a
+ * Hashtable. The Hashtable maps KeyStrokes to Components to be used when
* Components register keyboard actions with the condition
* JComponent.WHEN_IN_FOCUSED_WINDOW.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
*
*/
@@ -61,13 +61,13 @@ class KeyboardManager
{
/** Shared instance of KeyboardManager **/
static KeyboardManager manager = new KeyboardManager();
-
- /**
- * A mapping between top level containers and Hashtables that
+
+ /**
+ * A mapping between top level containers and Hashtables that
* map KeyStrokes to Components.
*/
- WeakHashMap topLevelLookup = new WeakHashMap();
-
+ WeakHashMap topLevelLookup = new WeakHashMap();
+
/**
* A mapping between top level containers and Vectors of JMenuBars
* used to allow all the JMenuBars within a top level container
@@ -91,22 +91,22 @@ class KeyboardManager
{
Container topLevel = (c instanceof Container) ? (Container) c
: c.getParent();
- while (topLevel != null &&
- !(topLevel instanceof Window) &&
- !(topLevel instanceof Applet) &&
+ while (topLevel != null &&
+ !(topLevel instanceof Window) &&
+ !(topLevel instanceof Applet) &&
!(topLevel instanceof JInternalFrame))
topLevel = topLevel.getParent();
return topLevel;
}
-
+
/**
- * Returns the Hashtable that maps KeyStrokes to Components, for
+ * Returns the Hashtable that maps KeyStrokes to Components, for
* the specified top-level container c. If no Hashtable exists
* we create and register it here and return the newly created
* Hashtable.
- *
+ *
* @param c the top-level container whose Hashtable we want
- * @return the Hashtable mapping KeyStrokes to Components for the
+ * @return the Hashtable mapping KeyStrokes to Components for the
* specified top-level container
*/
Hashtable getHashtableForTopLevel (Container c)
@@ -119,13 +119,13 @@ class KeyboardManager
}
return keyToComponent;
}
-
+
/**
* Registers a KeyStroke with a Component. This does not register
- * the KeyStroke to a specific Action. When searching for a
+ * the KeyStroke to a specific Action. When searching for a
* WHEN_IN_FOCUSED_WINDOW binding we will first go up to the focused
- * top-level Container, then get the Hashtable that maps KeyStrokes
- * to components for that particular top-level Container, then
+ * top-level Container, then get the Hashtable that maps KeyStrokes
+ * to components for that particular top-level Container, then
* call processKeyBindings on that component with the condition
* JComponent.WHEN_IN_FOCUSED_WINDOW.
* @param comp the JComponent associated with the KeyStroke
@@ -135,7 +135,7 @@ class KeyboardManager
{
// This method associates a KeyStroke with a particular JComponent
// When the KeyStroke occurs, if this component's top-level ancestor
- // has focus (one of its children is the focused Component) then
+ // has focus (one of its children is the focused Component) then
// comp.processKeyBindings will be called with condition
// JComponent.WHEN_IN_FOCUSED_WINDOW.
@@ -143,16 +143,16 @@ class KeyboardManager
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
-
+
// Now get the Hashtable for this top-level container
- Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
-
+ Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
+
// And add the new binding to this Hashtable
// FIXME: should allow more than one JComponent to be associated
// with a KeyStroke, in case one of them is disabled
keyToComponent.put(key, comp);
}
-
+
public void clearBindingsForComp(JComponent comp)
{
// This method clears all the WHEN_IN_FOCUSED_WINDOW bindings associated
@@ -162,9 +162,9 @@ class KeyboardManager
// bindings from the updated ComponentInputMap. This is only a preliminary
// strategy and should be improved upon once the WHEN_IN_FOCUSED_WINDOW
// bindings work.
-
+
// Find the top-level ancestor
-
+
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
@@ -179,22 +179,22 @@ class KeyboardManager
{
temp = keys.nextElement();
if (comp == (JComponent)keyToComponent.get(temp))
- keyToComponent.remove(temp);
+ keyToComponent.remove(temp);
}
}
-
+
/**
* This method registers all the bindings in the given ComponentInputMap.
* Rather than call registerBinding on all the keys, we do the work here
- * so that we don't duplicate finding the top-level container and
+ * so that we don't duplicate finding the top-level container and
* getting its Hashtable.
- *
+ *
* @param map the ComponentInputMap whose bindings we want to register
*/
public void registerEntireMap (ComponentInputMap map)
{
if (map == null)
- return;
+ return;
JComponent comp = map.getComponent();
KeyStroke[] keys = map.allKeys();
if (keys == null)
@@ -203,13 +203,13 @@ class KeyboardManager
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
-
+
// Register the KeyStrokes in the top-level container's Hashtable
Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
for (int i = 0; i < keys.length; i++)
keyToComponent.put(keys[i], comp);
}
-
+
public boolean processKeyStroke (Component comp, KeyStroke key, KeyEvent e)
{
boolean pressed = e.getID() == KeyEvent.KEY_PRESSED;
@@ -217,15 +217,15 @@ class KeyboardManager
// Look for the top-level ancestor
Container topLevel = findTopLevel(comp);
if (topLevel == null)
- return false;
+ return false;
// Now get the Hashtable for that top-level container
Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
Enumeration keys = keyToComponent.keys();
- JComponent target = (JComponent)keyToComponent.get(key);
+ JComponent target = (JComponent)keyToComponent.get(key);
if (target != null && target.processKeyBinding
(key, e, JComponent.WHEN_IN_FOCUSED_WINDOW, pressed))
return true;
-
+
// Have to give all the JMenuBars a chance to consume the event
Vector menuBars = getVectorForTopLevel(topLevel);
for (int i = 0; i < menuBars.size(); i++)
@@ -233,7 +233,7 @@ class KeyboardManager
return true;
return false;
}
-
+
/**
* Returns the Vector of JMenuBars associated with the top-level
* @param c the top-level container whose JMenuBar Vector we want
@@ -249,11 +249,11 @@ class KeyboardManager
}
return result;
}
-
+
/**
- * In processKeyStroke, KeyManager must give all JMenuBars in the
- * focused top-level container a chance to process the event. So,
- * JMenuBars must be registered in KeyManager and associated with a
+ * In processKeyStroke, KeyManager must give all JMenuBars in the
+ * focused top-level container a chance to process the event. So,
+ * JMenuBars must be registered in KeyManager and associated with a
* top-level container. That's what this method is for.
* @param menuBar the JMenuBar to register
*/
@@ -264,9 +264,9 @@ class KeyboardManager
if (!menuBars.contains(menuBar))
menuBars.add(menuBar);
}
-
+
/**
- * Unregisters a JMenuBar from its top-level container. This is
+ * Unregisters a JMenuBar from its top-level container. This is
* called before the JMenuBar is actually removed from the container
* so findTopLevel will still find us the correct top-level container.
* @param menuBar the JMenuBar to unregister.
diff --git a/javax/swing/LayoutFocusTraversalPolicy.java b/javax/swing/LayoutFocusTraversalPolicy.java
index 2d135157d..335bc265d 100644
--- a/javax/swing/LayoutFocusTraversalPolicy.java
+++ b/javax/swing/LayoutFocusTraversalPolicy.java
@@ -45,10 +45,10 @@ import java.util.Comparator;
/**
* @author Graydon Hoare
* @author Michael Koch
- *
+ *
* @since 1.4
*/
-public class LayoutFocusTraversalPolicy
+public class LayoutFocusTraversalPolicy
extends SortingFocusTraversalPolicy
implements Serializable
{
@@ -59,7 +59,7 @@ public class LayoutFocusTraversalPolicy
{
// Do nothing here.
}
-
+
public int compare(Object o1, Object o2)
{
Component comp1 = (Component) o1;
@@ -69,19 +69,19 @@ public class LayoutFocusTraversalPolicy
int y1 = comp1.getY();
int x2 = comp2.getX();
int y2 = comp2.getY();
-
+
if (x1 == x2 && y1 == y2)
- return 0;
-
+ return 0;
+
if ((y1 < y2) || ((y1 == y2) && (x1 < x2)))
- return -1;
+ return -1;
return 1;
}
}
private static final long serialVersionUID = 4312146927238881442L;
-
+
public LayoutFocusTraversalPolicy()
{
super(new LayoutComparator());
diff --git a/javax/swing/ListCellRenderer.java b/javax/swing/ListCellRenderer.java
index e234d184d..0e56d5016 100644
--- a/javax/swing/ListCellRenderer.java
+++ b/javax/swing/ListCellRenderer.java
@@ -1,4 +1,4 @@
-/* ListCellRenderer.java --
+/* ListCellRenderer.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/ListSelectionModel.java b/javax/swing/ListSelectionModel.java
index 499362d04..1cd67e948 100644
--- a/javax/swing/ListSelectionModel.java
+++ b/javax/swing/ListSelectionModel.java
@@ -1,4 +1,4 @@
-/* ListSelectionModel.java --
+/* ListSelectionModel.java --
Copyright (C) 2002, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,19 @@ import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
/**
- * A model that tracks the selection status of a list of items. Each item in
+ * A model that tracks the selection status of a list of items. Each item in
* the list is identified by a zero-based index only, so the model can be used
- * to track the selection status of any type of list. The model
+ * to track the selection status of any type of list. The model
* supports three modes:
* <ul>
- * <li><code>SINGLE_SELECTION</code> - only one item in the list may be
+ * <li><code>SINGLE_SELECTION</code> - only one item in the list may be
* selected;</li>
- * <li><code>SINGLE_INTERVAL_SELECTION</code> - only one interval in the list
+ * <li><code>SINGLE_INTERVAL_SELECTION</code> - only one interval in the list
* may be selected;</li>
- * <li><code>MULTIPLE_INTERVAL_SELECTION</code> - any combination of items in
+ * <li><code>MULTIPLE_INTERVAL_SELECTION</code> - any combination of items in
* the list may be selected.</li>
* </ul>
- * The model uses an event notification mechanism to notify listeners (see
+ * The model uses an event notification mechanism to notify listeners (see
* {@link ListSelectionListener}) about updates to the selection model.
* <p>
* This model is used to track row selections in the {@link JList} component,
@@ -62,10 +62,10 @@ import javax.swing.event.ListSelectionListener;
*/
public interface ListSelectionModel
{
-
+
/**
* A selection mode in which only one item can be selected.
- *
+ *
* @see #setSelectionMode(int)
*/
int SINGLE_SELECTION = 0;
@@ -73,14 +73,14 @@ public interface ListSelectionModel
/**
* A selection mode in which a single interval can be selected (an interval
* is a range containing one or more contiguous items).
- *
+ *
* @see #setSelectionMode(int)
*/
int SINGLE_INTERVAL_SELECTION = 1;
/**
* A selection mode in which any combination of items can be selected.
- *
+ *
* @see #setSelectionMode(int)
*/
int MULTIPLE_INTERVAL_SELECTION = 2;
@@ -90,32 +90,32 @@ public interface ListSelectionModel
* <p>
* FIXME: The spec is silent about what happens to existing selections, for
* example when changing from an interval selection to single selection.
- *
- * @param mode one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ *
+ * @param mode one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @see #getSelectionMode()
- *
+ *
* @throws IllegalArgumentException if <code>mode</code> is not one of the
* specified values.
*/
void setSelectionMode(int mode);
/**
- * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
int getSelectionMode();
/**
- * Clears the current selection from the model. If the selection state
- * changes (that is, the existing selection is non-empty) a
+ * Clears the current selection from the model. If the selection state
+ * changes (that is, the existing selection is non-empty) a
* {@link ListSelectionEvent} should be sent to all registered listeners.
* <p>
* FIXME: what happens to the anchor and lead selection indices (the spec
@@ -126,11 +126,11 @@ public interface ListSelectionModel
void clearSelection();
/**
- * Returns the lowest selected index, or <code>-1</code> if there is no
+ * Returns the lowest selected index, or <code>-1</code> if there is no
* selection.
- *
+ *
* @return The lowest selected index.
- *
+ *
* @see #getMaxSelectionIndex()
*/
int getMinSelectionIndex();
@@ -138,22 +138,22 @@ public interface ListSelectionModel
/**
* Returns the highest selected index, or <code>-1</code> if there is no
* selection.
- *
+ *
* @return The highest selected index.
- *
+ *
* @see #getMinSelectionIndex()
*/
int getMaxSelectionIndex();
/**
- * Returns <code>true</code> if the specified item is selected, and
- * <code>false</code> otherwise. Special note: if <code>index</code> is
- * negative, this method should return <code>false</code> (no exception
+ * Returns <code>true</code> if the specified item is selected, and
+ * <code>false</code> otherwise. Special note: if <code>index</code> is
+ * negative, this method should return <code>false</code> (no exception
* should be thrown).
- *
+ *
* @param index the item index (zero-based).
- *
- * @return <code>true</code> if the specified item is selected, and
+ *
+ * @return <code>true</code> if the specified item is selected, and
* <code>false</code> otherwise.
*/
boolean isSelectedIndex(int index);
@@ -161,56 +161,56 @@ public interface ListSelectionModel
/**
* Returns <code>true</code> if there is no selection, and <code>false</code>
* otherwise.
- *
- * @return <code>true</code> if there is no selection, and
+ *
+ * @return <code>true</code> if there is no selection, and
* <code>false</code> otherwise.
*/
boolean isSelectionEmpty();
/**
- * Sets the selection interval to the specified range (note that
- * <code>anchor</code> can be less than, equal to, or greater than
- * <code>lead</code>). If this results in the selection being changed,
+ * Sets the selection interval to the specified range (note that
+ * <code>anchor</code> can be less than, equal to, or greater than
+ * <code>lead</code>). If this results in the selection being changed,
* a {@link ListSelectionEvent} is sent to all registered listeners.
* <p>
- * If the selection mode is {@link #SINGLE_SELECTION}, only the
+ * If the selection mode is {@link #SINGLE_SELECTION}, only the
* <code>lead</code> item is selected.
- *
+ *
* @param anchor the anchor index.
* @param lead the lead index.
*/
void setSelectionInterval(int anchor, int lead);
/**
- * Marks the items in the specified interval as selected. The behaviour of
+ * Marks the items in the specified interval as selected. The behaviour of
* this method depends on the selection mode:
* <ul>
- * <li><code>SINGLE_SELECTION</code> - only the <code>lead</code> item is
+ * <li><code>SINGLE_SELECTION</code> - only the <code>lead</code> item is
* selected;</li>
- * <li><code>SINGLE_INTERVAL_SELECTION</code> - the existing selection
+ * <li><code>SINGLE_INTERVAL_SELECTION</code> - the existing selection
* interval is replaced by the specified interval;</li>
- * <li><code>MULTIPLE_INTERVAL_SELECTION</code> - the specified interval is
+ * <li><code>MULTIPLE_INTERVAL_SELECTION</code> - the specified interval is
* merged into the currently selected intervals.</li>
* </ul>
- * Note that <code>anchor</code> can be less than, equal to, or greater than
+ * Note that <code>anchor</code> can be less than, equal to, or greater than
* <code>lead</code>.
- *
+ *
* @param anchor the index of the anchor item
* @param lead the index of the lead item.
*/
void addSelectionInterval(int anchor, int lead);
/**
- * Marks the items in the specified interval as not selected. The behaviour
+ * Marks the items in the specified interval as not selected. The behaviour
* of this method depends on the selection mode:
* <ul>
* <li><code>SINGLE_SELECTION</code> - XXX;</li>
* <li><code>SINGLE_INTERVAL_SELECTION</code> - XXX;</li>
* <li><code>MULTIPLE_INTERVAL_SELECTION</code> - XXX.</li>
* </ul>
- * Note that <code>anchor</code> can be less than, equal to, or greater than
+ * Note that <code>anchor</code> can be less than, equal to, or greater than
* <code>lead</code>.
- *
+ *
* @param anchor the index of the anchor item
* @param lead the index of the lead item.
*/
@@ -221,67 +221,67 @@ public interface ListSelectionModel
* specified <code>index</code> (the <code>before</code> flag indicates
* whether the range is inserted before or after the existing item at
* <code>index</code>).
- *
+ *
* FIXME: What is the selection status of the new items? Bug 4870694.
* FIXME: What event is generated?
- *
- * @param index the index of the item.
+ *
+ * @param index the index of the item.
* @param length the number of items in the interval to be inserted.
- * @param before if <code>true</code>, the interval should be inserted
+ * @param before if <code>true</code>, the interval should be inserted
* before <code>index</code>, otherwise it is inserted after.
- *
+ *
* @see #removeIndexInterval(int, int)
*/
void insertIndexInterval(int index, int length, boolean before);
/**
* Removes the items in the specified range (inclusive) from the selection
- * model. This method should be called when an interval is deleted from
+ * model. This method should be called when an interval is deleted from
* the underlying list.
- *
- * FIXME: what happens to the lead and anchor indices if they are part of
- * the range that is removed?
+ *
+ * FIXME: what happens to the lead and anchor indices if they are part of
+ * the range that is removed?
* FIXME: what event is generated
- *
+ *
* @param index0 XXX
* @param index1 XXX
- *
+ *
* @see #insertIndexInterval(int, int, boolean)
*/
void removeIndexInterval(int index0, int index1);
/**
- * Returns the index of the anchor item.
- *
+ * Returns the index of the anchor item.
+ *
* @return The index of the anchor item.
- *
+ *
* @see #setAnchorSelectionIndex(int)
*/
int getAnchorSelectionIndex();
/**
* Sets the index of the anchor item.
- *
+ *
* @param index the item index.
- *
+ *
* @see #getAnchorSelectionIndex()
*/
void setAnchorSelectionIndex(int index);
/**
* Returns the index of the lead item.
- *
+ *
* @return The index of the lead item.
- *
+ *
* @see #setLeadSelectionIndex(int)
*/
int getLeadSelectionIndex();
/**
* Sets the index of the lead item.
- *
+ *
* @param index the item index.
- *
+ *
* @see #getLeadSelectionIndex()
*/
void setLeadSelectionIndex(int index);
@@ -289,21 +289,21 @@ public interface ListSelectionModel
/**
* Sets the flag that is passed to listeners for each change notification.
* If a sequence of changes is made to the selection model, this flag should
- * be set to <code>true</code> at the start of the sequence, and
+ * be set to <code>true</code> at the start of the sequence, and
* <code>false</code> for the last change - this gives listeners the option
* to ignore interim changes if that is more efficient.
- *
+ *
* @param valueIsAdjusting the flag value.
- *
+ *
* @see #getValueIsAdjusting()
*/
void setValueIsAdjusting(boolean valueIsAdjusting);
/**
* Returns a flag that is passed to registered listeners when changes are
- * made to the model. See the description for
+ * made to the model. See the description for
* {@link #setValueIsAdjusting(boolean)} for more information.
- *
+ *
* @return The flag.
*/
boolean getValueIsAdjusting();
@@ -311,9 +311,9 @@ public interface ListSelectionModel
/**
* Registers a listener with the model so that it receives notification
* of changes to the model.
- *
+ *
* @param listener the listener (<code>null</code> ignored).
- *
+ *
* @see #removeListSelectionListener(ListSelectionListener)
*/
void addListSelectionListener(ListSelectionListener listener);
@@ -322,9 +322,9 @@ public interface ListSelectionModel
* Deregisters a listener so that it no longer receives notification of
* changes to the model. If the specified listener is not registered with
* the model, or is <code>null</code>, this method does nothing.
- *
+ *
* @param listener the listener (<code>null</code> ignored).
- *
+ *
* @see #addListSelectionListener(ListSelectionListener)
*/
void removeListSelectionListener(ListSelectionListener listener);
diff --git a/javax/swing/LookAndFeel.java b/javax/swing/LookAndFeel.java
index d995bc9e9..aec6ebb7f 100644
--- a/javax/swing/LookAndFeel.java
+++ b/javax/swing/LookAndFeel.java
@@ -53,18 +53,18 @@ import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.text.JTextComponent;
/**
- * A <i>look-and-feel</i> controls most aspects of the appearance and
- * operation of user interface components in <code>javax.swing</code>. A
+ * A <i>look-and-feel</i> controls most aspects of the appearance and
+ * operation of user interface components in <code>javax.swing</code>. A
* cross-platform look-and-feel (the {@link MetalLookAndFeel}) is provided.
- *
+ *
* @see UIManager#getInstalledLookAndFeels()
* @see UIManager#setLookAndFeel(LookAndFeel)
*/
public abstract class LookAndFeel
{
/**
- * Creates and returns a look-and-feel specific defaults table. This method
- * is called once by {@link UIManager#setLookAndFeel(LookAndFeel)} and
+ * Creates and returns a look-and-feel specific defaults table. This method
+ * is called once by {@link UIManager#setLookAndFeel(LookAndFeel)} and
* shouldn't be called again (as it creates a large table of defaults).
*
* @return The UI defaults.
@@ -76,47 +76,47 @@ public abstract class LookAndFeel
/**
* Returns a description of the look and feel.
- *
+ *
* @return A description of the look and feel.
*/
public abstract String getDescription();
/**
* Returns the value of <code>Toolkit.getDefaultToolkit()
- * .getDesktopProperty(systemPropertyName)</code>, or
+ * .getDesktopProperty(systemPropertyName)</code>, or
* <code>fallbackValue</code> if no such property is defined.
- *
+ *
* @param systemPropertyName the system property name.
* @param fallbackValue the fallback value.
- *
+ *
* @return The property value or <code>fallbackValue</code>.
*/
- public static Object getDesktopPropertyValue(String systemPropertyName,
+ public static Object getDesktopPropertyValue(String systemPropertyName,
Object fallbackValue)
{
Object value = Toolkit.getDefaultToolkit().getDesktopProperty(
systemPropertyName);
return value != null ? value : fallbackValue;
}
-
+
/**
* Returns an identifier for the look and feel.
- *
+ *
* @return An identifier for the look and feel.
*/
public abstract String getID();
/**
* Returns the name for the look and feel.
- *
+ *
* @return The name for the look and feel.
*/
public abstract String getName();
/**
- * Returns <code>true</code> when the look-and-feel supports window
+ * Returns <code>true</code> when the look-and-feel supports window
* decorations, and <code>false</code> otherwise. This default implementation
- * always returns <code>false</code> and needs to be overridden when the
+ * always returns <code>false</code> and needs to be overridden when the
* derived look-and-feel supports this.
*
* @return <code>false</code>.
@@ -127,13 +127,13 @@ public abstract class LookAndFeel
{
return false;
}
-
+
/**
- * Initializes the look-and-feel. The
- * {@link UIManager#setLookAndFeel(LookAndFeel)} method calls this method
- * before the first call (and typically the only call) to
+ * Initializes the look-and-feel. The
+ * {@link UIManager#setLookAndFeel(LookAndFeel)} method calls this method
+ * before the first call (and typically the only call) to
* {@link #getDefaults()}. This default implementation does nothing, but
- * subclasses can override this behaviour.
+ * subclasses can override this behaviour.
*/
public void initialize()
{
@@ -142,12 +142,12 @@ public abstract class LookAndFeel
}
/**
- * Convenience method for installing a component's default {@link Border}
- * object on the specified component if either the border is currently
- * <code>null</code> or already an instance of {@link UIResource}.
- *
+ * Convenience method for installing a component's default {@link Border}
+ * object on the specified component if either the border is currently
+ * <code>null</code> or already an instance of {@link UIResource}.
+ *
* @param c the component (<code>null</code> not permitted).
- * @param defaultBorderName the border name (for lookup in the UIDefaults
+ * @param defaultBorderName the border name (for lookup in the UIDefaults
* table).
*/
public static void installBorder(JComponent c, String defaultBorderName)
@@ -160,9 +160,9 @@ public abstract class LookAndFeel
/**
* Convenience method for initializing a component's foreground and
* background color properties with values from the current defaults table.
- *
+ *
* @param c the component (<code>null</code> not permitted).
- * @param defaultBgName the key for the background color in the UIDefaults
+ * @param defaultBgName the key for the background color in the UIDefaults
* table.
* @param defaultFgName the key for the foreground color in the UIDefaults
* table.
@@ -184,9 +184,9 @@ public abstract class LookAndFeel
/**
* Convenience method for initializing a component's foreground, background
* and font properties with values from the current defaults table.
- *
+ *
* @param component the component (<code>null</code> not permitted).
- * @param defaultBgName the key for the background color in the UIDefaults
+ * @param defaultBgName the key for the background color in the UIDefaults
* table.
* @param defaultFgName the key for the foreground color in the UIDefaults
* table.
@@ -206,23 +206,23 @@ public abstract class LookAndFeel
}
/**
- * Returns <code>true</code> if the look-and-feel is the "native"
+ * Returns <code>true</code> if the look-and-feel is the "native"
* look-and-feel for the current platform, and <code>false</code> otherwise.
- * A native look-and-feel emulates the appearance and behaviour of the
+ * A native look-and-feel emulates the appearance and behaviour of the
* default windowing system on the host operating system.
- *
+ *
* @return A flag indicating whether or not this is the native look and feel
* for the current platform.
*/
public abstract boolean isNativeLookAndFeel();
/**
- * Returns <code>true</code> if the look-and-feel is supported on the
- * current operating system, and <code>false</code> otherwise. This
+ * Returns <code>true</code> if the look-and-feel is supported on the
+ * current operating system, and <code>false</code> otherwise. This
* mechanism is provided so that it is possible to prevent a look-and-feel
* from being used on some operating systems (usually for legal, not
* technical, reasons).
- *
+ *
* @return A flag indicating whether or not the look-and-feel is supported
* on the current platform.
*/
@@ -232,9 +232,9 @@ public abstract class LookAndFeel
* Loads the bindings in keys into retMap. Does not remove existing entries
* from retMap. <code>keys</code> describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param retMap the InputMap into which we load bindings
* @param keys the Object array describing the InputMap as above
*/
@@ -255,19 +255,19 @@ public abstract class LookAndFeel
}
/**
- * Creates a ComponentInputMap from keys.
+ * Creates a ComponentInputMap from keys.
* <code>keys</code> describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param c the JComponent associated with the ComponentInputMap
* @param keys the Object array describing the InputMap as above
- *
+ *
* @return A new input map.
*/
public static ComponentInputMap makeComponentInputMap(JComponent c,
- Object[] keys)
+ Object[] keys)
{
ComponentInputMap retMap = new ComponentInputMapUIResource(c);
loadKeyBindings(retMap, keys);
@@ -277,17 +277,17 @@ public abstract class LookAndFeel
/**
* Utility method that creates a UIDefaults.LazyValue that creates an
* ImageIcon UIResource for the specified gifFile filename.
- *
+ *
* @param baseClass the base class for accessing the icon resource.
* @param gifFile the file name.
- *
- * @return A {@link UIDefaults.LazyValue} that serves up an
+ *
+ * @return A {@link UIDefaults.LazyValue} that serves up an
* {@link IconUIResource}.
*/
public static Object makeIcon(Class<?> baseClass, String gifFile)
{
final URL file = baseClass.getResource(gifFile);
- return new UIDefaults.LazyValue()
+ return new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
@@ -297,14 +297,14 @@ public abstract class LookAndFeel
}
/**
- * Creates a InputMap from keys.
+ * Creates a InputMap from keys.
* <code>keys</code> describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param keys the Object array describing the InputMap as above
- *
+ *
* @return A new input map.
*/
public static InputMap makeInputMap(Object[] keys)
@@ -319,14 +319,14 @@ public abstract class LookAndFeel
* <code>keyBindingList</code> is an array of KeyStroke-Action pairs where
* even indexed elements are KeyStrokes or Strings representing KeyStrokes
* and odd indexed elements are the associated Actions.
- *
+ *
* @param keyBindingList the array of KeyStroke-Action pairs
* @return a JTextComponent.KeyBinding array
*/
public static JTextComponent.KeyBinding[] makeKeyBindings(
Object[] keyBindingList)
{
- JTextComponent.KeyBinding[] retBindings =
+ JTextComponent.KeyBinding[] retBindings =
new JTextComponent.KeyBinding[keyBindingList.length / 2];
for (int i = 0; i < keyBindingList.length - 1; i += 2)
{
@@ -335,15 +335,15 @@ public abstract class LookAndFeel
stroke = (KeyStroke) keyBindingList[i];
else
stroke = KeyStroke.getKeyStroke((String) keyBindingList[i]);
- retBindings[i / 2] = new JTextComponent.KeyBinding(stroke,
+ retBindings[i / 2] = new JTextComponent.KeyBinding(stroke,
(String) keyBindingList[i + 1]);
}
return retBindings;
}
/**
- * Invoked when the user attempts an invalid operation. The default
- * implementation just beeps. Subclasses that wish to change this need to
+ * Invoked when the user attempts an invalid operation. The default
+ * implementation just beeps. Subclasses that wish to change this need to
* override this method.
*
* @param component the component the error occured in
@@ -365,7 +365,7 @@ public abstract class LookAndFeel
/**
* UIManager.setLookAndFeel calls this method just before we're replaced by
- * a new default look and feel.
+ * a new default look and feel.
*/
public void uninitialize()
{
@@ -376,7 +376,7 @@ public abstract class LookAndFeel
/**
* Convenience method for un-installing a component's default border on the
* specified component if the border is currently an instance of UIResource.
- *
+ *
* @param c the component (<code>null</code> not permitted).
*/
public static void uninstallBorder(JComponent c)
diff --git a/javax/swing/MenuSelectionManager.java b/javax/swing/MenuSelectionManager.java
index beafbf442..0b654499d 100644
--- a/javax/swing/MenuSelectionManager.java
+++ b/javax/swing/MenuSelectionManager.java
@@ -127,7 +127,7 @@ public class MenuSelectionManager
// clear selected path
selectedPath.clear();
- // notify all listeners that the selected path was changed
+ // notify all listeners that the selected path was changed
fireStateChanged();
}
@@ -146,37 +146,37 @@ public class MenuSelectionManager
{
// Convert sourcePoint to screen coordinates.
Point sourcePointOnScreen = sourcePoint;
-
+
if (source.isShowing())
SwingUtilities.convertPointToScreen(sourcePointOnScreen, source);
Point compPointOnScreen;
Component resultComp = null;
- // For each menu element on the selected path, express its location
- // in terms of screen coordinates and check if there is any
+ // For each menu element on the selected path, express its location
+ // in terms of screen coordinates and check if there is any
// menu element on the selected path that contains given source point.
for (int i = 0; i < selectedPath.size(); i++)
{
- Component comp = ((Component) selectedPath.get(i));
- Dimension size = comp.getSize();
-
- // convert location of this menu item to screen coordinates
- compPointOnScreen = comp.getLocationOnScreen();
-
- if (compPointOnScreen.x <= sourcePointOnScreen.x
- && sourcePointOnScreen.x < compPointOnScreen.x + size.width
- && compPointOnScreen.y <= sourcePointOnScreen.y
- && sourcePointOnScreen.y < compPointOnScreen.y + size.height)
- {
- Point p = sourcePointOnScreen;
-
+ Component comp = ((Component) selectedPath.get(i));
+ Dimension size = comp.getSize();
+
+ // convert location of this menu item to screen coordinates
+ compPointOnScreen = comp.getLocationOnScreen();
+
+ if (compPointOnScreen.x <= sourcePointOnScreen.x
+ && sourcePointOnScreen.x < compPointOnScreen.x + size.width
+ && compPointOnScreen.y <= sourcePointOnScreen.y
+ && sourcePointOnScreen.y < compPointOnScreen.y + size.height)
+ {
+ Point p = sourcePointOnScreen;
+
if (comp.isShowing())
SwingUtilities.convertPointFromScreen(p, comp);
-
- resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y);
- break;
- }
+
+ resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y);
+ break;
+ }
}
return resultComp;
}
@@ -232,7 +232,7 @@ public class MenuSelectionManager
subElements = first.getSubElements();
for (int j = 0; j < subElements.length; j++)
{
- MenuElement me = subElements[j];
+ MenuElement me = subElements[j];
if (me != null
&& (SwingUtilities.isDescendingFrom(c, me.getComponent())))
{
@@ -315,9 +315,9 @@ public class MenuSelectionManager
Component source = ((Component) event.getSource());
// In the case of drag event, event.getSource() returns component
- // where drag event originated. However menu element processing this
- // event should be the one over which mouse is currently located,
- // which is not necessary the source of the drag event.
+ // where drag event originated. However menu element processing this
+ // event should be the one over which mouse is currently located,
+ // which is not necessary the source of the drag event.
Component mouseOverMenuComp;
// find over which menu element the mouse is currently located
@@ -330,28 +330,28 @@ public class MenuSelectionManager
// Process this event only if mouse is located over some menu element
if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement))
{
- MenuElement[] path = getPath(mouseOverMenuComp);
- ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path,
- manager);
-
- // FIXME: Java specification says that mouse events should be
- // forwarded to subcomponents. The code below does it, but
- // menu's work fine without it. This code is commented for now.
-
- /*
- MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp)
- .getSubElements();
-
- for (int i = 0; i < subComponents.length; i++)
- {
- subComponents[i].processMouseEvent(event, path, manager);
- }
- */
+ MenuElement[] path = getPath(mouseOverMenuComp);
+ ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path,
+ manager);
+
+ // FIXME: Java specification says that mouse events should be
+ // forwarded to subcomponents. The code below does it, but
+ // menu's work fine without it. This code is commented for now.
+
+ /*
+ MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp)
+ .getSubElements();
+
+ for (int i = 0; i < subComponents.length; i++)
+ {
+ subComponents[i].processMouseEvent(event, path, manager);
+ }
+ */
}
else
{
- if (event.getID() == MouseEvent.MOUSE_RELEASED)
- clearSelectedPath();
+ if (event.getID() == MouseEvent.MOUSE_RELEASED)
+ clearSelectedPath();
}
}
@@ -364,8 +364,8 @@ public class MenuSelectionManager
{
if (path == null)
{
- clearSelectedPath();
- return;
+ clearSelectedPath();
+ return;
}
int minSize = path.length; // size of the smaller path.
@@ -412,25 +412,25 @@ public class MenuSelectionManager
private MenuElement[] getPath(Component c)
{
// FIXME: There is the same method in BasicMenuItemUI. However I
- // cannot use it here instead of this method, since I cannot assume that
+ // cannot use it here instead of this method, since I cannot assume that
// all the menu elements on the selected path are JMenuItem or JMenu.
- // For now I've just duplicated it here. Please
- // fix me or delete me if another better approach will be found, and
+ // For now I've just duplicated it here. Please
+ // fix me or delete me if another better approach will be found, and
// this method will not be necessary.
ArrayList path = new ArrayList();
- // if given component is JMenu, we also need to include
- // it's popup menu in the path
+ // if given component is JMenu, we also need to include
+ // it's popup menu in the path
if (c instanceof JMenu)
path.add(((JMenu) c).getPopupMenu());
while (c instanceof MenuElement)
{
- path.add(0, (MenuElement) c);
+ path.add(0, (MenuElement) c);
- if (c instanceof JPopupMenu)
- c = ((JPopupMenu) c).getInvoker();
- else
- c = c.getParent();
+ if (c instanceof JPopupMenu)
+ c = ((JPopupMenu) c).getInvoker();
+ else
+ c = c.getParent();
}
MenuElement[] pathArray = new MenuElement[path.size()];
diff --git a/javax/swing/OverlayLayout.java b/javax/swing/OverlayLayout.java
index a2cccb9ce..b037a09a7 100644
--- a/javax/swing/OverlayLayout.java
+++ b/javax/swing/OverlayLayout.java
@@ -62,7 +62,7 @@ import java.io.Serializable;
* point is in the middle, an X alignment of 1.0 means, the aligment point is
* at the right edge. So if you have three components, the first with 0.0, the
* second with 0.5 and the third with 1.0, then they are laid out like this:
- *
+ *
* <pre>
* +-------+
* | 1 |
@@ -300,7 +300,7 @@ public class OverlayLayout implements LayoutManager2, Serializable
* at the right edge. So if you have three components, the first with 0.0,
* the second with 0.5 and the third with 1.0, then they are laid out like
* this:
- *
+ *
* <pre>
* +-------+
* | 1 |
diff --git a/javax/swing/Popup.java b/javax/swing/Popup.java
index 5074d6418..65be7cfe1 100644
--- a/javax/swing/Popup.java
+++ b/javax/swing/Popup.java
@@ -85,8 +85,8 @@ public class Popup
// The real stuff happens in the implementation of subclasses,
// for instance JWindowPopup.
}
-
-
+
+
/**
* Constructs a new <code>Popup</code>.
*/
@@ -177,8 +177,8 @@ public class Popup
window.setSize(contents.getSize());
window.show();
}
-
-
+
+
/**
* Removes the popup's <code>JWindow</code> from the
* screen. Nothing happens if it is currently not visible.
@@ -226,12 +226,12 @@ public class Popup
* The panel that holds the content.
*/
private JPanel panel;
-
+
/**
* The layered pane of the owner.
*/
private JLayeredPane layeredPane;
-
+
/**
* Constructs a new <code>LightweightPopup</code> given its owner,
* contents and the screen position where the popup
@@ -259,7 +259,7 @@ public class Popup
this.contents = contents;
this.x = x;
this.y = y;
-
+
JRootPane rootPane = SwingUtilities.getRootPane(owner);
JLayeredPane layeredPane = rootPane.getLayeredPane();
this.layeredPane = layeredPane;
@@ -279,7 +279,7 @@ public class Popup
panel = new JPanel();
panel.setLayout(new FlowLayout(0, 0, 0));
}
-
+
panel.add(contents);
panel.setSize(contents.getSize());
Point layeredPaneLoc = layeredPane.getLocationOnScreen();
diff --git a/javax/swing/PopupFactory.java b/javax/swing/PopupFactory.java
index b32620599..9468c8864 100644
--- a/javax/swing/PopupFactory.java
+++ b/javax/swing/PopupFactory.java
@@ -159,7 +159,7 @@ public class PopupFactory
Dimension rootSize = root.getSize();
if (x >= rootLoc.x && y > rootLoc.y
&& (x - rootLoc.x) + contentsSize.width < rootSize.width
- && (y - rootLoc.y) + contentsSize.height < rootSize.height)
+ && (y - rootLoc.y) + contentsSize.height < rootSize.height)
popup = new Popup.LightweightPopup(owner, contents, x, y);
else
popup = new Popup.JWindowPopup(owner, contents, x, y);
diff --git a/javax/swing/ProgressMonitor.java b/javax/swing/ProgressMonitor.java
index b4c3d2223..0d7ab3e27 100644
--- a/javax/swing/ProgressMonitor.java
+++ b/javax/swing/ProgressMonitor.java
@@ -64,12 +64,12 @@ import javax.accessibility.AccessibleContext;
*/
public class ProgressMonitor
{
-
+
/**
* The accessible content for this component
*/
protected AccessibleContext accessibleContext;
-
+
/**
* parentComponent
*/
@@ -108,13 +108,13 @@ public class ProgressMonitor
boolean canceled;
/**
- * Creates a new <code>ProgressMonitor</code> instance. This is used to
- * monitor a task and pops up a dialog if the task is taking a long time to
+ * Creates a new <code>ProgressMonitor</code> instance. This is used to
+ * monitor a task and pops up a dialog if the task is taking a long time to
* run.
- *
- * @param component The parent component of the progress dialog or
+ *
+ * @param component The parent component of the progress dialog or
* <code>null</code>.
- * @param message A constant message object which works in the way it does
+ * @param message A constant message object which works in the way it does
* in {@link JOptionPane}.
* @param note A string message which can be changed while the operation goes
* on.
@@ -192,7 +192,7 @@ public class ProgressMonitor
}
- /**
+ /**
* Returns the minimum or start value of the operation.
*
* @return Minimum or start value of the operation.
@@ -283,9 +283,9 @@ public class ProgressMonitor
/**
* Returns the number of milliseconds to wait before displaying the progress
* dialog. The default value is 2000.
- *
+ *
* @return The number of milliseconds.
- *
+ *
* @see #setMillisToPopup(int)
*/
public int getMillisToPopup()
@@ -296,9 +296,9 @@ public class ProgressMonitor
/**
* Sets the number of milliseconds to wait before displaying the progress
* dialog.
- *
+ *
* @param time the number of milliseconds.
- *
+ *
* @see #getMillisToPopup()
*/
public void setMillisToPopup(int time)
@@ -336,7 +336,7 @@ public class ProgressMonitor
}
}
- /**
+ /**
* Internal method that creates the progress dialog.
*/
void createDialog()
@@ -408,9 +408,9 @@ public class ProgressMonitor
first = false;
- long expected = (progress - min == 0) ?
- (now - timestamp) * (max - min) :
- (now - timestamp) * (max - min) / (progress - min);
+ long expected = (progress - min == 0) ?
+ (now - timestamp) * (max - min) :
+ (now - timestamp) * (max - min) / (progress - min);
if (expected > millisToPopup)
{
@@ -428,7 +428,7 @@ public class ProgressMonitor
{
// The progress dialog is being displayed. We now calculate
// whether setting the progress bar to the current progress
- // value would result in a visual difference.
+ // value would result in a visual difference.
int delta = progress - progressBar.getValue();
if ((delta * progressBar.getWidth() / (max - min)) > 0)
@@ -447,10 +447,10 @@ public class ProgressMonitor
timestamp = now;
}
}
-
+
/**
* Gets the accessible context.
- *
+ *
* @return the accessible context.
*/
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/ProgressMonitorInputStream.java b/javax/swing/ProgressMonitorInputStream.java
index 90e721247..ba98bf68e 100644
--- a/javax/swing/ProgressMonitorInputStream.java
+++ b/javax/swing/ProgressMonitorInputStream.java
@@ -47,8 +47,8 @@ import java.io.IOException;
/**
* An input stream with a {@link ProgressMonitor}.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
* @author Robert Schuster (robertschuster@fsfe.org)
* @status updated to 1.2
* @since 1.2
@@ -68,7 +68,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Creates a new <code>ProgressMonitorInputStream</code>.
- *
+ *
* @param component the parent component for the progress monitor dialog.
* @param message the task description.
* @param stream the underlying input stream.
@@ -79,7 +79,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
super(stream);
int max = 0;
-
+
try
{
max = stream.available();
@@ -94,7 +94,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Resets the input stream to the point where {@link #mark(int)} was called.
- *
+ *
* @exception IOException TODO
*/
public void reset() throws IOException
@@ -108,12 +108,12 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Reads an unsigned byte from the input stream and returns it as an
- * <code>int</code> in the range of 0-255. Returns -1 if the end of the
+ * Reads an unsigned byte from the input stream and returns it as an
+ * <code>int</code> in the range of 0-255. Returns -1 if the end of the
* stream has been reached. The progress monitor is updated.
- *
+ *
* @return int
- *
+ *
* @exception IOException if there is a problem reading the stream.
*/
public int read() throws IOException
@@ -129,14 +129,14 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Reads bytes from the input stream and stores them in the supplied array,
- * and updates the progress monitor (or closes it if the end of the stream
+ * and updates the progress monitor (or closes it if the end of the stream
* is reached).
- *
+ *
* @param data the data array for returning bytes read from the stream.
- *
+ *
* @return The number of bytes read, or -1 if there are no more bytes in the
* stream.
- *
+ *
* @throws IOException if there is a problem reading bytes from the stream.
*/
public int read(byte[] data) throws IOException
@@ -159,17 +159,17 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Reads up to <code>length</code> bytes from the input stream and stores
- * them in the supplied array at the given index, and updates the progress
+ * Reads up to <code>length</code> bytes from the input stream and stores
+ * them in the supplied array at the given index, and updates the progress
* monitor (or closes it if the end of the stream is reached).
*
* @param data the data array for returning bytes read from the stream.
- * @param offset the offset into the array where the bytes should be written.
+ * @param offset the offset into the array where the bytes should be written.
* @param length the maximum number of bytes to read from the stream.
- *
+ *
* @return The number of bytes read, or -1 if there are no more bytes in the
* stream.
- *
+ *
* @throws IOException if there is a problem reading bytes from the stream.
*/
public int read(byte[] data, int offset, int length) throws IOException
@@ -192,13 +192,13 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Skips the specified number of bytes and updates the
+ * Skips the specified number of bytes and updates the
* {@link ProgressMonitor}.
- *
+ *
* @param length the number of bytes to skip.
*
* @return The actual number of bytes skipped.
- *
+ *
* @throws IOException if there is a problem skipping bytes in the stream.
*/
public long skip(long length) throws IOException
@@ -219,7 +219,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Closes the input stream and the associated {@link ProgressMonitor}.
- *
+ *
* @throws IOException if there is a problem closing the input stream.
*/
public void close() throws IOException
@@ -230,7 +230,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Returns the {@link ProgressMonitor} used by this input stream.
- *
+ *
* @return The progress monitor.
*/
public ProgressMonitor getProgressMonitor()
diff --git a/javax/swing/Renderer.java b/javax/swing/Renderer.java
index 9a0e81a9f..4759c5b60 100644
--- a/javax/swing/Renderer.java
+++ b/javax/swing/Renderer.java
@@ -46,7 +46,7 @@ import java.awt.Component;
* javax.swing.tree.TreeCellRenderer}.
*
* @specnote This interface is not used and exists only for compatibility.
- *
+ *
* @author Andrew Selkirk
*/
public interface Renderer
diff --git a/javax/swing/RepaintManager.java b/javax/swing/RepaintManager.java
index bb88ebfcd..23c05a262 100644
--- a/javax/swing/RepaintManager.java
+++ b/javax/swing/RepaintManager.java
@@ -115,7 +115,7 @@ public class RepaintManager
super.dispatch();
}
}
-
+
/**
* The current repaint managers, indexed by their ThreadGroups.
*/
@@ -150,7 +150,7 @@ public class RepaintManager
live = false;
}
- public synchronized void setLive(boolean b)
+ public synchronized void setLive(boolean b)
{
live = b;
}
@@ -178,7 +178,7 @@ public class RepaintManager
}
- /**
+ /**
* A table storing the dirty regions of components. The keys of this
* table are components, the values are rectangles. Each component maps
* to exactly one rectangle. When more regions are marked as dirty on a
@@ -212,7 +212,7 @@ public class RepaintManager
*/
private RepaintWorker repaintWorker;
- /**
+ /**
* The set of components which need revalidation, in the "layout" sense.
* There is no additional information about "what kind of layout" they
* need (as there is with dirty regions), so it is just a vector rather
@@ -224,11 +224,11 @@ public class RepaintManager
*/
private ArrayList invalidComponents;
- /**
+ /**
* Whether or not double buffering is enabled on this repaint
* manager. This is merely a hint to clients; the RepaintManager will
* always return an offscreen buffer when one is requested.
- *
+ *
* @see #isDoubleBufferingEnabled
* @see #setDoubleBufferingEnabled
*/
@@ -478,7 +478,7 @@ public class RepaintManager
dirty = new Rectangle();
return dirty;
}
-
+
/**
* Mark a component as dirty over its entire bounds.
*
@@ -605,7 +605,7 @@ public class RepaintManager
* hierarchy of <code>dirty</code> to find the highest parent that is also
* marked dirty and merges the dirty regions.
*
- * @param dirtyRegions the dirty regions
+ * @param dirtyRegions the dirty regions
* @param dirty the component for which to find the repaint root
* @param roots the list to which new repaint roots get appended
*/
@@ -617,7 +617,7 @@ public class RepaintManager
// This will contain the dirty region in the root coordinate system,
// possibly clipped by ancestor's bounds.
- Rectangle originalDirtyRect = (Rectangle) dirtyRegions.get(dirty);
+ Rectangle originalDirtyRect = (Rectangle) dirtyRegions.get(dirty);
rectCache.setBounds(originalDirtyRect);
// The bounds of the current component.
@@ -631,7 +631,7 @@ public class RepaintManager
if (rectCache.isEmpty())
return;
- // The cumulated offsets.
+ // The cumulated offsets.
int dx = 0;
int dy = 0;
// The actual offset for the found root.
@@ -652,7 +652,7 @@ public class RepaintManager
dy += y;
rectCache.x += x;
rectCache.y += y;
-
+
x = current.getX();
y = current.getY();
w = current.getWidth();
@@ -705,8 +705,8 @@ public class RepaintManager
{
Component root = SwingUtilities.getWindowAncestor(component);
Image buffer = (Image) offscreenBuffers.get(root);
- if (buffer == null
- || buffer.getWidth(null) < proposedWidth
+ if (buffer == null
+ || buffer.getWidth(null) < proposedWidth
|| buffer.getHeight(null) < proposedHeight)
{
int width = Math.max(proposedWidth, root.getWidth());
@@ -733,11 +733,11 @@ public class RepaintManager
{
Component root = comp;
while (root != null
- && ! (root instanceof Window || root instanceof Applet))
+ && ! (root instanceof Window || root instanceof Applet))
{
- x += root.getX();
- y += root.getY();
- root = root.getParent();
+ x += root.getX();
+ y += root.getY();
+ root = root.getParent();
}
if (root != null)
@@ -774,8 +774,8 @@ public class RepaintManager
{
Component root = SwingUtilities.getWindowAncestor(comp);
Image buffer = (Image) offscreenBuffers.get(root);
- if (buffer == null
- || buffer.getWidth(null) < proposedWidth
+ if (buffer == null
+ || buffer.getWidth(null) < proposedWidth
|| buffer.getHeight(null) < proposedHeight
|| !(buffer instanceof VolatileImage))
{
@@ -789,7 +789,7 @@ public class RepaintManager
}
return buffer;
}
-
+
/**
* Get the value of the {@link #doubleBufferMaximumSize} property.
@@ -838,7 +838,7 @@ public class RepaintManager
{
return doubleBufferingEnabled;
}
-
+
public String toString()
{
return "RepaintManager";
diff --git a/javax/swing/ScrollPaneLayout.java b/javax/swing/ScrollPaneLayout.java
index 2a16f26ea..fa1743bed 100644
--- a/javax/swing/ScrollPaneLayout.java
+++ b/javax/swing/ScrollPaneLayout.java
@@ -50,15 +50,15 @@ import javax.swing.border.Border;
/**
* ScrollPaneLayout
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
+ * @version 1.0
*/
public class ScrollPaneLayout
implements LayoutManager, ScrollPaneConstants, Serializable
{
private static final long serialVersionUID = -4480022884523193743L;
- public static class UIResource extends ScrollPaneLayout
+ public static class UIResource extends ScrollPaneLayout
implements javax.swing.plaf.UIResource
{
public UIResource()
@@ -81,10 +81,10 @@ public class ScrollPaneLayout
public ScrollPaneLayout()
{
- // Nothing to do here.
+ // Nothing to do here.
}
- public void syncWithScrollPane(JScrollPane scrollPane)
+ public void syncWithScrollPane(JScrollPane scrollPane)
{
viewport = scrollPane.getViewport();
rowHead = scrollPane.getRowHeader();
@@ -96,7 +96,7 @@ public class ScrollPaneLayout
lowerLeft = scrollPane.getCorner(LOWER_LEFT_CORNER);
lowerRight = scrollPane.getCorner(LOWER_RIGHT_CORNER);
upperLeft = scrollPane.getCorner(UPPER_LEFT_CORNER);
- upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER);
+ upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER);
}
/**
@@ -108,7 +108,7 @@ public class ScrollPaneLayout
* @return the newComponent
*/
protected Component addSingletonComponent(Component oldComponent,
- Component newComponent)
+ Component newComponent)
{
if (oldComponent != null && oldComponent != newComponent)
oldComponent.getParent().remove(oldComponent);
@@ -116,7 +116,7 @@ public class ScrollPaneLayout
}
/**
- * Add the specified component to the layout.
+ * Add the specified component to the layout.
* @param key must be one of VIEWPORT, VERTICAL_SCROLLBAR,
* HORIZONTAL_SCROLLBAR, ROW_HEADER, COLUMN_HEADER,
* LOWER_RIGHT_CORNER, LOWER_LEFT_CORNER, UPPER_RIGHT_CORNER,
@@ -124,7 +124,7 @@ public class ScrollPaneLayout
* @param component the Component to add
* @throws IllegalArgumentException if key is not as above
*/
- public void addLayoutComponent(String key, Component component)
+ public void addLayoutComponent(String key, Component component)
{
if (key == VIEWPORT)
viewport = (JViewport) component;
@@ -148,7 +148,7 @@ public class ScrollPaneLayout
throw new IllegalArgumentException();
}
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
if (component == viewport)
viewport = null;
@@ -174,7 +174,7 @@ public class ScrollPaneLayout
{
return vsbPolicy;
}
-
+
/**
* Sets the vertical scrollbar policy.
* @param policy must be one of VERTICAL_SCROLLBAR_AS_NEEDED,
@@ -184,7 +184,7 @@ public class ScrollPaneLayout
*/
public void setVerticalScrollBarPolicy(int policy)
{
- if (policy != VERTICAL_SCROLLBAR_AS_NEEDED &&
+ if (policy != VERTICAL_SCROLLBAR_AS_NEEDED &&
policy != VERTICAL_SCROLLBAR_NEVER &&
policy != VERTICAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("Illegal Scrollbar Policy");
@@ -200,12 +200,12 @@ public class ScrollPaneLayout
* Sets the horizontal scrollbar policy.
* @param policy must be one of HORIZONTAL_SCROLLBAR_AS_NEEDED,
* HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_ALWAYS.
- * @throws IllegalArgumentException if policy is not one of the valid
+ * @throws IllegalArgumentException if policy is not one of the valid
* JScrollbar policies.
*/
public void setHorizontalScrollBarPolicy(int policy)
{
- if (policy != HORIZONTAL_SCROLLBAR_AS_NEEDED &&
+ if (policy != HORIZONTAL_SCROLLBAR_AS_NEEDED &&
policy != HORIZONTAL_SCROLLBAR_NEVER &&
policy != HORIZONTAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("Illegal Scrollbar Policy");
@@ -256,7 +256,7 @@ public class ScrollPaneLayout
return null;
}
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
// Sun's implementation simply throws a ClassCastException if
// parent is no JScrollPane, so do we.
@@ -343,7 +343,7 @@ public class ScrollPaneLayout
* | c3 | h scrollbar | c4 |
* +----+--------------------+----+ y4
* x1 x2 x3 x4
- *
+ *
*/
public void layoutContainer(Container parent)
{
@@ -352,11 +352,11 @@ public class ScrollPaneLayout
JScrollPane sc = (JScrollPane) parent;
JViewport viewport = sc.getViewport();
Component view = viewport.getView();
-
+
// If there is no view in the viewport, there is no work to be done.
if (view == null)
return;
-
+
Dimension viewSize = viewport.getView().getPreferredSize();
int x1 = 0, x2 = 0, x3 = 0, x4 = 0;
@@ -388,43 +388,43 @@ public class ScrollPaneLayout
int vsbPolicy = sc.getVerticalScrollBarPolicy();
int hsbPolicy = sc.getHorizontalScrollBarPolicy();
-
+
int vsWidth = 0;
int hsHeight = 0;
- boolean showVsb =
+ boolean showVsb =
(vsb != null)
&& ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS)
- || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
+ || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
&& viewSize.height > (y4 - y2)));
-
+
if (showVsb)
vsWidth = vsb.getPreferredSize().width;
-
+
// The horizontal scroll bar may become necessary if the vertical scroll
// bar appears, reducing the space, left for the component.
-
- boolean showHsb =
+
+ boolean showHsb =
(hsb != null)
&& ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS)
- || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED
+ || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED
&& viewSize.width > (x4 - x2 - vsWidth)));
-
+
if (showHsb)
hsHeight = hsb.getPreferredSize().height;
-
+
// If the horizontal scroll bar appears, and the vertical scroll bar
// was not necessary assuming that there is no horizontal scroll bar,
// the vertical scroll bar may become necessary because the horizontal
// scroll bar reduces the vertical space for the component.
if (!showVsb)
{
- showVsb =
+ showVsb =
(vsb != null)
&& ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS)
- || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
+ || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
&& viewSize.height > (y4 - y2)));
-
+
if (showVsb)
vsWidth = vsb.getPreferredSize().width;
}
@@ -482,7 +482,7 @@ public class ScrollPaneLayout
* @deprecated As of Swing 1.1 replaced by
* {@link javax.swing.JScrollPane#getViewportBorderBounds}.
*/
- public Rectangle getViewportBorderBounds(JScrollPane scrollPane)
+ public Rectangle getViewportBorderBounds(JScrollPane scrollPane)
{
return null;
}
diff --git a/javax/swing/Scrollable.java b/javax/swing/Scrollable.java
index 396d530ed..26fae2429 100644
--- a/javax/swing/Scrollable.java
+++ b/javax/swing/Scrollable.java
@@ -1,4 +1,4 @@
-/* Scrollable.java --
+/* Scrollable.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,14 +54,14 @@ public interface Scrollable
* Return the preferred scrolling amount (in pixels) for the given
* scrolling direction and orientation when scrolling in small amounts
* like table lines.
- *
- * @param visibleRect the currently visible part of the component.
+ *
+ * @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
- * The values greater than one means that more mouse wheel or similar
+ * The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
+ *
* @return the preferred scrolling distance, negative if up or left.
*/
int getScrollableUnitIncrement(Rectangle visibleRect, int orientation,
@@ -71,15 +71,15 @@ public interface Scrollable
* Return the preferred scrolling amount (in pixels) for the given
* scrolling direction and orientation when scrolling in large amounts
* (pages).
- *
- * @param visibleRect the currently visible part of the component.
+ *
+ * @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
- * The values greater than one means that more mouse wheel or similar
+ * The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
- * @return the preferred scrolling distance, negative if up or left.
+ *
+ * @return the preferred scrolling distance, negative if up or left.
*/
int getScrollableBlockIncrement(Rectangle visibleRect, int orientation,
int direction);
@@ -89,7 +89,7 @@ public interface Scrollable
* view, where it is displayed, width (for instance, the text area with
* the word wrap). In such case, the horizontal scrolling should not be
* performed.
- *
+ *
* @return true is no horizontal scrolling is assumed, faster otherwise.
*/
boolean getScrollableTracksViewportWidth();
@@ -98,7 +98,7 @@ public interface Scrollable
* Return true if the height of the scrollable is always equal to the view,
* where it is displayed, height.In such case, the vertical scrolling should
* not be performed.
- *
+ *
* @return true is no horizontal scrolling is assumed, faster otherwise.
*/
boolean getScrollableTracksViewportHeight();
diff --git a/javax/swing/SingleSelectionModel.java b/javax/swing/SingleSelectionModel.java
index 9f33e33fa..2a76ff389 100644
--- a/javax/swing/SingleSelectionModel.java
+++ b/javax/swing/SingleSelectionModel.java
@@ -51,19 +51,19 @@ public interface SingleSelectionModel
{
/**
* Returns the selected index or <code>-1</code> if there is no selection.
- *
+ *
* @return The selected index.
- *
+ *
* @see #setSelectedIndex(int)
*/
int getSelectedIndex();
/**
- * Sets the selected index and, if this is different to the previous
+ * Sets the selected index and, if this is different to the previous
* selection, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param index the index (use <code>-1</code> to represent no selection).
- *
+ *
* @see #getSelectedIndex()
* @see #clearSelection
*/
@@ -72,14 +72,14 @@ public interface SingleSelectionModel
/**
* Clears the selection by setting the selected index to <code>-1</code> and
* sends a {@link ChangeEvent} to all registered listeners. If the selected
- * index is already <code>-1</code>, this method does nothing.
+ * index is already <code>-1</code>, this method does nothing.
*/
void clearSelection();
/**
* Returns <code>true</code> if there is a selection, and <code>false</code>
- * otherwise.
- *
+ * otherwise.
+ *
* @return A boolean.
*/
boolean isSelected();
diff --git a/javax/swing/SizeRequirements.java b/javax/swing/SizeRequirements.java
index b9b5c3223..1ee0e285c 100644
--- a/javax/swing/SizeRequirements.java
+++ b/javax/swing/SizeRequirements.java
@@ -386,7 +386,7 @@ public class SizeRequirements implements Serializable
*
* The components are tiled in the forward direction, beginning with
* an offset of 0.
- *
+ *
* @param allocated the amount of allocated space
* @param total the total size requirements of the components
* @param children the size requirement of each component
diff --git a/javax/swing/SizeSequence.java b/javax/swing/SizeSequence.java
index cb6c8bc25..69c7366be 100644
--- a/javax/swing/SizeSequence.java
+++ b/javax/swing/SizeSequence.java
@@ -40,17 +40,17 @@ package javax.swing;
import java.util.Arrays;
/**
- * A sequence of values that represent the dimensions (widths or heights) of
+ * A sequence of values that represent the dimensions (widths or heights) of
* some collection of items (for example, the widths of the columns in a table).
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class SizeSequence
{
// TODO: Sun's API specification for this class contains an implementation
// note regarding the encoding for the element sizes. We currently use the
// simple size encoding but we should look at improving this.
-
+
/** Storage for the element sizes. */
private int[] sizes;
@@ -63,9 +63,9 @@ public class SizeSequence
}
/**
- * Creates a new <code>SizeSequence</code> instance with the specified number
+ * Creates a new <code>SizeSequence</code> instance with the specified number
* of elements, each having a size of 0.
- *
+ *
* @param numEntries the number of elements.
*/
public SizeSequence(int numEntries)
@@ -76,7 +76,7 @@ public class SizeSequence
/**
* Creates a new <code>SizeSequence</code> instance with the specified number
* of elements all having the same size (<code>value</code>).
- *
+ *
* @param numEntries the number of elements.
* @param value the value for each element.
*/
@@ -87,9 +87,9 @@ public class SizeSequence
}
/**
- * Creates a new <code>SizeSequence</code> instance using the specified
+ * Creates a new <code>SizeSequence</code> instance using the specified
* element sizes.
- *
+ *
* @param sizes the element sizes (<code>null</code> not permitted).
*/
public SizeSequence(int[] sizes)
@@ -99,7 +99,7 @@ public class SizeSequence
/**
* Sets the size of the element at the specified index.
- *
+ *
* @param index the index.
* @param size the size.
*/
@@ -111,16 +111,16 @@ public class SizeSequence
/**
* Returns the index of the element that contains the specified position.
- *
+ *
* @param position the position.
- *
+ *
* @return The index of the element that contains the specified position.
*/
public int getIndex(int position)
{
int i = 0;
- int runningTotal = 0;
- while (i < sizes.length && position >= runningTotal + sizes[i])
+ int runningTotal = 0;
+ while (i < sizes.length && position >= runningTotal + sizes[i])
{
runningTotal += sizes[i];
i++;
@@ -131,9 +131,9 @@ public class SizeSequence
/**
* Returns the size of the specified element, or 0 if the element index is
* outside the defined range.
- *
+ *
* @param index the element index.
- *
+ *
* @return The size of the specified element, or 0 if the element index is
* outside the defined range.
*/
@@ -146,7 +146,7 @@ public class SizeSequence
/**
* Sets the sizes for the elements in the sequence.
- *
+ *
* @param sizes the element sizes (<code>null</code> not permitted).
*/
public void setSizes(int[] sizes)
@@ -156,7 +156,7 @@ public class SizeSequence
/**
* Returns an array containing the sizes for all the elements in the sequence.
- *
+ *
* @return The element sizes.
*/
public int[] getSizes()
@@ -166,9 +166,9 @@ public class SizeSequence
/**
* Returns the position of the specified element.
- *
+ *
* @param index the element index.
- *
+ *
* @return The position.
*/
public int getPosition(int index)
@@ -186,7 +186,7 @@ public class SizeSequence
* Inserts new entries into the sequence at the <code>start</code> position.
* There are <code>length</code> new entries each having the specified
* <code>value</code>.
- *
+ *
* @param start the start element.
* @param length the number of elements to insert.
* @param value the size for each of the new elements.
@@ -197,7 +197,7 @@ public class SizeSequence
System.arraycopy(sizes, 0, newSizes, 0, start);
for (int i = start; i < start + length; i++)
newSizes[i] = value;
- System.arraycopy(sizes, start, newSizes, start + length,
+ System.arraycopy(sizes, start, newSizes, start + length,
sizes.length - start);
sizes = newSizes;
}
@@ -205,7 +205,7 @@ public class SizeSequence
/**
* Removes the element(s) at index <code>start</code> (the number of elements
* removed is <code>length</code>).
- *
+ *
* @param start the index of the first element to remove.
* @param length the number of elements to remove.
*/
@@ -218,7 +218,7 @@ public class SizeSequence
int[] newSizes = new int[sizes.length - length];
System.arraycopy(sizes, 0, newSizes, 0, start);
- System.arraycopy(sizes, start + length, newSizes, start,
+ System.arraycopy(sizes, start + length, newSizes, start,
sizes.length - start - length);
sizes = newSizes;
}
diff --git a/javax/swing/SortingFocusTraversalPolicy.java b/javax/swing/SortingFocusTraversalPolicy.java
index d14ee1d30..3c07dbd93 100644
--- a/javax/swing/SortingFocusTraversalPolicy.java
+++ b/javax/swing/SortingFocusTraversalPolicy.java
@@ -47,10 +47,10 @@ import java.util.TreeSet;
/**
* @author Graydon Hoare
* @author Michael Koch
- *
+ *
* @since 1.4
*/
-public class SortingFocusTraversalPolicy
+public class SortingFocusTraversalPolicy
extends InternalFrameFocusTraversalPolicy
{
/**
@@ -75,7 +75,7 @@ public class SortingFocusTraversalPolicy
* @see #getImplicitDownCycleTraversal()
*/
boolean implicitDownCycleTraversal = true;
-
+
/**
* Creates a new <code>SortingFocusTraversalPolicy</code> with no
* comparator set.
@@ -97,7 +97,7 @@ public class SortingFocusTraversalPolicy
}
/**
- * Decide whether a component is an acceptable focus owner.
+ * Decide whether a component is an acceptable focus owner.
*
* @param comp The component which is a candidate for focus ownership.
*
@@ -107,16 +107,16 @@ public class SortingFocusTraversalPolicy
protected boolean accept(Component comp)
{
return (comp.isVisible()
- && comp.isDisplayable()
- && comp.isEnabled()
- && comp.isFocusable());
+ && comp.isDisplayable()
+ && comp.isEnabled()
+ && comp.isFocusable());
}
/**
* Get the current value of the {@link #comparator} property.
*
* @return the current value of the property
- *
+ *
* @see #setComparator
*/
protected Comparator<? super Component> getComparator()
@@ -128,7 +128,7 @@ public class SortingFocusTraversalPolicy
* Set the current value of the {@link #comparator} property.
*
* @param comparator the new value of the property
- *
+ *
* @see #getComparator
*/
protected void setComparator(Comparator<? super Component> comparator)
@@ -139,11 +139,11 @@ public class SortingFocusTraversalPolicy
private TreeSet getSortedCycle(Container root, TreeSet set)
{
if (set == null)
- set = (getComparator() == null
+ set = (getComparator() == null
? new TreeSet()
: new TreeSet(getComparator()));
-
- if (root != null)
+
+ if (root != null)
{
Component[] comps = root.getComponents();
for (int i = 0; i < comps.length; ++i)
@@ -168,23 +168,23 @@ public class SortingFocusTraversalPolicy
* <code>comp</code> is a focus cycle root, an "implicit DownCycle"
* occurs and the method returns the
* <code>getDefaultComponent(comp)</code>.
- *
+ *
* @param root the focus cycle root to search for a successor within
* @param comp the component to search for the successor of
*
* @return the component following the specified component under
* the specified root, or null if no such component is found
- *
+ *
* @throws IllegalArgumentException if either argument is null, or
* if the root is not a focus cycle root of the component
*/
- public Component getComponentAfter(Container root,
+ public Component getComponentAfter(Container root,
Component comp)
{
if (comp == null || root == null || !comp.isFocusCycleRoot(root))
throw new IllegalArgumentException();
- if (getImplicitDownCycleTraversal()
+ if (getImplicitDownCycleTraversal()
&& comp instanceof Container
&& ((Container)comp).isFocusCycleRoot())
{
@@ -212,17 +212,17 @@ public class SortingFocusTraversalPolicy
* focus cycle, relative to the order imposed by {@link
* #comparator}. Candidate components are only considered if they are
* accepted by the {@link #accept} method.
- *
+ *
* @param root the focus cycle root to search for a predecessor within
* @param comp the component to search for the predecessor of
*
* @return the component preceding the specified component under the
* specified root, or null if no such component is found
- *
+ *
* @throws IllegalArgumentException if either argument is null, or
* if the root is not a focus cycle root of the component
*/
- public Component getComponentBefore(Container root,
+ public Component getComponentBefore(Container root,
Component comp)
{
if (comp == null || root == null || !comp.isFocusCycleRoot(root))
@@ -256,7 +256,7 @@ public class SortingFocusTraversalPolicy
return getFirstComponent(root);
}
- /**
+ /**
* Return the first focusable component of the focus cycle root
* <code>comp</code> under the ordering imposed by the {@link
* #comparator} property. Candidate components are only considered if
@@ -279,8 +279,8 @@ public class SortingFocusTraversalPolicy
return (Component) i.next();
return null;
}
-
- /**
+
+ /**
* Return the last focusable component of the focus cycle root
* <code>comp</code> under the ordering imposed by the {@link
* #comparator} property. Candidate components are only considered if
@@ -310,7 +310,7 @@ public class SortingFocusTraversalPolicy
* property.
*
* @return the current value of the property
- *
+ *
* @see #setImplicitDownCycleTraversal
*/
public boolean getImplicitDownCycleTraversal()
@@ -323,7 +323,7 @@ public class SortingFocusTraversalPolicy
* property.
*
* @param down the new value of the property
- *
+ *
* @see #getImplicitDownCycleTraversal
*/
public void setImplicitDownCycleTraversal(boolean down)
diff --git a/javax/swing/SpinnerDateModel.java b/javax/swing/SpinnerDateModel.java
index e5ff76f1a..f0e9d1ec4 100644
--- a/javax/swing/SpinnerDateModel.java
+++ b/javax/swing/SpinnerDateModel.java
@@ -45,8 +45,8 @@ import java.util.Date;
import javax.swing.event.ChangeEvent;
/**
- * A date model used by the {@link JSpinner} component. This implements a
- * spinner model for dates, rotating a calendar field such as month, year,
+ * A date model used by the {@link JSpinner} component. This implements a
+ * spinner model for dates, rotating a calendar field such as month, year,
* day, week, hour, minute.
*
* @author Sven de Marothy
@@ -57,21 +57,21 @@ public class SpinnerDateModel extends AbstractSpinnerModel
{
/** The current date. */
private Calendar date;
-
- /**
- * A constraint on the start or earliest permitted date (<code>null</code>
- * for no minimum).
+
+ /**
+ * A constraint on the start or earliest permitted date (<code>null</code>
+ * for no minimum).
*/
private Comparable start;
- /**
- * A constraint on the end or latest permitted date (<code>null</code> for no
- * maximum).
+ /**
+ * A constraint on the end or latest permitted date (<code>null</code> for no
+ * maximum).
*/
private Comparable end;
-
+
/**
- * The calendar field used to calculate the previous or next date.
+ * The calendar field used to calculate the previous or next date.
*/
private int calendarField;
@@ -82,7 +82,7 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Constructs a <code>SpinnerDateModel</code> using the current date,
- * no start or end limit, and {@link Calendar#DAY_OF_MONTH} as the calendar
+ * no start or end limit, and {@link Calendar#DAY_OF_MONTH} as the calendar
* field.
*/
public SpinnerDateModel()
@@ -92,15 +92,15 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Constructs a <code>SpinnerDateModel</code> with the specified value, lower
- * and upper bounds, and which spins the specified calendar field.
+ * and upper bounds, and which spins the specified calendar field.
* <p>
* The <code>start</code> and <code>end</code> limits must have a
* <code>compareTo</code> method that supports instances of {@link Date}, but
* do not themselves need to be instances of {@link Date} (although typically
* they are).
- *
+ *
* @param value the initial value/date (<code>null</code> not permitted).
- * @param start a constraint that specifies the earliest permitted date
+ * @param start a constraint that specifies the earliest permitted date
* value, or <code>null</code> for no lower limit.
* @param end a constraint that specifies the latest permitted date value,
* or <code>null</code> for no upper limit.
@@ -110,7 +110,7 @@ public class SpinnerDateModel extends AbstractSpinnerModel
public SpinnerDateModel(Date value, Comparable start, Comparable end,
int calendarField)
{
- if (value == null)
+ if (value == null)
throw new IllegalArgumentException("Null 'value' argument.");
if (start != null && start.compareTo(value) > 0)
throw new IllegalArgumentException("Require value on or after start.");
@@ -124,9 +124,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the {@link Calendar} field used to calculate the previous and
+ * Returns the {@link Calendar} field used to calculate the previous and
* next dates in the sequence.
- *
+ *
* @return The date field code.
*/
public int getCalendarField()
@@ -136,9 +136,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the current date/time.
- *
+ *
* @return The current date/time (never <code>null</code>).
- *
+ *
* @see #getValue()
*/
public Date getDate()
@@ -147,11 +147,11 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the lower limit on the date/time value, or <code>null</code> if
+ * Returns the lower limit on the date/time value, or <code>null</code> if
* there is no minimum date/time.
- *
+ *
* @return The lower limit.
- *
+ *
* @see #setStart(Comparable)
*/
public Comparable getStart()
@@ -160,11 +160,11 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the upper limit on the date/time value, or <code>null</code> if
+ * Returns the upper limit on the date/time value, or <code>null</code> if
* there is no maximum date/time.
- *
+ *
* @return The upper limit.
- *
+ *
* @see #setEnd(Comparable)
*/
public Comparable getEnd()
@@ -173,9 +173,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the current date in the sequence (this method returns the same as
+ * Returns the current date in the sequence (this method returns the same as
* {@link #getDate()}).
- *
+ *
* @return The current date (never <code>null</code>).
*/
public Object getValue()
@@ -185,12 +185,12 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the next date in the sequence, or <code>null</code> if the
- * next date is past the upper limit (if one is specified). The current date
+ * next date is past the upper limit (if one is specified). The current date
* is not changed.
- *
+ *
* @return The next date, or <code>null</code> if the current value is
* the latest date represented by the model.
- *
+ *
* @see #getEnd()
*/
public Object getNextValue()
@@ -207,12 +207,12 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the previous date in the sequence, or <code>null</code> if the
- * previous date is prior to the lower limit (if one is specified). The
+ * previous date is prior to the lower limit (if one is specified). The
* current date is not changed.
- *
+ *
* @return The previous date, or <code>null</code> if the current value is
* the earliest date represented by the model.
- *
+ *
* @see #getStart()
*/
public Object getPreviousValue()
@@ -228,13 +228,13 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the date field to change when calculating the next and previous
- * values. It must be a valid {@link Calendar} field, excluding
+ * Sets the date field to change when calculating the next and previous
+ * values. It must be a valid {@link Calendar} field, excluding
* {@link Calendar#ZONE_OFFSET} and {@link Calendar#DST_OFFSET}.
- *
+ *
* @param calendarField the calendar field to set.
- *
- * @throws IllegalArgumentException if <code>calendarField</code> is not
+ *
+ * @throws IllegalArgumentException if <code>calendarField</code> is not
* a valid code.
*/
public void setCalendarField(int calendarField)
@@ -252,15 +252,15 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the lower limit for the date/time value and, if the new limit is
- * different to the old limit, sends a {@link ChangeEvent} to all registered
- * listeners. A <code>null</code> value is interpreted as "no lower limit".
- * No check is made to ensure that the current date/time is on or after the
- * new lower limit - the caller is responsible for ensuring that this
+ * Sets the lower limit for the date/time value and, if the new limit is
+ * different to the old limit, sends a {@link ChangeEvent} to all registered
+ * listeners. A <code>null</code> value is interpreted as "no lower limit".
+ * No check is made to ensure that the current date/time is on or after the
+ * new lower limit - the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* <code>start</code> is {@link Serializable}.
- *
- * @param start the new lower limit for the date/time value
+ *
+ * @param start the new lower limit for the date/time value
* (<code>null</code> permitted).
*/
public void setStart(Comparable start)
@@ -273,14 +273,14 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the upper limit for the date/time value and, if the new limit is
- * different to the old limit, sends a {@link ChangeEvent} to all registered
- * listeners. A <code>null</code> value is interpreted as "no upper limit".
- * No check is made to ensure that the current date/time is on or before the
- * new upper limit - the caller is responsible for ensuring that this
+ * Sets the upper limit for the date/time value and, if the new limit is
+ * different to the old limit, sends a {@link ChangeEvent} to all registered
+ * listeners. A <code>null</code> value is interpreted as "no upper limit".
+ * No check is made to ensure that the current date/time is on or before the
+ * new upper limit - the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* <code>end</code> is {@link Serializable}.
- *
+ *
* @param end the new upper limit for the date/time value (<code>null</code>
* permitted).
*/
@@ -297,18 +297,18 @@ public class SpinnerDateModel extends AbstractSpinnerModel
* Sets the current date and, if the new value is different to the old
* value, sends a {@link ChangeEvent} to all registered listeners.
*
- * @param value the new date (<code>null</code> not permitted, must be an
+ * @param value the new date (<code>null</code> not permitted, must be an
* instance of <code>Date</code>).
- *
- * @throws IllegalArgumentException if <code>value</code> is not an instance
+ *
+ * @throws IllegalArgumentException if <code>value</code> is not an instance
* of <code>Date</code>.
*/
public void setValue(Object value)
{
if (! (value instanceof Date) || value == null)
throw new IllegalArgumentException("Value not a date.");
-
- if (!date.getTime().equals(value))
+
+ if (!date.getTime().equals(value))
{
date.setTime((Date) value);
fireStateChanged();
diff --git a/javax/swing/SpinnerListModel.java b/javax/swing/SpinnerListModel.java
index 52ac360e9..de4926afd 100644
--- a/javax/swing/SpinnerListModel.java
+++ b/javax/swing/SpinnerListModel.java
@@ -111,13 +111,13 @@ public class SpinnerListModel extends AbstractSpinnerModel
* to <code>getValue()</code> returns the same as <code>list.get(0)</code>.
*
* @param list The list to use for this model.
- *
+ *
* @throws IllegalArgumentException if the list is null or contains no
* elements.
*
* @see SpinnerListModel#getNextValue()
* @see SpinnerListModel#getValue()
- */
+ */
public SpinnerListModel(List<?> list)
{
// Retain a reference to the valid list.
@@ -151,9 +151,9 @@ public class SpinnerListModel extends AbstractSpinnerModel
throw new IllegalArgumentException("The supplied array was invalid.");
}
- // Retain a reference to a wrapper around the valid array.
- // The array, in list form, will be tested again here, but we can't really
- // avoid this -- a null value to Arrays.asList will throw a
+ // Retain a reference to a wrapper around the valid array.
+ // The array, in list form, will be tested again here, but we can't really
+ // avoid this -- a null value to Arrays.asList will throw a
// NullPointerException.
setList(Arrays.asList(array));
}
@@ -167,7 +167,7 @@ public class SpinnerListModel extends AbstractSpinnerModel
{
return list;
}
-
+
/**
* Returns the next value from the list, which is the same as the element
* stored at the current index + 1. Null is returned if there are no more
@@ -200,10 +200,10 @@ public class SpinnerListModel extends AbstractSpinnerModel
public Object getPreviousValue()
{
// Check for a previous value.
- if (index > 0)
+ if (index > 0)
// Return the element at the previous position.
return list.get(index - 1);
- else
+ else
// Return null as this is the start of the list.
return null;
}
@@ -266,7 +266,7 @@ public class SpinnerListModel extends AbstractSpinnerModel
* the backing list. Listeners are notified of this change.
* Following the change, <code>getNextValue()</code> and
* <code>getPreviousValue()</code> return the objects following
- * and prior to the supplied value, respectively.
+ * and prior to the supplied value, respectively.
*
* @param value The requested new value of the list.
*
diff --git a/javax/swing/SpinnerModel.java b/javax/swing/SpinnerModel.java
index 4ad962bbf..6cab34da2 100644
--- a/javax/swing/SpinnerModel.java
+++ b/javax/swing/SpinnerModel.java
@@ -1,4 +1,4 @@
-/* SpinnerModel.java --
+/* SpinnerModel.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -107,5 +107,5 @@ public interface SpinnerModel
* @param listener The listener to remove.
*/
void removeChangeListener(ChangeListener listener);
-
+
}
diff --git a/javax/swing/SpinnerNumberModel.java b/javax/swing/SpinnerNumberModel.java
index 1abbbe377..af3fea65f 100644
--- a/javax/swing/SpinnerNumberModel.java
+++ b/javax/swing/SpinnerNumberModel.java
@@ -83,7 +83,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* @param minimum the minimum value
* @param maximum the maximum value
* @param stepSize the step size
- * @throws IllegalArgumentException if minimum &lt;= value &lt;= maximum does
+ * @throws IllegalArgumentException if minimum &lt;= value &lt;= maximum does
* not hold.
*/
public SpinnerNumberModel(double value, double minimum, double maximum,
@@ -100,7 +100,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* @param minimum the minimum value
* @param maximum the maximum value
* @param stepSize the step size
- * @throws IllegalArgumentException if minimum &lt;= value &lt;= maximum does
+ * @throws IllegalArgumentException if minimum &lt;= value &lt;= maximum does
* not hold.
*/
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize)
@@ -111,7 +111,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Creates a <code>SpinnerNumberModel</code> with the given attributes. The
- * caller should ensure that both <code>minimum</code> and
+ * caller should ensure that both <code>minimum</code> and
* <code>maximum</code> are serializable.
*
* @param value the initial value (<code>null</code> not permitted).
@@ -121,9 +121,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
*
* @throws IllegalArgumentException if minimum &lt;= value &lt;= maximum
* does not hold
- * @throws IllegalArgumentException if <code>value</code> is
+ * @throws IllegalArgumentException if <code>value</code> is
* <code>null</code>.
- * @throws IllegalArgumentException if <code>stepSize</code> is
+ * @throws IllegalArgumentException if <code>stepSize</code> is
* <code>null</code>.
*/
public SpinnerNumberModel(Number value, Comparable minimum,
@@ -165,7 +165,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
if (! (value instanceof Number))
throw new IllegalArgumentException("value must be a Number");
- if (!this.value.equals(value))
+ if (!this.value.equals(value))
{
this.value = (Number) value;
fireStateChanged();
@@ -177,7 +177,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* {@link Number}.
*
* @return The current value.
- *
+ *
* @see #getNumber()
*/
public Object getValue()
@@ -187,10 +187,10 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the next value, or <code>null</code> if adding the step size to
- * the current value results in a value greater than the maximum value.
+ * the current value results in a value greater than the maximum value.
* The current value is not changed.
*
- * @return The next value, or <code>null</code> if the current value is the
+ * @return The next value, or <code>null</code> if the current value is the
* maximum value represented by this model.
*/
public Object getNextValue()
@@ -209,11 +209,11 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
num = new Short((short) (value.shortValue() + stepSize.shortValue()));
else
num = new Byte((byte) (value.byteValue() + stepSize.byteValue()));
-
+
// check upper bound if set
if ((maximum != null) && maximum.compareTo(num) < 0)
num = null;
-
+
return num;
}
@@ -241,7 +241,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
num = new Short((short) (value.shortValue() - stepSize.shortValue()));
else
num = new Byte((byte) (value.byteValue() - stepSize.byteValue()));
-
+
// check lower bound if set
if ((minimum != null) && minimum.compareTo(num) > 0)
num = null;
@@ -261,9 +261,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the minimum value, or <code>null</code> if there is no minimum.
- *
+ *
* @return The minimum value.
- *
+ *
* @see #setMinimum(Comparable)
*/
public Comparable getMinimum()
@@ -273,15 +273,15 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the minimum value and, if the new value is different to the old
- * value, sends a {@link ChangeEvent} to all registered listeners. A
+ * value, sends a {@link ChangeEvent} to all registered listeners. A
* <code>null</code> value is interpreted as "no minimum value". No check
- * is made to ensure that the new minimum is less than or equal to the
- * current value, the caller is responsible for ensuring that this
+ * is made to ensure that the new minimum is less than or equal to the
+ * current value, the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* <code>newMinimum</code> is {@link Serializable}.
- *
+ *
* @param newMinimum the new minimum value (<code>null</code> permitted).
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(Comparable newMinimum)
@@ -295,9 +295,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the maximum value, or <code>null</code> if there is no maximum.
- *
+ *
* @return The maximum value.
- *
+ *
* @see #getMinimum()
* @see #setMaximum(Comparable)
*/
@@ -308,15 +308,15 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the maximum value and, if the new value is different to the old
- * value, sends a {@link ChangeEvent} to all registered listeners. A
+ * value, sends a {@link ChangeEvent} to all registered listeners. A
* <code>null</code> value is interpreted as "no maximum value". No check
- * is made to ensure that the new maximum is greater than or equal to the
- * current value, the caller is responsible for ensuring that this
+ * is made to ensure that the new maximum is greater than or equal to the
+ * current value, the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* <code>newMaximum</code> is {@link Serializable}.
- *
+ *
* @param newMaximum the new maximum (<code>null</code> permitted).
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(Comparable newMaximum)
@@ -330,7 +330,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the step size.
- *
+ *
* @return The step size (never <code>null</code>).
*/
public Number getStepSize()
@@ -341,10 +341,10 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the step size and, if the new step size is different to the old
* step size, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param newStepSize the new step size (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>newStepSize</code> is
+ *
+ * @throws IllegalArgumentException if <code>newStepSize</code> is
* <code>null</code>.
*/
public void setStepSize(Number newStepSize)
diff --git a/javax/swing/Spring.java b/javax/swing/Spring.java
index 477525960..4cc06e539 100644
--- a/javax/swing/Spring.java
+++ b/javax/swing/Spring.java
@@ -1,4 +1,4 @@
-/* Spring.java --
+/* Spring.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -156,12 +156,12 @@ public abstract class Spring
*/
public abstract void setValue(int value);
- private int getShrinkRange()
+ private int getShrinkRange()
{
return (getPreferredValue() - getMinimumValue());
}
- private int getExpandRange()
+ private int getExpandRange()
{
return (getMaximumValue() - getPreferredValue());
}
@@ -176,7 +176,7 @@ public abstract class Spring
return (double)(v - p) / r;
}
- void setStrain(double strain)
+ void setStrain(double strain)
{
int r = (strain < 0) ? getShrinkRange() : getExpandRange();
int v = (getPreferredValue() + (int)(strain * r));
@@ -411,7 +411,7 @@ public abstract class Spring
return pref;
return value;
}
-
+
/**
* Sets the current value.
*
@@ -536,7 +536,7 @@ public abstract class Spring
int remainder = val - s1.getValue();
s2.setValue(remainder);
}
-
+
}
@@ -735,7 +735,7 @@ public abstract class Spring
s1.setValue(Math.min(val, p1));
s2.setValue(val);
}
- else
+ else
{
s1.setValue(val);
s2.setValue(Math.min(val, p2));
diff --git a/javax/swing/SpringLayout.java b/javax/swing/SpringLayout.java
index 2595b1967..2be5189b5 100644
--- a/javax/swing/SpringLayout.java
+++ b/javax/swing/SpringLayout.java
@@ -1,4 +1,4 @@
-/* SpringLayout.java --
+/* SpringLayout.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -110,10 +110,10 @@ public class SpringLayout implements LayoutManager2
/** The Spring for the bottom edge. */
private Spring south;
- /**
+ /**
In each axis the user can set three values, i.e. x, width, east, if all
- three are set, then there's no room for manoeuvre so in those cases the
- third will be described by the below spring which is calculated in terms
+ three are set, then there's no room for manoeuvre so in those cases the
+ third will be described by the below spring which is calculated in terms
of the other two
*/
private Spring v;
@@ -189,7 +189,7 @@ public class SpringLayout implements LayoutManager2
{
Spring retVal = null;
if (edgeName.equals(SpringLayout.NORTH))
- retVal = getY();
+ retVal = getY();
else if (edgeName.equals(SpringLayout.WEST))
retVal = getX();
else if (edgeName.equals(SpringLayout.SOUTH))
@@ -202,7 +202,7 @@ public class SpringLayout implements LayoutManager2
/**
* Returns the constraint for the height of the component.
*
- * @return the height constraint.
+ * @return the height constraint.
*/
public Spring getHeight()
{
@@ -294,7 +294,7 @@ public class SpringLayout implements LayoutManager2
*/
public void setConstraint(String edgeName, Spring s)
{
-
+
if (edgeName.equals(SpringLayout.WEST))
setX(s);
else if (edgeName.equals(SpringLayout.NORTH))
@@ -394,7 +394,7 @@ public class SpringLayout implements LayoutManager2
width.setValue(Spring.UNSET);
if (height != null)
height.setValue(Spring.UNSET);
- if (east != null)
+ if (east != null)
east.setValue(Spring.UNSET);
if (south != null)
south.setValue(Spring.UNSET);
@@ -444,16 +444,16 @@ public class SpringLayout implements LayoutManager2
* The trick to SpringLayout is that the network of Springs needs to
* completely created before the positioning results are generated.
*
- * Using the springs directly during network creation will set their values
- * before the network is completed, Using Deferred Springs during creation of
- * the network allows all the edges to be connected together and the network
- * to be created without resolving the Springs until their results need to be
- * known, at which point the network is complete and the spring addition and
+ * Using the springs directly during network creation will set their values
+ * before the network is completed, Using Deferred Springs during creation of
+ * the network allows all the edges to be connected together and the network
+ * to be created without resolving the Springs until their results need to be
+ * known, at which point the network is complete and the spring addition and
* and substitution calculations will work on a complete and valid network.
*
* @author Caolan McNamara (caolanm@redhat.com)
*/
- private static class DeferredSpring extends Spring
+ private static class DeferredSpring extends Spring
{
private SpringLayout sl;
private String edgeName;
@@ -471,27 +471,27 @@ public class SpringLayout implements LayoutManager2
c = component;
}
- private Spring resolveSpring()
+ private Spring resolveSpring()
{
return sl.getConstraints(c).getConstraint(edgeName);
}
- public int getMaximumValue()
+ public int getMaximumValue()
{
return resolveSpring().getMaximumValue();
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return resolveSpring().getMinimumValue();
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return resolveSpring().getPreferredValue();
}
- public int getValue()
+ public int getValue()
{
int nRet = resolveSpring().getValue();
if (nRet == Spring.UNSET)
@@ -499,7 +499,7 @@ public class SpringLayout implements LayoutManager2
return nRet;
}
- public void setValue(int size)
+ public void setValue(int size)
{
resolveSpring().setValue(size);
}
@@ -543,18 +543,18 @@ public class SpringLayout implements LayoutManager2
}
//clip max to a value we can do meaningful calculation with
- public int getMaximumValue()
+ public int getMaximumValue()
{
int widget_width = c.getMaximumSize().width;
return Math.min(Short.MAX_VALUE, widget_width);
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return c.getMinimumSize().width;
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return c.getPreferredSize().width;
}
@@ -575,18 +575,18 @@ public class SpringLayout implements LayoutManager2
}
//clip max to a value we can do meaningful calculations with it
- public int getMaximumValue()
+ public int getMaximumValue()
{
int widget_height = c.getMaximumSize().height;
return Math.min(Short.MAX_VALUE, widget_height);
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return c.getMinimumSize().height;
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return c.getPreferredSize().height;
}
@@ -635,7 +635,7 @@ public class SpringLayout implements LayoutManager2
/**
* Returns the X alignment of the Container <code>p</code>.
- *
+ *
* @param p
* the {@link java.awt.Container} for which to determine the X
* alignment.
@@ -676,7 +676,7 @@ public class SpringLayout implements LayoutManager2
c.setHeight(null);
if (c.getEast() == null)
c.setEast(Spring.constant(0, 0, Integer.MAX_VALUE));
- if (c.getSouth() == null)
+ if (c.getSouth() == null)
c.setSouth(Spring.constant(0, 0, Integer.MAX_VALUE));
return c;
@@ -715,12 +715,12 @@ public class SpringLayout implements LayoutManager2
Component c = components[index];
Constraints constraints = getConstraints(c);
-
+
int x = constraints.getX().getValue();
int y = constraints.getY().getValue();
int width = constraints.getWidth().getValue();
int height = constraints.getHeight().getValue();
-
+
c.setBounds(x + offsetX, y + offsetY, width, height);
}
}
@@ -794,7 +794,7 @@ public class SpringLayout implements LayoutManager2
* @param e2 the edge of component 2.
* @param c2 the component 2.
*/
- public void putConstraint(String e1, Component c1, int pad, String e2,
+ public void putConstraint(String e1, Component c1, int pad, String e2,
Component c2)
{
putConstraint(e1, c1, Spring.constant(pad), e2, c2);
@@ -811,7 +811,7 @@ public class SpringLayout implements LayoutManager2
* @param e2 the edge of component 2.
* @param c2 the component 2.
*/
- public void putConstraint(String e1, Component c1, Spring s, String e2,
+ public void putConstraint(String e1, Component c1, Spring s, String e2,
Component c2)
{
Constraints constraints1 = getConstraints(c1);
diff --git a/javax/swing/SwingConstants.java b/javax/swing/SwingConstants.java
index bed8a467b..fccf2ea95 100644
--- a/javax/swing/SwingConstants.java
+++ b/javax/swing/SwingConstants.java
@@ -1,4 +1,4 @@
-/* SwingConstants.java --
+/* SwingConstants.java --
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ public interface SwingConstants
int LEFT = 2;
int BOTTOM = 3;
int RIGHT = 4;
-
+
int NORTH = 1;
int NORTH_EAST = 2;
int EAST = 3;
@@ -57,10 +57,10 @@ public interface SwingConstants
int SOUTH_WEST = 6;
int WEST = 7;
int NORTH_WEST = 8;
-
+
int HORIZONTAL = 0;
- int VERTICAL = 1;
-
+ int VERTICAL = 1;
+
int LEADING = 10;
int TRAILING = 11;
@@ -74,4 +74,3 @@ public interface SwingConstants
*/
int PREVIOUS = 13;
}
-
diff --git a/javax/swing/SwingUtilities.java b/javax/swing/SwingUtilities.java
index 6ff0b3346..61047323f 100644
--- a/javax/swing/SwingUtilities.java
+++ b/javax/swing/SwingUtilities.java
@@ -74,8 +74,8 @@ import javax.swing.text.View;
public class SwingUtilities
implements SwingConstants
{
- /**
- * This frame should be used as parent for JWindow or JDialog
+ /**
+ * This frame should be used as parent for JWindow or JDialog
* that doesn't an owner
*/
private static OwnerFrame ownerFrame;
@@ -92,7 +92,7 @@ public class SwingUtilities
* of the <em>component's</em> coordinate system, where (0,0) is the
* upper left corner of the component's bounds.
*
- * @param c the component to measure the bounds of (if <code>null</code>,
+ * @param c the component to measure the bounds of (if <code>null</code>,
* this method returns <code>null</code>).
* @param r a carrier to store the return value in (if <code>null</code>, a
* new <code>Rectangle</code> instance is created).
@@ -115,11 +115,11 @@ public class SwingUtilities
/**
* Returns the focus owner or <code>null</code> if <code>comp</code> is not
* the focus owner or a parent of it.
- *
+ *
* @param comp the focus owner or a parent of it
- *
+ *
* @return the focus owner, or <code>null</code>
- *
+ *
* @deprecated 1.4 Replaced by
* <code>KeyboardFocusManager.getFocusOwner()</code>.
*/
@@ -127,22 +127,22 @@ public class SwingUtilities
{
// Get real focus owner.
Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager()
- .getFocusOwner();
+ .getFocusOwner();
// Check if comp is the focus owner or a parent of it.
Component tmp = focusOwner;
-
+
while (tmp != null)
{
- if (tmp == comp)
- return focusOwner;
+ if (tmp == comp)
+ return focusOwner;
- tmp = tmp.getParent();
+ tmp = tmp.getParent();
}
-
+
return null;
}
-
+
/**
* Returns the <code>Accessible</code> child of the specified component
* which appears at the supplied <code>Point</code>. If there is no
@@ -280,7 +280,7 @@ public class SwingUtilities
* @param comp The component to get the JRootPane of
*
* @return a suitable JRootPane for <code>comp</code>, or <code>null</code>
- *
+ *
* @see javax.swing.RootPaneContainer#getRootPane
* @see #getAncestorOfClass
*/
@@ -354,7 +354,7 @@ public class SwingUtilities
/**
* Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
*
- * @param comp The component to search for an ancestor window
+ * @param comp The component to search for an ancestor window
*
* @return An ancestral window, or <code>null</code> if none exists
*/
@@ -387,7 +387,7 @@ public class SwingUtilities
app = (Applet) comp;
comp = comp.getParent();
}
-
+
if (win != null)
return win;
return app;
@@ -395,7 +395,7 @@ public class SwingUtilities
/**
* Return true if a descends from b, in other words if b is an ancestor of a.
- *
+ *
* @param a The child to search the ancestry of
* @param b The potential ancestor to search for
* @return true if a is a descendent of b, false otherwise
@@ -419,7 +419,7 @@ public class SwingUtilities
* <code>(x,y)</code>. Returns <code>null</code> when either
* <code>(x,y)</code> is outside the bounds of parent, or parent is
* <code>null</code>.
- *
+ *
* @param parent The component to search the descendents of
* @param x Horizontal coordinate to search for
* @param y Vertical coordinate to search for
@@ -520,7 +520,7 @@ public class SwingUtilities
return pt;
}
-
+
public static Point convertPoint(Component source, Point aPoint, Component destination)
{
return convertPoint(source, aPoint.x, aPoint.y, destination);
@@ -704,17 +704,17 @@ public class SwingUtilities
* which is laid out in this label
*/
- public static String layoutCompoundLabel(JComponent c,
+ public static String layoutCompoundLabel(JComponent c,
FontMetrics fm,
- String text,
- Icon icon,
+ String text,
+ Icon icon,
int verticalAlignment,
- int horizontalAlignment,
+ int horizontalAlignment,
int verticalTextPosition,
- int horizontalTextPosition,
+ int horizontalTextPosition,
Rectangle viewR,
- Rectangle iconR,
- Rectangle textR,
+ Rectangle iconR,
+ Rectangle textR,
int textIconGap)
{
@@ -921,8 +921,8 @@ public class SwingUtilities
if (text == null || text.equals(""))
{
textIconGap = 0;
- textR.width = 0;
- textR.height = 0;
+ textR.width = 0;
+ textR.height = 0;
text = "";
}
else
@@ -1070,18 +1070,18 @@ public class SwingUtilities
return clipped;
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#invokeLater} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeLater(Runnable doRun)
{
java.awt.EventQueue.invokeLater(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#invokeAndWait} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeAndWait(Runnable doRun)
throws InterruptedException,
@@ -1090,21 +1090,21 @@ public class SwingUtilities
java.awt.EventQueue.invokeAndWait(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#isDispatchThread()}.
- *
- * @return <code>true</code> if the current thread is the current AWT event
+ *
+ * @return <code>true</code> if the current thread is the current AWT event
* dispatch thread.
*/
public static boolean isEventDispatchThread()
{
return java.awt.EventQueue.isDispatchThread();
}
-
+
/**
* This method paints the given component at the given position and size.
* The component will be reparented to the container given.
- *
+ *
* @param g The Graphics object to draw with.
* @param c The Component to draw
* @param p The Container to reparent to.
@@ -1113,22 +1113,22 @@ public class SwingUtilities
* @param w The width of the drawing area.
* @param h The height of the drawing area.
*/
- public static void paintComponent(Graphics g, Component c, Container p,
+ public static void paintComponent(Graphics g, Component c, Container p,
int x, int y, int w, int h)
- {
+ {
Container parent = c.getParent();
if (parent != null)
parent.remove(c);
if (p != null)
p.add(c);
-
+
Shape savedClip = g.getClip();
-
+
g.setClip(x, y, w, h);
g.translate(x, y);
c.paint(g);
-
+
g.translate(-x, -y);
g.setClip(savedClip);
}
@@ -1136,23 +1136,23 @@ public class SwingUtilities
/**
* This method paints the given component in the given rectangle.
* The component will be reparented to the container given.
- *
+ *
* @param g The Graphics object to draw with.
* @param c The Component to draw
* @param p The Container to reparent to.
* @param r The rectangle that describes the drawing area.
- */
- public static void paintComponent(Graphics g, Component c,
+ */
+ public static void paintComponent(Graphics g, Component c,
Container p, Rectangle r)
{
paintComponent(g, c, p, r.x, r.y, r.width, r.height);
}
-
+
/**
* This method returns the common Frame owner used in JDialogs or
* JWindow when no owner is provided.
*
- * @return The common Frame
+ * @return The common Frame
*/
static Window getOwnerFrame(Window owner)
{
@@ -1188,7 +1188,7 @@ public class SwingUtilities
public static boolean isMiddleMouseButton(MouseEvent event)
{
return ((event.getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK)
- == InputEvent.BUTTON2_DOWN_MASK);
+ == InputEvent.BUTTON2_DOWN_MASK);
}
/**
@@ -1201,9 +1201,9 @@ public class SwingUtilities
public static boolean isRightMouseButton(MouseEvent event)
{
return ((event.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK)
- == InputEvent.BUTTON3_DOWN_MASK);
+ == InputEvent.BUTTON3_DOWN_MASK);
}
-
+
/**
* This frame should be used when constructing a Window/JDialog without
* a parent. In this case, we are forced to use this frame as a window's
@@ -1214,9 +1214,9 @@ public class SwingUtilities
{
public void setVisible(boolean b)
{
- // Do nothing here.
+ // Do nothing here.
}
-
+
public boolean isShowing()
{
return true;
@@ -1251,9 +1251,9 @@ public class SwingUtilities
* parent-pointer chain, as illustrated:</p>
*
* <pre>
- * [{@link javax.swing.JComponent#getActionMap()}]
- * --&gt; [{@link javax.swing.ActionMap}]
- * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapActionMap}]
+ * [{@link javax.swing.JComponent#getActionMap()}]
+ * --&gt; [{@link javax.swing.ActionMap}]
+ * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapActionMap}]
* parent --&gt; [{@link javax.swing.plaf.ActionMapUIResource}]
* </pre>
*
@@ -1266,7 +1266,7 @@ public class SwingUtilities
* call as a request to remove the UI-managed ActionMap from the
* component's ActionMap parent chain.</p>
*/
- public static void replaceUIActionMap(JComponent component,
+ public static void replaceUIActionMap(JComponent component,
ActionMap uiActionMap)
{
ActionMap child = component.getActionMap();
@@ -1294,9 +1294,9 @@ public class SwingUtilities
* <em>end</em> of the parent-pointer chain, as illustrated:</p>
*
* <pre>
- * [{@link javax.swing.JComponent#getInputMap()}]
- * --&gt; [{@link javax.swing.InputMap}]
- * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapWrapper}]
+ * [{@link javax.swing.JComponent#getInputMap()}]
+ * --&gt; [{@link javax.swing.InputMap}]
+ * parent --&gt; [{@link javax.swing.text.JTextComponent.KeymapWrapper}]
* parent --&gt; [{@link javax.swing.plaf.InputMapUIResource}]
* </pre>
*
@@ -1309,8 +1309,8 @@ public class SwingUtilities
* call as a request to remove the UI-managed InputMap from the
* component's InputMap parent chain.</p>
*/
- public static void replaceUIInputMap(JComponent component,
- int condition,
+ public static void replaceUIInputMap(JComponent component,
+ int condition,
InputMap uiInputMap)
{
InputMap child = component.getInputMap(condition);
@@ -1357,7 +1357,7 @@ public class SwingUtilities
int h2 = rectB.height;
// (outer box = rectA)
- // -------------
+ // -------------
// |_____0_____|
// | |rectB| |
// |_1|_____|_2|
@@ -1393,11 +1393,11 @@ public class SwingUtilities
int n = 0;
for (int i = 0; i < 4; i++)
if (r[i] != null)
- n++;
+ n++;
Rectangle[] out = new Rectangle[n];
for (int i = 3; i >= 0; i--)
if (r[i] != null)
- out[--n] = r[i];
+ out[--n] = r[i];
return out;
}
@@ -1441,13 +1441,13 @@ public class SwingUtilities
return rect;
}
-
+
/**
* Calculates the width of a given string.
*
* @param fm the <code>FontMetrics</code> object to use
* @param str the string
- *
+ *
* @return the width of the the string.
*/
public static int computeStringWidth(FontMetrics fm, String str)
@@ -1551,7 +1551,7 @@ public class SwingUtilities
}
/**
- * Processes key bindings for the component that is associated with the
+ * Processes key bindings for the component that is associated with the
* key event. Note that this method does not make sense for
* JComponent-derived components, except when
* {@link JComponent#processKeyEvent(KeyEvent)} is overridden and super is
@@ -1575,7 +1575,7 @@ public class SwingUtilities
KeyboardManager km = KeyboardManager.getManager();
return km.processKeyStroke(c, s, ev);
}
-
+
/**
* Returns a string representing one of the horizontal alignment codes
* defined in the {@link SwingConstants} interface. The following table
@@ -1609,16 +1609,16 @@ public class SwingUtilities
* </p>
* If the supplied code is not one of those listed, this methods will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
static String convertHorizontalAlignmentCodeToString(int code)
{
- switch (code)
+ switch (code)
{
- case SwingConstants.CENTER:
+ case SwingConstants.CENTER:
return "CENTER";
case SwingConstants.LEFT:
return "LEFT";
@@ -1632,7 +1632,7 @@ public class SwingUtilities
throw new IllegalArgumentException("Unrecognised code: " + code);
}
}
-
+
/**
* Returns a string representing one of the vertical alignment codes
* defined in the {@link SwingConstants} interface. The following table
@@ -1658,9 +1658,9 @@ public class SwingUtilities
* </p>
* If the supplied code is not one of those listed, this methods will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
static String convertVerticalAlignmentCodeToString(int code)
@@ -1677,7 +1677,7 @@ public class SwingUtilities
throw new IllegalArgumentException("Unrecognised code: " + code);
}
}
-
+
/**
* Returns a string representing one of the default operation codes
* defined in the {@link WindowConstants} interface. The following table
@@ -1707,12 +1707,12 @@ public class SwingUtilities
* </p>
* If the supplied code is not one of those listed, this method will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
- static String convertWindowConstantToString(int code)
+ static String convertWindowConstantToString(int code)
{
switch (code)
{
diff --git a/javax/swing/Timer.java b/javax/swing/Timer.java
index acd1eb493..e9954b4b1 100644
--- a/javax/swing/Timer.java
+++ b/javax/swing/Timer.java
@@ -51,7 +51,7 @@ import javax.swing.event.EventListenerList;
* firing <code>ActionEvent</code>s. All Timers share one (daemon)
* Thread (or java.util.Timer). All events are fired from the event
* queue.
- *
+ *
* @author Ronald Veldema
* @author Audrius Meskauskas (audriusa@Bionformatics.org) - bug fixes
* and documentation comments
@@ -99,7 +99,7 @@ public class Timer
* running, even if there's no task scheduled in it.
*/
private static java.util.Timer timer = new java.util.Timer("swing.Timer",
- true);
+ true);
/**
* If <code>true</code>, the timer prints a message to
@@ -264,12 +264,12 @@ public class Timer
* firing the first event.
*
* @param d The time gap between the subsequent events, in milliseconds
- *
+ *
* @throws IllegalArgumentException if <code>d</code> is less than zero.
*/
public void setDelay(int d)
{
- if (d < 0)
+ if (d < 0)
throw new IllegalArgumentException("Invalid delay: " + d);
delay = d;
}
@@ -291,7 +291,7 @@ public class Timer
* subsequent events.
*
* @param i the initial delay, in milliseconds
- *
+ *
* @throws IllegalArgumentException if <code>i</code> is less than zero.
*/
public void setInitialDelay(int i)
@@ -387,12 +387,12 @@ public class Timer
Task t = task;
if (t == null)
{
- t = new Task();
- if (isRepeats())
- timer.schedule(t, getInitialDelay(), getDelay());
- else
- timer.schedule(t, getInitialDelay());
- task = t;
+ t = new Task();
+ if (isRepeats())
+ timer.schedule(t, getInitialDelay(), getDelay());
+ else
+ timer.schedule(t, getInitialDelay());
+ task = t;
}
}
@@ -404,8 +404,8 @@ public class Timer
Task t = task;
if (t != null)
{
- t.cancel();
- task = null;
+ t.cancel();
+ task = null;
}
}
@@ -468,9 +468,9 @@ public class Timer
{
synchronized(queueLock)
{
- queue++;
- if (queue == 1)
- SwingUtilities.invokeLater(drainer);
+ queue++;
+ if (queue == 1)
+ SwingUtilities.invokeLater(drainer);
}
}
}
diff --git a/javax/swing/ToolTipManager.java b/javax/swing/ToolTipManager.java
index 152fc0343..8a31f79f6 100644
--- a/javax/swing/ToolTipManager.java
+++ b/javax/swing/ToolTipManager.java
@@ -219,9 +219,9 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
{
if (! enabled)
{
- enterTimer.stop();
- exitTimer.stop();
- insideTimer.stop();
+ enterTimer.stop();
+ exitTimer.stop();
+ insideTimer.stop();
}
this.enabled = enabled;
@@ -276,7 +276,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* mouse enters a Component.
*
* @param delay The initial delay before the ToolTip is shown.
- *
+ *
* @throws IllegalArgumentException if <code>delay</code> is less than zero.
*/
public void setInitialDelay(int delay)
@@ -299,7 +299,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* Sets the time the ToolTip will be shown before being hidden.
*
* @param delay the delay (in milliseconds) before tool tips are hidden.
- *
+ *
* @throws IllegalArgumentException if <code>delay</code> is less than zero.
*/
public void setDismissDelay(int delay)
@@ -323,7 +323,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* Component, the tooltip will be shown immediately.
*
* @param delay The reshow delay (in milliseconds).
- *
+ *
* @throws IllegalArgumentException if <code>delay</code> is less than zero.
*/
public void setReshowDelay(int delay)
@@ -386,7 +386,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* This method is called when the mouse exits a JComponent registered with the
* ToolTipManager. When the mouse exits, the tooltip should be hidden
* immediately.
- *
+ *
* @param event
* The MouseEvent.
*/
@@ -421,8 +421,8 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
enterTimer.restart();
else if (insideTimer.isRunning())
{
- insideTimer.stop();
- hideTip();
+ insideTimer.stop();
+ hideTip();
}
}
@@ -517,7 +517,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
Point p = currentPoint;
Point cP = currentComponent.getLocationOnScreen();
Dimension dims = currentTip.getPreferredSize();
-
+
JLayeredPane pane = null;
JRootPane r = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class,
currentComponent));
@@ -525,12 +525,12 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
pane = r.getLayeredPane();
if (pane == null)
return;
-
+
p.translate(cP.x, cP.y);
adjustLocation(p, pane, dims);
-
+
currentTip.setBounds(0, 0, dims.width, dims.height);
-
+
PopupFactory factory = PopupFactory.getSharedInstance();
popup = factory.getPopup(currentComponent, currentTip, p.x, p.y);
popup.show();
@@ -539,7 +539,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
/**
* Adjusts the point to a new location on the component,
* using the currentTip's dimensions.
- *
+ *
* @param p - the point to convert.
* @param c - the component the point is on.
* @param d - the dimensions of the currentTip.
@@ -554,10 +554,10 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
p.y += d.height;
if (p.y + d.height > c.getHeight())
p.y -= d.height;
-
+
return p;
}
-
+
/**
* This method hides the ToolTip.
* This is package-private to avoid an accessor method.
diff --git a/javax/swing/TransferHandler.java b/javax/swing/TransferHandler.java
index 276697475..abf6e8c2e 100644
--- a/javax/swing/TransferHandler.java
+++ b/javax/swing/TransferHandler.java
@@ -172,7 +172,7 @@ public class TransferHandler implements Serializable
super(command);
this.command = command;
}
-
+
public void actionPerformed(ActionEvent event)
{
JComponent component = (JComponent) event.getSource();
@@ -180,42 +180,42 @@ public class TransferHandler implements Serializable
Clipboard clipboard = getClipboard(component);
if (clipboard == null)
- {
- // Access denied!
- Toolkit.getDefaultToolkit().beep();
- return;
- }
+ {
+ // Access denied!
+ Toolkit.getDefaultToolkit().beep();
+ return;
+ }
if (command.equals(COMMAND_COPY))
- transferHandler.exportToClipboard(component, clipboard, COPY);
+ transferHandler.exportToClipboard(component, clipboard, COPY);
else if (command.equals(COMMAND_CUT))
- transferHandler.exportToClipboard(component, clipboard, MOVE);
+ transferHandler.exportToClipboard(component, clipboard, MOVE);
else if (command.equals(COMMAND_PASTE))
- {
- Transferable transferable = clipboard.getContents(null);
+ {
+ Transferable transferable = clipboard.getContents(null);
- if (transferable != null)
- transferHandler.importData(component, transferable);
- }
+ if (transferable != null)
+ transferHandler.importData(component, transferable);
+ }
}
-
+
/**
* Get the system cliboard or null if the caller isn't allowed to
* access the system clipboard.
- *
+ *
* @param component a component, used to get the toolkit.
* @return the clipboard
*/
private static Clipboard getClipboard(JComponent component)
{
try
- {
- return component.getToolkit().getSystemClipboard();
- }
+ {
+ return component.getToolkit().getSystemClipboard();
+ }
catch (SecurityException se)
- {
- return null;
- }
+ {
+ return null;
+ }
}
}
@@ -244,7 +244,7 @@ public class TransferHandler implements Serializable
{
// Nothing to do here.
}
-
+
}
private static class SwingDragHandler
@@ -310,7 +310,7 @@ public class TransferHandler implements Serializable
{
// Nothing to do here.
}
-
+
}
private static final long serialVersionUID = -967749805571669910L;
@@ -318,7 +318,7 @@ public class TransferHandler implements Serializable
private static final String COMMAND_COPY = "copy";
private static final String COMMAND_CUT = "cut";
private static final String COMMAND_PASTE = "paste";
-
+
public static final int NONE = 0;
public static final int COPY = 1;
public static final int MOVE = 2;
@@ -327,13 +327,13 @@ public class TransferHandler implements Serializable
private static Action copyAction = new TransferAction(COMMAND_COPY);
private static Action cutAction = new TransferAction(COMMAND_CUT);
private static Action pasteAction = new TransferAction(COMMAND_PASTE);
-
+
private int sourceActions;
private Icon visualRepresentation;
/**
* The name of the property into/from which this TransferHandler
- * imports/exports.
+ * imports/exports.
*/
private String propertyName;
@@ -426,7 +426,7 @@ public class TransferHandler implements Serializable
* from the specified component, or null if the component doesn't
* have a readable property like the transfer handler
*/
- protected Transferable createTransferable(JComponent c)
+ protected Transferable createTransferable(JComponent c)
{
Transferable transferable = null;
if (propertyName != null)
@@ -499,7 +499,7 @@ public class TransferHandler implements Serializable
*
* @throws IllegalStateException when the clipboard is not available
*/
- public void exportToClipboard(JComponent c, Clipboard clip, int action)
+ public void exportToClipboard(JComponent c, Clipboard clip, int action)
throws IllegalStateException
{
action &= getSourceActions(c);
@@ -519,7 +519,7 @@ public class TransferHandler implements Serializable
}
else
exportDone(c, null, NONE);
- }
+ }
public int getSourceActions(JComponent c)
{
@@ -536,7 +536,7 @@ public class TransferHandler implements Serializable
* component <code>c</code> by setting the property of this TransferHandler
* on that component. If this succeeds, this method returns
* <code>true</code>, otherwise <code>false</code>.
- *
+ *
*
* @param c the component to import into
* @param t the transfer data to import
@@ -544,7 +544,7 @@ public class TransferHandler implements Serializable
* @return <code>true</code> if the transfer succeeds, <code>false</code>
* otherwise
*/
- public boolean importData(JComponent c, Transferable t)
+ public boolean importData(JComponent c, Transferable t)
{
boolean ok = false;
PropertyDescriptor prop = getPropertyDescriptor(c);
diff --git a/javax/swing/UIDefaults.java b/javax/swing/UIDefaults.java
index 9766cb05c..904b4c2b8 100644
--- a/javax/swing/UIDefaults.java
+++ b/javax/swing/UIDefaults.java
@@ -129,8 +129,8 @@ public class UIDefaults extends Hashtable<Object, Object>
{
final String className = s;
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
+ {
+ public Object createValue(UIDefaults table)
{
try
{
@@ -152,11 +152,11 @@ public class UIDefaults extends Hashtable<Object, Object>
final String className = c;
final String methodName = m;
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
+ {
+ public Object createValue(UIDefaults table)
{
- try
- {
+ try
+ {
return Class
.forName(className)
.getMethod(methodName, new Class[] {})
@@ -169,7 +169,7 @@ public class UIDefaults extends Hashtable<Object, Object>
}
};
}
-
+
public ProxyLazyValue(String c, Object[] os)
{
final String className = c;
@@ -178,20 +178,20 @@ public class UIDefaults extends Hashtable<Object, Object>
for (int i = 0; i < objs.length; ++i)
{
clss[i] = objs[i].getClass();
- }
+ }
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
- {
+ {
+ public Object createValue(UIDefaults table)
+ {
try
{
return Class
.forName(className)
.getConstructor(clss)
.newInstance(objs);
- }
+ }
catch (Exception e)
- {
+ {
return null;
}
}
@@ -205,14 +205,14 @@ public class UIDefaults extends Hashtable<Object, Object>
final Object[] objs = os;
final Class[] clss = new Class[objs.length];
for (int i = 0; i < objs.length; ++i)
- {
+ {
clss[i] = objs[i].getClass();
- }
+ }
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
- {
- try
+ {
+ public Object createValue(UIDefaults table)
+ {
+ try
{
return Class
.forName(className)
@@ -226,7 +226,7 @@ public class UIDefaults extends Hashtable<Object, Object>
}
};
}
-
+
public Object createValue(UIDefaults table)
{
return inner.createValue(table);
@@ -257,7 +257,7 @@ public class UIDefaults extends Hashtable<Object, Object>
public UIDefaults(Object[] entries)
{
this();
-
+
for (int i = 0; (2 * i + 1) < entries.length; ++i)
put(entries[2 * i], entries[2 * i + 1]);
}
@@ -293,14 +293,14 @@ public class UIDefaults extends Hashtable<Object, Object>
String keyString = (String) key;
ListIterator i = bundles.listIterator(0);
while (i.hasNext())
- {
+ {
String bundle_name = (String) i.next();
ResourceBundle res =
ResourceBundle.getBundle(bundle_name, loc);
if (res != null)
{
- try
- {
+ try
+ {
obj = res.getObject(keyString);
break;
}
@@ -329,7 +329,7 @@ public class UIDefaults extends Hashtable<Object, Object>
else if (obj instanceof ActiveValue)
{
return ((ActiveValue) obj).createValue(this);
- }
+ }
return obj;
}
@@ -582,7 +582,7 @@ public class UIDefaults extends Hashtable<Object, Object>
*
* @param key the key to the requested entry
*
- * @return The boolean entry for <code>key</code> or <code>false</code> if no
+ * @return The boolean entry for <code>key</code> or <code>false</code> if no
* such entry exists.
*/
public boolean getBoolean(Object key)
@@ -612,7 +612,7 @@ public class UIDefaults extends Hashtable<Object, Object>
* @return the insets entry for <code>key</code> or null if no such entry
* exists
*/
- public Insets getInsets(Object key)
+ public Insets getInsets(Object key)
{
Object o = get(key);
return o instanceof Insets ? (Insets) o : null;
@@ -627,7 +627,7 @@ public class UIDefaults extends Hashtable<Object, Object>
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
- public Insets getInsets(Object key, Locale locale)
+ public Insets getInsets(Object key, Locale locale)
{
Object o = get(key, locale);
return o instanceof Insets ? (Insets) o : null;
@@ -641,7 +641,7 @@ public class UIDefaults extends Hashtable<Object, Object>
* @return the dimension entry for <code>key</code> or null if no such entry
* exists
*/
- public Dimension getDimension(Object key)
+ public Dimension getDimension(Object key)
{
Object o = get(key);
return o instanceof Dimension ? (Dimension) o : null;
@@ -656,7 +656,7 @@ public class UIDefaults extends Hashtable<Object, Object>
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
- public Dimension getDimension(Object key, Locale locale)
+ public Dimension getDimension(Object key, Locale locale)
{
Object o = get(key, locale);
return o instanceof Dimension ? (Dimension) o : null;
@@ -677,7 +677,7 @@ public class UIDefaults extends Hashtable<Object, Object>
String className = (String) get(id);
if (className == null)
return null;
- try
+ try
{
if (loader == null)
loader = ClassLoader.getSystemClassLoader();
@@ -733,7 +733,7 @@ public class UIDefaults extends Hashtable<Object, Object>
Method factory;
- try
+ try
{
factory = cls.getMethod ("createUI", new Class[] { JComponent.class } );
}
@@ -749,14 +749,14 @@ public class UIDefaults extends Hashtable<Object, Object>
}
catch (java.lang.reflect.InvocationTargetException ite)
{
- getUIError ("InvocationTargetException ("+ ite.getTargetException()
- +") calling createUI(...) on " + cls.toString ());
- return null;
+ getUIError ("InvocationTargetException ("+ ite.getTargetException()
+ +") calling createUI(...) on " + cls.toString ());
+ return null;
}
catch (Exception e)
{
getUIError ("exception calling createUI(...) on " + cls.toString ());
- return null;
+ return null;
}
}
@@ -800,7 +800,7 @@ public class UIDefaults extends Hashtable<Object, Object>
* @param newValue the new value
*/
protected void firePropertyChange(String property,
- Object oldValue, Object newValue)
+ Object oldValue, Object newValue)
{
propertyChangeSupport.firePropertyChange(property, oldValue, newValue);
}
diff --git a/javax/swing/UIManager.java b/javax/swing/UIManager.java
index 0369b6514..05a3fceda 100644
--- a/javax/swing/UIManager.java
+++ b/javax/swing/UIManager.java
@@ -1,4 +1,4 @@
-/* UIManager.java --
+/* UIManager.java --
Copyright (C) 2002, 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,22 +61,22 @@ import javax.swing.plaf.metal.MetalLookAndFeel;
public class UIManager implements Serializable
{
/**
- * Represents the basic information about a {@link LookAndFeel} (LAF), so
- * that a list of installed LAFs can be presented without actually loading
+ * Represents the basic information about a {@link LookAndFeel} (LAF), so
+ * that a list of installed LAFs can be presented without actually loading
* the LAF class(es).
*/
public static class LookAndFeelInfo
{
String name, clazz;
-
+
/**
* Creates a new instance.
- *
+ *
* @param name the look and feel name.
* @param clazz the look and feel class name.
*/
- public LookAndFeelInfo(String name,
- String clazz)
+ public LookAndFeelInfo(String name,
+ String clazz)
{
this.name = name;
this.clazz = clazz;
@@ -84,17 +84,17 @@ public class UIManager implements Serializable
/**
* Returns the name of the look and feel.
- *
+ *
* @return The name of the look and feel.
*/
public String getName()
{
return name;
}
-
+
/**
* Returns the fully qualified class name for the {@link LookAndFeel}.
- *
+ *
* @return The fully qualified class name for the {@link LookAndFeel}.
*/
public String getClassName()
@@ -151,20 +151,20 @@ public class UIManager implements Serializable
i++;
return val;
}
-
+
}
UIDefaults fallback;
/**
- * Creates a new <code>MultiplexUIDefaults</code> instance with
+ * Creates a new <code>MultiplexUIDefaults</code> instance with
* <code>d</code> as the fallback defaults.
- *
+ *
* @param d the fallback defaults (<code>null</code> not permitted).
*/
MultiplexUIDefaults(UIDefaults d)
{
- if (d == null)
+ if (d == null)
throw new NullPointerException();
fallback = d;
}
@@ -219,10 +219,10 @@ public class UIManager implements Serializable
/** The installed auxiliary look and feels. */
static LookAndFeel[] auxLookAndFeels;
-
+
/** The current look and feel. */
static LookAndFeel currentLookAndFeel;
-
+
static MultiplexUIDefaults currentUIDefaults;
static UIDefaults lookAndFeelDefaults;
@@ -234,7 +234,7 @@ public class UIManager implements Serializable
static
{
String defaultlaf = System.getProperty("swing.defaultlaf");
- try
+ try
{
if (defaultlaf != null)
{
@@ -288,7 +288,7 @@ public class UIManager implements Serializable
*
* @param listener the listener to remove
*/
- public static void removePropertyChangeListener(PropertyChangeListener
+ public static void removePropertyChangeListener(PropertyChangeListener
listener)
{
listeners.removePropertyChangeListener(listener);
@@ -308,11 +308,11 @@ public class UIManager implements Serializable
/**
* Add a {@link LookAndFeel} to the list of auxiliary look and feels.
- *
+ *
* @param laf the auxiliary look and feel (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>laf</code> is <code>null</code>.
- *
+ *
* @see #getAuxiliaryLookAndFeels()
*/
public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
@@ -325,18 +325,18 @@ public class UIManager implements Serializable
auxLookAndFeels[0] = laf;
return;
}
-
+
LookAndFeel[] temp = new LookAndFeel[auxLookAndFeels.length + 1];
- System.arraycopy(auxLookAndFeels, 0, temp, 0, auxLookAndFeels.length);
+ System.arraycopy(auxLookAndFeels, 0, temp, 0, auxLookAndFeels.length);
auxLookAndFeels = temp;
auxLookAndFeels[auxLookAndFeels.length - 1] = laf;
}
-
+
/**
* Removes a {@link LookAndFeel} (LAF) from the list of auxiliary LAFs.
- *
+ *
* @param laf the LAF to remove.
- *
+ *
* @return <code>true</code> if the LAF was removed, and <code>false</code>
* otherwise.
*/
@@ -357,32 +357,32 @@ public class UIManager implements Serializable
LookAndFeel[] temp = new LookAndFeel[auxLookAndFeels.length - 1];
if (i == 0)
{
- System.arraycopy(auxLookAndFeels, 1, temp, 0, count - 1);
+ System.arraycopy(auxLookAndFeels, 1, temp, 0, count - 1);
}
else if (i == count - 1)
{
System.arraycopy(auxLookAndFeels, 0, temp, 0, count - 1);
}
- else
+ else
{
System.arraycopy(auxLookAndFeels, 0, temp, 0, i);
- System.arraycopy(auxLookAndFeels, i + 1, temp, i,
+ System.arraycopy(auxLookAndFeels, i + 1, temp, i,
count - i - 1);
}
auxLookAndFeels = temp;
return true;
- }
+ }
}
return false;
}
/**
* Returns an array (possibly <code>null</code>) containing the auxiliary
- * {@link LookAndFeel}s that are in use. These are used by the
+ * {@link LookAndFeel}s that are in use. These are used by the
* {@link javax.swing.plaf.multi.MultiLookAndFeel} class.
- *
+ *
* @return The auxiliary look and feels (possibly <code>null</code>).
- *
+ *
* @see #addAuxiliaryLookAndFeel(LookAndFeel)
*/
public static LookAndFeel[] getAuxiliaryLookAndFeels()
@@ -393,9 +393,9 @@ public class UIManager implements Serializable
/**
* Returns an object from the {@link UIDefaults} table for the current
* {@link LookAndFeel}.
- *
+ *
* @param key the key.
- *
+ *
* @return The object.
*/
public static Object get(Object key)
@@ -406,11 +406,11 @@ public class UIManager implements Serializable
/**
* Returns an object from the {@link UIDefaults} table for the current
* {@link LookAndFeel}.
- *
+ *
* @param key the key.
- *
+ *
* @return The object.
- *
+ *
* @since 1.4
*/
public static Object get(Object key, Locale locale)
@@ -422,70 +422,70 @@ public class UIManager implements Serializable
* Returns a boolean value from the defaults table. If there is no value
* for the specified key, or the value is not an instance of {@link Boolean},
* this method returns <code>false</code>.
- *
+ *
* @param key the key (<code>null</code> not permitted).
*
* @return The boolean value associated with the specified key.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
- *
+ *
* @since 1.4
*/
public static boolean getBoolean(Object key)
{
Object value = get(key);
- if (value instanceof Boolean)
+ if (value instanceof Boolean)
return ((Boolean) value).booleanValue();
return false;
}
-
+
/**
* Returns a boolean value from the defaults table. If there is no value
* for the specified key, or the value is not an instance of {@link Boolean},
* this method returns <code>false</code>.
- *
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
*
* @return The boolean value associated with the specified key.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
- *
+ *
* @since 1.4
*/
public static boolean getBoolean(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Boolean)
+ if (value instanceof Boolean)
return ((Boolean) value).booleanValue();
return false;
}
-
+
/**
- * Returns a border from the defaults table.
- *
+ * Returns a border from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The border associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Border getBorder(Object key)
{
Object value = get(key);
- if (value instanceof Border)
+ if (value instanceof Border)
return (Border) value;
return null;
}
-
+
/**
- * Returns a border from the defaults table.
- *
+ * Returns a border from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The border associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*
* @since 1.4
@@ -493,44 +493,44 @@ public class UIManager implements Serializable
public static Border getBorder(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Border)
+ if (value instanceof Border)
return (Border) value;
return null;
}
-
+
/**
- * Returns a drawing color from the defaults table.
- *
+ * Returns a drawing color from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The color associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Color getColor(Object key)
{
Object value = get(key);
- if (value instanceof Color)
+ if (value instanceof Color)
return (Color) value;
return null;
}
/**
- * Returns a drawing color from the defaults table.
- *
+ * Returns a drawing color from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The color associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
- *
+ *
* @since 1.4
*/
public static Color getColor(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Color)
+ if (value instanceof Color)
return (Color) value;
return null;
}
@@ -538,17 +538,17 @@ public class UIManager implements Serializable
/**
* The fully qualified class name of the cross platform (Metal) look and feel.
* This string can be passed to Class.forName()
- *
+ *
* @return <code>"javax.swing.plaf.metal.MetalLookAndFeel"</code>
*/
public static String getCrossPlatformLookAndFeelClassName()
- {
+ {
return "javax.swing.plaf.metal.MetalLookAndFeel";
}
/**
- * Returns the default values for this look and feel.
- *
+ * Returns the default values for this look and feel.
+ *
* @return The {@link UIDefaults} for the current {@link LookAndFeel}.
*/
public static UIDefaults getDefaults()
@@ -559,37 +559,37 @@ public class UIManager implements Serializable
}
/**
- * Returns a dimension from the defaults table.
- *
+ * Returns a dimension from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The color associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Dimension getDimension(Object key)
{
Object value = get(key);
- if (value instanceof Dimension)
+ if (value instanceof Dimension)
return (Dimension) value;
return null;
}
/**
- * Returns a dimension from the defaults table.
- *
+ * Returns a dimension from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The color associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
* @since 1.4
*/
public static Dimension getDimension(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Dimension)
+ if (value instanceof Dimension)
return (Dimension) value;
return null;
}
@@ -601,15 +601,15 @@ public class UIManager implements Serializable
* @param key an Object that specifies the font. Typically,
* this is a String such as
* <code>TitledBorder.font</code>.
- *
+ *
* @return The font associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Font getFont(Object key)
{
Object value = get(key);
- if (value instanceof Font)
+ if (value instanceof Font)
return (Font) value;
return null;
}
@@ -622,65 +622,65 @@ public class UIManager implements Serializable
* this is a String such as
* <code>TitledBorder.font</code>.
* @param locale the locale.
- *
+ *
* @return The font associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
- *
+ *
* @since 1.4
*/
public static Font getFont(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Font)
+ if (value instanceof Font)
return (Font) value;
return null;
}
/**
- * Returns an icon from the defaults table.
- *
+ * Returns an icon from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The icon associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Icon getIcon(Object key)
{
Object value = get(key);
- if (value instanceof Icon)
+ if (value instanceof Icon)
return (Icon) value;
return null;
}
-
+
/**
- * Returns an icon from the defaults table.
- *
+ * Returns an icon from the defaults table.
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The icon associated with the given key, or <code>null</code>.
- *
+ *
* @throws NullPointerException if <code>key</code> is <code>null</code>.
* @since 1.4
*/
public static Icon getIcon(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Icon)
+ if (value instanceof Icon)
return (Icon) value;
return null;
}
-
+
/**
* Returns an Insets object from the defaults table.
- *
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The insets associated with the given key, or <code>null</code>.
- *
- * @throws NullPointerException if <code>key</code> is <code>null</code>.
+ *
+ * @throws NullPointerException if <code>key</code> is <code>null</code>.
*/
public static Insets getInsets(Object key)
{
@@ -693,13 +693,13 @@ public class UIManager implements Serializable
/**
* Returns an Insets object from the defaults table.
- *
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The insets associated with the given key, or <code>null</code>.
- *
- * @throws NullPointerException if <code>key</code> is <code>null</code>.
+ *
+ * @throws NullPointerException if <code>key</code> is <code>null</code>.
* @since 1.4
*/
public static Insets getInsets(Object key, Locale locale)
@@ -714,7 +714,7 @@ public class UIManager implements Serializable
/**
* Returns an array containing information about the {@link LookAndFeel}s
* that are installed.
- *
+ *
* @return A list of the look and feels that are available (installed).
*/
public static LookAndFeelInfo[] getInstalledLookAndFeels()
@@ -726,9 +726,9 @@ public class UIManager implements Serializable
* Returns the integer value of the {@link Integer} associated with the
* given key. If there is no value, or the value is not an instance of
* {@link Integer}, this method returns 0.
- *
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The integer value associated with the given key, or 0.
*/
public static int getInt(Object key)
@@ -743,12 +743,12 @@ public class UIManager implements Serializable
* Returns the integer value of the {@link Integer} associated with the
* given key. If there is no value, or the value is not an instance of
* {@link Integer}, this method returns 0.
- *
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The integer value associated with the given key, or 0.
- *
+ *
* @since 1.4
*/
public static int getInt(Object key, Locale locale)
@@ -761,9 +761,9 @@ public class UIManager implements Serializable
/**
* Returns the current look and feel (which may be <code>null</code>).
- *
+ *
* @return The current look and feel.
- *
+ *
* @see #setLookAndFeel(LookAndFeel)
*/
public static LookAndFeel getLookAndFeel()
@@ -774,7 +774,7 @@ public class UIManager implements Serializable
/**
* Returns the <code>UIDefaults</code> table of the currently active
* look and feel.
- *
+ *
* @return The {@link UIDefaults} for the current {@link LookAndFeel}.
*/
public static UIDefaults getLookAndFeelDefaults()
@@ -783,11 +783,11 @@ public class UIManager implements Serializable
}
/**
- * Returns the {@link String} associated with the given key. If the value
+ * Returns the {@link String} associated with the given key. If the value
* is not a {@link String}, this method returns <code>null</code>.
- *
+ *
* @param key the key (<code>null</code> not permitted).
- *
+ *
* @return The string associated with the given key, or <code>null</code>.
*/
public static String getString(Object key)
@@ -797,16 +797,16 @@ public class UIManager implements Serializable
return (String) s;
return null;
}
-
+
/**
- * Returns the {@link String} associated with the given key. If the value
+ * Returns the {@link String} associated with the given key. If the value
* is not a {@link String}, this method returns <code>null</code>.
- *
+ *
* @param key the key (<code>null</code> not permitted).
* @param locale the locale.
- *
+ *
* @return The string associated with the given key, or <code>null</code>.
- *
+ *
* @since 1.4
*/
public static String getString(Object key, Locale locale)
@@ -816,14 +816,14 @@ public class UIManager implements Serializable
return (String) s;
return null;
}
-
+
/**
* Returns the name of the {@link LookAndFeel} class that implements the
* native systems look and feel if there is one, otherwise the name
* of the default cross platform LookAndFeel class.
- *
+ *
* @return The fully qualified class name for the system look and feel.
- *
+ *
* @see #getCrossPlatformLookAndFeelClassName()
*/
public static String getSystemLookAndFeelClassName()
@@ -832,9 +832,9 @@ public class UIManager implements Serializable
}
/**
- * Returns UI delegate from the current {@link LookAndFeel} that renders the
+ * Returns UI delegate from the current {@link LookAndFeel} that renders the
* target component.
- *
+ *
* @param target the target component.
*/
public static ComponentUI getUI(JComponent target)
@@ -844,7 +844,7 @@ public class UIManager implements Serializable
/**
* Creates a new look and feel and adds it to the current array.
- *
+ *
* @param name the look and feel name.
* @param className the fully qualified name of the class that implements the
* look and feel.
@@ -868,7 +868,7 @@ public class UIManager implements Serializable
/**
* Stores an object in the defaults table.
- *
+ *
* @param key the key.
* @param value the value.
*/
@@ -884,15 +884,15 @@ public class UIManager implements Serializable
{
installed = infos;
}
-
+
/**
* Sets the current {@link LookAndFeel}.
- *
+ *
* @param newLookAndFeel the new look and feel (<code>null</code> permitted).
- *
- * @throws UnsupportedLookAndFeelException if the look and feel is not
+ *
+ * @throws UnsupportedLookAndFeelException if the look and feel is not
* supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public static void setLookAndFeel(LookAndFeel newLookAndFeel)
@@ -905,7 +905,7 @@ public class UIManager implements Serializable
if (oldLookAndFeel != null)
oldLookAndFeel.uninitialize();
- // Set the current default look and feel using a LookAndFeel object.
+ // Set the current default look and feel using a LookAndFeel object.
currentLookAndFeel = newLookAndFeel;
if (newLookAndFeel != null)
{
@@ -919,7 +919,7 @@ public class UIManager implements Serializable
}
else
{
- currentUIDefaults = null;
+ currentUIDefaults = null;
}
listeners.firePropertyChange("lookAndFeel", oldLookAndFeel, newLookAndFeel);
//revalidate();
@@ -928,12 +928,12 @@ public class UIManager implements Serializable
/**
* Set the current default look and feel using a class name.
- *
+ *
* @param className the look and feel class name.
- *
- * @throws UnsupportedLookAndFeelException if the look and feel is not
+ *
+ * @throws UnsupportedLookAndFeelException if the look and feel is not
* supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public static void setLookAndFeel(String className)
diff --git a/javax/swing/UnsupportedLookAndFeelException.java b/javax/swing/UnsupportedLookAndFeelException.java
index b65119a00..74c6ac8bd 100644
--- a/javax/swing/UnsupportedLookAndFeelException.java
+++ b/javax/swing/UnsupportedLookAndFeelException.java
@@ -1,4 +1,4 @@
-/* UnsupportedLookAndFeelException.java --
+/* UnsupportedLookAndFeelException.java --
Copyright (C) 2002, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,14 +40,14 @@ package javax.swing;
/**
* Thrown by the {@link UIManager#setLookAndFeel(LookAndFeel)} method when the
* specified look and feel is not supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public class UnsupportedLookAndFeelException extends Exception
{
/**
* Creates a new exception instance with the specified message.
- *
+ *
* @param s the exception message.
*/
public UnsupportedLookAndFeelException(String s)
diff --git a/javax/swing/ViewportLayout.java b/javax/swing/ViewportLayout.java
index b61834e9e..02f9626ad 100644
--- a/javax/swing/ViewportLayout.java
+++ b/javax/swing/ViewportLayout.java
@@ -46,13 +46,13 @@ import java.awt.Rectangle;
import java.io.Serializable;
/**
- * The default layout for {@link JViewport}. The viewport makes its view the
- * same size as itself, but not smaller than its minimum size.
- *
+ * The default layout for {@link JViewport}. The viewport makes its view the
+ * same size as itself, but not smaller than its minimum size.
+ *
* If the port extends extends into space <em>past</em> the edge of the view,
* this layout manager moves the port up or to the left, in view space, by the
* amount of empty space (keep the lower and right edges lined up).
- *
+ *
* @author Andrew Selkirk
* @author Graydon Hoare
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
@@ -61,15 +61,15 @@ public class ViewportLayout implements LayoutManager, Serializable
{
private static final long serialVersionUID = -788225906076097229L;
- public ViewportLayout()
+ public ViewportLayout()
{
// Nothing to do here.
}
-
+
/**
* The method is not used with this manager.
*/
- public void addLayoutComponent(String name, Component c)
+ public void addLayoutComponent(String name, Component c)
{
// Nothing to do here.
}
@@ -77,20 +77,20 @@ public class ViewportLayout implements LayoutManager, Serializable
/**
* The method is not used with this manager.
*/
- public void removeLayoutComponent(Component c)
+ public void removeLayoutComponent(Component c)
{
// Nothing to do here.
}
-
+
/**
* Get the preferred layout size. If the view implements
- * {@link Scrollable}, this method returns
+ * {@link Scrollable}, this method returns
* {@link Scrollable#getPreferredScrollableViewportSize}.
* Otherwise, it returns {@link Component#getPreferredSize()}.
- *
+ *
* @return the preferred layout size, as described about.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
JViewport vp = (JViewport)parent;
Component view = vp.getView();
@@ -107,13 +107,13 @@ public class ViewportLayout implements LayoutManager, Serializable
/**
* Get the minimum layout size. Normally this method returns the value,
* returned by the view method {@link Component#getMinimumSize()}.
- *
- * If the view is not set, the zero size is returned.
+ *
+ * If the view is not set, the zero size is returned.
*
* @param parent the viewport
* @return the minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
// These values have been determined by the Mauve test for this method.
return new Dimension(4, 4);
@@ -132,7 +132,7 @@ public class ViewportLayout implements LayoutManager, Serializable
* <li>In {@link JViewport#setViewSize(Dimension)}, the view size is never
* set smaller that its minimum size.</li>
* </ol>
- *
+ *
* @see JViewport#getViewSize
* @see JViewport#setViewSize
* @see JViewport#getViewPosition
diff --git a/javax/swing/WindowConstants.java b/javax/swing/WindowConstants.java
index 598a61e14..63ec2cbb5 100644
--- a/javax/swing/WindowConstants.java
+++ b/javax/swing/WindowConstants.java
@@ -38,14 +38,14 @@ exception statement from your version. */
package javax.swing;
/**
- * Defines some constants that are used in Swing's top-level containers. See
+ * Defines some constants that are used in Swing's top-level containers. See
* the following methods:
* <ul>
* <li>{@link JFrame#setDefaultCloseOperation(int)};</li>
* <li>{@link JInternalFrame#setDefaultCloseOperation(int)};</li>
* <li>{@link JDialog#setDefaultCloseOperation(int)};</li>
* </ul>
- *
+ *
* @author Andrew Selkirk
*/
public interface WindowConstants
@@ -62,16 +62,16 @@ public interface WindowConstants
/**
* Dispose the container when it is closed.
- *
+ *
* @see Window#dispose()
*/
int DISPOSE_ON_CLOSE = 2;
/**
* Exit the application when the container is closed.
- *
+ *
* @see System#exit(int)
- *
+ *
* @since 1.4
*/
int EXIT_ON_CLOSE = 3;
diff --git a/javax/swing/border/AbstractBorder.java b/javax/swing/border/AbstractBorder.java
index 16bb238c3..f75bcbbc2 100644
--- a/javax/swing/border/AbstractBorder.java
+++ b/javax/swing/border/AbstractBorder.java
@@ -1,4 +1,4 @@
-/* AbstractBorder.java --
+/* AbstractBorder.java --
Copyright (C) 2003, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -87,10 +87,10 @@ public abstract class AbstractBorder implements Border, Serializable
}
/**
- * Returns the insets required for drawing this border around the specified
+ * Returns the insets required for drawing this border around the specified
* component.
*
- * @param c the component that the border applies to (ignored here,
+ * @param c the component that the border applies to (ignored here,
* subclasses may use it).
*
* @return an Insets object whose <code>left</code>, <code>right</code>,
@@ -106,25 +106,25 @@ public abstract class AbstractBorder implements Border, Serializable
}
/**
- * Returns the insets required for drawing this border around the specified
- * component. The default implementation provided here sets the
- * <code>left</code>, <code>right</code>, <code>top</code> and
- * <code>bottom</code> fields of the passed <code>insets</code> parameter to
+ * Returns the insets required for drawing this border around the specified
+ * component. The default implementation provided here sets the
+ * <code>left</code>, <code>right</code>, <code>top</code> and
+ * <code>bottom</code> fields of the passed <code>insets</code> parameter to
* zero.
*
- * @param c the component that the border applies to (ignored here,
+ * @param c the component that the border applies to (ignored here,
* subclasses may use it).
- * @param insets an instance that will be overwritten and returned as the
- * result (<code>null</code> not permitted).
+ * @param insets an instance that will be overwritten and returned as the
+ * result (<code>null</code> not permitted).
*
- * @return The border insets (the same object that was passed as the
+ * @return The border insets (the same object that was passed as the
* <code>insets</code> argument).
*
* @see #getBorderInsets(Component)
- *
+ *
* @throws NullPointerException if <code>insets</code> is <code>null</code>.
*/
- public Insets getBorderInsets(Component c, Insets insets)
+ public Insets getBorderInsets(Component c, Insets insets)
{
insets.left = insets.right = insets.top = insets.bottom = 0;
return insets;
@@ -139,14 +139,14 @@ public abstract class AbstractBorder implements Border, Serializable
*
* @return <code>false</code>.
*/
- public boolean isBorderOpaque()
+ public boolean isBorderOpaque()
{
return false;
}
/**
- * Returns a rectangle that covers the specified area minus the insets
- * required to draw this border. Components that wish to determine an area
+ * Returns a rectangle that covers the specified area minus the insets
+ * required to draw this border. Components that wish to determine an area
* into which they can safely draw without intersecting with a border might
* want to use this helper method.
*
@@ -155,7 +155,7 @@ public abstract class AbstractBorder implements Border, Serializable
* @param y the vertical position of the border.
* @param width the width of the available area for the border.
* @param height the height of the available area for the border.
- *
+ *
* @return The interior rectangle.
*/
public Rectangle getInteriorRectangle(Component c, int x, int y, int width,
@@ -163,12 +163,12 @@ public abstract class AbstractBorder implements Border, Serializable
{
return getInteriorRectangle(c, this, x, y, width, height);
}
-
+
/**
- * Returns a rectangle that covers the specified area minus the insets
+ * Returns a rectangle that covers the specified area minus the insets
* required to draw the specified border (if the border is <code>null</code>,
- * zero insets are assumed). Components that wish to determine an area into
- * which they can safely draw without intersecting with a border might want
+ * zero insets are assumed). Components that wish to determine an area into
+ * which they can safely draw without intersecting with a border might want
* to use this helper method.
*
* @param c the component in the center of this border.
@@ -177,7 +177,7 @@ public abstract class AbstractBorder implements Border, Serializable
* @param y the vertical position of the border.
* @param width the width of the available area for the border.
* @param height the height of the available area for the border.
- *
+ *
* @return The interior rectangle.
*/
public static Rectangle getInteriorRectangle(Component c, Border b, int x,
diff --git a/javax/swing/border/BevelBorder.java b/javax/swing/border/BevelBorder.java
index 5b4761e9e..b91961d66 100644
--- a/javax/swing/border/BevelBorder.java
+++ b/javax/swing/border/BevelBorder.java
@@ -1,4 +1,4 @@
-/* BevelBorder.java --
+/* BevelBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,12 +76,12 @@ public class BevelBorder extends AbstractBorder
* pressed into the screen.
*/
public static final int LOWERED = 1;
-
+
/**
* The type of this BevelBorder, which is either {@link #RAISED}
* or {@link #LOWERED}.
- */
+ */
protected int bevelType;
@@ -296,7 +296,7 @@ public class BevelBorder extends AbstractBorder
return insets;
}
-
+
/**
* Determines the color that will be used for the outer side of
* highlighted edges when painting the border. If a highlight color
@@ -306,7 +306,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see #getHighlightInnerColor(java.awt.Component)
* @see java.awt.Color#brighter()
*/
@@ -329,7 +329,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#brighter()
*/
@@ -352,7 +352,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#darker()
*/
@@ -374,7 +374,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see #getShadowInnerColor(java.awt.Component)
* @see java.awt.Color#darker()
*/
@@ -392,7 +392,7 @@ public class BevelBorder extends AbstractBorder
* highlighted edges when painting the border, or <code>null</code>
* if that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly <code>null</code>).
*/
public Color getHighlightOuterColor()
@@ -406,7 +406,7 @@ public class BevelBorder extends AbstractBorder
* highlighted edges when painting the border, or <code>null</code>
* if that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly <code>null</code>).
*/
public Color getHighlightInnerColor()
@@ -420,7 +420,7 @@ public class BevelBorder extends AbstractBorder
* shadowed edges when painting the border, or <code>null</code> if
* that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly <code>null</code>).
*/
public Color getShadowInnerColor()
@@ -434,19 +434,19 @@ public class BevelBorder extends AbstractBorder
* shadowed edges when painting the border, or <code>null</code> if
* that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly <code>null</code>).
*/
public Color getShadowOuterColor()
{
return shadowOuter;
}
-
-
+
+
/**
* Returns the appearance of this border, which is either {@link
* #RAISED} or {@link #LOWERED}.
- *
+ *
* @return The bevel type ({@link #RAISED} or {@link #LOWERED}).
*/
public int getBevelType()
@@ -475,7 +475,7 @@ public class BevelBorder extends AbstractBorder
* because Color.brighten() and Color.darken() always return an
* opaque color.
*/
- return
+ return
((highlightOuter == null) || (highlightOuter.getAlpha() == 255))
&& ((highlightInner == null) || (highlightInner.getAlpha() == 255))
&& ((shadowInner == null) || (shadowInner.getAlpha() == 255))
@@ -523,7 +523,7 @@ public class BevelBorder extends AbstractBorder
/**
* Paints a two-pixel bevel in four colors.
- *
+ *
* <pre>
* ++++++++++++
* +..........# + = color a
@@ -582,4 +582,3 @@ public class BevelBorder extends AbstractBorder
}
}
}
-
diff --git a/javax/swing/border/Border.java b/javax/swing/border/Border.java
index f4af3fb38..da25832ad 100644
--- a/javax/swing/border/Border.java
+++ b/javax/swing/border/Border.java
@@ -1,4 +1,4 @@
-/* Border.java --
+/* Border.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,7 +79,7 @@ public interface Border
*/
void paintBorder(Component c, Graphics g, int x, int y, int width,
int height);
-
+
/**
* Measures the width of this border.
*
@@ -90,7 +90,7 @@ public interface Border
* width of the border at the respective edge.
*/
Insets getBorderInsets(Component c);
-
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
diff --git a/javax/swing/border/CompoundBorder.java b/javax/swing/border/CompoundBorder.java
index ba2e745aa..d811150ba 100644
--- a/javax/swing/border/CompoundBorder.java
+++ b/javax/swing/border/CompoundBorder.java
@@ -1,4 +1,4 @@
-/* CompoundBorder.java --
+/* CompoundBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -115,7 +115,7 @@ public class CompoundBorder extends AbstractBorder
*/
public boolean isBorderOpaque()
{
- // Although the API specification states that this method
+ // Although the API specification states that this method
// returns true if both the inside and outside borders are non-null
// and opaque, and false otherwise, a mauve test shows that if both
// the inside or outside borders are null, then true is returned.
@@ -137,7 +137,7 @@ public class CompoundBorder extends AbstractBorder
/**
* Paints the compound border by first painting the outside border,
- * then painting the inside border tightly nested into the outside.
+ * then painting the inside border tightly nested into the outside.
*
* @param c the component whose border is to be painted.
* @param g the graphics for painting.
@@ -233,7 +233,7 @@ public class CompoundBorder extends AbstractBorder
* Returns the outside border, which is painted outside both the
* bordered Component and the inside border. It is valid for the
* result to be <code>null</code>.
- *
+ *
* @return The outside border (possibly <code>null</code>).
*/
public Border getOutsideBorder()
@@ -245,7 +245,7 @@ public class CompoundBorder extends AbstractBorder
* Returns the inside border, which is painted between the bordered
* Component and the outside border. It is valid for the result to
* be <code>null</code>.
- *
+ *
* @return The inside border (possibly <code>null</code>).
*/
public Border getInsideBorder()
diff --git a/javax/swing/border/EmptyBorder.java b/javax/swing/border/EmptyBorder.java
index c8e9c6044..da6651163 100644
--- a/javax/swing/border/EmptyBorder.java
+++ b/javax/swing/border/EmptyBorder.java
@@ -1,4 +1,4 @@
-/* EmptyBorder.java --
+/* EmptyBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -202,8 +202,8 @@ public class EmptyBorder extends AbstractBorder
{
return getBorderInsets(null, null);
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting. Since an empty border does not paint any pixels
diff --git a/javax/swing/border/EtchedBorder.java b/javax/swing/border/EtchedBorder.java
index cd48b18da..e9ee9e218 100644
--- a/javax/swing/border/EtchedBorder.java
+++ b/javax/swing/border/EtchedBorder.java
@@ -1,4 +1,4 @@
-/* EtchedBorder.java --
+/* EtchedBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,8 +63,8 @@ public class EtchedBorder extends AbstractBorder
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = 4001244046866360638L;
-
-
+
+
/**
* Indicates that the border appears as coming out of the
* background.
@@ -78,13 +78,13 @@ public class EtchedBorder extends AbstractBorder
*/
public static final int LOWERED = 1;
-
+
/**
* The type of this EtchedBorder, which is either {@link #RAISED}
* or {@link #LOWERED}.
*/
protected int etchType;
-
+
/**
* The highlight color, or <code>null</code> to indicate that the
@@ -139,8 +139,8 @@ public class EtchedBorder extends AbstractBorder
* assign a value here.
*/
}
-
-
+
+
/**
* Constructs a lowered EtchedBorder, explicitly selecting the
* colors that will be used for highlight and shadow.
@@ -157,8 +157,8 @@ public class EtchedBorder extends AbstractBorder
{
this(LOWERED, highlight, shadow);
}
-
-
+
+
/**
* Constructs an EtchedBorder with the specified appearance,
* explicitly selecting the colors that will be used for
@@ -186,8 +186,8 @@ public class EtchedBorder extends AbstractBorder
this.highlight = highlight;
this.shadow = shadow;
}
-
-
+
+
/**
* Paints the border for a given component.
*
@@ -214,8 +214,8 @@ public class EtchedBorder extends AbstractBorder
break;
}
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -277,11 +277,11 @@ public class EtchedBorder extends AbstractBorder
((highlight == null) || (highlight.getAlpha() == 255))
&& ((shadow == null) || (shadow.getAlpha() == 255));
}
-
+
/**
* Returns the appearance of this EtchedBorder, which is either
* {@link #RAISED} or {@link #LOWERED}.
- *
+ *
* @return The type ({@link #RAISED} or {@link #LOWERED}).
*/
public int getEtchType()
@@ -300,7 +300,7 @@ public class EtchedBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#brighter()
*/
@@ -316,7 +316,7 @@ public class EtchedBorder extends AbstractBorder
* Returns the color that will be used for highlighted parts when
* painting the border, or <code>null</code> if that color will be
* derived from the background of the enclosed Component.
- *
+ *
* @return The highlight color (possibly <code>null</code>).
*/
public Color getHighlightColor()
@@ -335,7 +335,7 @@ public class EtchedBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The shadow color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#darker()
*/
@@ -346,13 +346,13 @@ public class EtchedBorder extends AbstractBorder
else
return c.getBackground().darker();
}
-
-
+
+
/**
* Returns the color that will be used for shadowed parts when
* painting the border, or <code>null</code> if that color will be
* derived from the background of the enclosed Component.
- *
+ *
* @return The shadow color (possibly <code>null</code>).
*/
public Color getShadowColor()
diff --git a/javax/swing/border/LineBorder.java b/javax/swing/border/LineBorder.java
index 31e19fe1f..e78bbee3b 100644
--- a/javax/swing/border/LineBorder.java
+++ b/javax/swing/border/LineBorder.java
@@ -1,4 +1,4 @@
-/* LineBorder.java --
+/* LineBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -121,12 +121,12 @@ public class LineBorder extends AbstractBorder
{
this (color, thickness, /* roundedCorners */ false);
}
-
-
+
+
/**
* Constructs a LineBorder given its color, thickness, and whether
* it has rounded corners.
- *
+ *
* <p><img src="doc-files/LineBorder-1.png" width="500" height="200"
* alt="[An illustration of two LineBorders]" />
*
@@ -159,12 +159,12 @@ public class LineBorder extends AbstractBorder
this.thickness = thickness;
this.roundedCorners = roundedCorners;
}
-
-
+
+
/**
* Returns a black, one pixel thick, plain {@link LineBorder}. The method
* may always return the same (singleton) {@link LineBorder} instance.
- *
+ *
* @return The border.
*/
public static Border createBlackLineBorder()
@@ -174,15 +174,15 @@ public class LineBorder extends AbstractBorder
*/
if (blackLineBorder == null)
blackLineBorder = new LineBorder(Color.black);
-
+
return blackLineBorder;
}
-
-
+
+
/**
* Returns a gray, one pixel thick, plain {@link LineBorder}. The method
* may always return the same (singleton) {@link LineBorder} instance.
- *
+ *
* @return The border.
*/
public static Border createGrayLineBorder()
@@ -192,11 +192,11 @@ public class LineBorder extends AbstractBorder
*/
if (grayLineBorder == null)
grayLineBorder = new LineBorder(Color.gray);
-
+
return grayLineBorder;
}
-
-
+
+
/**
* Paints the line border around a given Component.
*
@@ -255,8 +255,8 @@ public class LineBorder extends AbstractBorder
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -273,8 +273,8 @@ public class LineBorder extends AbstractBorder
{
return new Insets(thickness, thickness, thickness, thickness);
}
-
-
+
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -295,30 +295,30 @@ public class LineBorder extends AbstractBorder
insets.left = insets.right = insets.top = insets.bottom = thickness;
return insets;
}
-
-
+
+
/**
* Returns the color of the line.
- *
+ *
* @return The line color (never <code>null</code>).
*/
public Color getLineColor()
{
return lineColor;
}
-
-
+
+
/**
* Returns the thickness of the line in pixels.
- *
+ *
* @return The line thickness (in pixels).
*/
public int getThickness()
{
return thickness;
}
-
-
+
+
/**
* Returns whether this LineBorder os drawm with rounded
* or with plain corners.
@@ -330,8 +330,8 @@ public class LineBorder extends AbstractBorder
{
return roundedCorners;
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
diff --git a/javax/swing/border/MatteBorder.java b/javax/swing/border/MatteBorder.java
index 944cd2866..c0c2d7760 100644
--- a/javax/swing/border/MatteBorder.java
+++ b/javax/swing/border/MatteBorder.java
@@ -1,4 +1,4 @@
-/* MatteBorder.java --
+/* MatteBorder.java --
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,8 +61,8 @@ public class MatteBorder extends EmptyBorder
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = 4422248989617298224L;
-
-
+
+
/**
* The color that is used for filling the border, or
* <code>null</code> if the border is filled with repetitions of a
@@ -71,8 +71,8 @@ public class MatteBorder extends EmptyBorder
* @see #tileIcon
*/
protected Color color;
-
-
+
+
/**
* The icon is used for filling the border with a tile, or
* <code>null</code> if the border is filled with a solid
@@ -81,8 +81,8 @@ public class MatteBorder extends EmptyBorder
* @see #color
*/
protected Icon tileIcon;
-
-
+
+
/**
* Constructs a MatteBorder given the width on each side
* and a fill color.
@@ -171,8 +171,8 @@ public class MatteBorder extends EmptyBorder
borderInsets.bottom, borderInsets.right,
tileIcon);
}
-
-
+
+
/**
* Constructs a MatteBorder given an icon for tiling the
* border area. The icon width is used for the border insets
@@ -188,8 +188,8 @@ public class MatteBorder extends EmptyBorder
{
this(-1, -1, -1, -1, tileIcon);
}
-
-
+
+
/**
* Paints the border for a given component.
*
@@ -215,8 +215,8 @@ public class MatteBorder extends EmptyBorder
i.right, height - i.bottom,
width - i.right, i.top);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -236,8 +236,8 @@ public class MatteBorder extends EmptyBorder
*/
return this.getBorderInsets(c, null);
}
-
-
+
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -271,8 +271,8 @@ public class MatteBorder extends EmptyBorder
*/
return super.getBorderInsets(c, insets);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -290,34 +290,34 @@ public class MatteBorder extends EmptyBorder
*/
return this.getBorderInsets(null, null);
}
-
-
+
+
/**
* Returns the color that is used for filling the border, or
* <code>null</code> if the border is filled with repetitions of a
* tile icon.
- *
+ *
* @return The color (possibly <code>null</code>).
*/
public Color getMatteColor()
{
return color;
}
-
-
+
+
/**
* Returns the icon is used for tiling the border, or
* <code>null</code> if the border is filled with a color instead of
* an icon.
- *
+ *
* @return The icon (possibly <code>null</code>).
*/
public Icon getTileIcon()
{
return tileIcon;
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
@@ -330,7 +330,7 @@ public class MatteBorder extends EmptyBorder
{
return (color != null) && (color.getAlpha() == 255);
}
-
+
/**
* Paints a rectangular area of the border. This private helper
@@ -372,7 +372,7 @@ public class MatteBorder extends EmptyBorder
}
return;
}
-
+
// If this border has no icon end painting here.
if (tileIcon == null)
return;
diff --git a/javax/swing/border/SoftBevelBorder.java b/javax/swing/border/SoftBevelBorder.java
index 028fd00e0..c0c9ae811 100644
--- a/javax/swing/border/SoftBevelBorder.java
+++ b/javax/swing/border/SoftBevelBorder.java
@@ -1,4 +1,4 @@
-/* SoftBevelBorder.java --
+/* SoftBevelBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -242,7 +242,7 @@ public class SoftBevelBorder extends BevelBorder
return insets;
}
-
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
@@ -261,7 +261,7 @@ public class SoftBevelBorder extends BevelBorder
/**
* Paints a soft bevel in four colors.
- *
+ *
* <pre>
* +++++++++++.
* ++.........# + = color a
diff --git a/javax/swing/border/TitledBorder.java b/javax/swing/border/TitledBorder.java
index 38ccd720f..4d4f3af7d 100644
--- a/javax/swing/border/TitledBorder.java
+++ b/javax/swing/border/TitledBorder.java
@@ -1,4 +1,4 @@
-/* TitledBorder.java --
+/* TitledBorder.java --
Copyright (C) 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -241,7 +241,7 @@ public class TitledBorder extends AbstractBorder
* on MacOS X 10.1.5.
*/
static final long serialVersionUID = 8012999415147721601L;
-
+
/**
* The title, or <code>null</code> to display no title.
@@ -257,7 +257,7 @@ public class TitledBorder extends AbstractBorder
*/
protected Border border;
-
+
/**
* The vertical position of the title text relative to the border,
* which is one of {@link #ABOVE_TOP}, {@link #TOP}, {@link
@@ -318,7 +318,7 @@ public class TitledBorder extends AbstractBorder
this(border, /* title */ "", LEADING, TOP,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border and title text.
@@ -334,7 +334,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, LEADING, TOP,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -350,7 +350,7 @@ public class TitledBorder extends AbstractBorder
* text in relation to the border. The value must be one of
* {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING},
* {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}.
-
+
* @param titlePosition the vertical position of the title text
* in relation to the border. The value must be one of
* {@link #ABOVE_TOP}, {@link #TOP}, {@link #BELOW_TOP},
@@ -366,7 +366,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, titleJustification, titlePosition,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -401,7 +401,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, titleJustification, titlePosition, titleFont,
/* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -448,8 +448,8 @@ public class TitledBorder extends AbstractBorder
this.titleFont = titleFont;
this.titleColor = titleColor;
}
-
-
+
+
/**
* Paints the border and the title text.
*
@@ -460,7 +460,7 @@ public class TitledBorder extends AbstractBorder
* @param width the width of the available area for painting the border.
* @param height the height of the available area for painting the border.
*/
- public void paintBorder(Component c, Graphics g,
+ public void paintBorder(Component c, Graphics g,
int x, int y, int width, int height)
{
Rectangle borderRect = new Rectangle(x + EDGE_SPACING, y + EDGE_SPACING,
@@ -666,7 +666,7 @@ public class TitledBorder extends AbstractBorder
borderRect.width,
borderRect.height);
}
-
+
}
else
{
@@ -683,7 +683,7 @@ public class TitledBorder extends AbstractBorder
borderRect.width,
borderRect.height);
}
-
+
}
g.setClip(saved);
}
@@ -710,7 +710,7 @@ public class TitledBorder extends AbstractBorder
{
return getBorderInsets(c, new Insets(0, 0, 0, 0));
}
-
+
/**
* Measures the width of this border, storing the results into a
@@ -795,8 +795,8 @@ public class TitledBorder extends AbstractBorder
}
return insets;
}
-
-
+
+
/**
* Returns <code>false</code>, indicating that there are pixels inside
* the area of this border where the background shines through.
@@ -961,7 +961,7 @@ public class TitledBorder extends AbstractBorder
public void setTitlePosition(int titlePosition)
{
if ((titlePosition < DEFAULT_POSITION) || (titlePosition > BELOW_BOTTOM))
- throw new IllegalArgumentException(titlePosition
+ throw new IllegalArgumentException(titlePosition
+ " is not a valid title position.");
// Swing borders are not JavaBeans, thus no need to fire an event.
@@ -983,7 +983,7 @@ public class TitledBorder extends AbstractBorder
{
if ((titleJustification < DEFAULT_JUSTIFICATION)
|| (titleJustification > TRAILING))
- throw new IllegalArgumentException(titleJustification
+ throw new IllegalArgumentException(titleJustification
+ " is not a valid title justification.");
// Swing borders are not JavaBeans, thus no need to fire an event.
@@ -1027,7 +1027,7 @@ public class TitledBorder extends AbstractBorder
*
* @param c the Component for which this TitledBorder constitutes
* a border.
- *
+ *
* @return The minimum size.
*/
public Dimension getMinimumSize(Component c)
diff --git a/javax/swing/colorchooser/AbstractColorChooserPanel.java b/javax/swing/colorchooser/AbstractColorChooserPanel.java
index efb527725..a554208ad 100644
--- a/javax/swing/colorchooser/AbstractColorChooserPanel.java
+++ b/javax/swing/colorchooser/AbstractColorChooserPanel.java
@@ -77,9 +77,9 @@ public abstract class AbstractColorChooserPanel extends JPanel
/**
* Returns the key code for the mnemonic for this panel. This method returns
* zero to indicate no mnemonic, subclasses can override this.
- *
+ *
* @return <code>0</code>, to indicate no mnemonic key code.
- *
+ *
* @see #getDisplayedMnemonicIndex()
* @since 1.4
*/
@@ -87,14 +87,14 @@ public abstract class AbstractColorChooserPanel extends JPanel
{
return 0;
}
-
+
/**
- * Returns the index of the character in the display name that is the
+ * Returns the index of the character in the display name that is the
* mnemonic. This method returns <code>-1</code> to indicate no mnemonic,
* subclasses can override.
- *
+ *
* @return <code>-1</code>, to indicate no mnemonic.
- *
+ *
* @see #getDisplayName()
* @see #getMnemonic()
* @since 1.4
@@ -103,7 +103,7 @@ public abstract class AbstractColorChooserPanel extends JPanel
{
return -1;
}
-
+
/**
* This method updates the chooser panel when the JColorChooser's color has
* changed.
diff --git a/javax/swing/colorchooser/ColorChooserComponentFactory.java b/javax/swing/colorchooser/ColorChooserComponentFactory.java
index 923ea531f..ef8ea21f1 100644
--- a/javax/swing/colorchooser/ColorChooserComponentFactory.java
+++ b/javax/swing/colorchooser/ColorChooserComponentFactory.java
@@ -64,7 +64,7 @@ public class ColorChooserComponentFactory
*/
public static AbstractColorChooserPanel[] getDefaultChooserPanels()
{
- AbstractColorChooserPanel[] values =
+ AbstractColorChooserPanel[] values =
{
new DefaultSwatchChooserPanel(),
new DefaultHSBChooserPanel(),
diff --git a/javax/swing/colorchooser/ColorSelectionModel.java b/javax/swing/colorchooser/ColorSelectionModel.java
index b660505fc..7831e4790 100644
--- a/javax/swing/colorchooser/ColorSelectionModel.java
+++ b/javax/swing/colorchooser/ColorSelectionModel.java
@@ -47,22 +47,22 @@ import javax.swing.event.ChangeListener;
/**
* A model that is used by the {@link JColorChooser} component to represent the
* selected color.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
-public interface ColorSelectionModel
+public interface ColorSelectionModel
{
/**
* Returns the selected color.
- *
+ *
* @return The selected color.
*/
Color getSelectedColor();
/**
* Sets the selected color.
- *
+ *
* @param color the selected color.
*/
void setSelectedColor(Color color);
@@ -70,13 +70,13 @@ public interface ColorSelectionModel
/**
* Registers a listener to receive {@link ChangeEvent} notifications
* from this model.
- *
+ *
* @param listener the listener.
*/
void addChangeListener(ChangeListener listener);
/**
- * Deregisters a listener so that it no longer receives {@link ChangeEvent}
+ * Deregisters a listener so that it no longer receives {@link ChangeEvent}
* notifications from this action.
*
* @param listener the listener.
diff --git a/javax/swing/colorchooser/DefaultColorSelectionModel.java b/javax/swing/colorchooser/DefaultColorSelectionModel.java
index aae2bed68..07493f6d6 100644
--- a/javax/swing/colorchooser/DefaultColorSelectionModel.java
+++ b/javax/swing/colorchooser/DefaultColorSelectionModel.java
@@ -113,8 +113,8 @@ public class DefaultColorSelectionModel implements ColorSelectionModel,
throw new Error("ColorSelectionModel cannot be set to have null color.");
if (color != selectedColor)
{
- this.selectedColor = color;
- fireStateChanged();
+ this.selectedColor = color;
+ fireStateChanged();
}
}
diff --git a/javax/swing/colorchooser/DefaultHSBChooserPanel.java b/javax/swing/colorchooser/DefaultHSBChooserPanel.java
index 112d02166..d035fe194 100644
--- a/javax/swing/colorchooser/DefaultHSBChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultHSBChooserPanel.java
@@ -206,7 +206,7 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
{
Point p = e.getPoint();
if (p.x < 0 || p.y < 0 || p.y > imgHeight || p.x > imgWidth)
- return;
+ return;
gradientPoint = p;
update(p);
@@ -231,11 +231,11 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
{
handlingMouse = true;
if (hSpinner.isEnabled())
- updateH(p);
+ updateH(p);
else if (sSpinner.isEnabled())
- updateS(p);
+ updateS(p);
else
- updateB(p);
+ updateB(p);
handlingMouse = false;
}
@@ -309,21 +309,21 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (internalChange)
- return;
+ return;
Integer value = new Integer(slider.getValue());
switch (locked)
{
- case HLOCKED:
- hSpinner.setValue(value);
- break;
- case SLOCKED:
- sSpinner.setValue(value);
- break;
- case BLOCKED:
- bSpinner.setValue(value);
- break;
+ case HLOCKED:
+ hSpinner.setValue(value);
+ break;
+ case SLOCKED:
+ sSpinner.setValue(value);
+ break;
+ case BLOCKED:
+ bSpinner.setValue(value);
+ break;
}
}
}
@@ -344,18 +344,18 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
JSpinner change;
if (e.getSource() == hRadio)
{
- locked = HLOCKED;
- change = hSpinner;
+ locked = HLOCKED;
+ change = hSpinner;
}
else if (e.getSource() == sRadio)
{
- locked = SLOCKED;
- change = sSpinner;
+ locked = SLOCKED;
+ change = sSpinner;
}
else
{
- locked = BLOCKED;
- change = bSpinner;
+ locked = BLOCKED;
+ change = bSpinner;
}
change.setEnabled(((AbstractButton) e.getSource()).isSelected());
@@ -380,7 +380,7 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (internalChange)
- return;
+ return;
float h = ((Number) hSpinner.getValue()).intValue() / 360f;
float s = ((Number) sSpinner.getValue()).intValue() / 100f;
@@ -393,8 +393,8 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
if (! handlingMouse && slider != null && ! slider.getValueIsAdjusting())
{
- updateImage();
- updateTrack();
+ updateImage();
+ updateTrack();
}
repaint();
}
@@ -435,44 +435,44 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
if (! spinnerTrigger)
{
- hSpinner.setValue(new Integer((int) (hsbVals[0] * 360)));
- sSpinner.setValue(new Integer((int) (hsbVals[1] * 100)));
- bSpinner.setValue(new Integer((int) (hsbVals[2] * 100)));
+ hSpinner.setValue(new Integer((int) (hsbVals[0] * 360)));
+ sSpinner.setValue(new Integer((int) (hsbVals[1] * 100)));
+ bSpinner.setValue(new Integer((int) (hsbVals[2] * 100)));
}
switch (locked)
{
case HLOCKED:
- if (slider != null)
- slider.setValue(((Number) hSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) ((1
- - ((Number) sSpinner.getValue()).intValue() / 100f) * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) hSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) ((1
+ - ((Number) sSpinner.getValue()).intValue() / 100f) * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
case SLOCKED:
- if (slider != null)
- slider.setValue(((Number) sSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) sSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
case BLOCKED:
- if (slider != null)
- slider.setValue(((Number) bSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) sSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) bSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) sSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
}
internalChange = false;
@@ -498,21 +498,21 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
gradientPanel = new JPanel()
{
- public Dimension getPreferredSize()
- {
- return new Dimension(imgWidth, imgHeight);
- }
-
- public void paint(Graphics g)
- {
- if (gradientImage != null)
- g.drawImage(gradientImage, 0, 0, this);
-
- Color saved = g.getColor();
- g.setColor(Color.WHITE);
- g.drawOval(gradientPoint.x - 3, gradientPoint.y - 3, 6, 6);
- g.setColor(saved);
- }
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(imgWidth, imgHeight);
+ }
+
+ public void paint(Graphics g)
+ {
+ if (gradientImage != null)
+ g.drawImage(gradientImage, 0, 0, this);
+
+ Color saved = g.getColor();
+ g.setColor(Color.WHITE);
+ g.drawOval(gradientPoint.x - 3, gradientPoint.y - 3, 6, 6);
+ g.setColor(saved);
+ }
};
MouseAdapter ml = new MainGradientMouseListener();
@@ -521,16 +521,16 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
trackPanel = new JPanel()
{
- public Dimension getPreferredSize()
- {
- return new Dimension(trackWidth, imgHeight);
- }
-
- public void paint(Graphics g)
- {
- if (trackImage != null)
- g.drawImage(trackImage, 0, 0, this);
- }
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(trackWidth, imgHeight);
+ }
+
+ public void paint(Graphics g)
+ {
+ if (trackImage != null)
+ g.drawImage(trackImage, 0, 0, this);
+ }
};
slider = new JSlider();
@@ -682,9 +682,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(hValue, (imgWidth - i * 1f) / imgWidth,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(hValue, (imgWidth - i * 1f) / imgWidth,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
@@ -702,9 +702,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int index = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth,
- (imgHeight - j * 1f) / imgHeight, bValue)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth,
+ (imgHeight - j * 1f) / imgHeight, bValue)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
@@ -722,9 +722,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int index = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth, sValue,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth, sValue,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
}
@@ -739,14 +739,14 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
switch (locked)
{
case HLOCKED:
- updateHLockImage();
- break;
+ updateHLockImage();
+ break;
case SLOCKED:
- updateSLockImage();
- break;
+ updateSLockImage();
+ break;
case BLOCKED:
- updateBLockImage();
- break;
+ updateBLockImage();
+ break;
}
}
@@ -777,18 +777,18 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
slider.setMinimum(0);
if (locked == HLOCKED)
{
- slider.setMaximum(359);
- slider.setValue(((Number) hSpinner.getValue()).intValue());
- slider.setInverted(true);
+ slider.setMaximum(359);
+ slider.setValue(((Number) hSpinner.getValue()).intValue());
+ slider.setInverted(true);
}
else
{
- slider.setMaximum(100);
- slider.setInverted(false);
- if (sRadio.isSelected())
- slider.setValue(((Number) sSpinner.getValue()).intValue());
- else
- slider.setValue(((Number) bSpinner.getValue()).intValue());
+ slider.setMaximum(100);
+ slider.setInverted(false);
+ if (sRadio.isSelected())
+ slider.setValue(((Number) sSpinner.getValue()).intValue());
+ else
+ slider.setValue(((Number) bSpinner.getValue()).intValue());
}
repaint();
}
@@ -803,14 +803,14 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
switch (locked)
{
case HLOCKED:
- updateHTrack();
- break;
+ updateHTrack();
+ break;
case SLOCKED:
- updateSTrack();
- break;
+ updateSTrack();
+ break;
case BLOCKED:
- updateBTrack();
- break;
+ updateBTrack();
+ break;
}
}
@@ -825,8 +825,8 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(j * 1f / imgHeight, 1f, 1f)
- | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(j * 1f / imgHeight, 1f, 1f)
+ | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
@@ -846,9 +846,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int trackIndex = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(hValue,
- (imgHeight - j * 1f) / imgHeight,
- bValue) | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(hValue,
+ (imgHeight - j * 1f) / imgHeight,
+ bValue) | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
@@ -868,9 +868,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int trackIndex = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(hValue, sValue,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(hValue, sValue,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
diff --git a/javax/swing/colorchooser/DefaultRGBChooserPanel.java b/javax/swing/colorchooser/DefaultRGBChooserPanel.java
index 39a173250..24f0a9a71 100644
--- a/javax/swing/colorchooser/DefaultRGBChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultRGBChooserPanel.java
@@ -72,7 +72,7 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (updateChange)
- return;
+ return;
int color = R.getValue() << 16 | G.getValue() << 8 | B.getValue();
@@ -95,7 +95,7 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (updateChange)
- return;
+ return;
int red = ((Number) RSpinner.getValue()).intValue();
int green = ((Number) GSpinner.getValue()).intValue();
@@ -198,21 +198,21 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
if (! sliderChange)
{
- if (R != null)
- R.setValue(red);
- if (G != null)
- G.setValue(green);
- if (B != null)
- B.setValue(blue);
+ if (R != null)
+ R.setValue(red);
+ if (G != null)
+ G.setValue(green);
+ if (B != null)
+ B.setValue(blue);
}
if (! spinnerChange)
{
- if (GSpinner != null)
- GSpinner.setValue(new Integer(green));
- if (RSpinner != null)
- RSpinner.setValue(new Integer(red));
- if (BSpinner != null)
- BSpinner.setValue(new Integer(blue));
+ if (GSpinner != null)
+ GSpinner.setValue(new Integer(green));
+ if (RSpinner != null)
+ RSpinner.setValue(new Integer(red));
+ if (BSpinner != null)
+ BSpinner.setValue(new Integer(blue));
}
updateChange = false;
diff --git a/javax/swing/colorchooser/DefaultSwatchChooserPanel.java b/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
index ff3436808..99b715789 100644
--- a/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
+++ b/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
@@ -213,7 +213,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
/** The color (255, 153, 153). */
public static final Color C255153153 = new Color(255, 153, 153);
- static Color[] colors =
+ static Color[] colors =
{
// Row 1
Color.WHITE, new Color(204, 255, 255), C204255255, C204255255, C204255255,
@@ -224,7 +224,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C255204204, new Color(255, 255, 204), C204255204,
C204255204, C204255204, C204255204, C204255204,
C204255204, C204255204, C204255204, C204255204,
-
+
// Row 2
C204204204, new Color(153, 255, 255), new Color(153, 204, 255), C153153255,
C153153255, C153153255, C153153255, C153153255,
@@ -237,7 +237,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(204, 255, 153), C153255153, C153255153,
C153255153, C153255153, C153255153, C153255153,
C153255153, new Color(153, 255, 204),
-
+
// Row 3
C204204204, new Color(102, 255, 255), new Color(102, 204, 255),
new Color(102, 153, 255), C102102255, C102102255,
@@ -256,7 +256,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C102255102, C102255102, C102255102,
new Color(102, 255, 153),
new Color(102, 255, 204),
-
+
// Row 4
new Color(153, 153, 153), new Color(51, 255, 255), new Color(51, 204, 255),
new Color(51, 153, 255), new Color(51, 102, 255),
@@ -272,7 +272,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C051255051, C051255051, C051255051,
new Color(51, 255, 102), new Color(51, 255, 153),
new Color(51, 255, 204),
-
+
// Row 5
new Color(153, 153, 153), new Color(0, 255, 255), new Color(0, 204, 255),
new Color(0, 153, 255), new Color(0, 102, 255),
@@ -289,7 +289,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(51, 255, 0), new Color(0, 255, 0),
new Color(0, 255, 51), new Color(0, 255, 102),
new Color(0, 255, 153), new Color(0, 255, 204),
-
+
// Row 6
new Color(102, 102, 102), C000204204, C000204204, new Color(0, 153, 204),
new Color(0, 102, 204), new Color(0, 51, 204),
@@ -305,7 +305,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(0, 204, 0), new Color(0, 204, 51),
new Color(0, 204, 102), new Color(0, 204, 153),
new Color(0, 204, 204),
-
+
// Row 7
new Color(102, 102, 102), C000153153, C000153153, C000153153,
new Color(0, 102, 153), new Color(0, 51, 153),
@@ -319,7 +319,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(102, 153, 0), new Color(51, 153, 0),
new Color(0, 153, 0), new Color(0, 153, 51),
new Color(0, 153, 102), C000153153, C000153153,
-
+
// Row 8
new Color(51, 51, 51), C000102102, C000102102, C000102102, C000102102,
new Color(0, 51, 102), new Color(0, 0, 102),
@@ -332,7 +332,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(51, 102, 0), new Color(0, 102, 0),
new Color(0, 102, 51), C000102102, C000102102,
C000102102,
-
+
// Row 9.
Color.BLACK, C000051051, C000051051, C000051051, C000051051, C000051051,
new Color(0, 0, 51), C051000051, C051000051,
@@ -369,8 +369,8 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
if (x % (cellWidth + gap) > cellWidth
|| y % (cellHeight + gap) > cellHeight)
- // position is located in gap.
- return null;
+ // position is located in gap.
+ return null;
int row = y / (cellHeight + gap);
int col = x / (cellWidth + gap);
@@ -401,14 +401,14 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < numRows; i++)
{
- for (int j = 0; j < numCols; j++)
- {
- graphics.setColor(colors[index++]);
- graphics.fill3DRect(currX, currY, cellWidth, cellHeight, true);
- currX += gap + cellWidth;
- }
- currX = insets.left;
- currY += gap + cellHeight;
+ for (int j = 0; j < numCols; j++)
+ {
+ graphics.setColor(colors[index++]);
+ graphics.fill3DRect(currX, currY, cellWidth, cellHeight, true);
+ currX += gap + cellWidth;
+ }
+ currX = insets.left;
+ currY += gap + cellHeight;
}
graphics.setColor(saved);
}
@@ -424,7 +424,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
Color c = getColorForPosition(e.getX(), e.getY());
if (c == null)
- return null;
+ return null;
return (c.getRed() + "," + c.getGreen() + "," + c.getBlue());
}
}
@@ -467,8 +467,8 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
if (x % (cellWidth + gap) > cellWidth
|| y % (cellHeight + gap) > cellHeight)
- // position is located in gap.
- return null;
+ // position is located in gap.
+ return null;
int row = y / (cellHeight + gap);
int col = x / (cellWidth + gap);
@@ -483,7 +483,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
colors = new Color[numRows * numCols];
for (int i = 0; i < colors.length; i++)
- colors[i] = defaultColor;
+ colors[i] = defaultColor;
}
/**
@@ -508,7 +508,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
void addColorToQueue(Color c)
{
if (--start == -1)
- start = numRows * numCols - 1;
+ start = numRows * numCols - 1;
colors[start] = c;
}
@@ -527,14 +527,14 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < numRows; i++)
{
- for (int j = 0; j < numCols; j++)
- {
- g.setColor(colors[getIndexForCell(i, j)]);
- g.fill3DRect(currX, currY, cellWidth, cellHeight, true);
- currX += cellWidth + gap;
- }
- currX = insets.left;
- currY += cellWidth + gap;
+ for (int j = 0; j < numCols; j++)
+ {
+ g.setColor(colors[getIndexForCell(i, j)]);
+ g.fill3DRect(currX, currY, cellWidth, cellHeight, true);
+ currX += cellWidth + gap;
+ }
+ currX = insets.left;
+ currY += cellWidth + gap;
}
}
@@ -549,7 +549,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
Color c = getColorForPosition(e.getX(), e.getY());
if (c == null)
- return null;
+ return null;
return c.getRed() + "," + c.getGreen() + "," + c.getBlue();
}
}
@@ -609,11 +609,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref[i] = comps[i].getPreferredSize();
- if (pref[i] == null)
- return;
- maxHeight = Math.max(maxHeight, pref[i].height);
- totalWidth += pref[i].width;
+ pref[i] = comps[i].getPreferredSize();
+ if (pref[i] == null)
+ return;
+ maxHeight = Math.max(maxHeight, pref[i].height);
+ totalWidth += pref[i].width;
}
ypos = (parent.getSize().height - maxHeight) / 2 + insets.top;
@@ -621,10 +621,10 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- if (pref[i] == null)
- continue;
- comps[i].setBounds(xpos, ypos, pref[i].width, pref[i].height);
- xpos += pref[i].width;
+ if (pref[i] == null)
+ continue;
+ comps[i].setBounds(xpos, ypos, pref[i].width, pref[i].height);
+ xpos += pref[i].width;
}
}
@@ -667,11 +667,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref == null)
- continue;
- xmax += pref.width;
- ymax = Math.max(ymax, pref.height);
+ pref = comps[i].getPreferredSize();
+ if (pref == null)
+ continue;
+ xmax += pref.width;
+ ymax = Math.max(ymax, pref.height);
}
Insets insets = parent.getInsets();
@@ -713,11 +713,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref == null)
- continue;
- comps[i].setBounds(insets.left, currY, pref.width, pref.height);
- currY += pref.height;
+ pref = comps[i].getPreferredSize();
+ if (pref == null)
+ continue;
+ comps[i].setBounds(insets.left, currY, pref.width, pref.height);
+ currY += pref.height;
}
}
@@ -750,12 +750,12 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
Dimension pref;
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref != null)
- {
- width = Math.max(width, pref.width);
- height += pref.height;
- }
+ pref = comps[i].getPreferredSize();
+ if (pref != null)
+ {
+ width = Math.max(width, pref.width);
+ height += pref.height;
+ }
}
return new Dimension(width + insets.left + insets.right,
diff --git a/javax/swing/event/AncestorEvent.java b/javax/swing/event/AncestorEvent.java
index d06c6e396..27b469a8f 100644
--- a/javax/swing/event/AncestorEvent.java
+++ b/javax/swing/event/AncestorEvent.java
@@ -50,7 +50,7 @@ import javax.swing.JComponent;
public class AncestorEvent extends AWTEvent
{
private static final long serialVersionUID = -8079801679695605002L;
-
+
public static final int ANCESTOR_ADDED = 1;
public static final int ANCESTOR_REMOVED = 2;
public static final int ANCESTOR_MOVED = 3;
@@ -66,7 +66,7 @@ public class AncestorEvent extends AWTEvent
* @param ancestorParent parent ancestor
*/
public AncestorEvent(JComponent source, int id, Container ancestor,
- Container ancestorParent)
+ Container ancestorParent)
{
super(source, id);
this.sourceComponent = source;
diff --git a/javax/swing/event/AncestorListener.java b/javax/swing/event/AncestorListener.java
index 61d5aedb7..623956f6e 100644
--- a/javax/swing/event/AncestorListener.java
+++ b/javax/swing/event/AncestorListener.java
@@ -47,23 +47,23 @@ import java.util.EventListener;
*/
public interface AncestorListener extends EventListener {
- /**
- * Ancestor Added
- * @param event Ancestor Event
- */
- void ancestorAdded(AncestorEvent event);
+ /**
+ * Ancestor Added
+ * @param event Ancestor Event
+ */
+ void ancestorAdded(AncestorEvent event);
- /**
- * Ancestor Removed
- * @param event Ancestor Event
- */
- void ancestorRemoved(AncestorEvent event);
+ /**
+ * Ancestor Removed
+ * @param event Ancestor Event
+ */
+ void ancestorRemoved(AncestorEvent event);
- /**
- * Ancestor Moved
- * @param event Ancestor Event
- */
- void ancestorMoved(AncestorEvent event);
+ /**
+ * Ancestor Moved
+ * @param event Ancestor Event
+ */
+ void ancestorMoved(AncestorEvent event);
} // AncestorListener
diff --git a/javax/swing/event/CaretEvent.java b/javax/swing/event/CaretEvent.java
index 7de05a81b..ef0436d1c 100644
--- a/javax/swing/event/CaretEvent.java
+++ b/javax/swing/event/CaretEvent.java
@@ -43,14 +43,14 @@ import java.util.EventObject;
* CaretEvent
* @author Andrew Selkirk
*/
-public abstract class CaretEvent extends EventObject
+public abstract class CaretEvent extends EventObject
{
/**
* CaretEvent constructor
* @param source Source object
*/
- public CaretEvent(Object source)
+ public CaretEvent(Object source)
{
super(source);
}
@@ -67,4 +67,4 @@ public abstract class CaretEvent extends EventObject
*/
public abstract int getMark();
-}
+}
diff --git a/javax/swing/event/CaretListener.java b/javax/swing/event/CaretListener.java
index aeee434e5..ab7305d5e 100644
--- a/javax/swing/event/CaretListener.java
+++ b/javax/swing/event/CaretListener.java
@@ -46,11 +46,11 @@ import java.util.EventListener;
*/
public interface CaretListener extends EventListener {
- /**
- * Caret position has been updated
- * @param event Caret Event
- */
- void caretUpdate(CaretEvent event);
+ /**
+ * Caret position has been updated
+ * @param event Caret Event
+ */
+ void caretUpdate(CaretEvent event);
} // CaretListener
diff --git a/javax/swing/event/CellEditorListener.java b/javax/swing/event/CellEditorListener.java
index d2dd5bab8..4252c2712 100644
--- a/javax/swing/event/CellEditorListener.java
+++ b/javax/swing/event/CellEditorListener.java
@@ -46,17 +46,17 @@ import java.util.EventListener;
*/
public interface CellEditorListener extends EventListener {
- /**
- * Editing has been canceled
- * @param event Change Event
- */
- void editingCanceled(ChangeEvent event);
-
- /**
- * Editing has been stopped
- * @param event Change Event
- */
- void editingStopped(ChangeEvent event);
+ /**
+ * Editing has been canceled
+ * @param event Change Event
+ */
+ void editingCanceled(ChangeEvent event);
+
+ /**
+ * Editing has been stopped
+ * @param event Change Event
+ */
+ void editingStopped(ChangeEvent event);
} // CellEditorListener
diff --git a/javax/swing/event/ChangeEvent.java b/javax/swing/event/ChangeEvent.java
index 8854282a9..86834128d 100644
--- a/javax/swing/event/ChangeEvent.java
+++ b/javax/swing/event/ChangeEvent.java
@@ -41,24 +41,24 @@ import java.util.EventObject;
/**
* An event used to signal a state change for an object.
- *
+ *
* @see ChangeListener
* @see CellEditorListener
* @see TableColumnModelListener
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class ChangeEvent
- extends EventObject
+public class ChangeEvent
+ extends EventObject
{
/**
* Creates a new <code>ChangeEvent</code> instance for the specified source.
- *
+ *
* @param source the source for the event (<code>null</code> not permitted).
*/
- public ChangeEvent(Object source)
+ public ChangeEvent(Object source)
{
super(source);
}
diff --git a/javax/swing/event/ChangeListener.java b/javax/swing/event/ChangeListener.java
index 75809707b..0f9d08774 100644
--- a/javax/swing/event/ChangeListener.java
+++ b/javax/swing/event/ChangeListener.java
@@ -40,22 +40,22 @@ package javax.swing.event;
import java.util.EventListener;
/**
- * A <code>ChangeListener</code> can register with an object to receive
+ * A <code>ChangeListener</code> can register with an object to receive
* notification of state changes (for objects that support this mechanism).
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ChangeListener
- extends EventListener
+public interface ChangeListener
+ extends EventListener
{
/**
* Called by an object to notify the listener that the object's state has
- * changed. The incoming <code>event</code> identifies the
+ * changed. The incoming <code>event</code> identifies the
* <code>source</code> of the event, allowing the listener to differentiate
* when it is listening for changes in multiple sources.
- *
+ *
* @param event the change event.
*/
void stateChanged(ChangeEvent event);
diff --git a/javax/swing/event/DocumentEvent.java b/javax/swing/event/DocumentEvent.java
index 822304925..4e1235542 100644
--- a/javax/swing/event/DocumentEvent.java
+++ b/javax/swing/event/DocumentEvent.java
@@ -75,7 +75,7 @@ public interface DocumentEvent
* @return Element[]
*/
Element[] getChildrenAdded();
-
+
}
/**
diff --git a/javax/swing/event/DocumentListener.java b/javax/swing/event/DocumentListener.java
index df5e784e4..28a7d9d0a 100644
--- a/javax/swing/event/DocumentListener.java
+++ b/javax/swing/event/DocumentListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface DocumentListener extends EventListener {
- /**
- * Changed update
- * @param event Document Event
- */
- void changedUpdate(DocumentEvent event);
+ /**
+ * Changed update
+ * @param event Document Event
+ */
+ void changedUpdate(DocumentEvent event);
- /**
- * Insert update
- * @param event Document Event
- */
- void insertUpdate(DocumentEvent event);
+ /**
+ * Insert update
+ * @param event Document Event
+ */
+ void insertUpdate(DocumentEvent event);
- /**
- * Remove update
- * @param event Document Event
- */
- void removeUpdate(DocumentEvent event);
+ /**
+ * Remove update
+ * @param event Document Event
+ */
+ void removeUpdate(DocumentEvent event);
} // DocumentListener
diff --git a/javax/swing/event/EventListenerList.java b/javax/swing/event/EventListenerList.java
index 8c76f7f87..940d1574c 100644
--- a/javax/swing/event/EventListenerList.java
+++ b/javax/swing/event/EventListenerList.java
@@ -107,8 +107,8 @@ public class EventListenerList
* have no listeners.
*/
private static final Object[] NO_LISTENERS = new Object[0];
-
-
+
+
/**
* An array with all currently registered listeners. The array has
* twice as many elements as there are listeners. For an even
@@ -118,7 +118,7 @@ public class EventListenerList
*/
protected transient Object[] listenerList = NO_LISTENERS;
-
+
/**
* EventListenerList constructor
*/
@@ -194,7 +194,7 @@ public class EventListenerList
/**
* Returns an array containing a sequence of listenerType/listener pairs, one
* for each listener.
- *
+ *
* @return An array containing the listener types and references.
*/
public Object[] getListenerList()
@@ -240,7 +240,7 @@ public class EventListenerList
for (int i = listenerList.length - 2; i >= 0; i -= 2)
if (listenerList[i] == c)
result[f++] = (EventListener) listenerList[i + 1];
-
+
return (T[]) result;
}
diff --git a/javax/swing/event/HyperlinkEvent.java b/javax/swing/event/HyperlinkEvent.java
index 4afa009f4..75092b51a 100644
--- a/javax/swing/event/HyperlinkEvent.java
+++ b/javax/swing/event/HyperlinkEvent.java
@@ -54,12 +54,12 @@ public class HyperlinkEvent extends EventObject
public static final EventType ENTERED = new EventType("ENTERED"); // TODO
public static final EventType EXITED = new EventType("EXITED"); // TODO
public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO
-
+
private String type;
/**
* Creates a new Event type.
- *
+ *
* @param type String representing the event type.
*/
private EventType(String type)
@@ -77,7 +77,7 @@ public class HyperlinkEvent extends EventObject
}
private static final long serialVersionUID = -2054640811732867012L;
-
+
private EventType type;
private URL url;
private String description;
@@ -85,7 +85,7 @@ public class HyperlinkEvent extends EventObject
/**
* Creates a new <code>HyperlinkEvent</code> with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
@@ -97,21 +97,21 @@ public class HyperlinkEvent extends EventObject
/**
* Creates a new <code>HyperlinkEvent</code> with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
* @param description The description for this link.
*/
public HyperlinkEvent(Object source, EventType type, URL url,
- String description)
+ String description)
{
this (source, type, url, description, null);
}
-
+
/**
* Creates a new <code>HyperlinkEvent</code> with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
@@ -119,7 +119,7 @@ public class HyperlinkEvent extends EventObject
* @param element The element in the document representing the anchor.
*/
public HyperlinkEvent(Object source, EventType type, URL url,
- String description, Element element)
+ String description, Element element)
{
super(source);
this.type = type;
@@ -135,7 +135,7 @@ public class HyperlinkEvent extends EventObject
{
return element;
}
-
+
/**
* Returns the URL of this event.
*/
diff --git a/javax/swing/event/HyperlinkListener.java b/javax/swing/event/HyperlinkListener.java
index 5dede993f..0e01ba7ed 100644
--- a/javax/swing/event/HyperlinkListener.java
+++ b/javax/swing/event/HyperlinkListener.java
@@ -47,11 +47,11 @@ import java.util.EventListener;
*/
public interface HyperlinkListener extends EventListener {
- /**
- * Hyperlink updated
- * @param event Hyperlink Event
- */
- void hyperlinkUpdate(HyperlinkEvent event);
+ /**
+ * Hyperlink updated
+ * @param event Hyperlink Event
+ */
+ void hyperlinkUpdate(HyperlinkEvent event);
} // HyperlinkListener
diff --git a/javax/swing/event/InternalFrameAdapter.java b/javax/swing/event/InternalFrameAdapter.java
index dfa88c3d4..da893c76d 100644
--- a/javax/swing/event/InternalFrameAdapter.java
+++ b/javax/swing/event/InternalFrameAdapter.java
@@ -52,7 +52,7 @@ public abstract class InternalFrameAdapter implements InternalFrameListener
{
// Nothing to do here.
}
-
+
/**
* Internal frame activated.
*
diff --git a/javax/swing/event/InternalFrameEvent.java b/javax/swing/event/InternalFrameEvent.java
index 4e289bfb7..1d7145d31 100644
--- a/javax/swing/event/InternalFrameEvent.java
+++ b/javax/swing/event/InternalFrameEvent.java
@@ -44,7 +44,7 @@ import javax.swing.JInternalFrame;
/**
* An event that indicates a change to a {@link JInternalFrame} component.
- *
+ *
* @author Andrew Selkirk
*/
public class InternalFrameEvent extends AWTEvent
@@ -98,12 +98,12 @@ public class InternalFrameEvent extends AWTEvent
/**
* Creates a new <code>JInternalFrameEvent</code> instance.
- *
+ *
* @param source the source of this event (<code>null</code> not permitted).
* @param id the event ID of this event (see the constants defined by this
* class).
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public InternalFrameEvent(JInternalFrame source, int id)
@@ -114,23 +114,23 @@ public class InternalFrameEvent extends AWTEvent
/**
* Returns the <code>JInternalFrame</code> component that is the source for
* this event.
- *
+ *
* @return The source.
- *
+ *
* @since 1.3
*/
public JInternalFrame getInternalFrame()
{
return (JInternalFrame) source;
}
-
+
/**
- * Returns a string that indicates the event id. This is used by the
+ * Returns a string that indicates the event id. This is used by the
* {@link #toString()} method.
- *
+ *
* @return A string that indicates the event id.
*/
- public String paramString()
+ public String paramString()
{
switch (id) {
case INTERNAL_FRAME_ACTIVATED:
diff --git a/javax/swing/event/InternalFrameListener.java b/javax/swing/event/InternalFrameListener.java
index d1b2812a8..36874d216 100644
--- a/javax/swing/event/InternalFrameListener.java
+++ b/javax/swing/event/InternalFrameListener.java
@@ -46,47 +46,47 @@ import java.util.EventListener;
*/
public interface InternalFrameListener extends EventListener {
- /**
- * Internal frame activated
- * @param event Internal Frame Event
- */
- void internalFrameActivated(InternalFrameEvent event);
-
- /**
- * Internal frame closed
- * @param event Internal Frame Event
- */
- void internalFrameClosed(InternalFrameEvent event);
-
- /**
- * Internal frame closing
- * @param event Internal Frame Event
- */
- void internalFrameClosing(InternalFrameEvent event);
-
- /**
- * Internal frame deactivated
- * @param event Internal Frame Event
- */
- void internalFrameDeactivated(InternalFrameEvent event);
-
- /**
- * Internal frame deiconified
- * @param event Internal Frame Event
- */
- void internalFrameDeiconified(InternalFrameEvent event);
-
- /**
- * Internal frame iconified
- * @param event Internal Frame Event
- */
- void internalFrameIconified(InternalFrameEvent event);
-
- /**
- * Internal frame opened
- * @param event Internal Frame Event
- */
- void internalFrameOpened(InternalFrameEvent event);
+ /**
+ * Internal frame activated
+ * @param event Internal Frame Event
+ */
+ void internalFrameActivated(InternalFrameEvent event);
+
+ /**
+ * Internal frame closed
+ * @param event Internal Frame Event
+ */
+ void internalFrameClosed(InternalFrameEvent event);
+
+ /**
+ * Internal frame closing
+ * @param event Internal Frame Event
+ */
+ void internalFrameClosing(InternalFrameEvent event);
+
+ /**
+ * Internal frame deactivated
+ * @param event Internal Frame Event
+ */
+ void internalFrameDeactivated(InternalFrameEvent event);
+
+ /**
+ * Internal frame deiconified
+ * @param event Internal Frame Event
+ */
+ void internalFrameDeiconified(InternalFrameEvent event);
+
+ /**
+ * Internal frame iconified
+ * @param event Internal Frame Event
+ */
+ void internalFrameIconified(InternalFrameEvent event);
+
+ /**
+ * Internal frame opened
+ * @param event Internal Frame Event
+ */
+ void internalFrameOpened(InternalFrameEvent event);
} // InternalFrameListener
diff --git a/javax/swing/event/ListDataEvent.java b/javax/swing/event/ListDataEvent.java
index 897fc128f..51fa887f8 100644
--- a/javax/swing/event/ListDataEvent.java
+++ b/javax/swing/event/ListDataEvent.java
@@ -43,40 +43,40 @@ import java.util.EventObject;
/**
* An event that contains information about a modification to the content of
* a list.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
public class ListDataEvent extends EventObject
{
private static final long serialVersionUID = 2510353260071004774L;
-
+
/** An event type indicating that the list content has been modified. */
public static final int CONTENTS_CHANGED = 0;
-
+
/** An event type indicating that an interval has been added to the list. */
public static final int INTERVAL_ADDED = 1;
-
- /**
- * An event type indicating that an interval has been removed from the
- * list.
+
+ /**
+ * An event type indicating that an interval has been removed from the
+ * list.
*/
public static final int INTERVAL_REMOVED = 2;
private int type;
private int index0;
private int index1;
-
+
/**
* Creates a <code>ListDataEvent</code> object.
- *
+ *
* @param source the source of the event (<code>null</code> not permitted).
- * @param type the type of the event (should be one of
- * {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
+ * @param type the type of the event (should be one of
+ * {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
* {@link #INTERVAL_REMOVED}, although this is not enforced).
- * @param index0 the index for one end of the modified range of list
+ * @param index0 the index for one end of the modified range of list
* elements.
- * @param index1 the index for the other end of the modified range of list
+ * @param index1 the index for the other end of the modified range of list
* elements.
*/
public ListDataEvent(Object source, int type, int index0, int index1)
@@ -86,10 +86,10 @@ public class ListDataEvent extends EventObject
this.index0 = Math.min(index0, index1);
this.index1 = Math.max(index0, index1);
}
-
+
/**
* Returns the index of the first item in the range of modified list items.
- *
+ *
* @return The index of the first item in the range of modified list items.
*/
public int getIndex0()
@@ -99,7 +99,7 @@ public class ListDataEvent extends EventObject
/**
* Returns the index of the last item in the range of modified list items.
- *
+ *
* @return The index of the last item in the range of modified list items.
*/
public int getIndex1()
@@ -109,24 +109,24 @@ public class ListDataEvent extends EventObject
/**
* Returns a code representing the type of this event, which is usually one
- * of {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
+ * of {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
* {@link #INTERVAL_REMOVED}.
- *
+ *
* @return The event type.
*/
public int getType()
{
return type;
}
-
+
/**
* Returns a string representing the state of this event.
- *
+ *
* @return A string.
*/
public String toString()
{
- return getClass().getName() + "[type=" + type + ",index0=" + index0
+ return getClass().getName() + "[type=" + type + ",index0=" + index0
+ ",index1=" + index1 + "]";
}
}
diff --git a/javax/swing/event/ListDataListener.java b/javax/swing/event/ListDataListener.java
index f42777d09..4bbe1e5e4 100644
--- a/javax/swing/event/ListDataListener.java
+++ b/javax/swing/event/ListDataListener.java
@@ -44,11 +44,11 @@ import javax.swing.ListModel;
/**
* A <code>ListDataListener</code> can register with a {@link ListModel} and
* receive notification of updates to the model.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ListDataListener extends EventListener
+public interface ListDataListener extends EventListener
{
/**
@@ -56,7 +56,7 @@ public interface ListDataListener extends EventListener
* in some way. This method will be called if the change cannot be
* notified via the {@link #intervalAdded(ListDataEvent)} or the
* {@link #intervalRemoved(ListDataEvent)} methods.
- *
+ *
* @param event the event.
*/
void contentsChanged(ListDataEvent event);
@@ -65,16 +65,16 @@ public interface ListDataListener extends EventListener
* Notifies the listener that one or more items have been added to the
* list. The <code>event</code> argument can supply the indices for the
* range of items added.
- *
+ *
* @param event the event.
*/
void intervalAdded(ListDataEvent event);
/**
* Notifies the listener that one or more items have been removed from
- * the list. The <code>event</code> argument can supply the indices for
+ * the list. The <code>event</code> argument can supply the indices for
* the range of items removed.
- *
+ *
* @param event the event.
*/
void intervalRemoved(ListDataEvent event);
diff --git a/javax/swing/event/ListSelectionEvent.java b/javax/swing/event/ListSelectionEvent.java
index d79cbfa50..97555d17a 100644
--- a/javax/swing/event/ListSelectionEvent.java
+++ b/javax/swing/event/ListSelectionEvent.java
@@ -45,22 +45,22 @@ import javax.swing.ListSelectionModel;
* An event that indicates a change to a list selection, including the source
* of the change (a {@link ListSelectionModel}) and the range of items in the
* list that have potentially changed their selection status.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class ListSelectionEvent extends EventObject
+public class ListSelectionEvent extends EventObject
{
- /**
- * The index of the first list item in the range of items that has
- * potentially had its selection status modified.
+ /**
+ * The index of the first list item in the range of items that has
+ * potentially had its selection status modified.
*/
private int firstIndex = 0;
- /**
- * The index of the last list item in the range of items that has
- * potentially had its selection status modified.
+ /**
+ * The index of the last list item in the range of items that has
+ * potentially had its selection status modified.
*/
private int lastIndex = 0;
@@ -69,52 +69,52 @@ public class ListSelectionEvent extends EventObject
/**
* Creates a new <code>ListSelectionEvent</code>.
- *
+ *
* @param source the event source (<code>null</code> not permitted).
* @param firstIndex the first index.
* @param lastIndex the last index.
- * @param isAdjusting a flag indicating that this event is one in a series
+ * @param isAdjusting a flag indicating that this event is one in a series
* of events updating a selection.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public ListSelectionEvent(Object source, int firstIndex,
- int lastIndex, boolean isAdjusting)
+ int lastIndex, boolean isAdjusting)
{
super(source);
this.firstIndex = firstIndex;
this.lastIndex = lastIndex;
this.isAdjusting = isAdjusting;
}
-
+
/**
* Returns the first index.
- *
+ *
* @return The first index.
*/
- public int getFirstIndex()
+ public int getFirstIndex()
{
return firstIndex;
}
/**
* Returns the last index.
- *
+ *
* @return The last index.
*/
- public int getLastIndex()
+ public int getLastIndex()
{
return lastIndex;
}
/**
- * Returns the flag that indicates that this event is one in a series of
+ * Returns the flag that indicates that this event is one in a series of
* events updating a selection.
- *
+ *
* @return A boolean.
*/
- public boolean getValueIsAdjusting()
+ public boolean getValueIsAdjusting()
{
return isAdjusting;
}
@@ -122,13 +122,13 @@ public class ListSelectionEvent extends EventObject
/**
* Returns a string representation of the event, typically used for debugging
* purposes.
- *
+ *
* @return A string representation of the event.
*/
- public String toString()
+ public String toString()
{
- return this.getClass().toString() + "[ source=" + source.toString()
- + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex
+ return this.getClass().toString() + "[ source=" + source.toString()
+ + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex
+ " isAdjusting= " + isAdjusting + " ]";
}
diff --git a/javax/swing/event/ListSelectionListener.java b/javax/swing/event/ListSelectionListener.java
index a21dc7365..20e40da58 100644
--- a/javax/swing/event/ListSelectionListener.java
+++ b/javax/swing/event/ListSelectionListener.java
@@ -42,20 +42,20 @@ import java.util.EventListener;
import javax.swing.ListSelectionModel;
/**
- * A listener that receives {@link ListSelectionEvent} notifications,
+ * A listener that receives {@link ListSelectionEvent} notifications,
* typically from a {@link ListSelectionModel} when it is modified.
*
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ListSelectionListener extends EventListener
+public interface ListSelectionListener extends EventListener
{
/**
* Receives notification of a {@link ListSelectionEvent}.
- *
+ *
* @param event the event.
*/
void valueChanged(ListSelectionEvent event);
-} \ No newline at end of file
+}
diff --git a/javax/swing/event/MenuDragMouseEvent.java b/javax/swing/event/MenuDragMouseEvent.java
index 6be11bcca..952d99e39 100644
--- a/javax/swing/event/MenuDragMouseEvent.java
+++ b/javax/swing/event/MenuDragMouseEvent.java
@@ -48,14 +48,14 @@ import javax.swing.MenuSelectionManager;
* MenuDragMouseEvent
* @author Andrew Selkirk
*/
-public class MenuDragMouseEvent extends MouseEvent
+public class MenuDragMouseEvent extends MouseEvent
{
/**
* path
*/
private MenuElement[] path = null;
-
+
/**
* manager
*/
@@ -76,29 +76,29 @@ public class MenuDragMouseEvent extends MouseEvent
*/
public MenuDragMouseEvent(Component source, int id, long when, int modifiers,
int x, int y, int clickCount, boolean popupTrigger,
- MenuElement[] path, MenuSelectionManager manager)
+ MenuElement[] path, MenuSelectionManager manager)
{
super(source, id, when, modifiers, x, y, clickCount, popupTrigger);
this.path = path;
this.manager = manager;
- }
+ }
/**
* Get path
* @return path
*/
- public MenuElement[] getPath()
+ public MenuElement[] getPath()
{
return path;
- }
+ }
/**
* Get menu selection manager
* @return manager
*/
- public MenuSelectionManager getMenuSelectionManager()
+ public MenuSelectionManager getMenuSelectionManager()
{
return manager;
}
-}
+}
diff --git a/javax/swing/event/MenuDragMouseListener.java b/javax/swing/event/MenuDragMouseListener.java
index bfca315e3..d0cd0530f 100644
--- a/javax/swing/event/MenuDragMouseListener.java
+++ b/javax/swing/event/MenuDragMouseListener.java
@@ -46,29 +46,29 @@ import java.util.EventListener;
*/
public interface MenuDragMouseListener extends EventListener {
- /**
- * Menu drag mouse dragged
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseDragged(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse dragged
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseDragged(MenuDragMouseEvent event);
- /**
- * Menu drag mouse entered
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseEntered(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse entered
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseEntered(MenuDragMouseEvent event);
- /**
- * Menu drag mouse exited
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseExited(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse exited
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseExited(MenuDragMouseEvent event);
- /**
- * Menu drag mouse released
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseReleased(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse released
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseReleased(MenuDragMouseEvent event);
} // MenuDragMouseListener
diff --git a/javax/swing/event/MenuEvent.java b/javax/swing/event/MenuEvent.java
index 8ba32929e..6a7e0215f 100644
--- a/javax/swing/event/MenuEvent.java
+++ b/javax/swing/event/MenuEvent.java
@@ -44,14 +44,14 @@ import java.util.EventObject;
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class MenuEvent extends EventObject
+public class MenuEvent extends EventObject
{
/**
* Constructor MenuEvent
* @param source Source object
*/
- public MenuEvent(Object source)
+ public MenuEvent(Object source)
{
super(source);
}
diff --git a/javax/swing/event/MenuKeyEvent.java b/javax/swing/event/MenuKeyEvent.java
index 3335850bc..937089ec2 100644
--- a/javax/swing/event/MenuKeyEvent.java
+++ b/javax/swing/event/MenuKeyEvent.java
@@ -48,14 +48,14 @@ import javax.swing.MenuSelectionManager;
* MenuKeyEvent
* @author Andrew Selkirk
*/
-public class MenuKeyEvent extends KeyEvent
+public class MenuKeyEvent extends KeyEvent
{
/**
* path
*/
private MenuElement[] path = null;
-
+
/**
* manager
*/
@@ -74,18 +74,18 @@ public class MenuKeyEvent extends KeyEvent
*/
public MenuKeyEvent(Component source, int id, long when, int modifiers,
int keyCode, char keyChar, MenuElement[] path,
- MenuSelectionManager manager)
+ MenuSelectionManager manager)
{
super(source, id, when, modifiers, keyCode, keyChar);
this.path = path;
this.manager = manager;
- }
+ }
/**
* getPath
* @return path
*/
- public MenuElement[] getPath()
+ public MenuElement[] getPath()
{
return path;
}
@@ -94,9 +94,9 @@ public class MenuKeyEvent extends KeyEvent
* getMenuSelectionManager
* @return MenuSelectionManager
*/
- public MenuSelectionManager getMenuSelectionManager()
+ public MenuSelectionManager getMenuSelectionManager()
{
return manager;
}
-}
+}
diff --git a/javax/swing/event/MenuKeyListener.java b/javax/swing/event/MenuKeyListener.java
index 7a1eb89b4..36d6ecdd4 100644
--- a/javax/swing/event/MenuKeyListener.java
+++ b/javax/swing/event/MenuKeyListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface MenuKeyListener extends EventListener {
- /**
- * Menu key pressed
- * @param event Menu Key Event
- */
- void menuKeyPressed(MenuKeyEvent event);
+ /**
+ * Menu key pressed
+ * @param event Menu Key Event
+ */
+ void menuKeyPressed(MenuKeyEvent event);
- /**
- * Menu key released
- * @param event Menu Key Event
- */
- void menuKeyReleased(MenuKeyEvent event);
+ /**
+ * Menu key released
+ * @param event Menu Key Event
+ */
+ void menuKeyReleased(MenuKeyEvent event);
- /**
- * Menu key typed
- * @param event Menu Key Event
- */
- void menuKeyTyped(MenuKeyEvent event);
+ /**
+ * Menu key typed
+ * @param event Menu Key Event
+ */
+ void menuKeyTyped(MenuKeyEvent event);
} // MenuKeyListener
diff --git a/javax/swing/event/MenuListener.java b/javax/swing/event/MenuListener.java
index dba704a8e..10a18f215 100644
--- a/javax/swing/event/MenuListener.java
+++ b/javax/swing/event/MenuListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface MenuListener extends EventListener {
- /**
- * Menu canceled
- * @param event Menu Event
- */
- void menuCanceled(MenuEvent event);
+ /**
+ * Menu canceled
+ * @param event Menu Event
+ */
+ void menuCanceled(MenuEvent event);
- /**
- * Menu deselected
- * @param event Menu Event
- */
- void menuDeselected(MenuEvent event);
+ /**
+ * Menu deselected
+ * @param event Menu Event
+ */
+ void menuDeselected(MenuEvent event);
- /**
- * Menu selected
- * @param event Menu Event
- */
- void menuSelected(MenuEvent event);
+ /**
+ * Menu selected
+ * @param event Menu Event
+ */
+ void menuSelected(MenuEvent event);
} // MenuListener
diff --git a/javax/swing/event/MouseInputListener.java b/javax/swing/event/MouseInputListener.java
index 3d879b9e7..fc9261533 100644
--- a/javax/swing/event/MouseInputListener.java
+++ b/javax/swing/event/MouseInputListener.java
@@ -46,7 +46,7 @@ import java.awt.event.MouseMotionListener;
* @author Andrew Selkirk
*/
public interface MouseInputListener extends MouseListener,
- MouseMotionListener
+ MouseMotionListener
{
// This interface only pulls together MouseListener and MouseMotionListener
// without adding any methods on its own.
diff --git a/javax/swing/event/PopupMenuEvent.java b/javax/swing/event/PopupMenuEvent.java
index 055555086..640b900ad 100644
--- a/javax/swing/event/PopupMenuEvent.java
+++ b/javax/swing/event/PopupMenuEvent.java
@@ -46,13 +46,13 @@ import java.util.EventObject;
*/
public class PopupMenuEvent extends EventObject {
- /**
- * Constructor PopupMenuEvent
- * @param source Source
- */
- public PopupMenuEvent(Object source) {
- super(source);
- } // PopupMenuEvent()
+ /**
+ * Constructor PopupMenuEvent
+ * @param source Source
+ */
+ public PopupMenuEvent(Object source) {
+ super(source);
+ } // PopupMenuEvent()
} // PopupMenuEvent
diff --git a/javax/swing/event/PopupMenuListener.java b/javax/swing/event/PopupMenuListener.java
index dc917d241..18d68f406 100644
--- a/javax/swing/event/PopupMenuListener.java
+++ b/javax/swing/event/PopupMenuListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface PopupMenuListener extends EventListener {
- /**
- * Popup Menu Canceled
- * @param event Popup Menu Event
- */
- void popupMenuCanceled(PopupMenuEvent event);
+ /**
+ * Popup Menu Canceled
+ * @param event Popup Menu Event
+ */
+ void popupMenuCanceled(PopupMenuEvent event);
- /**
- * Popup Menu will become invisible
- * @param event Popup Menu Event
- */
- void popupMenuWillBecomeInvisible(PopupMenuEvent event);
+ /**
+ * Popup Menu will become invisible
+ * @param event Popup Menu Event
+ */
+ void popupMenuWillBecomeInvisible(PopupMenuEvent event);
- /**
- * Popup Menu will become visible
- * @param event Popup Menu Event
- */
- void popupMenuWillBecomeVisible(PopupMenuEvent event);
+ /**
+ * Popup Menu will become visible
+ * @param event Popup Menu Event
+ */
+ void popupMenuWillBecomeVisible(PopupMenuEvent event);
} // PopupMenuListener
diff --git a/javax/swing/event/SwingPropertyChangeSupport.java b/javax/swing/event/SwingPropertyChangeSupport.java
index 7fb8aa67d..5228b3d57 100644
--- a/javax/swing/event/SwingPropertyChangeSupport.java
+++ b/javax/swing/event/SwingPropertyChangeSupport.java
@@ -51,19 +51,19 @@ import java.beans.PropertyChangeSupport;
* @author Andrew Selkirk
*/
public final class SwingPropertyChangeSupport
- extends PropertyChangeSupport
+ extends PropertyChangeSupport
{
private static final long serialVersionUID = 7162625831330845068L;
/**
* Creates a new instance.
- *
+ *
* @param source the source (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>source</code> is <code>null</code>.
*/
- public SwingPropertyChangeSupport(Object source)
+ public SwingPropertyChangeSupport(Object source)
{
super(source);
}
diff --git a/javax/swing/event/TableColumnModelEvent.java b/javax/swing/event/TableColumnModelEvent.java
index cff49130e..70bd7d050 100644
--- a/javax/swing/event/TableColumnModelEvent.java
+++ b/javax/swing/event/TableColumnModelEvent.java
@@ -46,7 +46,7 @@ import javax.swing.table.TableColumnModel;
* TableColumnModelEvent
* @author Andrew Selkirk
*/
-public class TableColumnModelEvent extends EventObject
+public class TableColumnModelEvent extends EventObject
{
/**
@@ -65,7 +65,7 @@ public class TableColumnModelEvent extends EventObject
* @param from From index
* @param to To index
*/
- public TableColumnModelEvent(TableColumnModel source, int from, int to)
+ public TableColumnModelEvent(TableColumnModel source, int from, int to)
{
super(source);
fromIndex = from;
@@ -76,18 +76,18 @@ public class TableColumnModelEvent extends EventObject
* getFromIndex.
* @return From index
*/
- public int getFromIndex()
+ public int getFromIndex()
{
return fromIndex;
- }
+ }
/**
- * getToIndex.
+ * getToIndex.
* @return To index
*/
- public int getToIndex()
+ public int getToIndex()
{
return toIndex;
}
-} \ No newline at end of file
+}
diff --git a/javax/swing/event/TableColumnModelListener.java b/javax/swing/event/TableColumnModelListener.java
index 522e0a8c6..362a4d9cd 100644
--- a/javax/swing/event/TableColumnModelListener.java
+++ b/javax/swing/event/TableColumnModelListener.java
@@ -44,25 +44,25 @@ import javax.swing.table.TableColumnModel;
/**
* A <code>TableColumnModelListener</code> can register with a
* {@link TableColumnModel} to receive notification of changes to the model.
- *
+ *
* @author Andrew Selkirk
*/
-public interface TableColumnModelListener
- extends EventListener
+public interface TableColumnModelListener
+ extends EventListener
{
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* added to the model.
- *
+ *
* @param event information about the column addition.
*/
void columnAdded(TableColumnModelEvent event);
/**
- * Called by the {@link TableColumnModel} to indicate that the model's
+ * Called by the {@link TableColumnModel} to indicate that the model's
* column margin has changed.
- *
+ *
* @param event the event (identifies the source).
*/
void columnMarginChanged(ChangeEvent event);
@@ -70,7 +70,7 @@ public interface TableColumnModelListener
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* moved.
- *
+ *
* @param event information about the column move.
*/
void columnMoved(TableColumnModelEvent event);
@@ -78,15 +78,15 @@ public interface TableColumnModelListener
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* removed from the model.
- *
+ *
* @param event information about the column removal.
*/
void columnRemoved(TableColumnModelEvent event);
/**
- * Called by the {@link TableColumnModel} to indicate that the column
+ * Called by the {@link TableColumnModel} to indicate that the column
* selection state has changed.
- *
+ *
* @param event information about the column selection state.
*/
void columnSelectionChanged(ListSelectionEvent event);
diff --git a/javax/swing/event/TableModelEvent.java b/javax/swing/event/TableModelEvent.java
index e15174cc6..b75a78a1c 100644
--- a/javax/swing/event/TableModelEvent.java
+++ b/javax/swing/event/TableModelEvent.java
@@ -44,58 +44,58 @@ import javax.swing.table.TableModel;
/**
* An event that describes changes to a {@link TableModel}.
- *
+ *
* @see javax.swing.event.TableModelListener
- *
+ *
* @author Andrew Selkirk
*/
public class TableModelEvent extends EventObject
{
private static final long serialVersionUID = -7849342674552212824L;
-
+
/** A column index representing all columns. */
public static final int ALL_COLUMNS = -1;
-
- /**
- * An event type indicating that one or more rows have been deleted from the
- * model.
+
+ /**
+ * An event type indicating that one or more rows have been deleted from the
+ * model.
*/
public static final int DELETE = -1;
-
+
/** A row index representing the header row. */
public static final int HEADER_ROW = -1;
-
- /**
- * An event type indicating that one or more rows have been inserted into the
- * model.
+
+ /**
+ * An event type indicating that one or more rows have been inserted into the
+ * model.
*/
public static final int INSERT = 1;
-
+
/** An event type indicating that data has been updated in the model. */
public static final int UPDATE = 0;
/** The column in the table model that the event relates to. */
protected int column = 0;
-
+
/** The first row in the table model that the event relates to. */
protected int firstRow = 0;
-
+
/** The last row in the table model that the event relates to. */
protected int lastRow = 0;
-
- /**
- * The event type (one of {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
+
+ /**
+ * The event type (one of {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
*/
protected int type = 0;
/**
- * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
+ * Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
* to the data in all columns and rows.
- *
+ *
* @param source the source object (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>source</code> is
- * <code>null</code>.
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public TableModelEvent(TableModel source)
{
@@ -105,11 +105,11 @@ public class TableModelEvent extends EventObject
/**
* Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
* to the data in a single row across all columns.
- *
+ *
* @param source the source object (<code>null</code> not permitted).
* @param row the updated row.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public TableModelEvent(TableModel source, int row)
@@ -120,12 +120,12 @@ public class TableModelEvent extends EventObject
/**
* Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
* to the data in the specified rows across all columns.
- *
+ *
* @param source the source object (<code>null</code> not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public TableModelEvent(TableModel source, int firstRow, int lastRow)
@@ -135,18 +135,18 @@ public class TableModelEvent extends EventObject
/**
* Creates a new <code>TableModelEvent</code> indicating an {@link #UPDATE}
- * to the data in the specified rows and column. Use {@link #ALL_COLUMNS}
+ * to the data in the specified rows and column. Use {@link #ALL_COLUMNS}
* for the <code>column</code> argument to indicate all columns.
- *
+ *
* @param source the source object (<code>null</code> not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
* @param column the affected column.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
int column)
{
this(source, firstRow, lastRow, column, UPDATE);
@@ -157,17 +157,17 @@ public class TableModelEvent extends EventObject
* the specified <code>type</code> on the data in the specified rows and
* column. The event type is usually one of {@link #UPDATE}, {@link #INSERT},
* and {@link #DELETE}.
- *
+ *
* @param source the source object (<code>null</code> not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
* @param column the affected column.
* @param type the type of change.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
int column, int type)
{
super(source);
@@ -179,7 +179,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the affected column of this event.
- *
+ *
* @return The column index.
*/
public int getColumn()
@@ -189,7 +189,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the first affected row of this event.
- *
+ *
* @return The row index.
*/
public int getFirstRow()
@@ -199,7 +199,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the last affected row of this event.
- *
+ *
* @return The row index.
*/
public int getLastRow()
@@ -208,9 +208,9 @@ public class TableModelEvent extends EventObject
}
/**
- * Returns the type of change indicated by this event (usually one of
+ * Returns the type of change indicated by this event (usually one of
* {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
- *
+ *
* @return The type.
*/
public int getType()
diff --git a/javax/swing/event/TableModelListener.java b/javax/swing/event/TableModelListener.java
index 21e5ea047..612712f85 100644
--- a/javax/swing/event/TableModelListener.java
+++ b/javax/swing/event/TableModelListener.java
@@ -40,21 +40,21 @@ package javax.swing.event;
import java.util.EventListener;
/**
- * A <code>TableModelListener</code> can register with a
+ * A <code>TableModelListener</code> can register with a
* {@link javax.swing.table.TableModel} and receive notification of updates to
* the model.
- *
+ *
* @author Andrew Selkirk
*/
-public interface TableModelListener extends EventListener
+public interface TableModelListener extends EventListener
{
/**
- * Called to notify the listener that the
+ * Called to notify the listener that the
* {@link javax.swing.table.TableModel} has been updated.
- *
+ *
* @param event contains details of the update.
*/
void tableChanged(TableModelEvent event);
-}
+}
diff --git a/javax/swing/event/TreeExpansionEvent.java b/javax/swing/event/TreeExpansionEvent.java
index 5820b3391..99e166677 100644
--- a/javax/swing/event/TreeExpansionEvent.java
+++ b/javax/swing/event/TreeExpansionEvent.java
@@ -46,7 +46,7 @@ import javax.swing.tree.TreePath;
* TreeExpansionEvent
* @author Andrew Selkirk
*/
-public class TreeExpansionEvent extends EventObject
+public class TreeExpansionEvent extends EventObject
{
/**
@@ -59,7 +59,7 @@ public class TreeExpansionEvent extends EventObject
* @param source Source object
* @param path Path
*/
- public TreeExpansionEvent(Object source, TreePath path)
+ public TreeExpansionEvent(Object source, TreePath path)
{
super(source);
this.path = path;
@@ -69,9 +69,9 @@ public class TreeExpansionEvent extends EventObject
* getPath
* @return Tree path
*/
- public TreePath getPath()
+ public TreePath getPath()
{
return path;
- }
+ }
-}
+}
diff --git a/javax/swing/event/TreeExpansionListener.java b/javax/swing/event/TreeExpansionListener.java
index 45a5ef93c..3461f2ce4 100644
--- a/javax/swing/event/TreeExpansionListener.java
+++ b/javax/swing/event/TreeExpansionListener.java
@@ -43,7 +43,7 @@ import java.util.EventListener;
* TreeExpansionListener public interface
* @author Andrew Selkirk
*/
-public interface TreeExpansionListener extends EventListener
+public interface TreeExpansionListener extends EventListener
{
/**
diff --git a/javax/swing/event/TreeModelEvent.java b/javax/swing/event/TreeModelEvent.java
index 2d562a5c4..490126f4d 100644
--- a/javax/swing/event/TreeModelEvent.java
+++ b/javax/swing/event/TreeModelEvent.java
@@ -46,7 +46,7 @@ import javax.swing.tree.TreePath;
* TreeModelEvent
* @author Andrew Selkirk
*/
-public class TreeModelEvent extends EventObject
+public class TreeModelEvent extends EventObject
{
/**
@@ -63,17 +63,17 @@ public class TreeModelEvent extends EventObject
* path
*/
protected TreePath path = null;
-
+
/**
* Constructor TreeModelEvent
* @param source Source object
* @param path
*/
- public TreeModelEvent(Object source, Object[] path)
+ public TreeModelEvent(Object source, Object[] path)
{
super(source);
this.path = new TreePath(path);
- }
+ }
/**
* Constructor TreeModelEvent
@@ -83,24 +83,24 @@ public class TreeModelEvent extends EventObject
* @param children Children
*/
public TreeModelEvent(Object source, Object[] path,
- int[] childIndices, Object[] children)
+ int[] childIndices, Object[] children)
{
super(source);
this.path = new TreePath(path);
this.childIndices = childIndices;
this.children = children;
- }
+ }
/**
* Constructor TreeModelEvent
* @param source Source object
* @param path Path
*/
- public TreeModelEvent(Object source, TreePath path)
+ public TreeModelEvent(Object source, TreePath path)
{
super(source);
this.path = path;
- }
+ }
/**
* Constructor TreeModelEvent
@@ -110,59 +110,59 @@ public class TreeModelEvent extends EventObject
* @param children Children
*/
public TreeModelEvent(Object source, TreePath path,
- int[] childIndices, Object[] children)
+ int[] childIndices, Object[] children)
{
super(source);
this.path = path;
this.childIndices = childIndices;
this.children = children;
- }
+ }
/**
* getChildIndices
* @return child indices
*/
- public int[] getChildIndices()
+ public int[] getChildIndices()
{
return childIndices;
- }
+ }
/**
* getChildren
* @return children
*/
- public Object[] getChildren()
+ public Object[] getChildren()
{
return children;
- }
+ }
/**
* getPath
* @return path
*/
- public Object[] getPath()
+ public Object[] getPath()
{
return path.getPath();
- }
+ }
/**
* getTreePath
* @return TreePath
*/
- public TreePath getTreePath()
+ public TreePath getTreePath()
{
return path;
- }
+ }
- /**
+ /**
* String representation
* @return String representation
*/
- public String toString()
+ public String toString()
{
- return getClass() + " [Source: " + getSource() + ", TreePath: "
- + getTreePath() + ", Child Indicies: " + getChildIndices()
+ return getClass() + " [Source: " + getSource() + ", TreePath: "
+ + getTreePath() + ", Child Indicies: " + getChildIndices()
+ ", Children: " + getChildren() + ", Path: " + getPath() +"]";
- }
+ }
-}
+}
diff --git a/javax/swing/event/TreeModelListener.java b/javax/swing/event/TreeModelListener.java
index 57b5c511b..780410588 100644
--- a/javax/swing/event/TreeModelListener.java
+++ b/javax/swing/event/TreeModelListener.java
@@ -46,29 +46,29 @@ import java.util.EventListener;
*/
public interface TreeModelListener extends EventListener {
- /**
- * Tree nodes changed
- * @param event Tree Model Event
- */
- void treeNodesChanged(TreeModelEvent event);
+ /**
+ * Tree nodes changed
+ * @param event Tree Model Event
+ */
+ void treeNodesChanged(TreeModelEvent event);
- /**
- * Tree nodes inserted
- * @param event Tree Model Event
- */
- void treeNodesInserted(TreeModelEvent event);
+ /**
+ * Tree nodes inserted
+ * @param event Tree Model Event
+ */
+ void treeNodesInserted(TreeModelEvent event);
- /**
- * Tree nodes removed
- * @param event Tree Model Event
- */
- void treeNodesRemoved(TreeModelEvent event);
+ /**
+ * Tree nodes removed
+ * @param event Tree Model Event
+ */
+ void treeNodesRemoved(TreeModelEvent event);
- /**
- * Tree structured changed
- * @param event Tree Model Event
- */
- void treeStructureChanged(TreeModelEvent event);
+ /**
+ * Tree structured changed
+ * @param event Tree Model Event
+ */
+ void treeStructureChanged(TreeModelEvent event);
} // TreeModelListener
diff --git a/javax/swing/event/TreeSelectionEvent.java b/javax/swing/event/TreeSelectionEvent.java
index 532a1dbf6..830170d9f 100644
--- a/javax/swing/event/TreeSelectionEvent.java
+++ b/javax/swing/event/TreeSelectionEvent.java
@@ -44,14 +44,14 @@ import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
/**
- * An event that carries information about a change to a
+ * An event that carries information about a change to a
* {@link TreeSelectionModel}.
- *
+ *
* @see TreeSelectionListener
- *
+ *
* @author Andrew Selkirk
*/
-public class TreeSelectionEvent extends EventObject
+public class TreeSelectionEvent extends EventObject
{
/**
@@ -77,112 +77,112 @@ public class TreeSelectionEvent extends EventObject
/**
* Creates a new <code>TreeSelectionEvent</code>.
- *
- * @param source the source (usually a {@link TreeSelectionModel},
+ *
+ * @param source the source (usually a {@link TreeSelectionModel},
* <code>null</code> not permitted).
- * @param paths an array of the paths that have been added to or removed
+ * @param paths an array of the paths that have been added to or removed
* from the selection.
* @param areNew a flag for each path where <code>true</code> indicates the
- * corresponding path has been added to the selection and
+ * corresponding path has been added to the selection and
* <code>false</code> indicates the path has been removed.
* @param oldLeadSelectionPath the old lead selection path (<code>null</code>
* permitted).
* @param newLeadSelectionPath the new lead selection path (<code>null</code>
* permitted).
*
- * @throws IllegalArgumentException if <code>source</code> is
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public TreeSelectionEvent(Object source, TreePath[] paths,
- boolean[] areNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath)
+ boolean[] areNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
{
super(source);
- this.paths = paths;
- this.areNew = areNew;
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
+ this.paths = paths;
+ this.areNew = areNew;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
}
/**
* Creates a new <code>TreeSelectionEvent</code>.
- *
+ *
* @param source the event source (usually a {@link TreeSelectionModel},
* <code>null</code> not permitted).
* @param path the path.
- * @param isNew <code>true</code> indicates that <code>path</code> has been
- * added to the selection, and <code>false</code> indicates that it has
+ * @param isNew <code>true</code> indicates that <code>path</code> has been
+ * added to the selection, and <code>false</code> indicates that it has
* been removed.
* @param oldLeadSelectionPath the old lead selection path (<code>null</code>
* permitted).
* @param newLeadSelectionPath the new lead selection path (<code>null</code>
* permitted).
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public TreeSelectionEvent(Object source, TreePath path,
- boolean isNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath)
+ boolean isNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
{
super(source);
this.paths = new TreePath[]{path};
this.areNew = new boolean[]{isNew};
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
}
/**
* Returns the first path element.
- *
+ *
* @return The first path element.
- *
+ *
* @see #getPaths()
*/
public TreePath getPath()
{
return paths[0];
- }
+ }
/**
* Returns an array of the paths that changed in the selection.
- *
+ *
* @return The paths that changed in the selection.
- *
+ *
* @see #isAddedPath(TreePath)
*/
public TreePath[] getPaths()
{
return (TreePath[]) paths.clone();
- }
+ }
/**
* Returns <code>true</code> if the path returned by {@link #getPath()} has
* been added to the selection, and <code>false</code> if it has been
* removed.
- *
+ *
* @return A boolean.
- *
+ *
* @see #isAddedPath(int)
*/
public boolean isAddedPath()
{
return areNew[0];
- }
+ }
/**
- * Returns <code>true</code> if <code>path</code> has been added to the
+ * Returns <code>true</code> if <code>path</code> has been added to the
* selection, and <code>false</code> if the path has been removed from the
* selection.
- *
+ *
* @param path the path to check.
- *
+ *
* @return A flag indicating whether the path has been added to, or removed
* from, the selection.
- *
+ *
* @throw IllegalArgumentException if <code>path</code> is not one of the
* paths in {@link #getPaths()}.
- *
+ *
* @see #isAddedPath(int)
*/
public boolean isAddedPath(TreePath path)
@@ -192,20 +192,20 @@ public class TreeSelectionEvent extends EventObject
return areNew[i];
throw new IllegalArgumentException("Unknown 'path' argument.");
- }
+ }
/**
- * Returns <code>true</code> if the path at the specified index has been
- * added to the selection, and <code>false</code> if the path has been
+ * Returns <code>true</code> if the path at the specified index has been
+ * added to the selection, and <code>false</code> if the path has been
* removed from the selection.
- *
+ *
* @param index the path index.
- *
+ *
* @return A flag indicating whether the path has been added to, or removed
* from, the selection.
- *
+ *
* @since 1.3
- *
+ *
* @see #isAddedPath(TreePath)
*/
public boolean isAddedPath(int index)
@@ -215,21 +215,21 @@ public class TreeSelectionEvent extends EventObject
/**
* Returns the old lead selection path.
- *
+ *
* @return The old lead selection path (possibly <code>null</code>).
- *
+ *
* @see #getNewLeadSelectionPath()
*/
public TreePath getOldLeadSelectionPath()
{
return oldLeadSelectionPath;
- }
+ }
/**
* Returns the new lead selection path.
- *
+ *
* @return The new lead selection path (possibly <code>null</code>).
- *
+ *
* @see #getOldLeadSelectionPath()
*/
public TreePath getNewLeadSelectionPath()
@@ -240,18 +240,18 @@ public class TreeSelectionEvent extends EventObject
/**
* Creates a shallow copy of this <code>TreeSelectionEvent</code>, replacing
* the source with <code>source</code>.
- *
+ *
* @param source the new event source (<code>null</code> not permitted).
- *
+ *
* @return A cloned event with another event source.
- *
- * @throws IllegalArgumentException if <code>source</code> is
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
* <code>null</code>.
*/
public Object cloneWithSource(Object source)
{
return new TreeSelectionEvent (source, paths, areNew, oldLeadSelectionPath,
newLeadSelectionPath);
- }
+ }
-}
+}
diff --git a/javax/swing/event/TreeSelectionListener.java b/javax/swing/event/TreeSelectionListener.java
index 2171e39d6..8f8711d3a 100644
--- a/javax/swing/event/TreeSelectionListener.java
+++ b/javax/swing/event/TreeSelectionListener.java
@@ -44,17 +44,17 @@ import javax.swing.tree.TreeSelectionModel;
/**
* A listener that receives {@link TreeSelectionEvent} notifications from a
* source (such as a {@link TreeSelectionModel}).
- *
+ *
* @author Andrew Selkirk
*/
-public interface TreeSelectionListener extends EventListener
+public interface TreeSelectionListener extends EventListener
{
/**
* Receives notification of a change to a tree selection model.
- *
+ *
* @param event information about the event.
*/
void valueChanged(TreeSelectionEvent event);
-}
+}
diff --git a/javax/swing/event/TreeWillExpandListener.java b/javax/swing/event/TreeWillExpandListener.java
index 89d3764f3..7bdcbe48d 100644
--- a/javax/swing/event/TreeWillExpandListener.java
+++ b/javax/swing/event/TreeWillExpandListener.java
@@ -49,7 +49,7 @@ public interface TreeWillExpandListener extends EventListener
{
/**
* Invoked whenever a node in the tree is about to be collapsed.
- *
+ *
* @param event The tree expansion Event
*/
void treeWillCollapse(TreeExpansionEvent event)
@@ -57,9 +57,9 @@ public interface TreeWillExpandListener extends EventListener
/**
* Invoked whenever a node in the tree is about to be expanded.
- *
+ *
* @param event The tree expansion Event
*/
void treeWillExpand(TreeExpansionEvent event)
throws ExpandVetoException;
-}
+}
diff --git a/javax/swing/event/UndoableEditEvent.java b/javax/swing/event/UndoableEditEvent.java
index b59ceadc9..b889bb656 100644
--- a/javax/swing/event/UndoableEditEvent.java
+++ b/javax/swing/event/UndoableEditEvent.java
@@ -47,7 +47,7 @@ import javax.swing.undo.UndoableEdit;
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class UndoableEditEvent extends EventObject
+public class UndoableEditEvent extends EventObject
{
private static final long serialVersionUID = 4418044561759134484L;
@@ -62,19 +62,19 @@ public class UndoableEditEvent extends EventObject
* @param source TODO
* @param edit TODO
*/
- public UndoableEditEvent(Object source, UndoableEdit edit)
+ public UndoableEditEvent(Object source, UndoableEdit edit)
{
super(source);
this.edit = edit;
- }
+ }
/**
* getEdit
* @return UndoableEdit
*/
- public UndoableEdit getEdit()
+ public UndoableEdit getEdit()
{
return edit;
}
-}
+}
diff --git a/javax/swing/filechooser/FileFilter.java b/javax/swing/filechooser/FileFilter.java
index de11525a2..68bcb6531 100644
--- a/javax/swing/filechooser/FileFilter.java
+++ b/javax/swing/filechooser/FileFilter.java
@@ -45,12 +45,12 @@ import javax.swing.JFileChooser;
/**
* The base class for filters that control the visibility of files in the
* {@link JFileChooser} component.
- *
+ *
* @see JFileChooser#addChoosableFileFilter(FileFilter)
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
-public abstract class FileFilter
+public abstract class FileFilter
{
/**
@@ -64,20 +64,20 @@ public abstract class FileFilter
/**
* Returns <code>true</code> if the specified file matches the filter, and
* <code>false</code> otherwise.
- *
+ *
* @param file the file.
- *
+ *
* @return A boolean.
*/
public abstract boolean accept(File file);
/**
- * Returns a description of the files that will be selected by the filter
- * (for example, "Java source files"). This description will usually be
+ * Returns a description of the files that will be selected by the filter
+ * (for example, "Java source files"). This description will usually be
* displayed on the {@link JFileChooser} component, often in a combo box that
* is used to select the appropriate filter (in cases where more than one
* filter is available).
- *
+ *
* @return A description of the filter.
*/
public abstract String getDescription();
diff --git a/javax/swing/filechooser/FileSystemView.java b/javax/swing/filechooser/FileSystemView.java
index 41d865a96..5c3c0b8ee 100644
--- a/javax/swing/filechooser/FileSystemView.java
+++ b/javax/swing/filechooser/FileSystemView.java
@@ -46,14 +46,14 @@ import javax.swing.JFileChooser;
/**
- * The base class providing a view of the file system for use by the
+ * The base class providing a view of the file system for use by the
* {@link JFileChooser} component.
*/
public abstract class FileSystemView
{
/** The instance returned by {@link #getFileSystemView()}. */
private static FileSystemView defaultFileSystemView;
-
+
/**
* Creates a new file object with the given name in the specified directory.
*
@@ -101,12 +101,12 @@ public abstract class FileSystemView
* Creates a new folder with a unique name in the specified directory and
* returns a {@link File} object representing the new directory.
*
- * @param containingDir the directory to contain the new folder
+ * @param containingDir the directory to contain the new folder
* (<code>null</code> not permitted).
*
* @return A {@link File} object representing the new directory.
*
- * @throws IOException if an exception occurs while creating the new
+ * @throws IOException if an exception occurs while creating the new
* directory.
*/
public abstract File createNewFolder(File containingDir)
@@ -137,8 +137,8 @@ public abstract class FileSystemView
}
/**
- * Returns an array containing the files in the given directory. The
- * <code>useFileHiding</code> controls whether or not hidden files are
+ * Returns an array containing the files in the given directory. The
+ * <code>useFileHiding</code> controls whether or not hidden files are
* included in the result.
*
* @param dir the directory (if <code>null</code>
@@ -158,7 +158,7 @@ public abstract class FileSystemView
ArrayList trim = new ArrayList();
for (int i = 0; i < files.length; i++)
if (! files[i].isHidden())
- trim.add(files[i]);
+ trim.add(files[i]);
File[] value = (File[]) trim.toArray(new File[trim.size()]);
return value;
}
@@ -220,12 +220,12 @@ public abstract class FileSystemView
}
/**
- * Returns the name of a file as it would be displayed by the underlying
+ * Returns the name of a file as it would be displayed by the underlying
* system.
*
* @param f the file.
*
- * @return the name of a file as it would be displayed by the underlying
+ * @return the name of a file as it would be displayed by the underlying
* system
*
* @specnote The specification suggests that the information here is
@@ -242,8 +242,8 @@ public abstract class FileSystemView
}
/**
- * Returns the icon that would be displayed for the given file by the
- * underlying system. This implementation returns <code>null</code>,
+ * Returns the icon that would be displayed for the given file by the
+ * underlying system. This implementation returns <code>null</code>,
* subclasses must override.
*
* @param f the file.
@@ -256,8 +256,8 @@ public abstract class FileSystemView
}
/**
- * Returns the type description of a file that would be displayed by the
- * underlying system. This implementation returns <code>null</code>,
+ * Returns the type description of a file that would be displayed by the
+ * underlying system. This implementation returns <code>null</code>,
* subclasses must override.
*
* @param f the file.
@@ -282,7 +282,7 @@ public abstract class FileSystemView
}
/**
- * Returns <code>true</code> if the given directory represents a disk
+ * Returns <code>true</code> if the given directory represents a disk
* drive, and <code>false</code> otherwise. This default implementation
* always returns <code>false</code>.
*
@@ -326,12 +326,12 @@ public abstract class FileSystemView
String filename = dir.getAbsolutePath();
for (int i = 0; i < roots.length; i++)
if (roots[i].getAbsolutePath().equals(filename))
- return true;
+ return true;
return false;
}
/**
- * Returns <code>true</code> if the given directory represents a floppy
+ * Returns <code>true</code> if the given directory represents a floppy
* drive, and <code>false</code> otherwise. This default implementation
* always returns <code>false</code>.
*
@@ -345,12 +345,12 @@ public abstract class FileSystemView
}
/**
- * Returns <code>true</code> if the given file is hidden, and
+ * Returns <code>true</code> if the given file is hidden, and
* <code>false</code> otherwise.
*
* @param f the file.
*
- * @return <code>true</code> if the given file is hidden, and
+ * @return <code>true</code> if the given file is hidden, and
* <code>false</code> otherwise.
*/
public boolean isHiddenFile(File f)
@@ -359,13 +359,13 @@ public abstract class FileSystemView
}
/**
- * Returns <code>true</code> if <code>folder</code> is the parent of
+ * Returns <code>true</code> if <code>folder</code> is the parent of
* <code>file</code>, and <code>false</code> otherwise.
*
* @param folder the folder (<code>null</code> not permitted).
* @param file the file (<code>null</code> not permitted).
*
- * @return <code>true</code> if <code>folder</code> is the parent of
+ * @return <code>true</code> if <code>folder</code> is the parent of
* <code>file</code>, and <code>false</code> otherwise.
*/
public boolean isParent(File folder, File file)
@@ -390,13 +390,13 @@ public abstract class FileSystemView
}
/**
- * Returns <code>true</code> if the file is traversable, and
+ * Returns <code>true</code> if the file is traversable, and
* <code>false</code> otherwise. Here, all directories are considered
- * traversable, and files are considered non-traversable.
+ * traversable, and files are considered non-traversable.
*
* @param f the file or directory (<code>null</code> not permitted).
*
- * @return <code>true</code> if the file is traversable, and
+ * @return <code>true</code> if the file is traversable, and
* <code>false</code> otherwise.
*/
public Boolean isTraversable(File f)
diff --git a/javax/swing/filechooser/FileView.java b/javax/swing/filechooser/FileView.java
index 8c2be32ef..cfa39996b 100644
--- a/javax/swing/filechooser/FileView.java
+++ b/javax/swing/filechooser/FileView.java
@@ -43,86 +43,86 @@ import java.io.File;
import javax.swing.Icon;
/**
- * An abstract class that provides presentation information about files and
+ * An abstract class that provides presentation information about files and
* directories. .
- *
+ *
* @author Andrew Selkirk
*/
-public abstract class FileView
+public abstract class FileView
{
/**
* Creates a new <code>FileView</code> instance.
*/
- public FileView()
+ public FileView()
{
// Nothing to do here.
- }
+ }
/**
* Returns the name for the specified file. This method always returns
* <code>null</code> and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always <code>null</code>.
*/
- public String getName(File file)
+ public String getName(File file)
{
return null;
- }
+ }
/**
* Returns a description for the specified file. This method always returns
* <code>null</code> and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always <code>null</code>.
*/
- public String getDescription(File file)
+ public String getDescription(File file)
{
return null;
- }
+ }
/**
- * Returns a description for the type of the specified file. This method
+ * Returns a description for the type of the specified file. This method
* always returns <code>null</code> and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always <code>null</code>.
*/
- public String getTypeDescription(File file)
+ public String getTypeDescription(File file)
{
return null;
- }
+ }
/**
- * Returns an {@link Icon} to represent the specified file. This method
+ * Returns an {@link Icon} to represent the specified file. This method
* always returns <code>null</code> and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always <code>null</code>.
*/
- public Icon getIcon(File file)
+ public Icon getIcon(File file)
{
return null;
- }
+ }
/**
* Returns {@link Boolean#TRUE} if the given directory is traversable, and
- * {@link Boolean#FALSE} if it is not. This method always returns
+ * {@link Boolean#FALSE} if it is not. This method always returns
* <code>null</code> and should be overridden by subclasses.
- *
+ *
* @param directory the directory.
- *
+ *
* @return Always <code>null</code>.
*/
- public Boolean isTraversable(File directory)
+ public Boolean isTraversable(File directory)
{
return null;
- }
+ }
}
diff --git a/javax/swing/filechooser/UnixFileSystemView.java b/javax/swing/filechooser/UnixFileSystemView.java
index f8d71e1df..13417683a 100644
--- a/javax/swing/filechooser/UnixFileSystemView.java
+++ b/javax/swing/filechooser/UnixFileSystemView.java
@@ -48,7 +48,7 @@ import javax.swing.Icon;
/**
* A concrete implementation of {@link FileSystemView} that is appropriate for
* Unix-like systems.
- *
+ *
* @see FileSystemView#getFileSystemView()
*/
class UnixFileSystemView extends FileSystemView
@@ -58,18 +58,18 @@ class UnixFileSystemView extends FileSystemView
/**
* Creates a new folder with a unique name in the specified directory and
- * returns a {@link File} object representing the new directory. The name
- * of the new folder is <code>NewFolder</code> or, if a directory or file
- * with that name already exists, <code>NewFolder.n</code> where
- * <code>n</code> is the lowest integer greater than zero that results in
+ * returns a {@link File} object representing the new directory. The name
+ * of the new folder is <code>NewFolder</code> or, if a directory or file
+ * with that name already exists, <code>NewFolder.n</code> where
+ * <code>n</code> is the lowest integer greater than zero that results in
* a unique directory name.
*
- * @param containingDir the directory to contain the new folder
+ * @param containingDir the directory to contain the new folder
* (<code>null</code> not permitted).
*
* @return A {@link File} object representing the new directory.
*
- * @throws IOException if an exception occurs while creating the new
+ * @throws IOException if an exception occurs while creating the new
* directory.
*/
public File createNewFolder(File containingDir) throws IOException
@@ -80,22 +80,22 @@ class UnixFileSystemView extends FileSystemView
+ NEW_FOLDER_NAME;
while (f == null)
{
- String full = filename;
- if (count > 0)
- full += "." + (count++);
- f = new File(full);
- if (f.isDirectory() || f.isFile())
- {
- count++;
- f = null;
- }
+ String full = filename;
+ if (count > 0)
+ full += "." + (count++);
+ f = new File(full);
+ if (f.isDirectory() || f.isFile())
+ {
+ count++;
+ f = null;
+ }
}
f.mkdir();
return f;
}
/**
- * Returns an array containing the file system root.
+ * Returns an array containing the file system root.
*
* @return An array containing the file system root.
*/
@@ -105,12 +105,12 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the name of a file as it would be displayed by the underlying
+ * Returns the name of a file as it would be displayed by the underlying
* system.
*
* @param f the file.
*
- * @return the name of a file as it would be displayed by the underlying
+ * @return the name of a file as it would be displayed by the underlying
* system
*/
public String getSystemDisplayName(File f)
@@ -137,7 +137,7 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the icon that would be displayed for the given file by the
+ * Returns the icon that would be displayed for the given file by the
* underlying system. This method is NOT YET IMPLEMENTED.
*
* @param f the file.
@@ -152,7 +152,7 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the description of a file that would be displayed by the
+ * Returns the description of a file that would be displayed by the
* underlying system. This method is NOT YET IMPLEMENTED.
*
* @param f the file.
diff --git a/javax/swing/plaf/BorderUIResource.java b/javax/swing/plaf/BorderUIResource.java
index 317cb09ac..17424944c 100644
--- a/javax/swing/plaf/BorderUIResource.java
+++ b/javax/swing/plaf/BorderUIResource.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -96,8 +96,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
* called.
*/
private static Border loweredBevelBorderUIResource;
-
-
+
+
/**
* A shared instance of a {@link BevelBorderUIResource} whose
* <code>bevelType</code> is {@link
@@ -106,8 +106,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
* called.
*/
private static Border raisedBevelBorderUIResource;
-
-
+
+
/**
* A shared instance of a {@link LineBorderUIResource} for
* a one-pixel thick black line, or <code>null</code> if
@@ -132,7 +132,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
etchedBorderUIResource = new EtchedBorderUIResource();
return etchedBorderUIResource;
}
-
+
/**
* Returns a shared instance of {@link BevelBorderUIResource} whose
@@ -170,8 +170,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
BevelBorder.RAISED);
return raisedBevelBorderUIResource;
}
-
-
+
+
/**
* Returns a shared instance of {@link LineBorderUIResource} for
* a black, one-pixel width border.
@@ -193,23 +193,23 @@ public class BorderUIResource implements Border, UIResource, Serializable
* The wrapped border.
*/
private Border delegate;
-
-
+
+
/**
* Constructs a <code>BorderUIResource</code> for wrapping
* a <code>Border</code> object.
- *
+ *
* @param delegate the border to be wrapped.
*/
public BorderUIResource(Border delegate)
{
if (delegate == null)
throw new IllegalArgumentException();
-
+
this.delegate = delegate;
}
-
+
/**
* Paints the border around an enclosed component by calling
* the <code>paintBorder</code> method of the wrapped delegate.
@@ -226,8 +226,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
delegate.paintBorder(c, g, x, y, width, height);
}
-
-
+
+
/**
* Measures the width of this border by calling the
* <code>getBorderInsets</code> method of the wrapped
@@ -240,11 +240,11 @@ public class BorderUIResource implements Border, UIResource, Serializable
* width of the border at the respective edge.
*/
public Insets getBorderInsets(Component c)
- {
+ {
return delegate.getBorderInsets(c);
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting by calling the <code>isBorderOpaque</code>
@@ -255,7 +255,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
* can shine through the border.
*/
public boolean isBorderOpaque()
- {
+ {
return delegate.isBorderOpaque();
}
@@ -272,12 +272,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @author Brian Jones (cbj@gnu.org)
* @author Sascha Brawer (brawer@dandelis.ch)
*/
- public static class BevelBorderUIResource
+ public static class BevelBorderUIResource
extends BevelBorder
implements UIResource, Serializable
{
private static final long serialVersionUID = -1275542891108351642L;
-
+
/**
* Constructs a BevelBorderUIResource whose colors will be derived
* from the background of the enclosed component. The background
@@ -296,12 +296,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws IllegalArgumentException if <code>bevelType</code> has
* an unsupported value.
*/
- public BevelBorderUIResource(int bevelType)
- {
+ public BevelBorderUIResource(int bevelType)
+ {
super(bevelType);
}
-
-
+
+
/**
* Constructs a BevelBorderUIResource given its appearance type
* and two colors for its highlight and shadow.
@@ -334,9 +334,9 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws NullPointerException if <code>highlight</code> or
* <code>shadow</code> is <code>null</code>.
*/
- public BevelBorderUIResource(int bevelType,
- Color highlight,
- Color shadow)
+ public BevelBorderUIResource(int bevelType,
+ Color highlight,
+ Color shadow)
{
super(bevelType, highlight, shadow);
}
@@ -382,15 +382,15 @@ public class BorderUIResource implements Border, UIResource, Serializable
Color highlightOuter,
Color highlightInner,
Color shadowOuter,
- Color shadowInner)
+ Color shadowInner)
{
super(bevelType,
highlightOuter, highlightInner,
shadowOuter, shadowInner);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.CompoundBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -408,7 +408,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = 7550017084975167341L;
-
+
/**
* Constructs a CompoundBorderUIResource with the specified inside
* and outside borders.
@@ -429,8 +429,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(outsideBorder, insideBorder);
}
}
-
-
+
+
/**
* An {@link javax.swing.border.EmptyBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -447,12 +447,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @author Brian Jones (cbj@gnu.org)
* @author Sascha Brawer (brawer@dandelis.ch)
*/
- public static class EmptyBorderUIResource
+ public static class EmptyBorderUIResource
extends EmptyBorder
implements UIResource, Serializable
{
private static final long serialVersionUID = -4914187529340071708L;
-
+
/**
* Constructs an empty border given the number of pixels required
* on each side.
@@ -473,8 +473,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right);
}
-
-
+
+
/**
* Constructs an empty border given the number of pixels required
* on each side, passed in an Insets object.
@@ -486,8 +486,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(insets);
}
}
-
-
+
+
/**
* An {@link javax.swing.border.EtchedBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -509,7 +509,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -8186391754165296656L;
-
+
/**
* Constructs an EtchedBorderUIResource that appears lowered into
* the surface. The colors will be derived from the background
@@ -519,8 +519,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super();
}
-
-
+
+
/**
* Constructs an EtchedBorderUIResource with the specified
* appearance. The colors will be derived from the background
@@ -537,12 +537,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws IllegalArgumentException if <code>etchType</code> has
* an unsupported value.
*/
- public EtchedBorderUIResource(int etchType)
+ public EtchedBorderUIResource(int etchType)
{
super(etchType);
}
-
-
+
+
/**
* Constructs a lowered EtchedBorderUIResource, explicitly
* selecting the colors that will be used for highlight and
@@ -560,8 +560,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(highlight, shadow);
}
-
-
+
+
/**
* Constructs an EtchedBorderUIResource with the specified
* appearance, explicitly selecting the colors that will be used
@@ -590,8 +590,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(etchType, highlight, shadow);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.LineBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -612,7 +612,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -6171232338180172310L;
-
+
/**
* Constructs a LineBorderUIResource given its color. The border
* will be one pixel thick and have plain corners.
@@ -621,10 +621,10 @@ public class BorderUIResource implements Border, UIResource, Serializable
*/
public LineBorderUIResource(Color color)
{
- super(color);
+ super(color);
}
-
-
+
+
/**
* Constructs a LineBorder given its color and thickness. The
* border will have plain corners.
@@ -636,13 +636,13 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(color, thickness);
}
-
-
+
+
/* Note: Since JDK1.3, javax.swing.border.LineBorder also has a
* constructor which accepts a value for the roundedCorners
* property. However, as of JDK1.4.1, the LineBorderUIResource
* subclass does not have a corresponding constructor.
- *
+ *
* A request for enhancing the Swing API has been filed with Sun:
* http://developer.java.sun.com/developer/bugParade/bugs/4879999.html
*/
@@ -669,7 +669,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -8107923147541851122L;
-
+
/**
* Constructs a MatteBorderUIResource given the width on each side
* and a fill color.
@@ -690,8 +690,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right, color);
}
-
-
+
+
/**
* Constructs a MatteBorderUIResource given the width on each side
* and an icon for tiling the border area.
@@ -712,8 +712,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right, tileIcon);
}
-
-
+
+
/**
* Constructs a MatteBorderUIResource given an icon for tiling the
* border area. The icon width is used for the border insets at
@@ -724,15 +724,15 @@ public class BorderUIResource implements Border, UIResource, Serializable
* height="150" alt="[A picture of a MatteBorder made by this
* constructor]" /></p>
*
- * @param tileIcon an icon for tiling the border area.
+ * @param tileIcon an icon for tiling the border area.
*/
public MatteBorderUIResource(Icon tileIcon)
{
super(tileIcon);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.TitledBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -750,7 +750,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = 7667113547406407427L;
-
+
/**
* Constructs a TitledBorderUIResource given the text of its title.
*
@@ -761,8 +761,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(title);
}
-
-
+
+
/**
* Constructs an initially untitled TitledBorderUIResource
* given another border.
@@ -775,8 +775,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(border);
}
-
-
+
+
/**
* Constructs a TitledBorder given its border and title text.
*
@@ -878,8 +878,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(border, title, titleJustification, titlePosition,
titleFont);
}
-
-
+
+
/**
* Constructs a TitledBorder given its border, title text,
* horizontal alignment, vertical position, font, and color.
@@ -928,4 +928,3 @@ public class BorderUIResource implements Border, UIResource, Serializable
}
}
}
-
diff --git a/javax/swing/plaf/ColorChooserUI.java b/javax/swing/plaf/ColorChooserUI.java
index 16091416a..e9cb32caa 100644
--- a/javax/swing/plaf/ColorChooserUI.java
+++ b/javax/swing/plaf/ColorChooserUI.java
@@ -56,4 +56,3 @@ public abstract class ColorChooserUI extends ComponentUI
/* The constructor does not do anything. */
}
}
-
diff --git a/javax/swing/plaf/ColorUIResource.java b/javax/swing/plaf/ColorUIResource.java
index 36e10f2d1..3c9db2ec8 100644
--- a/javax/swing/plaf/ColorUIResource.java
+++ b/javax/swing/plaf/ColorUIResource.java
@@ -62,7 +62,7 @@ public class ColorUIResource extends Color implements UIResource
* @param g the green intensity, which must be in the range [0 .. 255].
* @param b the blue intensity, which must be in the range [0 .. 255].
*
- * @throws IllegalArgumentException if any of the values is outside the
+ * @throws IllegalArgumentException if any of the values is outside the
* specified range.
*/
public ColorUIResource(int r, int g, int b)
@@ -95,7 +95,7 @@ public class ColorUIResource extends Color implements UIResource
* @param g the green intensity, which must be in the range [0.0 .. 1.0].
* @param b the blue intensity, which must be in the range [0.0 .. 1.0].
*
- * @throws IllegalArgumentException if any of the values is outside the
+ * @throws IllegalArgumentException if any of the values is outside the
* specified range.
*/
public ColorUIResource(float r, float g, float b)
diff --git a/javax/swing/plaf/ComboBoxUI.java b/javax/swing/plaf/ComboBoxUI.java
index 58f6e815c..0a06d263e 100644
--- a/javax/swing/plaf/ComboBoxUI.java
+++ b/javax/swing/plaf/ComboBoxUI.java
@@ -55,7 +55,7 @@ public abstract class ComboBoxUI extends ComponentUI
{
// Nothing to do here.
}
-
+
/**
* Sets the visibility of the popup button.
*
@@ -77,7 +77,7 @@ public abstract class ComboBoxUI extends ComponentUI
* visible, <code>false</code> otherwise.
*/
public abstract boolean isPopupVisible(JComboBox c);
-
+
/**
* Determines whether the combo box can receive input focus.
*
@@ -88,5 +88,5 @@ public abstract class ComboBoxUI extends ComponentUI
* input focus, <code>false</code> otherwise.
*/
public abstract boolean isFocusTraversable(JComboBox c);
-
+
}
diff --git a/javax/swing/plaf/ComponentInputMapUIResource.java b/javax/swing/plaf/ComponentInputMapUIResource.java
index cfc43e4fc..4553562e9 100644
--- a/javax/swing/plaf/ComponentInputMapUIResource.java
+++ b/javax/swing/plaf/ComponentInputMapUIResource.java
@@ -66,4 +66,3 @@ public class ComponentInputMapUIResource extends ComponentInputMap
super(component);
}
}
-
diff --git a/javax/swing/plaf/ComponentUI.java b/javax/swing/plaf/ComponentUI.java
index be7b68a44..35f2de3ed 100644
--- a/javax/swing/plaf/ComponentUI.java
+++ b/javax/swing/plaf/ComponentUI.java
@@ -80,7 +80,7 @@ import javax.swing.JComponent;
*
* @author Sascha Brawer (brawer@dandelis.ch)
*/
-public abstract class ComponentUI
+public abstract class ComponentUI
{
/**
* Constructs a new UI delegate.
@@ -89,8 +89,8 @@ public abstract class ComponentUI
{
// Nothing to do here.
}
-
-
+
+
/**
* Sets up the specified component so it conforms the the design
* guidelines of the implemented look and feel. When the look and
@@ -145,8 +145,8 @@ public abstract class ComponentUI
{
// The default implementation does not change any properties.
}
-
-
+
+
/**
* Paints the component according to the design guidelines
* of the look and feel. Most subclasses will want to override
@@ -162,8 +162,8 @@ public abstract class ComponentUI
// Nothing is done here. This method is meant to be overridden by
// subclasses.
}
-
-
+
+
/**
* Fills the specified component with its background color
* (unless the <code>opaque</code> property is <code>false</code>)
@@ -192,7 +192,7 @@ public abstract class ComponentUI
}
paint(g, c);
}
-
+
/**
* Determines the preferred size of a component. The default
* implementation returns <code>null</code>, which means that
@@ -209,8 +209,8 @@ public abstract class ComponentUI
{
return null;
}
-
-
+
+
/**
* Determines the minimum size of a component. The default
* implementation calls {@link #getPreferredSize}, but subclasses
@@ -265,7 +265,7 @@ public abstract class ComponentUI
* inside its parent.
*/
public boolean contains(JComponent c, int x, int y)
- {
+ {
/* JComponent.contains calls the ui delegate for hit
* testing. Therefore, endless mutual recursion would result if we
* called c.contains(x, y) here.
@@ -282,8 +282,8 @@ public abstract class ComponentUI
return (x >= 0) && (x < c.getWidth())
&& (y >= 0) && (y < c.getHeight());
}
-
-
+
+
/**
* Creates a delegate object for the specified component. Users
* should use the <code>createUI</code> method of a suitable
@@ -298,7 +298,7 @@ public abstract class ComponentUI
"javax.swing.plaf.ComponentUI does not implement createUI; call "
+ "createUI on a subclass.");
}
-
+
/**
* Counts the number of accessible children in the component. The
diff --git a/javax/swing/plaf/FileChooserUI.java b/javax/swing/plaf/FileChooserUI.java
index e9be8f2ba..fafd21d2a 100644
--- a/javax/swing/plaf/FileChooserUI.java
+++ b/javax/swing/plaf/FileChooserUI.java
@@ -63,7 +63,7 @@ public abstract class FileChooserUI extends ComponentUI
// Nothing to do here.
}
-
+
/**
* Returns a <code>FileFilter</code> that accepts every file. While
* the filtering itself is not specific to any look and feel, the
diff --git a/javax/swing/plaf/IconUIResource.java b/javax/swing/plaf/IconUIResource.java
index 8ac9e0875..48503f8a0 100644
--- a/javax/swing/plaf/IconUIResource.java
+++ b/javax/swing/plaf/IconUIResource.java
@@ -63,7 +63,7 @@ public class IconUIResource implements Icon, UIResource, Serializable
/**
- * The icon that is wrapped by this <code>IconUIResource</code> (never
+ * The icon that is wrapped by this <code>IconUIResource</code> (never
* <code>null</code>).
*/
private Icon delegate;
diff --git a/javax/swing/plaf/SplitPaneUI.java b/javax/swing/plaf/SplitPaneUI.java
index 59ededf58..faf17cb08 100644
--- a/javax/swing/plaf/SplitPaneUI.java
+++ b/javax/swing/plaf/SplitPaneUI.java
@@ -93,8 +93,8 @@ public abstract class SplitPaneUI extends ComponentUI
* @return the current location of the divider.
*/
public abstract int getDividerLocation(JSplitPane pane);
-
-
+
+
/**
* Determines the minimum location of the divider.
*
diff --git a/javax/swing/plaf/TabbedPaneUI.java b/javax/swing/plaf/TabbedPaneUI.java
index 01a772014..59136e04c 100644
--- a/javax/swing/plaf/TabbedPaneUI.java
+++ b/javax/swing/plaf/TabbedPaneUI.java
@@ -60,8 +60,8 @@ public abstract class TabbedPaneUI extends ComponentUI
{
// Nothing to do here.
}
-
-
+
+
/**
* Determines which tab lies at a given position.
*
@@ -79,7 +79,7 @@ public abstract class TabbedPaneUI extends ComponentUI
*/
public abstract int tabForCoordinate(JTabbedPane pane,
int x, int y);
-
+
/**
* Calculates the bounding box of a tab.
@@ -108,4 +108,3 @@ public abstract class TabbedPaneUI extends ComponentUI
*/
public abstract int getTabRunCount(JTabbedPane pane);
}
-
diff --git a/javax/swing/plaf/TextUI.java b/javax/swing/plaf/TextUI.java
index 9f2737cc2..424cee92d 100644
--- a/javax/swing/plaf/TextUI.java
+++ b/javax/swing/plaf/TextUI.java
@@ -61,7 +61,7 @@ public abstract class TextUI extends ComponentUI
{
/**
* Constructs a new <code>TextUI</code>.
- */
+ */
public TextUI()
{
// Nothing to do here.
@@ -155,7 +155,7 @@ public abstract class TextUI extends ComponentUI
*/
public abstract int viewToModel(JTextComponent tc, Point loc,
Position.Bias[] outBias);
-
+
/**
@@ -235,7 +235,7 @@ public abstract class TextUI extends ComponentUI
Position.Bias startBias,
Position.Bias endBias);
-
+
/**
* Retrieves the <code>EditorKit</code> managing policies and
* persistent state.
@@ -246,8 +246,8 @@ public abstract class TextUI extends ComponentUI
* @return the <code>EditorKit</code> used by <code>tc</code>.
*/
public abstract EditorKit getEditorKit(JTextComponent tc);
-
-
+
+
/**
* Retrieves the root of the view tree that visually presents
* the text.
diff --git a/javax/swing/plaf/UIResource.java b/javax/swing/plaf/UIResource.java
index fe398fe54..511aaa70f 100644
--- a/javax/swing/plaf/UIResource.java
+++ b/javax/swing/plaf/UIResource.java
@@ -1,4 +1,4 @@
-/* UIResource.java
+/* UIResource.java
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,14 +44,14 @@ package javax.swing.plaf;
* renderer with <code>ComponentUI.uninstallUI()</code> the renderer
* property is set to <code>null</code>.
* <br>
- * A comparison against null can be used with all properties except for
- * the <code>java.awt.Component</code> properties font, foreground, and
+ * A comparison against null can be used with all properties except for
+ * the <code>java.awt.Component</code> properties font, foreground, and
* background. The container can provide the value of the properties if
* they are initialized or set to <code>null</code>.
- *
+ *
* @author Brian Jones
*
- * @see ComponentUI
+ * @see ComponentUI
*/
public interface UIResource
{
diff --git a/javax/swing/plaf/basic/BasicArrowButton.java b/javax/swing/plaf/basic/BasicArrowButton.java
index 781269b2a..1d6e8874d 100644
--- a/javax/swing/plaf/basic/BasicArrowButton.java
+++ b/javax/swing/plaf/basic/BasicArrowButton.java
@@ -51,15 +51,15 @@ import javax.swing.SwingConstants;
* A button that displays an arrow (triangle) that points {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}. This button is used by
* the {@link BasicComboBoxUI} class.
- *
+ *
* @see BasicComboBoxUI#createArrowButton
*/
public class BasicArrowButton extends JButton implements SwingConstants
{
- /**
- * The direction that the arrow points.
- *
+ /**
+ * The direction that the arrow points.
+ *
* @see #getDirection()
*/
protected int direction;
@@ -89,7 +89,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* in the specified direction. If the <code>direction</code> is not one of
* the specified constants, no arrow is drawn.
*
- * @param direction The direction the arrow points in (one of:
+ * @param direction The direction the arrow points in (one of:
* {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*/
public BasicArrowButton(int direction)
@@ -103,7 +103,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* Creates a new BasicArrowButton object with the given colors and
* direction.
*
- * @param direction The direction to point in (one of:
+ * @param direction The direction to point in (one of:
* {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
* @param background The background color.
* @param shadow The shadow color.
@@ -133,7 +133,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
/**
- * Returns the direction of the arrow (one of: {@link #NORTH},
+ * Returns the direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*
* @return The direction of the arrow.
@@ -146,7 +146,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
/**
* Sets the direction of the arrow.
*
- * @param dir The new direction of the arrow (one of: {@link #NORTH},
+ * @param dir The new direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*/
public void setDirection(int dir)
@@ -163,23 +163,23 @@ public class BasicArrowButton extends JButton implements SwingConstants
public void paint(Graphics g)
{
super.paint(g);
-
+
int height = getHeight();
int size = height / 4;
-
+
int x = (getWidth() - size) / 2;
int y = (height - size) / 2;
-
+
ButtonModel m = getModel();
if (m.isArmed())
{
x++;
y++;
}
-
+
paintTriangle(g, x, y, size, direction, isEnabled());
}
-
+
/**
* Returns the preferred size of the arrow button.
*
@@ -220,17 +220,17 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
/**
- * Paints a triangle with the given size, location and direction. It is
+ * Paints a triangle with the given size, location and direction. It is
* difficult to explain the rationale behind the positioning of the triangle
- * relative to the given (x, y) position - by trial and error we seem to
- * match the behaviour of the reference implementation (which is missing a
+ * relative to the given (x, y) position - by trial and error we seem to
+ * match the behaviour of the reference implementation (which is missing a
* specification for this method).
*
* @param g the graphics device.
* @param x the x-coordinate for the triangle's location.
* @param y the y-coordinate for the triangle's location.
* @param size the arrow size (depth).
- * @param direction the direction of the arrow (one of: {@link #NORTH},
+ * @param direction the direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
* @param isEnabled if <code>true</code> the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
@@ -258,11 +258,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
g.setColor(savedColor);
}
-
+
/**
- * Paints an upward-pointing triangle. This method is called by the
+ * Paints an upward-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -270,7 +270,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if <code>true</code> the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleNorth(Graphics g, int x, int y, int size,
+ private void paintTriangleNorth(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 2) / 2;
@@ -297,11 +297,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX1 + 1, baseY + 1, baseX2 + 1, baseY + 1);
}
}
-
+
/**
- * Paints an downward-pointing triangle. This method is called by the
+ * Paints an downward-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -309,7 +309,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if <code>true</code> the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleSouth(Graphics g, int x, int y, int size,
+ private void paintTriangleSouth(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 2) / 2;
@@ -337,11 +337,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(tipX + 1, tipY + 1, baseX2 + 1, baseY + 1);
}
}
-
+
/**
- * Paints a right-pointing triangle. This method is called by the
+ * Paints a right-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -349,7 +349,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if <code>true</code> the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleEast(Graphics g, int x, int y, int size,
+ private void paintTriangleEast(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 1);
@@ -357,7 +357,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
int baseX = x;
int baseY1 = tipY - (size - 1);
int baseY2 = tipY + (size - 1);
-
+
Polygon triangle = new Polygon();
triangle.addPoint(tipX, tipY);
triangle.addPoint(baseX, baseY1);
@@ -378,11 +378,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX + 1, baseY2 + 1, tipX + 1, tipY + 1);
}
}
-
+
/**
- * Paints a left-pointing triangle. This method is called by the
+ * Paints a left-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -390,7 +390,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if <code>true</code> the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleWest(Graphics g, int x, int y, int size,
+ private void paintTriangleWest(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x;
@@ -398,7 +398,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
int baseX = x + (size - 1);
int baseY1 = tipY - (size - 1);
int baseY2 = tipY + (size - 1);
-
+
Polygon triangle = new Polygon();
triangle.addPoint(tipX, tipY);
triangle.addPoint(baseX, baseY1);
@@ -418,5 +418,5 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX + 1, baseY1 + 1, baseX + 1, baseY2 + 1);
}
}
-
+
}
diff --git a/javax/swing/plaf/basic/BasicBorders.java b/javax/swing/plaf/basic/BasicBorders.java
index 5e2cf2e48..83afc33a2 100644
--- a/javax/swing/plaf/basic/BasicBorders.java
+++ b/javax/swing/plaf/basic/BasicBorders.java
@@ -252,7 +252,7 @@ public class BasicBorders
* <code>UIDefaults</code> of the currently active look and feel
* using the keys <code>&#x201c;SplitPane.darkShadow&#x201d;</code> and
* <code>&#x201c;SplitPane.highlight&#x201d;</code>.
- *
+ *
* <p><img src="doc-files/BasicBorders.SplitPaneBorder-1.png" width="520"
* height="200" alt="[A screen shot for JSplitPane.HORIZONTAL_SPLIT]" />
*
@@ -284,7 +284,7 @@ public class BasicBorders
* other two edges is the background color of the divider.
*
* <p><img src="doc-files/BasicBorders.SplitPaneDividerBorder-1.png"
- * width="520" height="200" alt=
+ * width="520" height="200" alt=
* "[A screen shot for JSplitPane.HORIZONTAL_SPLIT]" />
*
* @return an instance of <code>SplitPaneDividerBorder</code>, which is
@@ -332,7 +332,7 @@ public class BasicBorders
UIManager.getColor("TextField.light"),
UIManager.getColor("TextField.highlight"));
}
-
+
/**
* Returns a two-pixel thick, green
@@ -407,8 +407,8 @@ public class BasicBorders
return sharedMarginBorder;
}
-
-
+
+
/**
* A border whose appearance depends on the state of
* the enclosed button.
@@ -429,36 +429,36 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -157053874580739687L;
-
-
+
+
/**
* The color for drawing the shaded parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color shadow;
-
-
+
+
/**
* The color for drawing the dark shaded parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color darkShadow;
-
-
+
+
/**
* The color for drawing the highlighted parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color highlight;
-
-
+
+
/**
* The color for drawing the bright highlighted parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color lightHighlight;
-
-
+
+
/**
* Constructs a new border for drawing a button in the Basic
* look and feel.
@@ -485,7 +485,7 @@ public class BasicBorders
? lightHighlight
: Color.white;
}
-
+
/**
* Paints the ButtonBorder around a given component.
@@ -503,10 +503,10 @@ public class BasicBorders
int x, int y, int width, int height)
{
ButtonModel bmodel = null;
-
+
if (c instanceof AbstractButton)
bmodel = ((AbstractButton) c).getModel();
-
+
BasicGraphicsUtils.drawBezel(
g, x, y, width, height,
/* pressed */ (bmodel != null)
@@ -516,8 +516,8 @@ public class BasicBorders
&& ((JButton) c).isDefaultButton(),
shadow, darkShadow, highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -534,7 +534,7 @@ public class BasicBorders
* <code>bottom</code> fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -545,7 +545,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -583,8 +583,8 @@ public class BasicBorders
return insets;
}
}
-
-
+
+
/**
* A border that makes its enclosed component appear as lowered
* into the surface. Typically used for text fields.
@@ -668,7 +668,7 @@ public class BasicBorders
? lightHighlight : Color.white;
}
-
+
/**
* Paints the FieldBorder around a given component.
*
@@ -688,8 +688,8 @@ public class BasicBorders
shadow, darkShadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -749,8 +749,8 @@ public class BasicBorders
return insets;
}
}
-
-
+
+
/**
* An invisible, but spacing border whose margin is determined
* by calling the <code>getMargin()</code> method of the enclosed
@@ -772,8 +772,8 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -3035848353448896090L;
-
-
+
+
/**
* Constructs a new MarginBorder.
*/
@@ -781,7 +781,7 @@ public class BasicBorders
{
// Nothing to do here.
}
-
+
/**
* Measures the width of this border.
*
@@ -797,8 +797,8 @@ public class BasicBorders
{
return getBorderInsets(c, new Insets(0, 0, 0, 0));
}
-
-
+
+
/**
* Determines the insets of this border by calling the
* <code>getMargin()</code> method of the enclosed component. The
@@ -839,7 +839,7 @@ public class BasicBorders
margin = ((JToolBar) c).getMargin();
else if (c instanceof JTextComponent)
margin = ((JTextComponent) c).getMargin();
-
+
if (margin == null)
insets.top = insets.left = insets.bottom = insets.right = 0;
else
@@ -853,7 +853,7 @@ public class BasicBorders
return insets;
}
}
-
+
/**
* A border for drawing a separator line below JMenuBar.
@@ -872,8 +872,8 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -6909056571935227506L;
-
-
+
+
/**
* The shadow color, which is used for the upper line of the
* two-pixel thick bottom edge.
@@ -949,7 +949,7 @@ public class BasicBorders
g.setColor(highlight);
g.drawLine(x + 1, y + 1, x + width - 3, y + 1);
- g.drawLine(x + width - 1, y, x + width - 1, y + 1);
+ g.drawLine(x + width - 1, y, x + width - 1, y + 1);
}
finally
{
@@ -1098,7 +1098,7 @@ public class BasicBorders
{
lowered = button.isSelected()
|| (/* mouse inside */ bmodel.isArmed() && bmodel.isPressed());
- focused = button.hasFocus() && button.isFocusPainted();
+ focused = button.hasFocus() && button.isFocusPainted();
}
if (lowered)
@@ -1112,8 +1112,8 @@ public class BasicBorders
shadow, darkShadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -1124,7 +1124,7 @@ public class BasicBorders
* <code>bottom</code> fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -1135,7 +1135,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -1439,7 +1439,7 @@ public class BasicBorders
y += rect.y - 1;
int right = x + rect.width + 1;
int bottom = y + rect.height + 1;
-
+
Color oldColor = g.getColor();
try
{
@@ -1466,7 +1466,7 @@ public class BasicBorders
}
}
-
+
/**
* Measures the width of this border.
*
@@ -1616,7 +1616,7 @@ public class BasicBorders
return true;
}
-
+
/**
* Determines the JSplitPane whose divider is being painted.
*
@@ -1661,7 +1661,7 @@ public class BasicBorders
*/
static final long serialVersionUID = -3528666548001058394L;
-
+
/**
* Constructs a new border for drawing a JToggleButton in
* the Basic look and feel.
@@ -1708,7 +1708,7 @@ public class BasicBorders
* is selected or not.
*/
BasicGraphicsUtils.drawBezel(g, x, y, width, height,
- /* pressed */ false,
+ /* pressed */ false,
/* default */ false,
shadow, darkShadow,
highlight, lightHighlight);
@@ -1725,7 +1725,7 @@ public class BasicBorders
* <code>bottom</code> fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -1736,7 +1736,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
diff --git a/javax/swing/plaf/basic/BasicButtonListener.java b/javax/swing/plaf/basic/BasicButtonListener.java
index c99de2c70..22033b6ad 100644
--- a/javax/swing/plaf/basic/BasicButtonListener.java
+++ b/javax/swing/plaf/basic/BasicButtonListener.java
@@ -131,7 +131,7 @@ public class BasicButtonListener
{
// Do nothing here.
}
-
+
public void propertyChange(PropertyChangeEvent e)
{
// Store the TextLayout for this in a client property for speed-up
@@ -166,31 +166,31 @@ public class BasicButtonListener
*
* @param b the button to check
*/
- protected void checkOpacity(AbstractButton b)
- {
+ protected void checkOpacity(AbstractButton b)
+ {
b.setOpaque(b.isContentAreaFilled());
}
-
- public void focusGained(FocusEvent e)
- {
+
+ public void focusGained(FocusEvent e)
+ {
if (e.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton) e.getSource();
if (button.isFocusPainted())
- button.repaint();
+ button.repaint();
}
}
-
+
public void focusLost(FocusEvent e)
{
if (e.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton) e.getSource();
if (button.isFocusPainted())
- button.repaint();
+ button.repaint();
}
}
-
+
public void installKeyboardActions(JComponent c)
{
ButtonUI ui = ((AbstractButton) c).getUI();
@@ -198,7 +198,7 @@ public class BasicButtonListener
{
// Install InputMap.
BasicButtonUI basicUI = (BasicButtonUI) ui;
- String prefix = basicUI.getPropertyPrefix();
+ String prefix = basicUI.getPropertyPrefix();
InputMap focusInputMap =
(InputMap) UIManager.get(prefix + "focusInputMap");
SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED,
@@ -212,11 +212,11 @@ public class BasicButtonListener
}
SwingUtilities.replaceUIActionMap(c, am);
}
-
- c.getActionMap().put("pressed",
- new AbstractAction()
+
+ c.getActionMap().put("pressed",
+ new AbstractAction()
{
- public void actionPerformed(ActionEvent e)
+ public void actionPerformed(ActionEvent e)
{
AbstractButton button = (AbstractButton) e.getSource();
ButtonModel model = button.getModel();
@@ -225,11 +225,11 @@ public class BasicButtonListener
model.setPressed(true);
}
});
-
- c.getActionMap().put("released",
- new AbstractAction()
+
+ c.getActionMap().put("released",
+ new AbstractAction()
{
- public void actionPerformed(ActionEvent e)
+ public void actionPerformed(ActionEvent e)
{
AbstractButton button = (AbstractButton) e.getSource();
ButtonModel model = button.getModel();
@@ -237,7 +237,7 @@ public class BasicButtonListener
model.setPressed(false);
model.setArmed(false);
}
- });
+ });
}
/**
@@ -259,23 +259,23 @@ public class BasicButtonListener
SwingUtilities.replaceUIActionMap(c, null);
SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, null);
}
-
+
public void stateChanged(ChangeEvent e)
{
// Need to repaint when the button state changes.
((AbstractButton) e.getSource()).repaint();
}
-
+
public void mouseMoved(MouseEvent e)
{
// Nothing to do here.
}
-
+
public void mouseDragged(MouseEvent e)
{
// Nothing to do here.
}
-
+
public void mouseClicked(MouseEvent e)
{
// Nothing to do here.
@@ -305,7 +305,7 @@ public class BasicButtonListener
}
/**
- * Accept a mouse release event and set the button's
+ * Accept a mouse release event and set the button's
* "pressed" property to <code>true</code>, if the model
* is armed. If the model is not armed, ignore the event.
*
diff --git a/javax/swing/plaf/basic/BasicButtonUI.java b/javax/swing/plaf/basic/BasicButtonUI.java
index 9f685bb7b..1697c24d9 100644
--- a/javax/swing/plaf/basic/BasicButtonUI.java
+++ b/javax/swing/plaf/basic/BasicButtonUI.java
@@ -120,7 +120,7 @@ public class BasicButtonUI extends ButtonUI
*
* @return A new UI capable of drawing the component
*/
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
if (sharedUI == null)
sharedUI = new BasicButtonUI();
@@ -129,9 +129,9 @@ public class BasicButtonUI extends ButtonUI
/**
* Returns the default gap between the button's text and icon (in pixels).
- *
+ *
* @param b the button (ignored).
- *
+ *
* @return The gap.
*/
public int getDefaultTextIconGap(AbstractButton b)
@@ -141,19 +141,19 @@ public class BasicButtonUI extends ButtonUI
/**
* Sets the text shift offset to zero.
- *
+ *
* @see #setTextShiftOffset()
*/
protected void clearTextShiftOffset()
{
textShiftOffset = 0;
}
-
+
/**
* Returns the text shift offset.
- *
+ *
* @return The text shift offset.
- *
+ *
* @see #clearTextShiftOffset()
* @see #setTextShiftOffset()
*/
@@ -164,7 +164,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Sets the text shift offset to the value in {@link #defaultTextShiftOffset}.
- *
+ *
* @see #clearTextShiftOffset()
*/
protected void setTextShiftOffset()
@@ -185,7 +185,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Installs the default settings.
- *
+ *
* @param b the button (<code>null</code> not permitted).
*/
protected void installDefaults(AbstractButton b)
@@ -218,7 +218,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Removes the defaults added by {@link #installDefaults(AbstractButton)}.
- *
+ *
* @param b the button (<code>null</code> not permitted).
*/
protected void uninstallDefaults(AbstractButton b)
@@ -229,11 +229,11 @@ public class BasicButtonUI extends ButtonUI
/**
* Creates and returns a new instance of {@link BasicButtonListener}. This
- * method provides a hook to make it easy for subclasses to install a
+ * method provides a hook to make it easy for subclasses to install a
* different listener.
- *
+ *
* @param b the button.
- *
+ *
* @return A new listener.
*/
protected BasicButtonListener createButtonListener(AbstractButton b)
@@ -249,7 +249,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Installs listeners for the button.
- *
+ *
* @param b the button (<code>null</code> not permitted).
*/
protected void installListeners(AbstractButton b)
@@ -259,7 +259,7 @@ public class BasicButtonUI extends ButtonUI
{
b.addChangeListener(listener);
b.addPropertyChangeListener(listener);
- b.addFocusListener(listener);
+ b.addFocusListener(listener);
b.addMouseListener(listener);
b.addMouseMotionListener(listener);
}
@@ -271,7 +271,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Uninstalls listeners for the button.
- *
+ *
* @param b the button (<code>null</code> not permitted).
*/
protected void uninstallListeners(AbstractButton b)
@@ -281,7 +281,7 @@ public class BasicButtonUI extends ButtonUI
{
b.removeChangeListener(listener);
b.removePropertyChangeListener(listener);
- b.removeFocusListener(listener);
+ b.removeFocusListener(listener);
b.removeMouseListener(listener);
b.removeMouseMotionListener(listener);
}
@@ -304,12 +304,12 @@ public class BasicButtonUI extends ButtonUI
/**
* Install the BasicButtonUI as the UI for a particular component.
* This means registering all the UI's listeners with the component,
- * and setting any properties of the button which are particular to
+ * and setting any properties of the button which are particular to
* this look and feel.
*
* @param c The component to install the UI into
*/
- public void installUI(final JComponent c)
+ public void installUI(final JComponent c)
{
super.installUI(c);
if (c instanceof AbstractButton)
@@ -395,7 +395,7 @@ public class BasicButtonUI extends ButtonUI
*
* @return The preferred dimensions of the component
*/
- public Dimension getPreferredSize(JComponent c)
+ public Dimension getPreferredSize(JComponent c)
{
AbstractButton b = (AbstractButton) c;
Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b,
@@ -417,7 +417,7 @@ public class BasicButtonUI extends ButtonUI
i = b.getRolloverSelectedIcon();
else if (b.getRolloverIcon() != null)
i = b.getRolloverIcon();
- }
+ }
else if (b.isSelected() && b.isEnabled())
{
@@ -434,7 +434,7 @@ public class BasicButtonUI extends ButtonUI
}
/**
- * Paint the component, which is an {@link AbstractButton}, according to
+ * Paint the component, which is an {@link AbstractButton}, according to
* its current state.
*
* @param g The graphics context to paint with
@@ -462,13 +462,13 @@ public class BasicButtonUI extends ButtonUI
g.setFont(f);
Icon icon = b.getIcon();
String text = b.getText();
- text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
text, icon,
- b.getVerticalAlignment(),
+ b.getVerticalAlignment(),
b.getHorizontalAlignment(),
- b.getVerticalTextPosition(),
+ b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
- viewR, iconR, textR,
+ viewR, iconR, textR,
text == null ? 0
: b.getIconTextGap());
@@ -541,7 +541,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Paints the background area of an {@link AbstractButton} in the pressed
- * state. This means filling the supplied area with a darker than normal
+ * state. This means filling the supplied area with a darker than normal
* background.
*
* @param g The graphics context to paint with
@@ -557,7 +557,7 @@ public class BasicButtonUI extends ButtonUI
g.fillRect(area.x, area.y, area.width, area.height);
}
}
-
+
/**
* Paints the "text" property of an {@link AbstractButton}.
*
@@ -567,8 +567,8 @@ public class BasicButtonUI extends ButtonUI
* @param text The text to paint
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
- String text)
- {
+ String text)
+ {
AbstractButton b = (AbstractButton) c;
Font f = b.getFont();
g.setFont(f);
@@ -602,10 +602,10 @@ public class BasicButtonUI extends ButtonUI
* @since 1.4
*/
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect,
- String text)
+ String text)
{
paintText(g, (JComponent) b, textRect, text);
- }
+ }
/**
* A helper method that finds the BasicButtonListener for the specified
diff --git a/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java b/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
index e45970ed0..79ce7b834 100644
--- a/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
@@ -52,7 +52,7 @@ import javax.swing.plaf.ComponentUI;
*/
public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI
{
-
+
/**
* Creates a new BasicCheckBoxMenuItemUI object.
*/
@@ -60,7 +60,7 @@ public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI
{
super();
}
-
+
/**
* Factory method to create a BasicCheckBoxMenuItemUI for the given {@link
* JComponent}, which should be a JCheckBoxMenuItem
diff --git a/javax/swing/plaf/basic/BasicCheckBoxUI.java b/javax/swing/plaf/basic/BasicCheckBoxUI.java
index 43001b8db..0a4da00b2 100644
--- a/javax/swing/plaf/basic/BasicCheckBoxUI.java
+++ b/javax/swing/plaf/basic/BasicCheckBoxUI.java
@@ -47,14 +47,14 @@ import javax.swing.plaf.ComponentUI;
* A UI delegate for the {@link JCheckBox} component.
*/
public class BasicCheckBoxUI extends BasicRadioButtonUI
-{
-
+{
+
/**
- * Returns a UI delegate (that is, an instance of this class) for the
+ * Returns a UI delegate (that is, an instance of this class) for the
* specified component.
- *
+ *
* @param c the component (this should be a {@link JCheckBox}).
- *
+ *
* @return A new instance of <code>BasicCheckBoxUI</code>.
*/
public static ComponentUI createUI(JComponent c)
@@ -63,7 +63,7 @@ public class BasicCheckBoxUI extends BasicRadioButtonUI
}
/**
- * Returns the prefix for entries in the {@link UIManager} defaults table
+ * Returns the prefix for entries in the {@link UIManager} defaults table
* (<code>"CheckBox."</code> in this case).
*
* @return "CheckBox."
@@ -73,7 +73,3 @@ public class BasicCheckBoxUI extends BasicRadioButtonUI
return "CheckBox.";
}
}
-
-
-
-
diff --git a/javax/swing/plaf/basic/BasicColorChooserUI.java b/javax/swing/plaf/basic/BasicColorChooserUI.java
index f37cbd7b8..10b56431a 100644
--- a/javax/swing/plaf/basic/BasicColorChooserUI.java
+++ b/javax/swing/plaf/basic/BasicColorChooserUI.java
@@ -74,12 +74,12 @@ public class BasicColorChooserUI extends ColorChooserUI
public void propertyChange(PropertyChangeEvent e)
{
if (e.getPropertyName() == JColorChooser.CHOOSER_PANELS_PROPERTY)
- makeTabs(chooser.getChooserPanels());
+ makeTabs(chooser.getChooserPanels());
else if (e.getPropertyName() == JColorChooser.PREVIEW_PANEL_PROPERTY)
- updatePreviewPanel(chooser.getPreviewPanel());
+ updatePreviewPanel(chooser.getPreviewPanel());
else if (e.getPropertyName() == JColorChooser.SELECTION_MODEL_PROPERTY)
- ((AbstractColorChooserPanel) pane.getSelectedComponent())
- .updateChooser();
+ ((AbstractColorChooserPanel) pane.getSelectedComponent())
+ .updateChooser();
chooser.repaint();
}
@@ -100,10 +100,10 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (pane != null)
{
- AbstractColorChooserPanel panel = (AbstractColorChooserPanel) pane
- .getSelectedComponent();
- if (panel != null)
- panel.updateChooser();
+ AbstractColorChooserPanel panel = (AbstractColorChooserPanel) pane
+ .getSelectedComponent();
+ if (panel != null)
+ panel.updateChooser();
}
chooser.repaint();
}
@@ -190,30 +190,30 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (c instanceof JColorChooser)
{
- chooser = (JColorChooser) c;
- chooser.setLayout(new BorderLayout());
+ chooser = (JColorChooser) c;
+ chooser.setLayout(new BorderLayout());
- // Do this first, so we avoid doing work for property change events.
- defaultChoosers = createDefaultChoosers();
- chooser.setChooserPanels(defaultChoosers);
- pane = new JTabbedPane();
+ // Do this first, so we avoid doing work for property change events.
+ defaultChoosers = createDefaultChoosers();
+ chooser.setChooserPanels(defaultChoosers);
+ pane = new JTabbedPane();
- pane.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- pane.repaint();
- }
- });
+ pane.addChangeListener(new ChangeListener()
+ {
+ public void stateChanged(ChangeEvent e)
+ {
+ pane.repaint();
+ }
+ });
- makeTabs(defaultChoosers);
+ makeTabs(defaultChoosers);
- chooser.add(pane, BorderLayout.NORTH);
+ chooser.add(pane, BorderLayout.NORTH);
- installPreviewPanel();
+ installPreviewPanel();
- installDefaults();
- installListeners();
+ installDefaults();
+ installListeners();
}
}
@@ -274,9 +274,9 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (prevContainer == null)
{
- prevContainer = new JPanel();
- prevContainer.setLayout(new BorderLayout());
- chooser.add(prevContainer, BorderLayout.CENTER);
+ prevContainer = new JPanel();
+ prevContainer.setLayout(new BorderLayout());
+ chooser.add(prevContainer, BorderLayout.CENTER);
}
prevContainer.removeAll();
prevContainer.add(preview, BorderLayout.CENTER);
diff --git a/javax/swing/plaf/basic/BasicComboBoxEditor.java b/javax/swing/plaf/basic/BasicComboBoxEditor.java
index d87926196..b04f3fa01 100644
--- a/javax/swing/plaf/basic/BasicComboBoxEditor.java
+++ b/javax/swing/plaf/basic/BasicComboBoxEditor.java
@@ -69,7 +69,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * Returns the component that will be used by the combo box to display and
+ * Returns the component that will be used by the combo box to display and
* edit the currently selected item in the combo box.
*
* @return The editor component, which is a {@link JTextField} in this case.
@@ -138,7 +138,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * Adds an {@link ActionListener} to the editor component. If the user will
+ * Adds an {@link ActionListener} to the editor component. If the user will
* edit currently selected item in the textfield and pressEnter, then action
* will be performed. The actionPerformed of this ActionListener should
* change the selected item of the comboBox to the newly editted selected
@@ -163,7 +163,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * A subclass of {@link BasicComboBoxEditor} that implements the
+ * A subclass of {@link BasicComboBoxEditor} that implements the
* {@link UIResource} interface.
*/
public static class UIResource extends BasicComboBoxEditor
diff --git a/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/javax/swing/plaf/basic/BasicComboBoxRenderer.java
index 3c8d1e8c5..761d7d11f 100644
--- a/javax/swing/plaf/basic/BasicComboBoxRenderer.java
+++ b/javax/swing/plaf/basic/BasicComboBoxRenderer.java
@@ -51,12 +51,12 @@ import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
/**
- * A renderer for a {@link JComboBox}.
+ * A renderer for a {@link JComboBox}.
*
* @author Olga Rodimina
*/
-public class BasicComboBoxRenderer
- extends JLabel
+public class BasicComboBoxRenderer
+ extends JLabel
implements ListCellRenderer, Serializable
{
/**
@@ -75,7 +75,7 @@ public class BasicComboBoxRenderer
/**
* Returns preferredSize of the renderer
- *
+ *
* @return preferredSize of the renderer
*/
public Dimension getPreferredSize()
diff --git a/javax/swing/plaf/basic/BasicComboBoxUI.java b/javax/swing/plaf/basic/BasicComboBoxUI.java
index ff636d684..07d4f42cd 100644
--- a/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -100,9 +100,9 @@ public class BasicComboBoxUI extends ComboBoxUI
protected JComboBox comboBox;
/**
- * The component that is responsible for displaying/editing the selected
- * item of the combo box.
- *
+ * The component that is responsible for displaying/editing the selected
+ * item of the combo box.
+ *
* @see BasicComboBoxEditor#getEditorComponent()
*/
protected Component editor;
@@ -144,11 +144,11 @@ public class BasicComboBoxUI extends ComboBoxUI
* Popup list containing the combo box's menu items.
*/
protected ComboPopup popup;
-
+
protected KeyListener popupKeyListener;
-
+
protected MouseListener popupMouseListener;
-
+
protected MouseMotionListener popupMouseMotionListener;
/**
@@ -187,7 +187,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * A factory method to create a UI delegate for the given
+ * A factory method to create a UI delegate for the given
* {@link JComponent}, which should be a {@link JComboBox}.
*
* @param c The {@link JComponent} a UI is being created for.
@@ -203,7 +203,7 @@ public class BasicComboBoxUI extends ComboBoxUI
* Installs the UI for the given {@link JComponent}.
*
* @param c the JComponent to install a UI for.
- *
+ *
* @see #uninstallUI(JComponent)
*/
public void installUI(JComponent c)
@@ -230,7 +230,7 @@ public class BasicComboBoxUI extends ComboBoxUI
{
currentEditor = createEditor();
comboBox.setEditor(currentEditor);
- }
+ }
installComponents();
installListeners();
@@ -246,7 +246,7 @@ public class BasicComboBoxUI extends ComboBoxUI
* Uninstalls the UI for the given {@link JComponent}.
*
* @param c The JComponent that is having this UI removed.
- *
+ *
* @see #installUI(JComponent)
*/
public void uninstallUI(JComponent c)
@@ -262,9 +262,9 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Installs the defaults that are defined in the {@link BasicLookAndFeel}
+ * Installs the defaults that are defined in the {@link BasicLookAndFeel}
* for this {@link JComboBox}.
- *
+ *
* @see #uninstallDefaults()
*/
protected void installDefaults()
@@ -276,7 +276,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Creates and installs the listeners for this UI.
- *
+ *
* @see #uninstallListeners()
*/
protected void installListeners()
@@ -312,7 +312,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Uninstalls the defaults and sets any objects created during
* install to <code>null</code>.
- *
+ *
* @see #installDefaults()
*/
protected void uninstallDefaults()
@@ -322,7 +322,7 @@ public class BasicComboBoxUI extends ComboBoxUI
if (comboBox.getForeground() instanceof UIResource)
comboBox.setForeground(null);
-
+
if (comboBox.getBackground() instanceof UIResource)
comboBox.setBackground(null);
@@ -331,7 +331,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Detaches all the listeners we attached in {@link #installListeners}.
- *
+ *
* @see #installListeners()
*/
protected void uninstallListeners()
@@ -429,7 +429,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Creates and returns a layout manager for the combo box. Subclasses can
+ * Creates and returns a layout manager for the combo box. Subclasses can
* override this method to provide a different layout.
*
* @return a layout manager for the combo box.
@@ -452,7 +452,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Creates the component that will be responsible for displaying/editing
- * the selected item in the combo box. This editor is used only when combo
+ * the selected item in the combo box. This editor is used only when combo
* box is editable.
*
* @return A new component that will be responsible for displaying/editing
@@ -484,7 +484,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Uninstalls components from this {@link JComboBox}.
- *
+ *
* @see #installComponents()
*/
protected void uninstallComponents()
@@ -546,7 +546,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Unconfigures the editor for this combo box.
+ * Unconfigures the editor for this combo box.
*/
protected void unconfigureEditor()
{
@@ -558,7 +558,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Configures the arrow button.
- *
+ *
* @see #configureArrowButton()
*/
public void configureArrowButton()
@@ -569,7 +569,7 @@ public class BasicComboBoxUI extends ComboBoxUI
arrowButton.setFocusable(false);
arrowButton.addMouseListener(popup.getMouseListener());
arrowButton.addMouseMotionListener(popup.getMouseMotionListener());
-
+
// Mark the button as not closing the popup, we handle this ourselves.
arrowButton.putClientProperty(BasicLookAndFeel.DONT_CANCEL_POPUP,
Boolean.TRUE);
@@ -578,7 +578,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Unconfigures the arrow button.
- *
+ *
* @see #configureArrowButton()
*
* @specnote The specification says this method is implementation specific
@@ -613,7 +613,7 @@ public class BasicComboBoxUI extends ComboBoxUI
*
* @param c The JComboBox to check
*
- * @return <code>true</code> if popup part of the JComboBox is visible and
+ * @return <code>true</code> if popup part of the JComboBox is visible and
* <code>false</code> otherwise.
*/
public boolean isPopupVisible(JComboBox c)
@@ -917,12 +917,12 @@ public class BasicComboBoxUI extends ComboBoxUI
= new DefaultListCellRenderer();
/**
- * Returns the default size for the display area of a combo box that does
+ * Returns the default size for the display area of a combo box that does
* not contain any elements. This method returns the width and height of
- * a single space in the current font, plus a margin of 1 pixel.
+ * a single space in the current font, plus a margin of 1 pixel.
*
* @return The default display size.
- *
+ *
* @see #getDisplaySize()
*/
protected Dimension getDefaultSize()
@@ -937,7 +937,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Returns the size of the display area for the combo box. This size will be
+ * Returns the size of the display area for the combo box. This size will be
* the size of the combo box, not including the arrowButton.
*
* @return The size of the display area for the combo box.
@@ -950,11 +950,11 @@ public class BasicComboBoxUI extends ComboBoxUI
{
renderer = DEFAULT_RENDERER;
}
-
+
Object prototype = comboBox.getPrototypeDisplayValue();
if (prototype != null)
{
- Component comp = renderer.getListCellRendererComponent(listBox,
+ Component comp = renderer.getListCellRendererComponent(listBox,
prototype, -1, false, false);
currentValuePane.add(comp);
comp.setFont(comboBox.getFont());
@@ -971,7 +971,7 @@ public class BasicComboBoxUI extends ComboBoxUI
{
for (int i = 0; i < size; ++i)
{
- Component comp = renderer.getListCellRendererComponent(listBox,
+ Component comp = renderer.getListCellRendererComponent(listBox,
model.getElementAt(i), -1, false, false);
currentValuePane.add(comp);
comp.setFont(comboBox.getFont());
@@ -1009,7 +1009,7 @@ public class BasicComboBoxUI extends ComboBoxUI
(InputMap) UIManager.get("ComboBox.ancestorInputMap"));
// Install any action maps here.
}
-
+
/**
* Uninstalls the keyboard actions for the {@link JComboBox} there were
* installed by in {@link #installListeners}.
@@ -1024,7 +1024,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* A {@link LayoutManager} used to position the sub-components of the
* {@link JComboBox}.
- *
+ *
* @see BasicComboBoxUI#createLayoutManager()
*/
public class ComboBoxLayoutManager implements LayoutManager
@@ -1040,7 +1040,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Adds a component to the layout. This method does nothing, since the
* layout manager doesn't need to track the components.
- *
+ *
* @param name the name to associate the component with (ignored).
* @param comp the component (ignored).
*/
@@ -1052,7 +1052,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Removes a component from the layout. This method does nothing, since
* the layout manager doesn't need to track the components.
- *
+ *
* @param comp the component.
*/
public void removeLayoutComponent(Component comp)
@@ -1063,7 +1063,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Returns preferred layout size of the JComboBox.
*
- * @param parent the Container for which the preferred size should be
+ * @param parent the Container for which the preferred size should be
* calculated.
*
* @return The preferred size for the given container
@@ -1075,9 +1075,9 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum size.
*/
public Dimension minimumLayoutSize(Container parent)
@@ -1095,7 +1095,7 @@ public class BasicComboBoxUI extends ComboBoxUI
*/
public void layoutContainer(Container parent)
{
- // Position editor component to the left of arrow button if combo box is
+ // Position editor component to the left of arrow button if combo box is
// editable
Insets i = getInsets();
int arrowSize = comboBox.getHeight() - (i.top + i.bottom);
@@ -1152,7 +1152,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Handles {@link ItemEvent}s fired by the {@link JComboBox} when its
+ * Handles {@link ItemEvent}s fired by the {@link JComboBox} when its
* selected item changes.
*/
public class ItemHandler extends Object implements ItemListener
@@ -1297,7 +1297,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
}
}
-
+
}
/**
@@ -1328,7 +1328,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Invoked whenever bound property of JComboBox changes.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -1404,7 +1404,7 @@ public class BasicComboBoxUI extends ComboBoxUI
isMinimumSizeDirty = true;
comboBox.revalidate();
}
- // FIXME: Need to handle changes in other bound properties.
+ // FIXME: Need to handle changes in other bound properties.
}
}
}
diff --git a/javax/swing/plaf/basic/BasicComboPopup.java b/javax/swing/plaf/basic/BasicComboPopup.java
index 11f832ae8..3e54ca7c6 100644
--- a/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/javax/swing/plaf/basic/BasicComboPopup.java
@@ -483,7 +483,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void installListListeners()
{
- // mouse listener listening to mouse events occuring in the
+ // mouse listener listening to mouse events occuring in the
// combo box's list of items.
listMouseListener = createListMouseListener();
list.addMouseListener(listMouseListener);
@@ -613,7 +613,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void autoScrollUp()
{
- // scroll up the scroll bar to make the item above visible
+ // scroll up the scroll bar to make the item above visible
JScrollBar scrollbar = scroller.getVerticalScrollBar();
int scrollToNext = list.getScrollableUnitIncrement(super.getBounds(),
SwingConstants.VERTICAL,
@@ -621,8 +621,8 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
scrollbar.setValue(scrollbar.getValue() - scrollToNext);
- // If we haven't reached the begging of the combo box's list of items,
- // then highlight next element above currently highlighted element
+ // If we haven't reached the begging of the combo box's list of items,
+ // then highlight next element above currently highlighted element
if (list.getSelectedIndex() != 0)
list.setSelectedIndex(list.getSelectedIndex() - 1);
}
@@ -633,7 +633,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void autoScrollDown()
{
- // scroll scrollbar down to make next item visible
+ // scroll scrollbar down to make next item visible
JScrollBar scrollbar = scroller.getVerticalScrollBar();
int scrollToNext = list.getScrollableUnitIncrement(super.getBounds(),
SwingConstants.VERTICAL,
@@ -713,12 +713,12 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
for (int i = 0; i < maxRowCount; i++)
{
- Component comp = rend.getListCellRendererComponent(list,
- comboBox.getModel()
- .getElementAt(i),
- -1, false, false);
- Dimension dim = comp.getPreferredSize();
- totalHeight += dim.height;
+ Component comp = rend.getListCellRendererComponent(list,
+ comboBox.getModel()
+ .getElementAt(i),
+ -1, false, false);
+ Dimension dim = comp.getPreferredSize();
+ totalHeight += dim.height;
}
return totalHeight == 0 ? 100 : totalHeight;
@@ -995,9 +995,9 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
{
if (e.getPropertyName().equals("renderer"))
{
- list.setCellRenderer(comboBox.getRenderer());
- if (isVisible())
- hide();
+ list.setCellRenderer(comboBox.getRenderer());
+ if (isVisible())
+ hide();
}
if (e.getPropertyName().equals("model"))
{
diff --git a/javax/swing/plaf/basic/BasicDesktopIconUI.java b/javax/swing/plaf/basic/BasicDesktopIconUI.java
index 3f8730249..e52293812 100644
--- a/javax/swing/plaf/basic/BasicDesktopIconUI.java
+++ b/javax/swing/plaf/basic/BasicDesktopIconUI.java
@@ -118,7 +118,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
yOffset = e.getY();
pane = frame.getDesktopPane();
if (pane != null)
- pane.getDesktopManager().beginDraggingFrame(desktopIcon);
+ pane.getDesktopManager().beginDraggingFrame(desktopIcon);
}
/**
@@ -129,7 +129,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
public void mouseReleased(MouseEvent e)
{
if (pane != null)
- pane.getDesktopManager().endDraggingFrame(desktopIcon);
+ pane.getDesktopManager().endDraggingFrame(desktopIcon);
xOffset = 0;
yOffset = 0;
}
@@ -147,9 +147,9 @@ public class BasicDesktopIconUI extends DesktopIconUI
int newHeight)
{
if (pane != null)
- pane.getDesktopManager().dragFrame(f, newX, newY);
+ pane.getDesktopManager().dragFrame(f, newX, newY);
else
- desktopIcon.setBounds(newX, newY, newWidth, newHeight);
+ desktopIcon.setBounds(newX, newY, newWidth, newHeight);
}
}
@@ -308,7 +308,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
/** The PropertyChangeListener listening to the JDesktopIcon. */
private transient PropertyChangeListener propertyHandler;
-
+
/** The default icon used when no frame icon is given by the JInternalFrame. */
static Icon defaultIcon = new InternalFrameDefaultMenuIcon();
@@ -389,15 +389,15 @@ public class BasicDesktopIconUI extends DesktopIconUI
{
if (c instanceof JDesktopIcon)
{
- desktopIcon = (JDesktopIcon) c;
- desktopIcon.setLayout(new BorderLayout());
- frame = desktopIcon.getInternalFrame();
+ desktopIcon = (JDesktopIcon) c;
+ desktopIcon.setLayout(new BorderLayout());
+ frame = desktopIcon.getInternalFrame();
- installDefaults();
- installComponents();
- installListeners();
+ installDefaults();
+ installComponents();
+ installListeners();
- desktopIcon.setOpaque(true);
+ desktopIcon.setOpaque(true);
}
}
@@ -409,11 +409,11 @@ public class BasicDesktopIconUI extends DesktopIconUI
public void uninstallUI(JComponent c)
{
desktopIcon.setOpaque(false);
-
+
uninstallListeners();
uninstallComponents();
uninstallDefaults();
-
+
frame = null;
desktopIcon.setLayout(null);
desktopIcon = null;
@@ -444,7 +444,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void uninstallComponents()
{
desktopIcon.remove(button);
-
+
button = null;
}
@@ -460,29 +460,29 @@ public class BasicDesktopIconUI extends DesktopIconUI
propertyHandler = new PropertyChangeListener()
{
- public void propertyChange(PropertyChangeEvent e)
- {
- if (e.getPropertyName().equals(JInternalFrame.TITLE_PROPERTY))
- button.setText(desktopIcon.getInternalFrame().getTitle());
- else if (e.getPropertyName().equals(JInternalFrame.FRAME_ICON_PROPERTY))
- {
- Icon use = desktopIcon.getInternalFrame().getFrameIcon();
- if (use == null)
- use = defaultIcon;
- button.setIcon(use);
- }
- desktopIcon.revalidate();
- desktopIcon.repaint();
- }
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ if (e.getPropertyName().equals(JInternalFrame.TITLE_PROPERTY))
+ button.setText(desktopIcon.getInternalFrame().getTitle());
+ else if (e.getPropertyName().equals(JInternalFrame.FRAME_ICON_PROPERTY))
+ {
+ Icon use = desktopIcon.getInternalFrame().getFrameIcon();
+ if (use == null)
+ use = defaultIcon;
+ button.setIcon(use);
+ }
+ desktopIcon.revalidate();
+ desktopIcon.repaint();
+ }
};
frame.addPropertyChangeListener(propertyHandler);
button.addActionListener(new ActionListener()
{
- public void actionPerformed(ActionEvent e)
- {
+ public void actionPerformed(ActionEvent e)
+ {
deiconize();
- }
+ }
});
}
@@ -492,10 +492,10 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void uninstallListeners()
{
// button is nulled so no need to remove it.
-
+
frame.removePropertyChangeListener(propertyHandler);
propertyHandler = null;
-
+
desktopIcon.removeMouseMotionListener(mouseHandler);
desktopIcon.removeMouseListener(mouseHandler);
}
@@ -506,7 +506,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void installDefaults()
{
// FIXME: Move border to defaults.
- desktopIcon.setBorder(new DesktopIconBorder());
+ desktopIcon.setBorder(new DesktopIconBorder());
}
/**
@@ -578,7 +578,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
/**
* This method deiconizes the JInternalFrame associated with the JDesktopIcon.
*/
- public void deiconize()
+ public void deiconize()
{
try
{
diff --git a/javax/swing/plaf/basic/BasicDesktopPaneUI.java b/javax/swing/plaf/basic/BasicDesktopPaneUI.java
index 4116858da..cbc3f9f89 100644
--- a/javax/swing/plaf/basic/BasicDesktopPaneUI.java
+++ b/javax/swing/plaf/basic/BasicDesktopPaneUI.java
@@ -94,7 +94,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isClosable();
+ return desktop.getSelectedFrame().isClosable();
return false;
}
}
@@ -133,7 +133,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isMaximizable();
+ return desktop.getSelectedFrame().isMaximizable();
return false;
}
}
@@ -172,7 +172,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isIconifiable();
+ return desktop.getSelectedFrame().isIconifiable();
return false;
}
}
@@ -191,23 +191,23 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
*/
public void actionPerformed(ActionEvent e)
{
- // This is supposed to set the next selected frame.
+ // This is supposed to set the next selected frame.
JInternalFrame[] frames = desktop.getAllFrames();
if (frames.length == 0)
- return;
+ return;
JInternalFrame sFrame = frames[0];
if (desktop.getSelectedFrame() != null)
- sFrame = desktop.getSelectedFrame();
+ sFrame = desktop.getSelectedFrame();
int i = 0;
for (; i < frames.length; i++)
- if (frames[i] == sFrame)
- break;
+ if (frames[i] == sFrame)
+ break;
- // FIXME: Navigate actions go reverse too.
+ // FIXME: Navigate actions go reverse too.
if (i == frames.length)
- i = 0;
+ i = 0;
desktop.setSelectedFrame(frames[i]);
}
@@ -399,11 +399,11 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
{
if (c instanceof JDesktopPane)
{
- desktop = (JDesktopPane) c;
+ desktop = (JDesktopPane) c;
- installDefaults();
- installDesktopManager();
- installKeyboardActions();
+ installDefaults();
+ installDesktopManager();
+ installKeyboardActions();
}
}
diff --git a/javax/swing/plaf/basic/BasicDirectoryModel.java b/javax/swing/plaf/basic/BasicDirectoryModel.java
index b1fb727fe..62657ad86 100644
--- a/javax/swing/plaf/basic/BasicDirectoryModel.java
+++ b/javax/swing/plaf/basic/BasicDirectoryModel.java
@@ -54,7 +54,7 @@ import javax.swing.filechooser.FileSystemView;
/**
* Implements an AbstractListModel for directories where the source
- * of the files is a JFileChooser object.
+ * of the files is a JFileChooser object.
*
* This class is used for sorting and ordering the file list in
* a JFileChooser L&F object.
@@ -188,7 +188,7 @@ public class BasicDirectoryModel extends AbstractListModel
if (filechooser.accept(files[i]))
accepted.add(files[i]);
}
-
+
// Occasional check if we have been interrupted.
if (isInterrupted())
return;
@@ -286,7 +286,7 @@ public class BasicDirectoryModel extends AbstractListModel
List added = newCache.subList(start, end);
UpdateSwingRequest r = new UpdateSwingRequest(added, start,
- null, 0);
+ null, 0);
invokeLater(r);
newCache = null;
}
@@ -332,10 +332,10 @@ public class BasicDirectoryModel extends AbstractListModel
{
public int compare(Object o1, Object o2)
{
- if (lt((File) o1, (File) o2))
- return -1;
- else
- return 1;
+ if (lt((File) o1, (File) o2))
+ return -1;
+ else
+ return 1;
}
};
@@ -366,7 +366,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Fires a content change event.
+ * Fires a content change event.
*/
public void fireContentsChanged()
{
@@ -397,7 +397,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Returns the (java.io.File) object at
+ * Returns the (java.io.File) object at
* an index in the list.
*
* @param index The list index
@@ -441,7 +441,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Returns the size of the list, which only includes directories
+ * Returns the size of the list, which only includes directories
* if the JFileChooser is set to DIRECTORIES_ONLY.
*
* Otherwise, both directories and files are included in the count.
@@ -537,12 +537,12 @@ public class BasicDirectoryModel extends AbstractListModel
|| property.equals(JFileChooser.FILE_VIEW_CHANGED_PROPERTY)
)
{
- validateFileCache();
+ validateFileCache();
}
}
/**
- * Renames a file - However, does <I>not</I> re-sort the list
+ * Renames a file - However, does <I>not</I> re-sort the list
* or replace the old file with the new one in the list.
*
* @param oldFile The old file
@@ -584,4 +584,3 @@ public class BasicDirectoryModel extends AbstractListModel
}
}
}
-
diff --git a/javax/swing/plaf/basic/BasicEditorPaneUI.java b/javax/swing/plaf/basic/BasicEditorPaneUI.java
index d514a87c8..6ddd2513b 100644
--- a/javax/swing/plaf/basic/BasicEditorPaneUI.java
+++ b/javax/swing/plaf/basic/BasicEditorPaneUI.java
@@ -1,4 +1,4 @@
-/* BasicEditorPaneUI.java --
+/* BasicEditorPaneUI.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/plaf/basic/BasicFileChooserUI.java b/javax/swing/plaf/basic/BasicFileChooserUI.java
index 4b6e2f798..347686d6e 100644
--- a/javax/swing/plaf/basic/BasicFileChooserUI.java
+++ b/javax/swing/plaf/basic/BasicFileChooserUI.java
@@ -72,7 +72,7 @@ import javax.swing.plaf.metal.MetalIconFactory;
/**
- * A UI delegate for the {@link JFileChooser} component under the
+ * A UI delegate for the {@link JFileChooser} component under the
* {@link BasicLookAndFeel}.
*/
public class BasicFileChooserUI extends FileChooserUI
@@ -89,7 +89,7 @@ public class BasicFileChooserUI extends FileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Returns <code>true</code> always, as all files are accepted by this
* filter.
@@ -116,7 +116,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles a user action to approve the dialog selection.
- *
+ *
* @see BasicFileChooserUI#getApproveSelectionAction()
*/
protected class ApproveSelectionAction extends AbstractAction
@@ -131,7 +131,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Sets the current selection and closes the dialog.
- *
+ *
* @param e the action event.
*/
public void actionPerformed(ActionEvent e)
@@ -159,8 +159,8 @@ public class BasicFileChooserUI extends FileChooserUI
else
{
File f = new File(filechooser.getCurrentDirectory(), getFileName());
- if ( selectedDir != null )
- f = selectedDir;
+ if ( selectedDir != null )
+ f = selectedDir;
if (filechooser.isTraversable(f))
{
filechooser.setCurrentDirectory(f);
@@ -212,7 +212,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Retrieves the icon associated with the specified file/directory, if
+ * Retrieves the icon associated with the specified file/directory, if
* there is one.
*
* @param f the file/directory.
@@ -225,8 +225,8 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns a description of the given file/directory. In this
- * implementation, the description is the same as the name returned by
+ * Returns a description of the given file/directory. In this
+ * implementation, the description is the same as the name returned by
* {@link #getName(File)}.
*
* @param f the file/directory.
@@ -249,11 +249,11 @@ public class BasicFileChooserUI extends FileChooserUI
{
Icon val = getCachedIcon(f);
if (val != null)
- return val;
+ return val;
if (filechooser.isTraversable(f))
- val = directoryIcon;
+ val = directoryIcon;
else
- val = fileIcon;
+ val = fileIcon;
cacheIcon(f, val);
return val;
}
@@ -287,9 +287,9 @@ public class BasicFileChooserUI extends FileChooserUI
public String getTypeDescription(File f)
{
if (filechooser.isTraversable(f))
- return dirDescText;
+ return dirDescText;
else
- return fileDescText;
+ return fileDescText;
}
/**
@@ -308,7 +308,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles an action to cancel the file chooser.
- *
+ *
* @see BasicFileChooserUI#getCancelSelectionAction()
*/
protected class CancelSelectionAction extends AbstractAction
@@ -338,7 +338,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* An action to handle changes to the parent directory (for example, via
* a click on the "up folder" button).
- *
+ *
* @see BasicFileChooserUI#getChangeToParentDirectoryAction()
*/
protected class ChangeToParentDirectoryAction extends AbstractAction
@@ -366,7 +366,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* A mouse listener that handles double-click events.
- *
+ *
* @see BasicFileChooserUI#createDoubleClickListener(JFileChooser, JList)
*/
protected class DoubleClickListener extends MouseAdapter
@@ -392,7 +392,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -422,7 +422,7 @@ public class BasicFileChooserUI extends FileChooserUI
String path = p.toString();
File f = fsv.createFileObject(path);
filechooser.setSelectedFile(f);
-
+
if (filechooser.isMultiSelectionEnabled())
{
int[] inds = list.getSelectedIndices();
@@ -431,7 +431,7 @@ public class BasicFileChooserUI extends FileChooserUI
allFiles[i] = (File) list.getModel().getElementAt(inds[i]);
filechooser.setSelectedFiles(allFiles);
}
-
+
if (filechooser.isTraversable(f))
{
setDirectorySelected(true);
@@ -444,18 +444,18 @@ public class BasicFileChooserUI extends FileChooserUI
}
lastSelected = path;
parentPath = f.getParent();
-
+
if (f.isFile())
setFileName(f.getName());
- else if (filechooser.getFileSelectionMode() !=
- JFileChooser.FILES_ONLY)
+ else if (filechooser.getFileSelectionMode() !=
+ JFileChooser.FILES_ONLY)
setFileName(path);
}
}
/**
* Handles a mouse entered event (NOT IMPLEMENTED).
- *
+ *
* @param e the mouse event.
*/
public void mouseEntered(MouseEvent e)
@@ -465,9 +465,9 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * An action that changes the file chooser to display the user's home
- * directory.
- *
+ * An action that changes the file chooser to display the user's home
+ * directory.
+ *
* @see BasicFileChooserUI#getGoHomeAction()
*/
protected class GoHomeAction extends AbstractAction
@@ -497,7 +497,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* An action that handles the creation of a new folder/directory.
- *
+ *
* @see BasicFileChooserUI#getNewFolderAction()
*/
protected class NewFolderAction extends AbstractAction
@@ -519,12 +519,12 @@ public class BasicFileChooserUI extends FileChooserUI
{
try
{
- filechooser.getFileSystemView().createNewFolder(filechooser
- .getCurrentDirectory());
+ filechooser.getFileSystemView().createNewFolder(filechooser
+ .getCurrentDirectory());
}
catch (IOException ioe)
{
- return;
+ return;
}
filechooser.rescanCurrentDirectory();
filechooser.repaint();
@@ -533,7 +533,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* A listener for selection events in the file list.
- *
+ *
* @see BasicFileChooserUI#createListSelectionListener(JFileChooser)
*/
protected class SelectionListener implements ListSelectionListener
@@ -556,24 +556,24 @@ public class BasicFileChooserUI extends FileChooserUI
JList list = (JList) e.getSource();
Object f = list.getSelectedValue();
if (f == null)
- return;
+ return;
File file = filechooser.getFileSystemView().createFileObject(f.toString());
if (! filechooser.isTraversable(file))
- {
- selectedDir = null;
- filechooser.setSelectedFile(file);
- }
+ {
+ selectedDir = null;
+ filechooser.setSelectedFile(file);
+ }
else
- {
- selectedDir = file;
- filechooser.setSelectedFile(null);
- }
+ {
+ selectedDir = file;
+ filechooser.setSelectedFile(null);
+ }
}
}
/**
* DOCUMENT ME!
- *
+ *
* @see BasicFileChooserUI#getUpdateAction()
*/
protected class UpdateAction extends AbstractAction
@@ -722,46 +722,46 @@ public class BasicFileChooserUI extends FileChooserUI
// FIXME: describe what is contained in the bottom panel
/** The bottom panel. */
JPanel bottomPanel;
-
+
/** The close panel. */
JPanel closePanel;
/** Text box that displays file name */
JTextField entry;
-
+
/** Current parent path */
String parentPath;
-
+
/**
* The action for the 'approve' button.
* @see #getApproveSelectionAction()
*/
private ApproveSelectionAction approveSelectionAction;
-
+
/**
* The action for the 'cancel' button.
* @see #getCancelSelectionAction()
*/
private CancelSelectionAction cancelSelectionAction;
-
+
/**
* The action for the 'go home' control button.
* @see #getGoHomeAction()
*/
private GoHomeAction goHomeAction;
-
+
/**
* The action for the 'up folder' control button.
* @see #getChangeToParentDirectoryAction()
*/
private ChangeToParentDirectoryAction changeToParentDirectoryAction;
-
+
/**
* The action for the 'new folder' control button.
* @see #getNewFolderAction()
*/
private NewFolderAction newFolderAction;
-
+
/**
* The action for ???. // FIXME: what is this?
* @see #getUpdateAction()
@@ -774,7 +774,7 @@ public class BasicFileChooserUI extends FileChooserUI
* the directory on "Open" when in that mode.
*/
private File selectedDir;
-
+
// -- end private --
/**
@@ -810,7 +810,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Installs the UI for the specified component.
- *
+ *
* @param c the component (should be a {@link JFileChooser}).
*/
public void installUI(JComponent c)
@@ -825,7 +825,7 @@ public class BasicFileChooserUI extends FileChooserUI
installDefaults(fc);
installComponents(fc);
installListeners(fc);
-
+
File path = filechooser.getCurrentDirectory();
if (path != null)
parentPath = path.getParent();
@@ -834,7 +834,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Uninstalls this UI from the given component.
- *
+ *
* @param c the component (should be a {@link JFileChooser}).
*/
public void uninstallUI(JComponent c)
@@ -868,7 +868,7 @@ public class BasicFileChooserUI extends FileChooserUI
if (parentFiles.size() == 0)
return;
- }
+ }
/**
* Creates and install the subcomponents for the file chooser.
@@ -996,9 +996,9 @@ public class BasicFileChooserUI extends FileChooserUI
directoryOpenButtonText = "Open";
directoryOpenButtonToolTipText = "Open selected directory";
- directoryOpenButtonMnemonic
+ directoryOpenButtonMnemonic
= new Integer((String) UIManager.get("FileChooser.directoryOpenButtonMnemonic")).intValue();
-
+
helpButtonText = "Help";
helpButtonToolTipText = "FileChooser help";
helpButtonMnemonic = new Integer((String) UIManager.get("FileChooser.helpButtonMnemonic")).intValue();
@@ -1010,7 +1010,7 @@ public class BasicFileChooserUI extends FileChooserUI
saveButtonText = "Save";
saveButtonToolTipText = "Save selected file";
saveButtonMnemonic = new Integer((String) UIManager.get("FileChooser.saveButtonMnemonic")).intValue();
-
+
updateButtonText = "Update";
updateButtonToolTipText = "Update directory listing";
updateButtonMnemonic = new Integer((String) UIManager.get("FileChooser.updateButtonMnemonic")).intValue();
@@ -1041,7 +1041,7 @@ public class BasicFileChooserUI extends FileChooserUI
saveButtonText = null;
saveButtonToolTipText = null;
-
+
updateButtonText = null;
updateButtonToolTipText = null;
}
@@ -1067,9 +1067,9 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Creates a listener to handle changes to the properties of the given
* file chooser component.
- *
+ *
* @param fc the file chooser component.
- *
+ *
* @return A new listener.
*/
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
@@ -1080,7 +1080,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the current file name.
- *
+ *
* @return The current file name.
*/
public String getFileName()
@@ -1092,7 +1092,7 @@ public class BasicFileChooserUI extends FileChooserUI
* Returns the current directory name.
*
* @return The directory name.
- *
+ *
* @see #setDirectoryName(String)
*/
public String getDirectoryName()
@@ -1105,12 +1105,12 @@ public class BasicFileChooserUI extends FileChooserUI
* Sets the file name.
*
* @param filename the file name.
- *
+ *
* @see #getFileName()
*/
public void setFileName(String filename)
{
- // FIXME: it might be the case that this method provides an access
+ // FIXME: it might be the case that this method provides an access
// point for the JTextField (or whatever) a subclass is using...
//this.filename = filename;
}
@@ -1119,7 +1119,7 @@ public class BasicFileChooserUI extends FileChooserUI
* Sets the directory name (NOT IMPLEMENTED).
*
* @param dirname the directory name.
- *
+ *
* @see #getDirectoryName()
*/
public void setDirectoryName(String dirname)
@@ -1149,7 +1149,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns the {@link JFileChooser} component that this UI delegate
+ * Returns the {@link JFileChooser} component that this UI delegate
* represents.
*
* @return The component represented by this UI delegate.
@@ -1184,7 +1184,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the tool tip text for the approve (open/save) button. This first
* checks the file chooser to see if a value has been explicitly set - if
- * not, a default value appropriate for the type of file chooser is
+ * not, a default value appropriate for the type of file chooser is
* returned.
*
* @param fc the file chooser.
@@ -1236,7 +1236,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns <code>true</code> if a directory is selected, and
+ * Returns <code>true</code> if a directory is selected, and
* <code>false</code> otherwise.
*
* @return A boolean.
@@ -1295,7 +1295,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser component.
*
* @return The file view.
- *
+ *
* @see JFileChooser#getFileView()
*/
public FileView getFileView(JFileChooser fc)
@@ -1309,7 +1309,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (<code>null</code> not permitted).
*
* @return The dialog title.
- *
+ *
* @see JFileChooser#getDialogTitle()
*/
public String getDialogTitle(JFileChooser fc)
@@ -1326,7 +1326,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (<code>null</code> not permitted).
*
* @return The approve button mnemonic.
- *
+ *
* @see JFileChooser#getApproveButtonMnemonic()
*/
public int getApproveButtonMnemonic(JFileChooser fc)
@@ -1345,7 +1345,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (<code>null</code> not permitted).
*
* @return The approve button text.
- *
+ *
* @see JFileChooser#getApproveButtonText()
*/
public String getApproveButtonText(JFileChooser fc)
@@ -1362,7 +1362,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Creates and returns a new action that will be used with the "new folder"
+ * Creates and returns a new action that will be used with the "new folder"
* button.
*
* @return A new instance of {@link NewFolderAction}.
@@ -1375,7 +1375,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Creates and returns a new action that will be used with the "home folder"
+ * Creates and returns a new action that will be used with the "home folder"
* button.
*
* @return A new instance of {@link GoHomeAction}.
@@ -1426,7 +1426,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the update action (an instance of {@link UpdateAction}).
*
- * @return An action.
+ * @return An action.
*/
public Action getUpdateAction()
{
diff --git a/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java b/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
index 9c7f1c4c5..555921435 100644
--- a/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
+++ b/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
@@ -66,4 +66,4 @@ public class BasicFormattedTextFieldUI extends BasicTextFieldUI
{
return "FormattedTextField";
}
-} \ No newline at end of file
+}
diff --git a/javax/swing/plaf/basic/BasicGraphicsUtils.java b/javax/swing/plaf/basic/BasicGraphicsUtils.java
index e73c39bf6..f270d3335 100644
--- a/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -142,7 +142,7 @@ public class BasicGraphicsUtils
g.setColor(darkShadow);
g.drawLine(x + 1, y + 1, x2 - 2, y + 1); // top, inner
g.drawLine(x + 1, y + 2, x + 1, y2 - 2); // left, inner
-
+
g.setColor(highlight);
g.drawLine(x + 1, y2 - 1, x2 - 1, y2 - 1); // bottom, inner
g.drawLine(x2 - 1, y + 1, x2 - 1, y2 - 2); // right, inner
@@ -156,8 +156,8 @@ public class BasicGraphicsUtils
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Determines the width of the border that gets painted by
* {@link #drawEtchedRect}.
@@ -229,7 +229,7 @@ public class BasicGraphicsUtils
{
return new Insets(2, 2, 2, 2);
}
-
+
/**
* Draws a border that is suitable for buttons of the Basic look and
@@ -310,8 +310,8 @@ public class BasicGraphicsUtils
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Draws a rectangle that appears lowered into the surface, given
* four colors that are used for drawing.
@@ -363,8 +363,8 @@ public class BasicGraphicsUtils
darkShadow, shadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Draws a String at the given location, underlining the first
* occurence of a specified character. The algorithm for determining
@@ -390,7 +390,7 @@ public class BasicGraphicsUtils
* the GNU Classpath implementation does not underline
* anything if <code>underlinedChar</code> is outside
* the range of <code>char</code>.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -436,7 +436,7 @@ public class BasicGraphicsUtils
* <code>text</code>. If <code>underlinedIndex</code> falls
* outside the range <code>[0, text.length() - 1]</code>, the
* text will be drawn without underlining anything.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -518,7 +518,7 @@ public class BasicGraphicsUtils
underline.width = underlineX1 - underlineX2;
}
-
+
underline.height = lineMetrics.getUnderlineThickness();
underline.y = lineMetrics.getUnderlineOffset();
if (underline.y == 0)
@@ -597,7 +597,7 @@ public class BasicGraphicsUtils
* <code>text</code>. If <code>underlinedIndex</code> falls
* outside the range <code>[0, text.length() - 1]</code>, the
* text will be drawn without underlining anything.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -683,7 +683,7 @@ public class BasicGraphicsUtils
underline.width = underlineX1 - underlineX2;
}
-
+
underline.height = lineMetrics.getUnderlineThickness();
underline.y = lineMetrics.getUnderlineOffset();
if (underline.y == 0)
@@ -761,8 +761,8 @@ public class BasicGraphicsUtils
* and <code>height</code> fields indicate the preferred
* extent in pixels.
*
- * @see javax.swing.SwingUtilities#layoutCompoundLabel(JComponent,
- * FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle,
+ * @see javax.swing.SwingUtilities#layoutCompoundLabel(JComponent,
+ * FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle,
* Rectangle, int)
*/
public static Dimension getPreferredButtonSize(AbstractButton b,
@@ -795,7 +795,7 @@ public class BasicGraphicsUtils
b.getFontMetrics(b.getFont()), // see comment above
b.getText(),
b.getIcon(),
- b.getVerticalAlignment(),
+ b.getVerticalAlignment(),
b.getHorizontalAlignment(),
b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
diff --git a/javax/swing/plaf/basic/BasicHTML.java b/javax/swing/plaf/basic/BasicHTML.java
index 6e26d5355..a7ce8b15b 100644
--- a/javax/swing/plaf/basic/BasicHTML.java
+++ b/javax/swing/plaf/basic/BasicHTML.java
@@ -145,7 +145,7 @@ public class BasicHTML
{
if (view != null)
view.setParent(null);
-
+
if (v != null)
v.setParent(this);
diff --git a/javax/swing/plaf/basic/BasicIconFactory.java b/javax/swing/plaf/basic/BasicIconFactory.java
index cad0d0e8a..1b5afa7f1 100644
--- a/javax/swing/plaf/basic/BasicIconFactory.java
+++ b/javax/swing/plaf/basic/BasicIconFactory.java
@@ -53,16 +53,16 @@ public class BasicIconFactory implements Serializable
{
static final long serialVersionUID = 5605588811185324383L;
- private static class DummyIcon
+ private static class DummyIcon
implements Icon
- {
- public int getIconHeight()
- {
- return 10;
+ {
+ public int getIconHeight()
+ {
+ return 10;
}
- public int getIconWidth()
- {
- return 10;
+ public int getIconWidth()
+ {
+ return 10;
}
public void paintIcon(Component c, Graphics g, int x, int y)
{
@@ -118,7 +118,7 @@ public class BasicIconFactory implements Serializable
}
/**
- * The icon used for {@link JCheckBoxMenuItem}s in the
+ * The icon used for {@link JCheckBoxMenuItem}s in the
* {@link BasicLookAndFeel}. This icon has a size of 9x9 pixels.
*/
static class CheckBoxMenuItemIcon
@@ -155,14 +155,14 @@ public class BasicIconFactory implements Serializable
public void paintIcon(Component c, Graphics g, int x, int y)
{
JCheckBoxMenuItem item = (JCheckBoxMenuItem) c;
- if (item.isSelected())
+ if (item.isSelected())
{
// paint the check...
g.setColor(Color.black);
g.drawLine(x + 1, y + 3, x + 1, y + 4);
g.drawLine(x + 2, y + 4, x + 2, y + 5);
for (int i = 0; i < 5; i++)
- g.drawLine(x + 3 + i, y + 5 - i, x + 3 + i, y + 6 - i);
+ g.drawLine(x + 3 + i, y + 5 - i, x + 3 + i, y + 6 - i);
}
}
}
@@ -212,7 +212,7 @@ public class BasicIconFactory implements Serializable
}
/** The cached CheckBoxIcon instance. */
private static CheckBoxIcon checkBoxIcon;
-
+
/** The cached RadioButtonIcon instance. */
private static RadioButtonIcon radioButtonIcon;
@@ -246,34 +246,34 @@ public class BasicIconFactory implements Serializable
{
return new DummyIcon();
}
-
+
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
- * points to the right. This is displayed in menu items that have a
+ * points to the right. This is displayed in menu items that have a
* sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuArrowIcon()
{
return new Icon()
{
- public int getIconHeight()
- {
- return 8;
- }
- public int getIconWidth()
- {
- return 4;
- }
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- Color saved = g.getColor();
- g.setColor(Color.BLACK);
+ public int getIconHeight()
+ {
+ return 8;
+ }
+ public int getIconWidth()
+ {
+ return 4;
+ }
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ Color saved = g.getColor();
+ g.setColor(Color.BLACK);
for (int i = 0; i < 4; i++)
g.drawLine(x + i, y + i, x + i, y + 7 - i);
- g.setColor(saved);
- }
+ g.setColor(saved);
+ }
};
}
@@ -308,19 +308,19 @@ public class BasicIconFactory implements Serializable
/**
* Creates and returns an icon used when rendering {@link JCheckBoxMenuItem}
* components.
- *
+ *
* @return An icon.
*/
public static Icon getCheckBoxMenuItemIcon()
{
return new CheckBoxMenuItemIcon();
}
-
+
public static Icon getRadioButtonMenuItemIcon()
{
return getRadioButtonIcon();
}
-
+
public static Icon createEmptyFrameIcon()
{
return new DummyIcon();
diff --git a/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
index ea8b46036..484660501 100644
--- a/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+++ b/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
@@ -89,7 +89,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
super("Close");
}
-
+
/**
* This method is called when something closes the JInternalFrame.
*
@@ -371,7 +371,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
Icon frameIcon = frame.getFrameIcon();
if (frameIcon == null)
- frameIcon = BasicDesktopIconUI.defaultIcon;
+ frameIcon = BasicDesktopIconUI.defaultIcon;
frameIcon.paintIcon(this, g, 0, 0);
}
@@ -453,8 +453,8 @@ public class BasicInternalFrameTitlePane extends JComponent
}
if (title != null)
- title.setBounds(insets.left + menupref.width, insets.top,
- loc - menupref.width - insets.left, height);
+ title.setBounds(insets.left + menupref.width, insets.top,
+ loc - menupref.width - insets.left, height);
}
/**
@@ -581,7 +581,7 @@ public class BasicInternalFrameTitlePane extends JComponent
/** The icon displayed in the close button. */
protected Icon closeIcon;
-
+
/** The JInternalFrame that this TitlePane is used in. */
protected JInternalFrame frame;
@@ -620,7 +620,7 @@ public class BasicInternalFrameTitlePane extends JComponent
* This is package-private to avoid an accessor method.
*/
transient JLabel title;
-
+
static
{
// not constants in JDK
@@ -739,7 +739,7 @@ public class BasicInternalFrameTitlePane extends JComponent
selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground");
notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground");
notSelectedTitleColor = UIManager.getColor("InternalFrame.inactiveTitleBackground");
-
+
closeIcon = UIManager.getIcon("InternalFrame.closeIcon");
iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon");
maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
@@ -755,7 +755,7 @@ public class BasicInternalFrameTitlePane extends JComponent
selectedTitleColor = null;
notSelectedTextColor = null;
notSelectedTitleColor = null;
-
+
closeIcon = null;
iconIcon = null;
maxIcon = null;
@@ -894,17 +894,17 @@ public class BasicInternalFrameTitlePane extends JComponent
paintTitleBackground(g);
if (frame.getTitle() != null && title != null)
{
- Color saved = g.getColor();
+ Color saved = g.getColor();
Font f = title.getFont();
g.setFont(f);
FontMetrics fm = g.getFontMetrics(f);
- if (frame.isSelected())
- g.setColor(selectedTextColor);
- else
- g.setColor(notSelectedTextColor);
- title.setText(getTitle(frame.getTitle(), fm, title.getBounds().width));
- SwingUtilities.paintComponent(g, title, null, title.getBounds());
- g.setColor(saved);
+ if (frame.isSelected())
+ g.setColor(selectedTextColor);
+ else
+ g.setColor(notSelectedTextColor);
+ title.setText(getTitle(frame.getTitle(), fm, title.getBounds().width));
+ SwingUtilities.paintComponent(g, title, null, title.getBounds());
+ g.setColor(saved);
}
}
@@ -964,7 +964,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
// FIXME: Implement postClosingEvent when I figure out what
// it's supposed to do.
- // It says that this fires an WINDOW_CLOSING like event.
+ // It says that this fires an WINDOW_CLOSING like event.
// So the closest thing is some kind of InternalFrameEvent.
// But none is fired.
// Can't see it called or anything.
diff --git a/javax/swing/plaf/basic/BasicInternalFrameUI.java b/javax/swing/plaf/basic/BasicInternalFrameUI.java
index 87c5268c8..da37e2bd8 100644
--- a/javax/swing/plaf/basic/BasicInternalFrameUI.java
+++ b/javax/swing/plaf/basic/BasicInternalFrameUI.java
@@ -170,10 +170,10 @@ public class BasicInternalFrameUI extends InternalFrameUI
implements SwingConstants
{
/**
- * The current shape of the cursor.
+ * The current shape of the cursor.
*/
transient int showingCursor;
-
+
/** FIXME: Use for something. */
protected final int RESIZE_NONE = 0;
@@ -188,7 +188,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/** Cache rectangle that can be reused. */
private transient Rectangle cacheRect = new Rectangle();
-
+
/**
* This method is called when the mouse is clicked.
*
@@ -209,7 +209,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
// We do nothing if the attempt has been vetoed.
}
-
+
// There is nothing to do when the mouse is clicked
// on the border.
}
@@ -288,7 +288,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse exits the JInternalFrame.
- *
+ *
* @param e The MouseEvent.
*/
public void mouseExited(MouseEvent e)
@@ -302,7 +302,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is moved inside the JInternalFrame.
- *
+ *
* @param e The MouseEvent.
*/
public void mouseMoved(MouseEvent e)
@@ -318,10 +318,10 @@ public class BasicInternalFrameUI extends InternalFrameUI
setCursor(e);
}
}
-
+
/**
* Set the mouse cursor, how applicable.
- *
+ *
* @param e the current mouse event.
*/
void setCursor(MouseEvent e)
@@ -337,7 +337,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is pressed.
- *
+ *
* @param e The MouseEvent.
*/
public void mousePressed(MouseEvent e)
@@ -381,7 +381,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
dm.endDraggingFrame(frame);
frame.putClientProperty("bufferedDragging", null);
}
-
+
setCursor(e);
}
@@ -398,7 +398,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
Rectangle b = frame.getBounds();
int corner = InternalFrameBorder.cornerSize;
-
+
if (x < corner && y < corner)
return Cursor.NW_RESIZE_CURSOR;
else if (x > b.width - corner && y < corner)
@@ -429,7 +429,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
/**
* This method is called when the JDesktopPane is hidden.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -440,7 +440,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is moved.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -451,7 +451,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is resized.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -469,7 +469,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is shown.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -487,7 +487,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the given Component is added to the
* JInternalFrame.
- *
+ *
* @param name
* The name of the Component.
* @param c
@@ -501,7 +501,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is used to set the bounds of the children of the
* JInternalFrame.
- *
+ *
* @param c
* The Container to lay out.
*/
@@ -562,7 +562,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns the minimum layout size.
- *
+ *
* @param c
* The Container to find a minimum layout size for.
* @return The minimum dimensions for the JInternalFrame.
@@ -574,7 +574,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* Th8is method returns the preferred layout size.
- *
+ *
* @param c
* The Container to find a preferred layout size for.
* @return The preferred dimensions for the JInternalFrame.
@@ -586,7 +586,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* DOCUMENT ME!
- *
+ *
* @param c
* DOCUMENT ME!
* @param min
@@ -694,7 +694,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse enters the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -705,7 +705,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is clicked on the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -716,7 +716,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is dragged in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -727,7 +727,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse exits the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -738,7 +738,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is moved in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -749,7 +749,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is pressed in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -764,7 +764,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is released in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -776,7 +776,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This is a helper method that dispatches the GlassPane MouseEvents to the
* proper component.
- *
+ *
* @param e the mouse event to be dispatched
*/
private void handleEvent(MouseEvent e)
@@ -885,7 +885,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when one of the JInternalFrame's properties change.
- *
+ *
* @param evt
* The PropertyChangeEvent.
*/
@@ -971,8 +971,8 @@ public class BasicInternalFrameUI extends InternalFrameUI
class InternalFrameBorder extends AbstractBorder implements
UIResource
{
- /**
- * The width of the border.
+ /**
+ * The width of the border.
*/
static final int bSize = 5;
@@ -983,7 +983,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns whether the border is opaque.
- *
+ *
* @return Whether the border is opaque.
*/
public boolean isBorderOpaque()
@@ -993,7 +993,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns the insets of the border.
- *
+ *
* @param c
* The Component to find border insets for.
* @return The border insets.
@@ -1005,7 +1005,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method paints the border.
- *
+ *
* @param c
* The Component that owns the border.
* @param g
@@ -1051,9 +1051,9 @@ public class BasicInternalFrameUI extends InternalFrameUI
g.fill3DRect(0, cornerSize, bSize, b.height - 2 * cornerSize, false);
g.fill3DRect(cornerSize, 0, b.width - 2 * cornerSize, bSize, false);
- g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize,
+ g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize,
bSize, false);
- g.fill3DRect(b.width - bSize, cornerSize, bSize,
+ g.fill3DRect(b.width - bSize, cornerSize, bSize,
b.height - 2 * cornerSize, false);
g.translate(-x, -y);
@@ -1595,7 +1595,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
replacePane(northPane, c);
northPane = c;
// the following is needed to make internal frames draggable when using
- // the JGoodies PlasticLookAndFeel, because it overrides the
+ // the JGoodies PlasticLookAndFeel, because it overrides the
// createNorthPane() method and doesn't assign anything to the titlePane
// field. It is possible there is another way to make this work, but
// I didn't find it...
diff --git a/javax/swing/plaf/basic/BasicLabelUI.java b/javax/swing/plaf/basic/BasicLabelUI.java
index 045740df6..9469b5695 100644
--- a/javax/swing/plaf/basic/BasicLabelUI.java
+++ b/javax/swing/plaf/basic/BasicLabelUI.java
@@ -114,7 +114,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* Returns the preferred size of this component as calculated by the
- * {@link #layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle,
+ * {@link #layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle,
* Rectangle)} method.
*
* @param c This {@link JComponent} to get a preferred size for.
@@ -188,7 +188,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* The method that paints the label according to its current state.
- *
+ *
* @param g The {@link Graphics} object to paint with.
* @param c The {@link JComponent} to paint.
*/
@@ -217,7 +217,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
text = layoutCL(b, fm, text, icon, vr, ir, tr);
if (icon != null)
- icon.paintIcon(b, g, ir.x, ir.y);
+ icon.paintIcon(b, g, ir.x, ir.y);
if (text != null && ! text.equals(""))
{
@@ -239,7 +239,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* This method is simply calls SwingUtilities's layoutCompoundLabel.
- *
+ *
* @param label The label to lay out.
* @param fontMetrics The FontMetrics for the font used.
* @param text The text to paint.
@@ -247,7 +247,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
* @param viewR The entire viewable rectangle.
* @param iconR The icon bounds rectangle.
* @param textR The text bounds rectangle.
- *
+ *
* @return A possibly clipped version of the text.
*/
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text,
@@ -421,11 +421,11 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
{
// add a keystroke for the given mnemonic mapping to 'press';
InputMap keyMap = new InputMap();
- keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.VK_ALT),
+ keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.VK_ALT),
"press");
- SwingUtilities.replaceUIInputMap(l,
+ SwingUtilities.replaceUIInputMap(l,
JComponent.WHEN_IN_FOCUSED_WINDOW, keyMap);
-
+
// add an action to focus the component when 'press' happens
ActionMap map = new ActionMap();
map.put("press", new AbstractAction() {
@@ -439,7 +439,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
});
SwingUtilities.replaceUIActionMap(l, map);
}
- }
+ }
}
/**
@@ -450,7 +450,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
protected void uninstallKeyboardActions(JLabel l)
{
SwingUtilities.replaceUIActionMap(l, null);
- SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW,
+ SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW,
null);
}
@@ -500,9 +500,9 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
int newMnemonic = ((Integer) e.getNewValue()).intValue();
InputMap keyMap = label.getInputMap(
JComponent.WHEN_IN_FOCUSED_WINDOW);
- keyMap.put(KeyStroke.getKeyStroke(oldMnemonic,
+ keyMap.put(KeyStroke.getKeyStroke(oldMnemonic,
KeyEvent.ALT_DOWN_MASK), null);
- keyMap.put(KeyStroke.getKeyStroke(newMnemonic,
+ keyMap.put(KeyStroke.getKeyStroke(newMnemonic,
KeyEvent.ALT_DOWN_MASK), "press");
}
}
@@ -512,8 +512,8 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
InputMap keyMap = label.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
int mnemonic = label.getDisplayedMnemonic();
if (mnemonic > 0)
- keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.ALT_DOWN_MASK),
- "press");
+ keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.ALT_DOWN_MASK),
+ "press");
}
}
diff --git a/javax/swing/plaf/basic/BasicListUI.java b/javax/swing/plaf/basic/BasicListUI.java
index befc22736..0e33957f4 100644
--- a/javax/swing/plaf/basic/BasicListUI.java
+++ b/javax/swing/plaf/basic/BasicListUI.java
@@ -78,7 +78,7 @@ import javax.swing.plaf.ListUI;
import javax.swing.plaf.UIResource;
/**
- * The Basic Look and Feel UI delegate for the
+ * The Basic Look and Feel UI delegate for the
* JList.
*/
public class BasicListUI extends ListUI
@@ -111,7 +111,7 @@ public class BasicListUI extends ListUI
}
/**
- * Helper method to repaint the focused cell's
+ * Helper method to repaint the focused cell's
* lost or acquired focus state.
*/
protected void repaintCellFocus()
@@ -170,7 +170,7 @@ public class BasicListUI extends ListUI
public class ListSelectionHandler implements ListSelectionListener
{
/**
- * Called when the list selection changes.
+ * Called when the list selection changes.
*
* @param e The event representing the change
*/
@@ -197,7 +197,7 @@ public class BasicListUI extends ListUI
ActionListener target;
String bindingCommandName;
- public ActionListenerProxy(ActionListener li,
+ public ActionListenerProxy(ActionListener li,
String cmd)
{
target = li;
@@ -237,13 +237,13 @@ public class BasicListUI extends ListUI
{
int lead = list.getLeadSelectionIndex();
int max = list.getModel().getSize() - 1;
- DefaultListSelectionModel selModel
+ DefaultListSelectionModel selModel
= (DefaultListSelectionModel) list.getSelectionModel();
String command = e.getActionCommand();
// Do nothing if list is empty
if (max == -1)
return;
-
+
if (command.equals("selectNextRow"))
{
selectNextIndex();
@@ -265,7 +265,7 @@ public class BasicListUI extends ListUI
}
else if (command.equals("selectLastRow"))
{
- list.setSelectedIndex(list.getModel().getSize() - 1);
+ list.setSelectedIndex(list.getModel().getSize() - 1);
}
else if (command.equals("selectLastRowChangeLead"))
{
@@ -276,7 +276,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -288,7 +288,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -300,7 +300,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -312,7 +312,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -344,12 +344,12 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
target = list.getFirstVisibleIndex();
- list.setSelectedIndex(target);
+ list.setSelectedIndex(target);
}
else if (command.equals("selectLastRowExtendSelection"))
{
@@ -360,7 +360,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -384,7 +384,7 @@ public class BasicListUI extends ListUI
{
selModel.moveLeadSelectionIndex(Math.max(0, lead - 1));
}
- }
+ }
else if (command.equals("addToSelection"))
{
list.addSelectionInterval(lead, lead);
@@ -402,20 +402,20 @@ public class BasicListUI extends ListUI
list.removeSelectionInterval(lead, lead);
selModel.setAnchorSelectionIndex(lead);
}
- else
+ else
{
- // DEBUG: uncomment the following line to print out
+ // DEBUG: uncomment the following line to print out
// key bindings that aren't implemented yet
-
+
// System.out.println ("not implemented: "+e.getActionCommand());
}
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
}
/**
- * A helper class which listens for {@link MouseEvent}s
+ * A helper class which listens for {@link MouseEvent}s
* from the {@link JList}.
*/
public class MouseInputHandler implements MouseInputListener
@@ -436,20 +436,20 @@ public class BasicListUI extends ListUI
{
if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION)
list.setSelectedIndex(index);
- else if (list.getSelectionMode() ==
+ else if (list.getSelectionMode() ==
ListSelectionModel.SINGLE_INTERVAL_SELECTION)
// COMPAT: the IBM VM is compatible with the following line of code.
- // However, compliance with Sun's VM would correspond to replacing
- // getAnchorSelectionIndex() with getLeadSelectionIndex().This is
- // both unnatural and contradictory to the way they handle other
+ // However, compliance with Sun's VM would correspond to replacing
+ // getAnchorSelectionIndex() with getLeadSelectionIndex().This is
+ // both unnatural and contradictory to the way they handle other
// similar UI interactions.
list.setSelectionInterval(list.getAnchorSelectionIndex(), index);
else
// COMPAT: both Sun and IBM are compatible instead with:
// list.setSelectionInterval
// (list.getLeadSelectionIndex(),index);
- // Note that for IBM this is contradictory to what they did in
- // the above situation for SINGLE_INTERVAL_SELECTION.
+ // Note that for IBM this is contradictory to what they did in
+ // the above situation for SINGLE_INTERVAL_SELECTION.
// The most natural thing to do is the following:
if (list.isSelectedIndex(list.getAnchorSelectionIndex()))
list.getSelectionModel().setLeadSelectionIndex(index);
@@ -467,7 +467,7 @@ public class BasicListUI extends ListUI
}
else
list.setSelectedIndex(index);
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
@@ -530,7 +530,7 @@ public class BasicListUI extends ListUI
return;
if (!event.isShiftDown() && !event.isControlDown())
list.setSelectedIndex(index);
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
@@ -664,7 +664,7 @@ public class BasicListUI extends ListUI
/** The width of a single cell in the list. */
protected int cellWidth;
- /**
+ /**
* An array of varying heights of cells in the list, in cases where each
* cell might have a different height. This field is used when the
* <code>fixedCellHeight</code> property of the list is not set. Otherwise
@@ -692,7 +692,7 @@ public class BasicListUI extends ListUI
* The {@link CellRendererPane} that is used for painting.
*/
protected CellRendererPane rendererPane;
-
+
/** The action bound to KeyStrokes. */
ListAction action;
@@ -729,7 +729,7 @@ public class BasicListUI extends ListUI
* @param index1 The first row to include in the bounds
* @param index2 The last row to incude in the bounds
*
- * @return A rectangle encompassing the range of rows between
+ * @return A rectangle encompassing the range of rows between
* <code>index1</code> and <code>index2</code> inclusive, or null
* such a rectangle couldn't be calculated for the given indexes.
*/
@@ -953,7 +953,7 @@ public class BasicListUI extends ListUI
}
/**
- * Resets to <code>null</code> those defaults which were installed in
+ * Resets to <code>null</code> those defaults which were installed in
* {@link #installDefaults}
*/
protected void uninstallDefaults()
@@ -1002,7 +1002,7 @@ public class BasicListUI extends ListUI
list.removeMouseMotionListener(mouseInputListener);
list.removePropertyChangeListener(propertyChangeListener);
}
-
+
/**
* Installs keyboard actions for this UI in the {@link JList}.
*/
@@ -1125,7 +1125,7 @@ public class BasicListUI extends ListUI
* Gets the size this list would prefer to assume. This is calculated by
* calling {@link #getCellBounds} over the entire list.
*
- * @param c Ignored; uses the saved {@link JList} reference
+ * @param c Ignored; uses the saved {@link JList} reference
*
* @return DOCUMENT ME!
*/
@@ -1150,7 +1150,7 @@ public class BasicListUI extends ListUI
{
// We cast to double here to force double divisions.
double modelSize = size;
- int neededColumns = (int) Math.ceil(modelSize / visibleRows);
+ int neededColumns = (int) Math.ceil(modelSize / visibleRows);
int adjustedRows = (int) Math.ceil(modelSize / neededColumns);
h = maxCellHeight * adjustedRows;
w = cellWidth * neededColumns;
@@ -1220,7 +1220,7 @@ public class BasicListUI extends ListUI
* cell in the list.
*
* @param g The graphics context to paint with
- * @param c Ignored; uses the saved {@link JList} reference
+ * @param c Ignored; uses the saved {@link JList} reference
*/
public void paint(Graphics g, JComponent c)
{
@@ -1238,7 +1238,7 @@ public class BasicListUI extends ListUI
int startIndex = locationToIndex(list, new Point(clip.x, clip.y));
int endIndex = locationToIndex(list, new Point(clip.x + clip.width,
clip.y + clip.height));
-
+
for (int row = startIndex; row <= endIndex; ++row)
{
Rectangle bounds = getCellBounds(list, row, row);
diff --git a/javax/swing/plaf/basic/BasicLookAndFeel.java b/javax/swing/plaf/basic/BasicLookAndFeel.java
index 154309454..9a1f544f6 100644
--- a/javax/swing/plaf/basic/BasicLookAndFeel.java
+++ b/javax/swing/plaf/basic/BasicLookAndFeel.java
@@ -96,7 +96,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* are targetted at a menu/submenu/menubar or not. If not,
* the MenuSelectionManager is messaged to close the currently opened menus,
* if any.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class PopupHelper implements AWTEventListener
@@ -227,9 +227,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * Creates and returns a new instance of the default resources for this look
+ * Creates and returns a new instance of the default resources for this look
* and feel.
- *
+ *
* @return The UI defaults.
*/
public UIDefaults getDefaults()
@@ -247,9 +247,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * Populates the <code>defaults</code> table with mappings between class IDs
+ * Populates the <code>defaults</code> table with mappings between class IDs
* and fully qualified class names for the UI delegates.
- *
+ *
* @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initClassDefaults(UIDefaults defaults)
@@ -314,7 +314,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* {@link #loadSystemColors(UIDefaults, String[], boolean)}. If the
* look and feel is a native look and feel, these defaults may be overridden
* by the corresponding SystemColor constants.
- *
+ *
* @param defaults the defaults table (<code>null</code> not permitted).
*/
protected void initSystemColorDefaults(UIDefaults defaults)
@@ -365,7 +365,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* <code>false</code>
* @param useNative when <code>true</code>, installs the values of the
* SystemColor constants, when <code>false</code>, install the values
- * from <code>systemColors</code>
+ * from <code>systemColors</code>
*/
protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
boolean useNative)
@@ -479,19 +479,19 @@ public abstract class BasicLookAndFeel extends LookAndFeel
protected void initComponentDefaults(UIDefaults defaults)
{
Object[] uiDefaults;
-
+
Color highLight = new Color(249, 247, 246);
Color light = new Color(239, 235, 231);
Color shadow = new Color(139, 136, 134);
Color darkShadow = new Color(16, 16, 16);
-
+
uiDefaults = new Object[] {
"AbstractUndoableEdit.undoText", "Undo",
"AbstractUndoableEdit.redoText", "Redo",
"Button.background", new ColorUIResource(Color.LIGHT_GRAY),
"Button.border",
- new UIDefaults.LazyValue()
+ new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
@@ -528,7 +528,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
return BasicIconFactory.getCheckBoxIcon();
}
},
- "CheckBox.checkIcon",
+ "CheckBox.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
@@ -549,7 +549,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"CheckBoxMenuItem.background", new ColorUIResource(light),
"CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
"CheckBoxMenuItem.borderPainted", Boolean.FALSE,
- "CheckBoxMenuItem.checkIcon",
+ "CheckBoxMenuItem.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
@@ -637,7 +637,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
"EditorPane.foreground", new ColorUIResource(Color.black),
"EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
- "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
+ "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("shift UP"), "selection-up",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
@@ -782,21 +782,21 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"InternalFrame.border",
new UIDefaults.LazyValue()
{
- public Object createValue(UIDefaults table)
- {
- Color lineColor = new Color(238, 238, 238);
- Border inner = BorderFactory.createLineBorder(lineColor, 1);
- Color shadowInner = new Color(184, 207, 229);
- Color shadowOuter = new Color(122, 138, 153);
- Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
- Color.WHITE,
- Color.WHITE,
- shadowOuter,
- shadowInner);
- Border border = new BorderUIResource.CompoundBorderUIResource(outer,
- inner);
- return border;
- }
+ public Object createValue(UIDefaults table)
+ {
+ Color lineColor = new Color(238, 238, 238);
+ Border inner = BorderFactory.createLineBorder(lineColor, 1);
+ Color shadowInner = new Color(184, 207, 229);
+ Color shadowOuter = new Color(122, 138, 153);
+ Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
+ Color.WHITE,
+ Color.WHITE,
+ shadowOuter,
+ shadowInner);
+ Border border = new BorderUIResource.CompoundBorderUIResource(outer,
+ inner);
+ return border;
+ }
},
"InternalFrame.borderColor", new ColorUIResource(light),
"InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
@@ -1459,60 +1459,60 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"TextPane.foreground", new ColorUIResource(Color.black),
"TextPane.inactiveForeground", new ColorUIResource(Color.gray),
"TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
- KeyStroke.getKeyStroke("shift UP"), "selection-up",
- KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
- KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
- KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
- KeyStroke.getKeyStroke("DOWN"), "caret-down",
- KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
- KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
- KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
- KeyStroke.getKeyStroke("END"), "caret-end-line",
- KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
- KeyStroke.getKeyStroke("KP_UP"), "caret-up",
- KeyStroke.getKeyStroke("DELETE"), "delete-next",
- KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
- KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
- KeyStroke.getKeyStroke("ctrl END"), "caret-end",
- KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
- KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
- KeyStroke.getKeyStroke("LEFT"), "caret-backward",
- KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
- KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
- KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
- KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
- KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
- KeyStroke.getKeyStroke("ENTER"), "insert-break",
- KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
- KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
- KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
- KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
- KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
- KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
- KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
- KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
- KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
- KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
- KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
- KeyStroke.getKeyStroke("shift END"), "selection-end-line",
- KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
- KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
- KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
- KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
- KeyStroke.getKeyStroke("ctrl A"), "select-all",
- KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
- KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
- KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
- KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
- KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
- KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
- KeyStroke.getKeyStroke("TAB"), "insert-tab",
- KeyStroke.getKeyStroke("UP"), "caret-up",
- KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
- KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
- KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
- KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
- KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
+ KeyStroke.getKeyStroke("shift UP"), "selection-up",
+ KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
+ KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
+ KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
+ KeyStroke.getKeyStroke("DOWN"), "caret-down",
+ KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
+ KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
+ KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
+ KeyStroke.getKeyStroke("END"), "caret-end-line",
+ KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
+ KeyStroke.getKeyStroke("KP_UP"), "caret-up",
+ KeyStroke.getKeyStroke("DELETE"), "delete-next",
+ KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
+ KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
+ KeyStroke.getKeyStroke("ctrl END"), "caret-end",
+ KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
+ KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
+ KeyStroke.getKeyStroke("LEFT"), "caret-backward",
+ KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
+ KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
+ KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
+ KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
+ KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
+ KeyStroke.getKeyStroke("ENTER"), "insert-break",
+ KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
+ KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
+ KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
+ KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
+ KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
+ KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
+ KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
+ KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
+ KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
+ KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
+ KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
+ KeyStroke.getKeyStroke("shift END"), "selection-end-line",
+ KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
+ KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
+ KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
+ KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
+ KeyStroke.getKeyStroke("ctrl A"), "select-all",
+ KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
+ KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
+ KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
+ KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
+ KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
+ KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
+ KeyStroke.getKeyStroke("TAB"), "insert-tab",
+ KeyStroke.getKeyStroke("UP"), "caret-up",
+ KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
+ KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
+ KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
+ KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
+ KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
}),
"TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
diff --git a/javax/swing/plaf/basic/BasicMenuBarUI.java b/javax/swing/plaf/basic/BasicMenuBarUI.java
index cd25a3baf..b9e29128a 100644
--- a/javax/swing/plaf/basic/BasicMenuBarUI.java
+++ b/javax/swing/plaf/basic/BasicMenuBarUI.java
@@ -109,20 +109,20 @@ public class BasicMenuBarUI extends MenuBarUI
defaultManager.setSelectedPath(me);
}
}
-
+
}
protected ChangeListener changeListener;
/*ContainerListener that listens to the ContainerEvents fired from menu bar*/
protected ContainerListener containerListener;
-
+
/*Property change listeners that listener to PropertyChangeEvent from menu bar*/
private PropertyChangeListener propertyChangeListener;
/* menu bar for which this UI delegate is for*/
protected JMenuBar menuBar;
-
+
/* MouseListener that listens to the mouseEvents fired from menu bar*/
private MouseInputListener mouseListener;
@@ -398,7 +398,7 @@ public class BasicMenuBarUI extends MenuBarUI
menuBar.repaint();
}
}
-
+
private class MouseInputHandler implements MouseInputListener
{
/**
@@ -409,7 +409,7 @@ public class BasicMenuBarUI extends MenuBarUI
public void mouseClicked(MouseEvent e)
{
MenuElement[] me = menuBar.getSubElements();
-
+
for (int i = 0; i < me.length; i++)
{
JMenu menu = menuBar.getMenu(i);
@@ -417,7 +417,7 @@ public class BasicMenuBarUI extends MenuBarUI
menu.setSelected(false);
}
}
-
+
/**
* Handles mouse pressed event
*
@@ -427,7 +427,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse released event
*
@@ -437,7 +437,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse exited event
*
@@ -447,7 +447,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse dragged event
*
@@ -457,7 +457,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse moved event
*
@@ -467,7 +467,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse entered event
*
diff --git a/javax/swing/plaf/basic/BasicMenuItemUI.java b/javax/swing/plaf/basic/BasicMenuItemUI.java
index 5fafb4108..40b539378 100644
--- a/javax/swing/plaf/basic/BasicMenuItemUI.java
+++ b/javax/swing/plaf/basic/BasicMenuItemUI.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -128,7 +128,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Number of spaces between icon and text.
*/
protected int defaultTextIconGap = 4;
-
+
/**
* Color of the text when menu item is disabled
*/
@@ -222,14 +222,14 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* A class to handle PropertChangeEvents for the JMenuItem
- * @author Anthony Balkissoon abalkiss at redhat dot com.
+ * @author Anthony Balkissoon abalkiss at redhat dot com.
*/
class PropertyChangeHandler implements PropertyChangeListener
{
/**
* This method is called when a property of the menuItem is changed.
* Currently it is only used to update the accelerator key bindings.
- *
+ *
* @param e
* the PropertyChangeEvent
*/
@@ -238,7 +238,7 @@ public class BasicMenuItemUI extends MenuItemUI
String property = e.getPropertyName();
if (property.equals("accelerator"))
{
- InputMap map = SwingUtilities.getUIInputMap(menuItem,
+ InputMap map = SwingUtilities.getUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map != null)
map.remove((KeyStroke) e.getOldValue());
@@ -266,7 +266,7 @@ public class BasicMenuItemUI extends MenuItemUI
}
}
}
-
+
/**
* A class to handle accelerator keys. This is the Action we will
* perform when the accelerator key for this JMenuItem is pressed.
@@ -282,9 +282,9 @@ public class BasicMenuItemUI extends MenuItemUI
public void actionPerformed(ActionEvent event)
{
doClick(MenuSelectionManager.defaultManager());
- }
+ }
}
-
+
/**
* Creates a new BasicMenuItemUI object.
*/
@@ -308,7 +308,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Create MenuDragMouseListener to listen for mouse dragged events.
- *
+ *
* @param c
* menu item to listen to
* @return The MenuDragMouseListener
@@ -321,7 +321,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Creates MenuKeyListener to listen to key events occuring when menu item is
* visible on the screen.
- *
+ *
* @param c
* menu item to listen to
* @return The MenuKeyListener
@@ -333,7 +333,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Handles mouse input events occuring for this menu item
- *
+ *
* @param c
* menu item to listen to
* @return The MouseInputListener
@@ -346,7 +346,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Factory method to create a BasicMenuItemUI for the given {@link
* JComponent}, which should be a {@link JMenuItem}.
- *
+ *
* @param c
* The {@link JComponent} a UI is being created for.
* @return A BasicMenuItemUI for the {@link JComponent}.
@@ -358,7 +358,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Programatically clicks menu item.
- *
+ *
* @param msm
* MenuSelectionManager for the menu hierarchy
*/
@@ -370,7 +370,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns maximum size for the specified menu item
- *
+ *
* @param c
* component for which to get maximum size
* @return Maximum size for the specified menu item.
@@ -382,7 +382,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns minimum size for the specified menu item
- *
+ *
* @param c
* component for which to get minimum size
* @return Minimum size for the specified menu item.
@@ -394,7 +394,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns path to this menu item.
- *
+ *
* @return $MenuElement[]$ Returns array of menu elements that constitute a
* path to this menu item.
*/
@@ -420,7 +420,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns preferred size for the given menu item.
- *
+ *
* @param c
* menu item for which to get preferred size
* @param checkIcon
@@ -504,20 +504,20 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns preferred size of the given component
- *
+ *
* @param c
* component for which to return preferred size
* @return $Dimension$ preferred size for the given component
*/
public Dimension getPreferredSize(JComponent c)
{
- return getPreferredMenuItemSize(c, checkIcon, arrowIcon,
+ return getPreferredMenuItemSize(c, checkIcon, arrowIcon,
defaultTextIconGap);
}
/**
* Returns the prefix for entries in the {@link UIDefaults} table.
- *
+ *
* @return "MenuItem"
*/
protected String getPropertyPrefix()
@@ -527,7 +527,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method installs the components for this {@link JMenuItem}.
- *
+ *
* @param menuItem
* The {@link JMenuItem} to install components for.
*/
@@ -548,15 +548,15 @@ public class BasicMenuItemUI extends MenuItemUI
prefix + ".foreground", prefix + ".font");
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
acceleratorFont = UIManager.getFont(prefix + ".acceleratorFont");
- acceleratorForeground = UIManager.getColor(prefix
+ acceleratorForeground = UIManager.getColor(prefix
+ ".acceleratorForeground");
- acceleratorSelectionForeground = UIManager.getColor(prefix
+ acceleratorSelectionForeground = UIManager.getColor(prefix
+ ".acceleratorSelectionForeground");
selectionBackground = UIManager.getColor(prefix + ".selectionBackground");
selectionForeground = UIManager.getColor(prefix + ".selectionForeground");
acceleratorDelimiter = UIManager.getString(prefix + ".acceleratorDelimiter");
checkIcon = UIManager.getIcon(prefix + ".checkIcon");
-
+
menuItem.setHorizontalTextPosition(SwingConstants.TRAILING);
menuItem.setHorizontalAlignment(SwingConstants.LEADING);
}
@@ -566,16 +566,16 @@ public class BasicMenuItemUI extends MenuItemUI
*/
protected void installKeyboardActions()
{
- InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem,
+ InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW);
if (focusedWindowMap == null)
focusedWindowMap = new ComponentInputMapUIResource(menuItem);
KeyStroke accelerator = menuItem.getAccelerator();
if (accelerator != null)
focusedWindowMap.put(accelerator, "doClick");
- SwingUtilities.replaceUIInputMap(menuItem,
+ SwingUtilities.replaceUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap);
-
+
ActionMap UIActionMap = SwingUtilities.getUIActionMap(menuItem);
if (UIActionMap == null)
UIActionMap = new ActionMapUIResource();
@@ -605,7 +605,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Installs and initializes all fields for this UI delegate. Any properties of
* the UI that need to be initialized and/or set to defaults will be done now.
* It will also install any listeners necessary.
- *
+ *
* @param c
* The {@link JComponent} that is having this UI installed.
*/
@@ -621,7 +621,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints given menu item using specified graphics context
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -635,7 +635,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints background of the menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param menuItem
@@ -664,7 +664,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints specified menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -808,7 +808,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints label for the given menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param menuItem
@@ -864,7 +864,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method uninstalls the components for this {@link JMenuItem}.
- *
+ *
* @param menuItem
* The {@link JMenuItem} to uninstall components for.
*/
@@ -901,7 +901,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Uninstalls any keyboard actions.
*/
protected void uninstallKeyboardActions()
- {
+ {
SwingUtilities.replaceUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW, null);
}
@@ -922,7 +922,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Performs the opposite of installUI. Any properties or resources that need
* to be cleaned up will be done now. It will also uninstall any listeners it
* has. In addition, any properties of this UI will be nulled.
- *
+ *
* @param c
* The {@link JComponent} that is having this UI uninstalled.
*/
@@ -937,7 +937,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method calls paint.
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -966,7 +966,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is clicked on the menu item. It forwards
* this event to MenuSelectionManager.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -979,7 +979,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is dragged inside the menu item. It
* forwards this event to MenuSelectionManager.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -994,7 +994,7 @@ public class BasicMenuItemUI extends MenuItemUI
* item is considered to be selected and selection path in
* MenuSelectionManager is set. This event is also forwarded to
* MenuSelection Manager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1012,7 +1012,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse exits menu item. The event is forwarded
* to MenuSelectionManager for processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1025,7 +1025,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is inside the menu item. This event is
* forwarder to MenuSelectionManager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1038,7 +1038,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is pressed. This event is forwarded to
* MenuSelectionManager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1052,7 +1052,7 @@ public class BasicMenuItemUI extends MenuItemUI
* This method is called when mouse is released. If the mouse is released
* inside this menuItem, then this menu item is considered to be chosen and
* the menu hierarchy should be closed.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1078,7 +1078,7 @@ public class BasicMenuItemUI extends MenuItemUI
{
/**
* Tbis method is invoked when mouse is dragged over the menu item.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1091,7 +1091,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse enters the menu item while it is being
* dragged.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1104,7 +1104,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse exits the menu item while it is being
* dragged
- *
+ *
* @param e the MenuDragMouseEvent
*/
public void menuDragMouseExited(MenuDragMouseEvent e)
@@ -1115,7 +1115,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse was dragged and released inside the
* menu item.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1140,7 +1140,7 @@ public class BasicMenuItemUI extends MenuItemUI
{
/**
* This method is invoked when key has been pressed
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1151,7 +1151,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is invoked when key has been pressed
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1163,7 +1163,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is invoked when key has been typed It handles the mnemonic
* key for the menu item.
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1172,7 +1172,7 @@ public class BasicMenuItemUI extends MenuItemUI
// TODO: What should be done here, if anything?
}
}
-
+
/**
* Helper class that listens for item changes to the properties of the {@link
* JMenuItem}.
diff --git a/javax/swing/plaf/basic/BasicMenuUI.java b/javax/swing/plaf/basic/BasicMenuUI.java
index 355e0435e..4897ee4a0 100644
--- a/javax/swing/plaf/basic/BasicMenuUI.java
+++ b/javax/swing/plaf/basic/BasicMenuUI.java
@@ -98,7 +98,7 @@ public class BasicMenuUI extends BasicMenuItemUI
defaultManager.setSelectedPath(newPath);
}
}
-
+
}
protected ChangeListener changeListener;
@@ -233,7 +233,7 @@ public class BasicMenuUI extends BasicMenuItemUI
*/
protected void installDefaults()
{
-
+
LookAndFeel.installBorder(menuItem, "Menu.border");
LookAndFeel.installColorsAndFont(menuItem, "Menu.background",
"Menu.foreground", "Menu.font");
@@ -502,9 +502,9 @@ public class BasicMenuUI extends BasicMenuItemUI
{
JMenu menu = (JMenu) menuItem;
if (menu.isTopLevelMenu())
- ((JMenuBar) menu.getParent()).setSelected(menu);
+ ((JMenuBar) menu.getParent()).setSelected(menu);
else
- ((JPopupMenu) menu.getParent()).setSelected(menu);
+ ((JPopupMenu) menu.getParent()).setSelected(menu);
}
}
diff --git a/javax/swing/plaf/basic/BasicOptionPaneUI.java b/javax/swing/plaf/basic/BasicOptionPaneUI.java
index e23808580..a03d224d2 100644
--- a/javax/swing/plaf/basic/BasicOptionPaneUI.java
+++ b/javax/swing/plaf/basic/BasicOptionPaneUI.java
@@ -100,7 +100,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
JOptionPane op = (JOptionPane) event.getSource();
op.setValue(new Integer(JOptionPane.CLOSED_OPTION));
}
-
+
}
/**
@@ -136,18 +136,18 @@ public class BasicOptionPaneUI extends OptionPaneUI
Object value = new Integer(JOptionPane.CLOSED_OPTION);
Object[] options = optionPane.getOptions();
if (options != null)
- value = new Integer(buttonIndex);
+ value = new Integer(buttonIndex);
else
{
- String text = ((JButton) e.getSource()).getText();
- if (text.equals(OK_STRING))
- value = new Integer(JOptionPane.OK_OPTION);
- if (text.equals(CANCEL_STRING))
- value = new Integer(JOptionPane.CANCEL_OPTION);
- if (text.equals(YES_STRING))
- value = new Integer(JOptionPane.YES_OPTION);
- if (text.equals(NO_STRING))
- value = new Integer(JOptionPane.NO_OPTION);
+ String text = ((JButton) e.getSource()).getText();
+ if (text.equals(OK_STRING))
+ value = new Integer(JOptionPane.OK_OPTION);
+ if (text.equals(CANCEL_STRING))
+ value = new Integer(JOptionPane.CANCEL_OPTION);
+ if (text.equals(YES_STRING))
+ value = new Integer(JOptionPane.YES_OPTION);
+ if (text.equals(NO_STRING))
+ value = new Integer(JOptionPane.NO_OPTION);
}
optionPane.setValue(value);
resetInputValue();
@@ -155,7 +155,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
Window owner = SwingUtilities.windowForComponent(optionPane);
if (owner instanceof JDialog)
- ((JDialog) owner).dispose();
+ ((JDialog) owner).dispose();
//else we probably have some kind of internal frame.
JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(
@@ -265,21 +265,21 @@ public class BasicOptionPaneUI extends OptionPaneUI
Component[] buttonList = container.getComponents();
int x = container.getInsets().left;
if (getCentersChildren())
- x += (int) ((double) (container.getSize().width) / 2
- - (double) (buttonRowLength(container)) / 2);
+ x += (int) ((double) (container.getSize().width) / 2
+ - (double) (buttonRowLength(container)) / 2);
for (int i = 0; i < buttonList.length; i++)
{
- Dimension dims = buttonList[i].getPreferredSize();
- if (syncAllWidths)
- {
- buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height);
- x += widthOfWidestButton + getPadding();
- }
- else
- {
- buttonList[i].setBounds(x, 0, dims.width, dims.height);
- x += dims.width + getPadding();
- }
+ Dimension dims = buttonList[i].getPreferredSize();
+ if (syncAllWidths)
+ {
+ buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height);
+ x += widthOfWidestButton + getPadding();
+ }
+ else
+ {
+ buttonList[i].setBounds(x, 0, dims.width, dims.height);
+ x += dims.width + getPadding();
+ }
}
}
@@ -301,10 +301,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
for (int i = 0; i < buttonList.length; i++)
{
- Dimension dims = buttonList[i].getPreferredSize();
- buttonLength += dims.width + getPadding();
- widest = Math.max(widest, dims.width);
- tallest = Math.max(tallest, dims.height);
+ Dimension dims = buttonList[i].getPreferredSize();
+ buttonLength += dims.width + getPadding();
+ widest = Math.max(widest, dims.width);
+ tallest = Math.max(tallest, dims.height);
}
widthOfWidestButton = widest;
@@ -312,10 +312,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
int width;
if (getSyncAllWidths())
- width = widest * buttonList.length
- + getPadding() * (buttonList.length - 1);
+ width = widest * buttonList.length
+ + getPadding() * (buttonList.length - 1);
else
- width = buttonLength;
+ width = buttonLength;
Insets insets = c.getInsets();
width += insets.left + insets.right;
@@ -438,10 +438,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
/** Whether the JOptionPane contains custom components. */
protected boolean hasCustomComponents;
- // The initialFocusComponent seems to always be set to a button (even if
- // I try to set initialSelectionValue). This is different from what the
- // javadocs state (which should switch this reference to the input component
- // if one is present since that is what's going to get focus).
+ // The initialFocusComponent seems to always be set to a button (even if
+ // I try to set initialSelectionValue). This is different from what the
+ // javadocs state (which should switch this reference to the input component
+ // if one is present since that is what's going to get focus).
/**
* The button that will receive focus based on initialValue when no input
@@ -531,20 +531,20 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- Polygon oct = new Polygon(new int[] { 0, 0, 9, 27, 36, 36, 27, 9 },
- new int[] { 9, 27, 36, 36, 27, 9, 0, 0 }, 8);
- g.translate(x, y);
+ Polygon oct = new Polygon(new int[] { 0, 0, 9, 27, 36, 36, 27, 9 },
+ new int[] { 9, 27, 36, 36, 27, 9, 0, 0 }, 8);
+ g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.RED);
+ Color saved = g.getColor();
+ g.setColor(Color.RED);
- g.fillPolygon(oct);
+ g.fillPolygon(oct);
- g.setColor(Color.BLACK);
- g.drawRect(13, 16, 10, 4);
+ g.setColor(Color.BLACK);
+ g.drawRect(13, 16, 10, 4);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -553,24 +553,24 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
+ g.translate(x, y);
+ Color saved = g.getColor();
- // Should be purple.
- g.setColor(Color.RED);
+ // Should be purple.
+ g.setColor(Color.RED);
- g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
+ g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
- g.setColor(Color.BLACK);
- g.drawOval(16, 6, 4, 4);
+ g.setColor(Color.BLACK);
+ g.drawOval(16, 6, 4, 4);
- Polygon bottomI = new Polygon(new int[] { 15, 15, 13, 13, 23, 23, 21, 21 },
- new int[] { 12, 28, 28, 30, 30, 28, 28, 12 },
- 8);
- g.drawPolygon(bottomI);
+ Polygon bottomI = new Polygon(new int[] { 15, 15, 13, 13, 23, 23, 21, 21 },
+ new int[] { 12, 28, 28, 30, 30, 28, 28, 12 },
+ 8);
+ g.drawPolygon(bottomI);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -579,23 +579,23 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.YELLOW);
+ g.translate(x, y);
+ Color saved = g.getColor();
+ g.setColor(Color.YELLOW);
- Polygon triangle = new Polygon(new int[] { 0, 18, 36 },
- new int[] { 36, 0, 36 }, 3);
- g.fillPolygon(triangle);
+ Polygon triangle = new Polygon(new int[] { 0, 18, 36 },
+ new int[] { 36, 0, 36 }, 3);
+ g.fillPolygon(triangle);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- Polygon excl = new Polygon(new int[] { 15, 16, 20, 21 },
- new int[] { 8, 26, 26, 8 }, 4);
- g.drawPolygon(excl);
- g.drawOval(16, 30, 4, 4);
+ Polygon excl = new Polygon(new int[] { 15, 16, 20, 21 },
+ new int[] { 8, 26, 26, 8 }, 4);
+ g.drawPolygon(excl);
+ g.drawOval(16, 30, 4, 4);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -604,32 +604,32 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.GREEN);
+ g.translate(x, y);
+ Color saved = g.getColor();
+ g.setColor(Color.GREEN);
- g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
+ g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- g.drawOval(11, 2, 16, 16);
- g.drawOval(14, 5, 10, 10);
+ g.drawOval(11, 2, 16, 16);
+ g.drawOval(14, 5, 10, 10);
- g.setColor(Color.GREEN);
- g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
+ g.setColor(Color.GREEN);
+ g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- g.drawLine(11, 10, 14, 10);
+ g.drawLine(11, 10, 14, 10);
- g.drawLine(24, 10, 17, 22);
- g.drawLine(27, 10, 20, 22);
- g.drawLine(17, 22, 20, 22);
+ g.drawLine(24, 10, 17, 22);
+ g.drawLine(27, 10, 20, 22);
+ g.drawLine(17, 22, 20, 22);
- g.drawOval(17, 25, 3, 3);
+ g.drawOval(17, 25, 3, 3);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -659,25 +659,25 @@ public class BasicOptionPaneUI extends OptionPaneUI
return;
for (int i = 0; i < buttons.length; i++)
{
- if (buttons[i] != null)
- {
- Component toAdd;
- if (buttons[i] instanceof Component)
- toAdd = (Component) buttons[i];
- else
- {
- if (buttons[i] instanceof Icon)
- toAdd = new JButton((Icon) buttons[i]);
- else
- toAdd = new JButton(buttons[i].toString());
- hasCustomComponents = true;
- }
- if (toAdd instanceof JButton)
- ((JButton) toAdd).addActionListener(createButtonActionListener(i));
- if (i == initialIndex)
- initialFocusComponent = toAdd;
- container.add(toAdd);
- }
+ if (buttons[i] != null)
+ {
+ Component toAdd;
+ if (buttons[i] instanceof Component)
+ toAdd = (Component) buttons[i];
+ else
+ {
+ if (buttons[i] instanceof Icon)
+ toAdd = new JButton((Icon) buttons[i]);
+ else
+ toAdd = new JButton(buttons[i].toString());
+ hasCustomComponents = true;
+ }
+ if (toAdd instanceof JButton)
+ ((JButton) toAdd).addActionListener(createButtonActionListener(i));
+ if (i == initialIndex)
+ initialFocusComponent = toAdd;
+ container.add(toAdd);
+ }
}
selectInitialValue(optionPane);
}
@@ -693,9 +693,9 @@ public class BasicOptionPaneUI extends OptionPaneUI
Icon icon = getIcon();
if (icon != null)
{
- iconLabel = new JLabel(icon);
+ iconLabel = new JLabel(icon);
configureLabel(iconLabel);
- top.add(iconLabel, BorderLayout.WEST);
+ top.add(iconLabel, BorderLayout.WEST);
}
}
@@ -743,38 +743,38 @@ public class BasicOptionPaneUI extends OptionPaneUI
hasCustomComponents = internallyCreated;
if (msg instanceof Object[])
{
- Object[] arr = (Object[]) msg;
- for (int i = 0; i < arr.length; i++)
- addMessageComponents(container, cons, arr[i], maxll,
- internallyCreated);
- return;
+ Object[] arr = (Object[]) msg;
+ for (int i = 0; i < arr.length; i++)
+ addMessageComponents(container, cons, arr[i], maxll,
+ internallyCreated);
+ return;
}
else if (msg instanceof Component)
{
- container.add((Component) msg, cons);
- cons.gridy++;
+ container.add((Component) msg, cons);
+ cons.gridy++;
}
else if (msg instanceof Icon)
{
JLabel label = new JLabel((Icon) msg);
configureLabel(label);
- container.add(label, cons);
- cons.gridy++;
+ container.add(label, cons);
+ cons.gridy++;
}
else
{
- // Undocumented behaviour.
- // if msg.toString().length greater than maxll
- // it will create a box and burst the string.
- // otherwise, it will just create a label and re-call
- // this method with the label o.O
- if (msg.toString().length() > maxll || msg.toString().contains("\n"))
- {
- Box tmp = new Box(BoxLayout.Y_AXIS);
- burstStringInto(tmp, msg.toString(), maxll);
- addMessageComponents(container, cons, tmp, maxll, true);
- }
- else
+ // Undocumented behaviour.
+ // if msg.toString().length greater than maxll
+ // it will create a box and burst the string.
+ // otherwise, it will just create a label and re-call
+ // this method with the label o.O
+ if (msg.toString().length() > maxll || msg.toString().contains("\n"))
+ {
+ Box tmp = new Box(BoxLayout.Y_AXIS);
+ burstStringInto(tmp, msg.toString(), maxll);
+ addMessageComponents(container, cons, tmp, maxll, true);
+ }
+ else
{
JLabel label = new JLabel(msg.toString());
configureLabel(label);
@@ -817,7 +817,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
if (remainder.length() == 0)
return;
- // Recursively call ourselves to burst the remainder of the string,
+ // Recursively call ourselves to burst the remainder of the string,
if (remainder.length() > maxll || remainder.contains("\n"))
burstStringInto(c, remainder, maxll);
else
@@ -901,27 +901,27 @@ public class BasicOptionPaneUI extends OptionPaneUI
rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
rightSide.setLayout(new GridBagLayout());
GridBagConstraints con = createConstraints();
-
+
addMessageComponents(rightSide, con, getMessage(),
getMaxCharactersPerLineCount(), false);
if (optionPane.getWantsInput())
{
- Object[] selection = optionPane.getSelectionValues();
+ Object[] selection = optionPane.getSelectionValues();
- if (selection == null)
+ if (selection == null)
inputComponent = new JTextField(15);
- else if (selection.length < 20)
+ else if (selection.length < 20)
inputComponent = new JComboBox(selection);
- else
- inputComponent = new JList(selection);
- if (inputComponent != null)
- {
- addMessageComponents(rightSide, con, inputComponent,
+ else
+ inputComponent = new JList(selection);
+ if (inputComponent != null)
+ {
+ addMessageComponents(rightSide, con, inputComponent,
getMaxCharactersPerLineCount(), false);
- resetSelectedValue();
- selectInitialValue(optionPane);
- }
+ resetSelectedValue();
+ selectInitialValue(optionPane);
+ }
}
messageArea.add(rightSide, BorderLayout.CENTER);
@@ -979,11 +979,11 @@ public class BasicOptionPaneUI extends OptionPaneUI
switch (optionPane.getOptionType())
{
case JOptionPane.YES_NO_OPTION:
- return new Object[] { YES_STRING, NO_STRING };
+ return new Object[] { YES_STRING, NO_STRING };
case JOptionPane.YES_NO_CANCEL_OPTION:
- return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
+ return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
case JOptionPane.OK_CANCEL_OPTION:
- return new Object[] { OK_STRING, CANCEL_STRING };
+ return new Object[] { OK_STRING, CANCEL_STRING };
case JOptionPane.DEFAULT_OPTION:
return (optionPane.getWantsInput()) ?
new Object[] { OK_STRING, CANCEL_STRING } :
@@ -1022,17 +1022,17 @@ public class BasicOptionPaneUI extends OptionPaneUI
switch (messageType)
{
case JOptionPane.ERROR_MESSAGE:
- tmp = errorIcon;
- break;
+ tmp = errorIcon;
+ break;
case JOptionPane.INFORMATION_MESSAGE:
- tmp = infoIcon;
- break;
+ tmp = infoIcon;
+ break;
case JOptionPane.WARNING_MESSAGE:
- tmp = warningIcon;
- break;
+ tmp = warningIcon;
+ break;
case JOptionPane.QUESTION_MESSAGE:
- tmp = questionIcon;
- break;
+ tmp = questionIcon;
+ break;
}
return tmp;
// FIXME: Don't cast till the default icons are in.
@@ -1055,8 +1055,8 @@ public class BasicOptionPaneUI extends OptionPaneUI
for (int i = 0; i < buttons.length; i++)
{
- if (select == buttons[i])
- return i;
+ if (select == buttons[i])
+ return i;
}
return 0;
}
@@ -1251,12 +1251,12 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (c instanceof JOptionPane)
{
- optionPane = (JOptionPane) c;
+ optionPane = (JOptionPane) c;
- installDefaults();
- installComponents();
- installListeners();
- installKeyboardActions();
+ installDefaults();
+ installComponents();
+ installListeners();
+ installKeyboardActions();
}
}
@@ -1268,16 +1268,16 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (optionPane.getWantsInput() && inputComponent != null)
{
- Object output = null;
- if (inputComponent instanceof JTextField)
- output = ((JTextField) inputComponent).getText();
- else if (inputComponent instanceof JComboBox)
- output = ((JComboBox) inputComponent).getSelectedItem();
- else if (inputComponent instanceof JList)
- output = ((JList) inputComponent).getSelectedValue();
-
- if (output != null)
- optionPane.setInputValue(output);
+ Object output = null;
+ if (inputComponent instanceof JTextField)
+ output = ((JTextField) inputComponent).getText();
+ else if (inputComponent instanceof JComboBox)
+ output = ((JComboBox) inputComponent).getSelectedItem();
+ else if (inputComponent instanceof JList)
+ output = ((JList) inputComponent).getSelectedValue();
+
+ if (output != null)
+ optionPane.setInputValue(output);
}
}
@@ -1291,8 +1291,8 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (inputComponent != null)
{
- inputComponent.requestFocus();
- return;
+ inputComponent.requestFocus();
+ return;
}
if (initialFocusComponent != null)
initialFocusComponent.requestFocus();
@@ -1307,17 +1307,17 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (inputComponent != null)
{
- Object init = optionPane.getInitialSelectionValue();
- if (init == null)
- return;
- if (inputComponent instanceof JTextField)
- ((JTextField) inputComponent).setText((String) init);
- else if (inputComponent instanceof JComboBox)
- ((JComboBox) inputComponent).setSelectedItem(init);
- else if (inputComponent instanceof JList)
- {
- // ((JList) inputComponent).setSelectedValue(init, true);
- }
+ Object init = optionPane.getInitialSelectionValue();
+ if (init == null)
+ return;
+ if (inputComponent instanceof JTextField)
+ ((JTextField) inputComponent).setText((String) init);
+ else if (inputComponent instanceof JComboBox)
+ ((JComboBox) inputComponent).setSelectedItem(init);
+ else if (inputComponent instanceof JList)
+ {
+ // ((JList) inputComponent).setSelectedValue(init, true);
+ }
}
}
diff --git a/javax/swing/plaf/basic/BasicPanelUI.java b/javax/swing/plaf/basic/BasicPanelUI.java
index 458f10204..959462a78 100644
--- a/javax/swing/plaf/basic/BasicPanelUI.java
+++ b/javax/swing/plaf/basic/BasicPanelUI.java
@@ -54,13 +54,13 @@ public class BasicPanelUI extends PanelUI
* stateless).
*/
static BasicPanelUI sharedUI;
-
+
/**
* Returns a UI delegate for the specified component.
- *
+ *
* @param panel the panel.
*/
- public static ComponentUI createUI(JComponent panel)
+ public static ComponentUI createUI(JComponent panel)
{
if (sharedUI == null)
sharedUI = new BasicPanelUI();
@@ -69,7 +69,7 @@ public class BasicPanelUI extends PanelUI
/**
* Installs this UI delegate in the specified component.
- *
+ *
* @param c the component (should be a {@link JPanel}, <code>null</code> not
* permitted).
*/
@@ -85,19 +85,19 @@ public class BasicPanelUI extends PanelUI
/**
* Installs the defaults for this UI delegate in the specified panel.
- *
+ *
* @param p the panel (<code>null</code> not permitted).
*/
protected void installDefaults(JPanel p)
{
LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground",
"Panel.font");
-
+
// A test against the reference implementation shows that this method will
// install a border if one is defined in the UIDefaults table (even though
// the BasicLookAndFeel doesn't actually define a "Panel.border"). This
- // test was written after discovering that a null argument to
- // uninstallDefaults throws a NullPointerException in
+ // test was written after discovering that a null argument to
+ // uninstallDefaults throws a NullPointerException in
// LookAndFeel.uninstallBorder()...
LookAndFeel.installBorder(p, "Panel.border");
}
@@ -123,10 +123,10 @@ public class BasicPanelUI extends PanelUI
// (1) doesn't actually remove the installed colors and font installed
// by installDefaults(), it isn't necessary;
// (2) throws a NullPointerException in LookAndFeel.uninstallBorder() if
- // p is null. Strangely, no border is installed by the
+ // p is null. Strangely, no border is installed by the
// BasicLookAndFeel - perhaps this is needed by another LAF?
-
+
LookAndFeel.uninstallBorder(p);
}
-
+
}
diff --git a/javax/swing/plaf/basic/BasicPasswordFieldUI.java b/javax/swing/plaf/basic/BasicPasswordFieldUI.java
index 76dcfc435..cc839179f 100644
--- a/javax/swing/plaf/basic/BasicPasswordFieldUI.java
+++ b/javax/swing/plaf/basic/BasicPasswordFieldUI.java
@@ -56,7 +56,7 @@ public class BasicPasswordFieldUI extends BasicTextFieldUI
{
return new PasswordView(elem);
}
-
+
public static ComponentUI createUI(JComponent c)
{
return new BasicPasswordFieldUI();
diff --git a/javax/swing/plaf/basic/BasicPopupMenuUI.java b/javax/swing/plaf/basic/BasicPopupMenuUI.java
index 8c0fe6757..6cd433b33 100644
--- a/javax/swing/plaf/basic/BasicPopupMenuUI.java
+++ b/javax/swing/plaf/basic/BasicPopupMenuUI.java
@@ -255,7 +255,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
/**
* Finds the next child element that is enabled and visible.
- *
+ *
* @param children the children to search through
* @param start the start index
* @param end the end index
@@ -282,7 +282,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
/**
* Finds the previous child element that is enabled and visible.
- *
+ *
* @param children the children to search through
* @param start the start index
* @param end the end index
@@ -349,7 +349,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
else
{
int popupIndex = len-1;
- if (len > 2
+ if (len > 2
&& (path[popupIndex] instanceof JPopupMenu
|| path[--popupIndex] instanceof JPopupMenu)
&& ! ((JMenu) path[popupIndex - 1]).isTopLevelMenu())
@@ -773,7 +773,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("cancel");
am.put(action.getValue(Action.NAME), action);
-
+
return am;
}
@@ -916,7 +916,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
*/
public void popupMenuWillBecomeInvisible(PopupMenuEvent event)
{
- // remove listener that listens to component events fired
+ // remove listener that listens to component events fired
// by the top - level window that this popup belongs to.
Component invoker = popupMenu.getInvoker();
Component rootContainer = SwingUtilities.getRoot(invoker);
@@ -931,30 +931,30 @@ public class BasicPopupMenuUI extends PopupMenuUI
*/
public void popupMenuWillBecomeVisible(PopupMenuEvent event)
{
- // Adds topWindowListener to top-level window to listener to
+ // Adds topWindowListener to top-level window to listener to
// ComponentEvents fired by it. We need to cancel this popup menu
// if topWindow to which this popup belongs was resized or moved.
- Component invoker = popupMenu.getInvoker();
+ Component invoker = popupMenu.getInvoker();
Component rootContainer = SwingUtilities.getRoot(invoker);
if (rootContainer != null)
rootContainer.addComponentListener(topWindowListener);
// if this popup menu is a free floating popup menu,
// then by default its first element should be always selected when
- // this popup menu becomes visible.
+ // this popup menu becomes visible.
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
if (manager.getSelectedPath().length == 0)
{
- // Set selected path to point to the first item in the popup menu
- MenuElement[] path = new MenuElement[2];
- path[0] = popupMenu;
- Component[] comps = popupMenu.getComponents();
- if (comps.length != 0 && comps[0] instanceof MenuElement)
- {
- path[1] = (MenuElement) comps[0];
- manager.setSelectedPath(path);
- }
+ // Set selected path to point to the first item in the popup menu
+ MenuElement[] path = new MenuElement[2];
+ path[0] = popupMenu;
+ Component[] comps = popupMenu.getComponents();
+ if (comps.length != 0 && comps[0] instanceof MenuElement)
+ {
+ path[1] = (MenuElement) comps[0];
+ manager.setSelectedPath(path);
+ }
}
}
}
diff --git a/javax/swing/plaf/basic/BasicProgressBarUI.java b/javax/swing/plaf/basic/BasicProgressBarUI.java
index 12bbe013c..bff6385ea 100644
--- a/javax/swing/plaf/basic/BasicProgressBarUI.java
+++ b/javax/swing/plaf/basic/BasicProgressBarUI.java
@@ -71,13 +71,13 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ProgressBarUI;
/**
- * The Basic Look and Feel UI delegate for the
+ * The Basic Look and Feel UI delegate for the
* JProgressBar.
*/
public class BasicProgressBarUI extends ProgressBarUI
{
/**
- * A helper class that listens for ChangeEvents
+ * A helper class that listens for ChangeEvents
* from the progressBar's model.
*
* @specnote Apparently this class was intended to be protected,
@@ -99,13 +99,13 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This helper class is used to listen for
+ * This helper class is used to listen for
* PropertyChangeEvents from the progressBar.
*/
private class PropertyChangeHandler implements PropertyChangeListener
{
/**
- * Called every time the properties of the
+ * Called every time the properties of the
* progressBar change.
*
* @param e The PropertyChangeEvent given by the progressBar.
@@ -163,11 +163,11 @@ public class BasicProgressBarUI extends ProgressBarUI
{
// Nothing to do here.
}
-
+
}
/**
- * This helper class is used to listen for
+ * This helper class is used to listen for
* the animationTimer's intervals. On every interval,
* the bouncing box should move.
*/
@@ -215,7 +215,7 @@ public class BasicProgressBarUI extends ProgressBarUI
* Holds the value of the bouncing box that is returned by {@link #getBox}.
*
* @since 1.5
- */
+ */
protected Rectangle boxRect;
/** The timer used to move the bouncing box. */
@@ -230,7 +230,7 @@ public class BasicProgressBarUI extends ProgressBarUI
// | frame0 | frame1 | frame2 | frame 3 | frame 4 |
// | | frame7 | frame6 | frame 5 | |
// +-----------------------------------------------+
-
+
/** The current animation index. */
private transient int animationIndex;
@@ -260,7 +260,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* The size of the box returned by {@link #getBox} against the orientation
* direction of the progress bar. This is package private to avoid accessor
- * method.
+ * method.
*/
transient int boxIndependent = - 1;
@@ -346,7 +346,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the size and position of the bouncing box
- * for the current animation index. It stores the values in the
+ * for the current animation index. It stores the values in the
* given rectangle and returns it. It returns null if no box should
* be drawn.
*
@@ -487,7 +487,7 @@ public class BasicProgressBarUI extends ProgressBarUI
* rectangle (the bounds without the insets) if the
* progressBar is horizontal.
*
- * @return The preferred size of the progressBar minus
+ * @return The preferred size of the progressBar minus
* insets if it's horizontal.
*/
protected Dimension getPreferredInnerHorizontal()
@@ -512,7 +512,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the preferred size of the inner
- * rectangle (the bounds without insets) if the
+ * rectangle (the bounds without insets) if the
* progressBar is vertical.
*
* @return The preferred size of the progressBar minus
@@ -539,7 +539,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method returns the preferred size of the
+ * This method returns the preferred size of the
* given JComponent. If it returns null, then it
* is up to the LayoutManager to give it a size.
*
@@ -585,7 +585,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the point (the top left of the bounding box)
- * where the text should be painted.
+ * where the text should be painted.
*
* @param g The Graphics object to measure FontMetrics with.
* @param progressString The string to paint.
@@ -602,7 +602,7 @@ public class BasicProgressBarUI extends ProgressBarUI
Rectangle tr = new Rectangle();
Rectangle vr = new Rectangle();
Rectangle ir = new Rectangle();
-
+
if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
vr.setBounds(x, y, width, height);
else
@@ -616,7 +616,7 @@ public class BasicProgressBarUI extends ProgressBarUI
SwingConstants.CENTER,
SwingConstants.CENTER,
SwingConstants.CENTER, vr, ir, tr, 0);
-
+
if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
return new Point(tr.x, tr.y);
else
@@ -651,7 +651,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method is called if the painting to be done is
+ * This method is called if the painting to be done is
* for a determinate progressBar.
*
* @param g The Graphics object to paint with.
@@ -672,17 +672,17 @@ public class BasicProgressBarUI extends ProgressBarUI
int amountFull = getAmountFull(insets, or.width, or.height);
- if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
- {
- g.setColor(c.getForeground());
- g.fillRect(vr.x, vr.y, amountFull, vr.height);
- }
- else
- {
- g.setColor(c.getForeground());
- g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width,
+ if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
+ {
+ g.setColor(c.getForeground());
+ g.fillRect(vr.x, vr.y, amountFull, vr.height);
+ }
+ else
+ {
+ g.setColor(c.getForeground());
+ g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width,
amountFull);
- }
+ }
if (progressBar.isStringPainted() && !progressBar.getString().equals(""))
paintString(g, 0, 0, or.width, or.height, amountFull, insets);
@@ -739,13 +739,13 @@ public class BasicProgressBarUI extends ProgressBarUI
String str = progressBar.getString();
int full = getAmountFull(b, width, height);
Point placement = getStringPlacement(g, progressBar.getString(),
- x + b.left, y + b.top,
+ x + b.left, y + b.top,
width - b.left - b.right,
height - b.top - b.bottom);
Color savedColor = g.getColor();
Shape savedClip = g.getClip();
FontMetrics fm = g.getFontMetrics(progressBar.getFont());
-
+
if (progressBar.getOrientation() == JProgressBar.VERTICAL)
{
AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2);
@@ -756,7 +756,7 @@ public class BasicProgressBarUI extends ProgressBarUI
{
placement.y += fm.getAscent();
}
-
+
g.setColor(getSelectionForeground());
g.setClip(0, 0, full + b.left, height);
g.drawString(str, placement.x, placement.y);
@@ -770,7 +770,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method sets the current animation index. If the index is greater than
* the number of frames, it resets to 0.
- *
+ *
* @param newValue The new animation index.
*/
protected void setAnimationIndex(int newValue)
@@ -849,10 +849,10 @@ public class BasicProgressBarUI extends ProgressBarUI
if (cycleTime % repaintInterval != 0
&& (cycleTime / repaintInterval) % 2 != 0)
{
- int div = (cycleTime / repaintInterval) + 2;
- div /= 2;
- div *= 2;
- cycleTime = div * repaintInterval;
+ int div = (cycleTime / repaintInterval) + 2;
+ div /= 2;
+ div *= 2;
+ cycleTime = div * repaintInterval;
}
setAnimationIndex(0);
numFrames = cycleTime / repaintInterval;
@@ -874,7 +874,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method registers listeners to all the
+ * This method registers listeners to all the
* components that this UI delegate needs to listen to.
*/
protected void installListeners()
@@ -895,7 +895,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method unregisters listeners to all the
+ * This method unregisters listeners to all the
* components that were listened to.
*/
protected void uninstallListeners()
@@ -930,13 +930,13 @@ public class BasicProgressBarUI extends ProgressBarUI
super.installUI(c);
if (c instanceof JProgressBar)
{
- progressBar = (JProgressBar) c;
+ progressBar = (JProgressBar) c;
- animationTimer = new Timer(200, null);
- animationTimer.setRepeats(true);
+ animationTimer = new Timer(200, null);
+ animationTimer.setRepeats(true);
- installDefaults();
- installListeners();
+ installDefaults();
+ installListeners();
}
if (progressBar.isIndeterminate())
startAnimationTimer();
diff --git a/javax/swing/plaf/basic/BasicRadioButtonUI.java b/javax/swing/plaf/basic/BasicRadioButtonUI.java
index 3cea0d926..ff374d1ab 100644
--- a/javax/swing/plaf/basic/BasicRadioButtonUI.java
+++ b/javax/swing/plaf/basic/BasicRadioButtonUI.java
@@ -72,7 +72,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
*
* @return a new instance of <code>BasicRadioButtonUI</code>
*/
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
return new BasicRadioButtonUI();
}
@@ -158,7 +158,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
Icon currentIcon = getCurrentIcon(b);
// Do the layout.
- String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
b.getText(), currentIcon == null ? getDefaultIcon() : currentIcon,
b.getVerticalAlignment(), b.getHorizontalAlignment(),
b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
@@ -184,13 +184,13 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
paintFocus(g, textR, size);
}
}
-
- /**
- * Determines the icon to be displayed for the specified radio button.
- *
- * @param b the radio button
- *
- * @return the icon
+
+ /**
+ * Determines the icon to be displayed for the specified radio button.
+ *
+ * @param b the radio button
+ *
+ * @return the icon
*/
private Icon getCurrentIcon(AbstractButton b)
{
@@ -246,14 +246,14 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
// one will be used for layout calculations and painting instead.
// The other icon properties are ignored.
AbstractButton b = (AbstractButton) c;
-
+
Insets insets = b.getInsets();
String text = b.getText();
Icon i = b.getIcon();
if (i == null)
- i = getDefaultIcon();
-
+ i = getDefaultIcon();
+
textR.x = 0;
textR.y = 0;
textR.width = 0;
@@ -269,7 +269,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
SwingUtilities.layoutCompoundLabel(b, // for the component orientation
b.getFontMetrics(b.getFont()),
- text, i, b.getVerticalAlignment(),
+ text, i, b.getVerticalAlignment(),
b.getHorizontalAlignment(),
b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
diff --git a/javax/swing/plaf/basic/BasicRootPaneUI.java b/javax/swing/plaf/basic/BasicRootPaneUI.java
index e20bc2bb3..26c7a532d 100644
--- a/javax/swing/plaf/basic/BasicRootPaneUI.java
+++ b/javax/swing/plaf/basic/BasicRootPaneUI.java
@@ -130,7 +130,7 @@ public class BasicRootPaneUI extends RootPaneUI
}
}
- public static ComponentUI createUI(JComponent x)
+ public static ComponentUI createUI(JComponent x)
{
return new BasicRootPaneUI();
}
diff --git a/javax/swing/plaf/basic/BasicScrollBarUI.java b/javax/swing/plaf/basic/BasicScrollBarUI.java
index 400ede03c..9f24f8aca 100644
--- a/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -85,7 +85,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
*/
protected class ArrowButtonListener extends MouseAdapter
{
-
+
/**
* Move the thumb in the direction specified by the button's arrow. If
* this button is held down, then it should keep moving the thumb.
@@ -285,13 +285,13 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
currentMouseY = e.getY();
if (scrollbar.getValueIsAdjusting())
{
- int value;
- if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- value = valueForXPosition(currentMouseX) - offset;
- else
- value = valueForYPosition(currentMouseY) - offset;
+ int value;
+ if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
+ value = valueForXPosition(currentMouseX) - offset;
+ else
+ value = valueForYPosition(currentMouseY) - offset;
- scrollbar.setValue(value);
+ scrollbar.setValue(value);
}
}
@@ -321,38 +321,38 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
int value;
if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- value = valueForXPosition(currentMouseX);
+ value = valueForXPosition(currentMouseX);
else
- value = valueForYPosition(currentMouseY);
+ value = valueForYPosition(currentMouseY);
if (! thumbRect.contains(e.getPoint()))
{
- scrollTimer.stop();
- scrollListener.setScrollByBlock(true);
- if (value > scrollbar.getValue())
- {
- trackHighlight = INCREASE_HIGHLIGHT;
- scrollListener.setDirection(POSITIVE_SCROLL);
- }
- else
- {
- trackHighlight = DECREASE_HIGHLIGHT;
- scrollListener.setDirection(NEGATIVE_SCROLL);
- }
+ scrollTimer.stop();
+ scrollListener.setScrollByBlock(true);
+ if (value > scrollbar.getValue())
+ {
+ trackHighlight = INCREASE_HIGHLIGHT;
+ scrollListener.setDirection(POSITIVE_SCROLL);
+ }
+ else
+ {
+ trackHighlight = DECREASE_HIGHLIGHT;
+ scrollListener.setDirection(NEGATIVE_SCROLL);
+ }
scrollTimer.setDelay(100);
- scrollTimer.start();
+ scrollTimer.start();
}
else
{
- // We'd like to keep track of where the cursor
- // is inside the thumb.
- // This works because the scrollbar's value represents
- // "lower" edge of the thumb. The value at which
- // the cursor is at must be greater or equal
- // to that value.
+ // We'd like to keep track of where the cursor
+ // is inside the thumb.
+ // This works because the scrollbar's value represents
+ // "lower" edge of the thumb. The value at which
+ // the cursor is at must be greater or equal
+ // to that value.
scrollListener.setScrollByBlock(false);
- scrollbar.setValueIsAdjusting(true);
+ scrollbar.setValueIsAdjusting(true);
offset = value - scrollbar.getValue();
}
scrollbar.repaint();
@@ -394,17 +394,17 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
int value;
if (scrollbar.getOrientation() == HORIZONTAL)
- value = valueForXPosition(currentMouseX);
+ value = valueForXPosition(currentMouseX);
else
- value = valueForYPosition(currentMouseY);
+ value = valueForYPosition(currentMouseY);
if (thumbRect.contains(currentMouseX, currentMouseY))
return false;
-
+
if (direction == POSITIVE_SCROLL)
- return value > scrollbar.getValue();
+ return value > scrollbar.getValue();
else
- return value < scrollbar.getValue();
+ return value < scrollbar.getValue();
}
}
@@ -488,7 +488,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
/** The scrollbar this UI is acting for. */
protected JScrollBar scrollbar;
-
+
/** True if the mouse is over the thumb. */
boolean thumbRollover;
@@ -767,7 +767,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
/**
- * Installs the input map from the look and feel defaults, and a
+ * Installs the input map from the look and feel defaults, and a
* corresponding action map. Note the the keyboard bindings will only
* work when the {@link JScrollBar} component has the focus, which is rare.
*/
@@ -775,7 +775,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(scrollbar,
+ SwingUtilities.replaceUIInputMap(scrollbar,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(scrollbar, map);
@@ -788,25 +788,25 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
protected void uninstallKeyboardActions()
{
SwingUtilities.replaceUIActionMap(scrollbar, null);
- SwingUtilities.replaceUIInputMap(scrollbar,
+ SwingUtilities.replaceUIInputMap(scrollbar,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("ScrollBar.focusInputMap");
return null;
}
-
+
/**
- * Returns the action map for the {@link JScrollBar}. All scroll bars
- * share a single action map which is created the first time this method is
+ * Returns the action map for the {@link JScrollBar}. All scroll bars
+ * share a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("ScrollBar.actionMap");
@@ -821,23 +821,23 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("positiveUnitIncrement",
+ map.put("positiveUnitIncrement",
new AbstractAction("positiveUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -845,12 +845,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("positiveBlockIncrement",
+ map.put("positiveBlockIncrement",
new AbstractAction("positiveBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -858,12 +858,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("negativeUnitIncrement",
+ map.put("negativeUnitIncrement",
new AbstractAction("negativeUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -871,12 +871,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("negativeBlockIncrement",
+ map.put("negativeBlockIncrement",
new AbstractAction("negativeBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -884,24 +884,24 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("minScroll",
+ map.put("minScroll",
new AbstractAction("minScroll") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
sb.setValue(sb.getMinimum());
}
}
}
);
- map.put("maxScroll",
+ map.put("maxScroll",
new AbstractAction("maxScroll") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
sb.setValue(sb.getMaximum());
}
@@ -910,7 +910,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
);
return map;
}
-
+
/**
* This method installs any listeners for the scrollbar. This method also
* installs listeners for things such as the JButtons and the timer.
@@ -973,10 +973,10 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
if (scrollbarContainer instanceof JScrollBar)
{
- if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- layoutHScrollbar((JScrollBar) scrollbarContainer);
- else
- layoutVScrollbar((JScrollBar) scrollbarContainer);
+ if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
+ layoutHScrollbar((JScrollBar) scrollbarContainer);
+ else
+ layoutVScrollbar((JScrollBar) scrollbarContainer);
}
}
@@ -992,7 +992,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
Dimension incrDims = incrButton.getPreferredSize();
Dimension decrDims = decrButton.getPreferredSize();
-
+
// calculate and update the track bounds
SwingUtilities.calculateInnerArea(scrollbar, trackRect);
trackRect.width -= incrDims.getWidth();
@@ -1000,7 +1000,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
trackRect.x += decrDims.getWidth();
updateThumbRect();
-
+
decrButton.setBounds(vr.x, vr.y, decrDims.width, trackRect.height);
incrButton.setBounds(trackRect.x + trackRect.width, vr.y, incrDims.width,
trackRect.height);
@@ -1018,13 +1018,13 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
Dimension incrDims = incrButton.getPreferredSize();
Dimension decrDims = decrButton.getPreferredSize();
-
+
// Update rectangles
SwingUtilities.calculateInnerArea(scrollbar, trackRect);
trackRect.height -= incrDims.getHeight();
trackRect.height -= decrDims.getHeight();
trackRect.y += decrDims.getHeight();
-
+
updateThumbRect();
decrButton.setBounds(vr.x, vr.y, trackRect.width, decrDims.height);
@@ -1076,14 +1076,14 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
thumbRect.height = Math.max(extent * trackRect.height / (max - min),
getMinimumThumbSize().height);
int availableHeight = trackRect.height - thumbRect.height;
- thumbRect.y = trackRect.y
+ thumbRect.y = trackRect.y
+ (value - min) * availableHeight / (max - min - extent);
thumbRect.width = trackRect.width;
}
}
}
-
+
/**
* This method returns the minimum size required for the layout.
*
@@ -1367,7 +1367,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
decrButton.removeMouseListener(buttonListener);
if (incrButton != null)
incrButton.removeMouseListener(buttonListener);
-
+
propertyChangeListener = null;
modelListener = null;
buttonListener = null;
@@ -1469,39 +1469,39 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
value = min;
return value;
}
-
+
/**
* Returns true if the mouse is over the thumb.
- *
+ *
* @return true if the mouse is over the thumb.
- *
+ *
* @since 1.5
*/
public boolean isThumbRollover()
{
- return thumbRollover;
+ return thumbRollover;
}
-
+
/**
* Set thumbRollover to active. This indicates
* whether or not the mouse is over the thumb.
- *
+ *
* @param active - true if the mouse is over the thumb.
- *
+ *
* @since 1.5
*/
protected void setThumbRollover(boolean active)
{
thumbRollover = active;
}
-
+
/**
- * Indicates whether the user can position the thumb with
+ * Indicates whether the user can position the thumb with
* a mouse click (i.e. middle button).
- *
+ *
* @return true if the user can position the thumb with a mouse
* click.
- *
+ *
* @since 1.5
*/
public boolean getSupportsAbsolutePositioning()
diff --git a/javax/swing/plaf/basic/BasicScrollPaneUI.java b/javax/swing/plaf/basic/BasicScrollPaneUI.java
index a71942840..712394830 100644
--- a/javax/swing/plaf/basic/BasicScrollPaneUI.java
+++ b/javax/swing/plaf/basic/BasicScrollPaneUI.java
@@ -127,7 +127,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
viewPosition.y = vsb.getValue();
vp.setViewPosition(viewPosition);
}
-
+
}
/**
@@ -144,7 +144,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* changes. When the extents size has changed, this method calls
* {@link BasicScrollPaneUI#syncScrollPaneWithViewport()} to adjust the
* scrollbars extents as well.
- *
+ *
* @param event the change event
*/
public void stateChanged(ChangeEvent event)
@@ -221,7 +221,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
/**
* Scroll with the mouse wheel.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public void mouseWheelMoved(MouseWheelEvent e)
@@ -245,11 +245,11 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
}
-
+
/**
* Adds/removes the mouse wheel listener when the component is added/removed
* to/from the scroll pane view port.
- *
+ *
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
class ViewportContainerListener implements ContainerListener
@@ -261,7 +261,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
{
e.getChild().addMouseWheelListener(mouseWheelListener);
}
-
+
/**
* Remove the mouse wheel listener.
*/
@@ -270,18 +270,18 @@ public class BasicScrollPaneUI extends ScrollPaneUI
e.getChild().removeMouseWheelListener(mouseWheelListener);
}
}
-
+
/**
* The number of pixels by that we should scroll the content that does
* not implement Scrollable.
*/
static int SCROLL_NON_SCROLLABLES = 10;
-
+
/**
* The number of rows to scroll per mouse wheel click. From impression,
* Sun seems using the value 3.
*/
- static int ROWS_PER_WHEEL_CLICK = 3;
+ static int ROWS_PER_WHEEL_CLICK = 3;
/** The Scrollpane for which the UI is provided by this class. */
protected JScrollPane scrollpane;
@@ -310,14 +310,14 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* The mousewheel listener for the scrollpane.
*/
MouseWheelListener mouseWheelListener;
-
+
/**
* The listener to add and remove the mouse wheel listener to/from
* the component container.
*/
ContainerListener containerListener;
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
return new BasicScrollPaneUI();
}
@@ -348,8 +348,8 @@ public class BasicScrollPaneUI extends ScrollPaneUI
if (vpBorder != null && vpBorder instanceof UIResource)
p.setViewportBorder(null);
}
-
- public void installUI(final JComponent c)
+
+ public void installUI(final JComponent c)
{
super.installUI(c);
installDefaults((JScrollPane) c);
@@ -371,31 +371,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
if (hsbChangeListener == null)
hsbChangeListener = createHSBChangeListener();
sp.getHorizontalScrollBar().getModel().addChangeListener(hsbChangeListener);
-
+
if (vsbChangeListener == null)
vsbChangeListener = createVSBChangeListener();
sp.getVerticalScrollBar().getModel().addChangeListener(vsbChangeListener);
if (viewportChangeListener == null)
viewportChangeListener = createViewportChangeListener();
-
+
if (mouseWheelListener == null)
mouseWheelListener = createMouseWheelListener();
-
+
if (containerListener == null)
containerListener = new ViewportContainerListener();
-
+
JViewport v = sp.getViewport();
v.addChangeListener(viewportChangeListener);
v.addContainerListener(containerListener);
-
+
// Add mouse wheel listeners to the componets that are probably already
// in the view port.
for (int i = 0; i < v.getComponentCount(); i++)
v.getComponent(i).addMouseWheelListener(mouseWheelListener);
}
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("ScrollPane.ancestorInputMap");
@@ -403,13 +403,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
/**
- * Returns the action map for the {@link JScrollPane}. All scroll panes
- * share a single action map which is created the first time this method is
+ * Returns the action map for the {@link JScrollPane}. All scroll panes
+ * share a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("ScrollPane.actionMap");
@@ -424,24 +424,24 @@ public class BasicScrollPaneUI extends ScrollPaneUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("scrollLeft",
+ map.put("scrollLeft",
new AbstractAction("scrollLeft") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -449,31 +449,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollEnd",
+ map.put("scrollEnd",
new AbstractAction("scrollEnd") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb1 = sp.getHorizontalScrollBar();
- if (sb1.isVisible())
+ if (sb1.isVisible())
{
sb1.setValue(sb1.getMaximum());
}
JScrollBar sb2 = sp.getVerticalScrollBar();
- if (sb2.isVisible())
+ if (sb2.isVisible())
{
sb2.setValue(sb2.getMaximum());
}
}
}
);
- map.put("unitScrollUp",
+ map.put("unitScrollUp",
new AbstractAction("unitScrollUp") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -481,13 +481,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollLeft",
+ map.put("unitScrollLeft",
new AbstractAction("unitScrollLeft") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -495,13 +495,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollUp",
+ map.put("scrollUp",
new AbstractAction("scrollUp") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -509,13 +509,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollRight",
+ map.put("scrollRight",
new AbstractAction("scrollRight") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -523,31 +523,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollHome",
+ map.put("scrollHome",
new AbstractAction("scrollHome") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb1 = sp.getHorizontalScrollBar();
- if (sb1.isVisible())
+ if (sb1.isVisible())
{
sb1.setValue(sb1.getMinimum());
}
JScrollBar sb2 = sp.getVerticalScrollBar();
- if (sb2.isVisible())
+ if (sb2.isVisible())
{
sb2.setValue(sb2.getMinimum());
}
}
}
);
- map.put("scrollDown",
+ map.put("scrollDown",
new AbstractAction("scrollDown") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -555,13 +555,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollDown",
+ map.put("unitScrollDown",
new AbstractAction("unitScrollDown") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -569,13 +569,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollRight",
+ map.put("unitScrollRight",
new AbstractAction("unitScrollRight") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -585,7 +585,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
);
return map;
}
-
+
/**
* Installs additional keyboard actions on the scrollpane. This is a hook
* method provided to subclasses in order to install their own keyboard
@@ -597,7 +597,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(sp,
+ SwingUtilities.replaceUIInputMap(sp,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(sp, map);
@@ -613,10 +613,10 @@ public class BasicScrollPaneUI extends ScrollPaneUI
protected void uninstallKeyboardActions(JScrollPane sp)
{
SwingUtilities.replaceUIActionMap(sp, null);
- SwingUtilities.replaceUIInputMap(sp,
+ SwingUtilities.replaceUIInputMap(sp,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
-
+
/**
* Creates and returns the change listener for the horizontal scrollbar.
*
@@ -661,7 +661,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* Creates and returns the mouse wheel listener for the scrollpane.
*
* @return the mouse wheel listener for the scrollpane
- *
+ *
* @since 1.4
*/
protected MouseWheelListener createMouseWheelListener()
@@ -669,7 +669,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
return new MouseWheelHandler();
}
- public void uninstallUI(final JComponent c)
+ public void uninstallUI(final JComponent c)
{
uninstallDefaults((JScrollPane) c);
uninstallListeners(c);
@@ -680,7 +680,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* Uninstalls all the listeners that have been installed in
* {@link #installListeners(JScrollPane)}.
*
- * @param c the scrollpane from which to uninstall the listeners
+ * @param c the scrollpane from which to uninstall the listeners
*/
protected void uninstallListeners(JComponent c)
{
@@ -690,17 +690,17 @@ public class BasicScrollPaneUI extends ScrollPaneUI
.removeChangeListener(hsbChangeListener);
sp.getVerticalScrollBar().getModel()
.removeChangeListener(vsbChangeListener);
-
+
JViewport v = sp.getViewport();
v.removeChangeListener(viewportChangeListener);
v.removeContainerListener(containerListener);
-
+
for (int i = 0; i < v.getComponentCount(); i++)
v.getComponent(i).removeMouseWheelListener(mouseWheelListener);
}
- public Dimension getMinimumSize(JComponent c)
+ public Dimension getMinimumSize(JComponent c)
{
JScrollPane p = (JScrollPane) c;
ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();
@@ -821,15 +821,3 @@ public class BasicScrollPaneUI extends ScrollPaneUI
syncScrollPaneWithViewport();
}
}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/javax/swing/plaf/basic/BasicSeparatorUI.java b/javax/swing/plaf/basic/BasicSeparatorUI.java
index 97caa3af7..2c80822a4 100644
--- a/javax/swing/plaf/basic/BasicSeparatorUI.java
+++ b/javax/swing/plaf/basic/BasicSeparatorUI.java
@@ -86,10 +86,10 @@ public class BasicSeparatorUI extends SeparatorUI
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
+ JSeparator s = (JSeparator) c;
- installDefaults(s);
- installListeners(s);
+ installDefaults(s);
+ installListeners(s);
}
}
@@ -104,10 +104,10 @@ public class BasicSeparatorUI extends SeparatorUI
{
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
+ JSeparator s = (JSeparator) c;
- uninstallListeners(s);
- uninstallDefaults(s);
+ uninstallListeners(s);
+ uninstallDefaults(s);
}
}
@@ -138,7 +138,7 @@ public class BasicSeparatorUI extends SeparatorUI
/**
* This method installs any listeners that need
- * to be attached to the JSeparator or any of its
+ * to be attached to the JSeparator or any of its
* components.
*
* @param s The JSeparator that is being installed.
@@ -156,15 +156,15 @@ public class BasicSeparatorUI extends SeparatorUI
*/
protected void uninstallListeners(JSeparator s)
{
- // Separators don't receive events.
+ // Separators don't receive events.
}
/**
- * The separator is made of two lines. The top line will be
- * the shadow color (or left line if it's vertical). The bottom
- * or right line will be the highlight color. The two lines will
- * be centered inside the bounds box. If the separator is horizontal,
- * then it will be vertically centered, or if it's vertical, it will
+ * The separator is made of two lines. The top line will be
+ * the shadow color (or left line if it's vertical). The bottom
+ * or right line will be the highlight color. The two lines will
+ * be centered inside the bounds box. If the separator is horizontal,
+ * then it will be vertically centered, or if it's vertical, it will
* be horizontally centered.
*
* @param g The Graphics object to paint with
@@ -175,15 +175,15 @@ public class BasicSeparatorUI extends SeparatorUI
Rectangle r = new Rectangle();
SwingUtilities.calculateInnerArea(c, r);
Color saved = g.getColor();
-
+
JSeparator s;
if (c instanceof JSeparator)
s = (JSeparator) c;
else
return;
-
+
if (s.getOrientation() == JSeparator.HORIZONTAL)
- {
+ {
int midAB = r.height / 2;
g.setColor(shadow);
g.drawLine(r.x, r.y + midAB - 1, r.x + r.width, r.y + midAB - 1);
@@ -204,7 +204,7 @@ public class BasicSeparatorUI extends SeparatorUI
}
/**
- * This method returns the preferred size of the
+ * This method returns the preferred size of the
* JComponent.
*
* @param c The JComponent to measure.
@@ -216,8 +216,8 @@ public class BasicSeparatorUI extends SeparatorUI
Dimension pref = new Dimension(2, 0);
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
- if (s.getOrientation() == JSeparator.HORIZONTAL)
+ JSeparator s = (JSeparator) c;
+ if (s.getOrientation() == JSeparator.HORIZONTAL)
pref = new Dimension(0, 2);
}
return pref;
diff --git a/javax/swing/plaf/basic/BasicSliderUI.java b/javax/swing/plaf/basic/BasicSliderUI.java
index 474a42256..b9d564372 100644
--- a/javax/swing/plaf/basic/BasicSliderUI.java
+++ b/javax/swing/plaf/basic/BasicSliderUI.java
@@ -81,12 +81,12 @@ import javax.swing.plaf.SliderUI;
* BasicSliderUI.java This is the UI delegate in the Basic look and feel that
* paints JSliders.
* </p>
- *
+ *
* <p>
* The UI delegate keeps track of 6 rectangles that place the various parts of
* the JSlider inside the component.
* </p>
- *
+ *
* <p>
* The rectangles are organized as follows:
* </p>
@@ -110,27 +110,27 @@ import javax.swing.plaf.SliderUI;
* | | | | | |
* | | | | |
* </pre>
- *
+ *
* <p>
* The space between the contentRect and the focusRect are the FocusInsets.
* </p>
- *
+ *
* <p>
* The space between the focusRect and the component bounds is the insetCache
* which are the component's insets.
* </p>
- *
+ *
* <p>
* The top of the thumb is the top of the contentRect. The trackRect has to be
* as tall as the thumb.
* </p>
- *
+ *
* <p>
* The trackRect and tickRect do not start from the left edge of the
* focusRect. They are trackBuffer away from each side of the focusRect. This
* is so that the thumb has room to move.
* </p>
- *
+ *
* <p>
* The labelRect does start right against the contentRect's left and right
* edges and it gets all remaining space.
@@ -420,8 +420,8 @@ public class BasicSliderUI extends SliderUI
if (slider.getSnapToTicks())
value = findClosestTick(value);
- // If the thumb is hit, then we don't need to set the timers to
- // move it.
+ // If the thumb is hit, then we don't need to set the timers to
+ // move it.
if (! thumbRect.contains(e.getPoint()))
{
// The mouse has hit some other part of the slider.
@@ -605,16 +605,16 @@ public class BasicSliderUI extends SliderUI
/**
* Returns true if the user is dragging the slider.
- *
+ *
* @return true if the slider is being dragged.
- *
+ *
* @since 1.5
*/
protected boolean isDragging()
{
return dragging;
}
-
+
/**
* Gets the shadow color to be used for this slider. The shadow color is the
* color used for drawing the top and left edges of the track.
@@ -1099,15 +1099,15 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Updates the <code>contentRect</code> field to an area inside the
- * <code>focusRect</code>. This method does not need to be called if the
+ * Updates the <code>contentRect</code> field to an area inside the
+ * <code>focusRect</code>. This method does not need to be called if the
* orientation changes.
*/
protected void calculateContentRect()
{
contentRect.x = focusRect.x + focusInsets.left;
contentRect.y = focusRect.y + focusInsets.top;
-
+
contentRect.width = focusRect.width - focusInsets.left - focusInsets.right;
contentRect.height = focusRect.height - focusInsets.top
- focusInsets.bottom;
@@ -1134,9 +1134,9 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Calculates the gap size between the edge of the <code>contentRect</code>
+ * Calculates the gap size between the edge of the <code>contentRect</code>
* and the edge of the <code>trackRect</code>, storing the result in the
- * <code>trackBuffer</code> field. Sufficient space needs to be reserved
+ * <code>trackBuffer</code> field. Sufficient space needs to be reserved
* for the slider thumb and/or the labels at each end of the slider track.
*/
protected void calculateTrackBuffer()
@@ -1145,11 +1145,11 @@ public class BasicSliderUI extends SliderUI
{
int w = Math.max(getWidthOfLowValueLabel(), getWidthOfHighValueLabel());
trackBuffer = Math.max(thumbRect.width / 2, w / 2);
-
+
}
else
{
- int h = Math.max(getHeightOfLowValueLabel(),
+ int h = Math.max(getHeightOfLowValueLabel(),
getHeightOfHighValueLabel());
trackBuffer = Math.max(thumbRect.height / 2, h / 2);
}
@@ -1157,10 +1157,10 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the size of the slider's thumb. The size is hard coded to
- * <code>11 x 20</code> for horizontal sliders, and <code>20 x 11</code> for
- * vertical sliders. Note that a new instance of {@link Dimension} is
- * returned for every call to this method (this seems wasteful, but
- * {@link Dimension} instances are not immutable, so this is probably
+ * <code>11 x 20</code> for horizontal sliders, and <code>20 x 11</code> for
+ * vertical sliders. Note that a new instance of {@link Dimension} is
+ * returned for every call to this method (this seems wasteful, but
+ * {@link Dimension} instances are not immutable, so this is probably
* unavoidable).
*
* @return The size of the slider's thumb.
@@ -1232,7 +1232,7 @@ public class BasicSliderUI extends SliderUI
tickRect.y = trackRect.y + trackRect.height;
tickRect.width = trackRect.width;
tickRect.height = getTickLength();
-
+
// this makes our Mauve tests pass...can't explain it!
if (!slider.getPaintTicks())
{
@@ -1257,7 +1257,7 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Calculates the <code>labelRect</code> field, taking into account the
+ * Calculates the <code>labelRect</code> field, taking into account the
* orientation of the slider.
*/
protected void calculateLabelRect()
@@ -1353,7 +1353,7 @@ public class BasicSliderUI extends SliderUI
* there are no labels.
*
* @return The width of the label whose key has the highest value.
- *
+ *
* @see #getHighestValueLabel()
*/
protected int getWidthOfHighValueLabel()
@@ -1370,7 +1370,7 @@ public class BasicSliderUI extends SliderUI
* there are no labels.
*
* @return The width of the label whose key has the lowest value.
- *
+ *
* @see #getLowestValueLabel()
*/
protected int getWidthOfLowValueLabel()
@@ -1455,7 +1455,7 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the label whose key has the highest value.
*
- * @return The label whose key has the highest value or <code>null</code> if
+ * @return The label whose key has the highest value or <code>null</code> if
* no label table exists.
*/
protected Component getHighestValueLabel()
@@ -1527,7 +1527,7 @@ public class BasicSliderUI extends SliderUI
protected void recalculateIfOrientationChanged()
{
// Examining a test program shows that either Sun calls private
- // methods that we don't know about, or these don't do anything.
+ // methods that we don't know about, or these don't do anything.
calculateThumbSize();
calculateTrackBuffer();
calculateTrackRect();
@@ -1549,7 +1549,7 @@ public class BasicSliderUI extends SliderUI
Color saved_color = g.getColor();
g.setColor(getFocusColor());
-
+
g.drawRect(focusRect.x, focusRect.y, focusRect.width, focusRect.height);
g.setColor(saved_color);
@@ -1564,16 +1564,16 @@ public class BasicSliderUI extends SliderUI
* with the highlight color.
* </p>
* <pre>
- * a---d
- * | |
+ * a---d
+ * | |
* | | a------------------------d
* | | | |
* | | b------------------------c
* | |
- * | |
+ * | |
* b---c
* </pre>
- *
+ *
* <p>
* The b-a-d path needs to be drawn with the shadow color and the b-c-d path
* needs to be drawn with the highlight color.
@@ -1676,7 +1676,7 @@ public class BasicSliderUI extends SliderUI
}
}
- /* Minor ticks start at 1/4 of the height (or width) of the tickRect and
+ /* Minor ticks start at 1/4 of the height (or width) of the tickRect and
extend to 1/2 of the tickRect.
Major ticks start at 1/4 of the height and extend to 3/4.
@@ -1849,7 +1849,7 @@ public class BasicSliderUI extends SliderUI
* \ / | /
* d e-----d
* </pre>
- *
+ *
* <p>
* In the case of vertical thumbs, we highlight the path b-a-e-d and shadow
* the path b-c-d. In the case of horizontal thumbs, we highlight the path
@@ -1958,10 +1958,10 @@ public class BasicSliderUI extends SliderUI
/**
* Moves the thumb one block in the direction specified (a block is 1/10th
- * of the slider range). If the slider snaps to ticks, this method is
+ * of the slider range). If the slider snaps to ticks, this method is
* responsible for snapping it to a tick after the thumb has been moved.
*
- * @param direction the direction (positive values increment the thumb
+ * @param direction the direction (positive values increment the thumb
* position by one block, zero/negative values decrement the thumb position
* by one block).
*/
@@ -1981,11 +1981,11 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Moves the thumb one unit in the specified direction. If the slider snaps
- * to ticks, this method is responsible for snapping it to a tick after the
+ * Moves the thumb one unit in the specified direction. If the slider snaps
+ * to ticks, this method is responsible for snapping it to a tick after the
* thumb has been moved.
*
- * @param direction the direction (positive values increment the thumb
+ * @param direction the direction (positive values increment the thumb
* position by one, zero/negative values decrement the thumb position by
* one).
*/
@@ -2021,7 +2021,7 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Returns the x-coordinate (relative to the component) for the given slider
+ * Returns the x-coordinate (relative to the component) for the given slider
* value. This method assumes that the <code>trackRect</code> field is
* set up.
*
@@ -2049,8 +2049,8 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Returns the y-coordinate (relative to the component) for the given slider
- * value. This method assumes that the <code>trackRect</code> field is
+ * Returns the y-coordinate (relative to the component) for the given slider
+ * value. This method assumes that the <code>trackRect</code> field is
* set up.
*
* @param value the slider value.
@@ -2093,8 +2093,8 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider
- // is. This really shouldn't ever happen, but just in case, we'll return
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
// the middle.
if (len == 0)
return (max - min) / 2;
@@ -2129,8 +2129,8 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider
- // is. This really shouldn't ever happen, but just in case, we'll return
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
// the middle.
if (len == 0)
return (max - min) / 2;
@@ -2164,14 +2164,14 @@ public class BasicSliderUI extends SliderUI
int minorSpace = slider.getMinorTickSpacing();
// The default value to return is value + minor or
- // value + major.
+ // value + major.
// Initializing at min - value leaves us with a default
// return value of min, which always has tick marks
// (if ticks are painted).
int minor = min - value;
int major = min - value;
- // If there are no major tick marks or minor tick marks
+ // If there are no major tick marks or minor tick marks
// e.g. snap is set to true but no ticks are set, then
// we can just return the value.
if (majorSpace <= 0 && minorSpace <= 0)
@@ -2208,8 +2208,8 @@ public class BasicSliderUI extends SliderUI
else
return value + minor;
}
-
- InputMap getInputMap(int condition)
+
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_FOCUSED)
return (InputMap) UIManager.get("Slider.focusInputMap");
@@ -2218,12 +2218,12 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the action map for the {@link JSlider}. All sliders share
- * a single action map which is created the first time this method is
+ * a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("Slider.actionMap");
@@ -2238,18 +2238,18 @@ public class BasicSliderUI extends SliderUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("positiveUnitIncrement",
+ map.put("positiveUnitIncrement",
new AbstractAction("positiveUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2262,7 +2262,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("negativeUnitIncrement",
+ map.put("negativeUnitIncrement",
new AbstractAction("negativeUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2275,7 +2275,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("positiveBlockIncrement",
+ map.put("positiveBlockIncrement",
new AbstractAction("positiveBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2288,7 +2288,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("negativeBlockIncrement",
+ map.put("negativeBlockIncrement",
new AbstractAction("negativeBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2301,7 +2301,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("minScroll",
+ map.put("minScroll",
new AbstractAction("minScroll") {
public void actionPerformed(ActionEvent event)
{
@@ -2309,11 +2309,11 @@ public class BasicSliderUI extends SliderUI
if (slider.getInverted())
slider.setValue(slider.getMaximum());
else
- slider.setValue(slider.getMinimum());
+ slider.setValue(slider.getMinimum());
}
}
);
- map.put("maxScroll",
+ map.put("maxScroll",
new AbstractAction("maxScroll") {
public void actionPerformed(ActionEvent event)
{
@@ -2321,7 +2321,7 @@ public class BasicSliderUI extends SliderUI
if (slider.getInverted())
slider.setValue(slider.getMinimum());
else
- slider.setValue(slider.getMaximum());
+ slider.setValue(slider.getMaximum());
}
}
);
diff --git a/javax/swing/plaf/basic/BasicSpinnerUI.java b/javax/swing/plaf/basic/BasicSpinnerUI.java
index 254a9a4fa..00c8537cc 100644
--- a/javax/swing/plaf/basic/BasicSpinnerUI.java
+++ b/javax/swing/plaf/basic/BasicSpinnerUI.java
@@ -173,7 +173,7 @@ public class BasicSpinnerUI extends SpinnerUI
if (e instanceof JSpinner.DefaultEditor)
{
JSpinner.DefaultEditor de = (JSpinner.DefaultEditor) e;
- de.getTextField().setBorder(null);
+ de.getTextField().setBorder(null);
}
spinner.setLayout(createLayout());
spinner.setOpaque(true);
@@ -199,36 +199,36 @@ public class BasicSpinnerUI extends SpinnerUI
{
c.addMouseListener(new MouseAdapter()
{
- public void mousePressed(MouseEvent evt)
- {
- if (! spinner.isEnabled())
- return;
- increment();
- timer.setInitialDelay(500);
- timer.start();
- }
-
- public void mouseReleased(MouseEvent evt)
- {
- timer.stop();
- }
-
- void increment()
- {
- Object next = BasicSpinnerUI.this.spinner.getNextValue();
- if (next != null)
- BasicSpinnerUI.this.spinner.getModel().setValue(next);
- }
-
- volatile boolean mouseDown;
- Timer timer = new Timer(50,
- new ActionListener()
- {
- public void actionPerformed(ActionEvent event)
- {
- increment();
- }
- });
+ public void mousePressed(MouseEvent evt)
+ {
+ if (! spinner.isEnabled())
+ return;
+ increment();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void increment()
+ {
+ Object next = BasicSpinnerUI.this.spinner.getNextValue();
+ if (next != null)
+ BasicSpinnerUI.this.spinner.getModel().setValue(next);
+ }
+
+ volatile boolean mouseDown;
+ Timer timer = new Timer(50,
+ new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ increment();
+ }
+ });
});
}
@@ -239,36 +239,36 @@ public class BasicSpinnerUI extends SpinnerUI
{
c.addMouseListener(new MouseAdapter()
{
- public void mousePressed(MouseEvent evt)
- {
- if (! spinner.isEnabled())
- return;
- decrement();
- timer.setInitialDelay(500);
- timer.start();
- }
-
- public void mouseReleased(MouseEvent evt)
- {
- timer.stop();
- }
-
- void decrement()
- {
- Object prev = BasicSpinnerUI.this.spinner.getPreviousValue();
- if (prev != null)
- BasicSpinnerUI.this.spinner.getModel().setValue(prev);
- }
-
- volatile boolean mouseDown;
- Timer timer = new Timer(50,
- new ActionListener()
- {
- public void actionPerformed(ActionEvent event)
- {
- decrement();
- }
- });
+ public void mousePressed(MouseEvent evt)
+ {
+ if (! spinner.isEnabled())
+ return;
+ decrement();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void decrement()
+ {
+ Object prev = BasicSpinnerUI.this.spinner.getPreviousValue();
+ if (prev != null)
+ BasicSpinnerUI.this.spinner.getModel().setValue(prev);
+ }
+
+ volatile boolean mouseDown;
+ Timer timer = new Timer(50,
+ new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ decrement();
+ }
+ });
});
}
@@ -384,7 +384,7 @@ public class BasicSpinnerUI extends SpinnerUI
Dimension e = prefSize(editor);
Dimension n = prefSize(next);
Dimension p = prefSize(previous);
- Dimension s = parent.getSize();
+ Dimension s = parent.getSize();
int x = l2r ? i.left : i.right;
int y = i.top;
diff --git a/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/javax/swing/plaf/basic/BasicSplitPaneDivider.java
index 95468caa9..53f7db6e7 100644
--- a/javax/swing/plaf/basic/BasicSplitPaneDivider.java
+++ b/javax/swing/plaf/basic/BasicSplitPaneDivider.java
@@ -61,7 +61,7 @@ import javax.swing.border.Border;
/**
* The divider that separates the two parts of a JSplitPane in the Basic look
* and feel.
- *
+ *
* <p>
* Implementation status: We do not have a real implementation yet. Currently,
* it is mostly a stub to allow compiling other parts of the
@@ -138,62 +138,62 @@ public class BasicSplitPaneDivider extends Container
public void paint(Graphics g)
{
if (splitPane != null)
- {
- // Fill background.
- g.setColor(splitPane.getBackground());
- g.fillRect(0, 0, getWidth(), getHeight());
-
- // Draw arrow.
- int size;
- if (direction == LEFT)
- {
- if (orientation == JSplitPane.VERTICAL_SPLIT)
- {
- size = Math.min(getHeight(), ONE_TOUCH_SIZE);
- xpoints[0] = 0;
- xpoints[1] = size / 2;
- xpoints[2] = size;
- ypoints[0] = size;
- ypoints[1] = 0;
- ypoints[2] = size;
- }
- else
- {
- size = Math.min(getWidth(), ONE_TOUCH_SIZE);
- xpoints[0] = size;
- xpoints[1] = 0;
- xpoints[2] = size;
- ypoints[0] = 0;
- ypoints[1] = size / 2;
- ypoints[2] = size;
- }
- }
- else
- {
- if (orientation == JSplitPane.VERTICAL_SPLIT)
- {
- size = Math.min(getHeight(), ONE_TOUCH_SIZE);
- xpoints[0] = 0;
- xpoints[1] = size / 2;
- xpoints[2] = size;
- ypoints[0] = 0;
- ypoints[1] = size;
- ypoints[2] = 0;
- }
- else
- {
- size = Math.min(getWidth(), ONE_TOUCH_SIZE);
- xpoints[0] = 0;
- xpoints[1] = size;
- xpoints[2] = 0;
- ypoints[0] = 0;
- ypoints[1] = size / 2;
- ypoints[2] = size;
- }
- }
- g.setColor(Color.BLACK);
- g.fillPolygon(xpoints, ypoints, 3);
- }
+ {
+ // Fill background.
+ g.setColor(splitPane.getBackground());
+ g.fillRect(0, 0, getWidth(), getHeight());
+
+ // Draw arrow.
+ int size;
+ if (direction == LEFT)
+ {
+ if (orientation == JSplitPane.VERTICAL_SPLIT)
+ {
+ size = Math.min(getHeight(), ONE_TOUCH_SIZE);
+ xpoints[0] = 0;
+ xpoints[1] = size / 2;
+ xpoints[2] = size;
+ ypoints[0] = size;
+ ypoints[1] = 0;
+ ypoints[2] = size;
+ }
+ else
+ {
+ size = Math.min(getWidth(), ONE_TOUCH_SIZE);
+ xpoints[0] = size;
+ xpoints[1] = 0;
+ xpoints[2] = size;
+ ypoints[0] = 0;
+ ypoints[1] = size / 2;
+ ypoints[2] = size;
+ }
+ }
+ else
+ {
+ if (orientation == JSplitPane.VERTICAL_SPLIT)
+ {
+ size = Math.min(getHeight(), ONE_TOUCH_SIZE);
+ xpoints[0] = 0;
+ xpoints[1] = size / 2;
+ xpoints[2] = size;
+ ypoints[0] = 0;
+ ypoints[1] = size;
+ ypoints[2] = 0;
+ }
+ else
+ {
+ size = Math.min(getWidth(), ONE_TOUCH_SIZE);
+ xpoints[0] = 0;
+ xpoints[1] = size;
+ xpoints[2] = 0;
+ ypoints[0] = 0;
+ ypoints[1] = size / 2;
+ ypoints[2] = size;
+ }
+ }
+ g.setColor(Color.BLACK);
+ g.fillPolygon(xpoints, ypoints, 3);
+ }
}
}
@@ -212,66 +212,66 @@ public class BasicSplitPaneDivider extends Container
int newLoc;
if (ev.getSource() == leftButton)
- {
- if (orientation == JSplitPane.VERTICAL_SPLIT)
- {
- if (currentLoc
- >= splitPane.getHeight() - insets.bottom - getHeight())
- {
- newLoc = Math.min(splitPane.getMaximumDividerLocation(),
- lastLoc);
- }
- else
- {
- newLoc = insets.top;
- }
- }
- else
- {
- if (currentLoc
- >= splitPane.getWidth() - insets.right - getWidth())
- {
- newLoc = Math.min(splitPane.getMaximumDividerLocation(),
- lastLoc);
- }
- else
- {
- newLoc = insets.left;
- }
- }
- }
+ {
+ if (orientation == JSplitPane.VERTICAL_SPLIT)
+ {
+ if (currentLoc
+ >= splitPane.getHeight() - insets.bottom - getHeight())
+ {
+ newLoc = Math.min(splitPane.getMaximumDividerLocation(),
+ lastLoc);
+ }
+ else
+ {
+ newLoc = insets.top;
+ }
+ }
+ else
+ {
+ if (currentLoc
+ >= splitPane.getWidth() - insets.right - getWidth())
+ {
+ newLoc = Math.min(splitPane.getMaximumDividerLocation(),
+ lastLoc);
+ }
+ else
+ {
+ newLoc = insets.left;
+ }
+ }
+ }
else
- {
- if (orientation == JSplitPane.VERTICAL_SPLIT)
- {
- if (currentLoc == insets.top)
- {
- newLoc = Math.min(splitPane.getMaximumDividerLocation(),
- lastLoc);
- }
- else
- {
- newLoc = splitPane.getHeight() - insets.top - getHeight();
- }
- }
- else
- {
- if (currentLoc == insets.left)
- {
- newLoc = Math.min(splitPane.getMaximumDividerLocation(),
- lastLoc);
- }
- else
- {
- newLoc = splitPane.getWidth() - insets.left - getWidth();
- }
- }
- }
+ {
+ if (orientation == JSplitPane.VERTICAL_SPLIT)
+ {
+ if (currentLoc == insets.top)
+ {
+ newLoc = Math.min(splitPane.getMaximumDividerLocation(),
+ lastLoc);
+ }
+ else
+ {
+ newLoc = splitPane.getHeight() - insets.top - getHeight();
+ }
+ }
+ else
+ {
+ if (currentLoc == insets.left)
+ {
+ newLoc = Math.min(splitPane.getMaximumDividerLocation(),
+ lastLoc);
+ }
+ else
+ {
+ newLoc = splitPane.getWidth() - insets.left - getWidth();
+ }
+ }
+ }
if (currentLoc != newLoc)
- {
- splitPane.setDividerLocation(newLoc);
- splitPane.setLastDividerLocation(currentLoc);
- }
+ {
+ splitPane.setDividerLocation(newLoc);
+ splitPane.setLastDividerLocation(currentLoc);
+ }
}
}
@@ -315,7 +315,7 @@ public class BasicSplitPaneDivider extends Container
/**
* The listener for handling mouse events from both the divider and the
* containing <code>JSplitPane</code>.
- *
+ *
* <p>
* The reason for also handling MouseEvents from the containing
* <code>JSplitPane</code> is that users should be able to start a drag
@@ -398,11 +398,11 @@ public class BasicSplitPaneDivider extends Container
/* Remove the connection to the existing JSplitPane. */
if (splitPane != null)
{
- splitPane.removePropertyChangeListener(this);
- removeMouseListener(mouseHandler);
- removeMouseMotionListener(mouseHandler);
- splitPane = null;
- hiddenDivider = null;
+ splitPane.removePropertyChangeListener(this);
+ removeMouseListener(mouseHandler);
+ removeMouseMotionListener(mouseHandler);
+ splitPane = null;
+ hiddenDivider = null;
}
/* Establish the connection to the new JSplitPane. */
@@ -411,11 +411,11 @@ public class BasicSplitPaneDivider extends Container
splitPane = newUI.getSplitPane();
if (splitPane != null)
{
- splitPane.addPropertyChangeListener(this);
- addMouseListener(mouseHandler);
- addMouseMotionListener(mouseHandler);
- hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider();
- orientation = splitPane.getOrientation();
+ splitPane.addPropertyChangeListener(this);
+ addMouseListener(mouseHandler);
+ addMouseMotionListener(mouseHandler);
+ hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider();
+ orientation = splitPane.getOrientation();
if (splitPane.isOneTouchExpandable())
oneTouchExpandableChanged();
}
@@ -465,9 +465,9 @@ public class BasicSplitPaneDivider extends Container
{
if (border != this.border)
{
- Border oldValue = this.border;
- this.border = border;
- firePropertyChange("border", oldValue, border);
+ Border oldValue = this.border;
+ this.border = border;
+ firePropertyChange("border", oldValue, border);
}
}
@@ -539,7 +539,7 @@ public class BasicSplitPaneDivider extends Container
oneTouchExpandableChanged();
else if (e.getPropertyName().equals(JSplitPane.ORIENTATION_PROPERTY))
{
- orientation = splitPane.getOrientation();
+ orientation = splitPane.getOrientation();
invalidate();
if (splitPane != null)
splitPane.revalidate();
@@ -560,8 +560,8 @@ public class BasicSplitPaneDivider extends Container
super.paint(g);
if (border != null)
{
- dividerSize = getSize();
- border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height);
+ dividerSize = getSize();
+ border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height);
}
}
@@ -573,20 +573,20 @@ public class BasicSplitPaneDivider extends Container
{
if (splitPane.isOneTouchExpandable())
{
- leftButton = createLeftOneTouchButton();
- if (leftButton != null)
- leftButton.addActionListener(new OneTouchAction());
+ leftButton = createLeftOneTouchButton();
+ if (leftButton != null)
+ leftButton.addActionListener(new OneTouchAction());
- rightButton = createRightOneTouchButton();
- if (rightButton != null)
- rightButton.addActionListener(new OneTouchAction());
+ rightButton = createRightOneTouchButton();
+ if (rightButton != null)
+ rightButton.addActionListener(new OneTouchAction());
- // Only add them when both are non-null.
- if (leftButton != null && rightButton != null)
+ // Only add them when both are non-null.
+ if (leftButton != null && rightButton != null)
{
add(leftButton);
add(rightButton);
- }
+ }
}
invalidate();
if (splitPane != null)
@@ -678,28 +678,28 @@ public class BasicSplitPaneDivider extends Container
switch (locationIndex)
{
case 1:
- splitPane.setDividerLocation(splitPane.getLastDividerLocation());
- break;
+ splitPane.setDividerLocation(splitPane.getLastDividerLocation());
+ break;
case 0:
- int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left
- : insets.top;
- splitPane.setDividerLocation(top);
- break;
+ int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left
+ : insets.top;
+ splitPane.setDividerLocation(top);
+ break;
case 2:
- int bottom;
- if (orientation == JSplitPane.HORIZONTAL_SPLIT)
- bottom = splitPane.getBounds().width - insets.right - dividerSize;
- else
- bottom = splitPane.getBounds().height - insets.bottom - dividerSize;
- splitPane.setDividerLocation(bottom);
- break;
+ int bottom;
+ if (orientation == JSplitPane.HORIZONTAL_SPLIT)
+ bottom = splitPane.getBounds().width - insets.right - dividerSize;
+ else
+ bottom = splitPane.getBounds().height - insets.bottom - dividerSize;
+ splitPane.setDividerLocation(bottom);
+ break;
}
}
/**
* The listener for handling mouse events from both the divider and the
* containing <code>JSplitPane</code>.
- *
+ *
* <p>
* The reason for also handling MouseEvents from the containing
* <code>JSplitPane</code> is that users should be able to start a drag
@@ -724,9 +724,9 @@ public class BasicSplitPaneDivider extends Container
isDragging = true;
currentDividerLocation = 1;
if (orientation == JSplitPane.HORIZONTAL_SPLIT)
- dragger = new DragController(e);
+ dragger = new DragController(e);
else
- dragger = new VerticalDragController(e);
+ dragger = new VerticalDragController(e);
prepareForDragging();
}
@@ -836,7 +836,7 @@ public class BasicSplitPaneDivider extends Container
protected void continueDrag(int newX, int newY)
{
if (isValid())
- dragDividerTo(adjust(newX, newY));
+ dragDividerTo(adjust(newX, newY));
}
/**
@@ -848,7 +848,7 @@ public class BasicSplitPaneDivider extends Container
protected void continueDrag(MouseEvent e)
{
if (isValid())
- dragDividerTo(positionForMouseEvent(e));
+ dragDividerTo(positionForMouseEvent(e));
}
/**
@@ -1000,7 +1000,7 @@ public class BasicSplitPaneDivider extends Container
x = insets.left;
y = 0;
}
-
+
leftButton.setBounds(x, y + ONE_TOUCH_OFFSET, size,
size * 2);
rightButton.setBounds(x, y + ONE_TOUCH_OFFSET
diff --git a/javax/swing/plaf/basic/BasicSplitPaneUI.java b/javax/swing/plaf/basic/BasicSplitPaneUI.java
index b7cc42548..ca9607515 100644
--- a/javax/swing/plaf/basic/BasicSplitPaneUI.java
+++ b/javax/swing/plaf/basic/BasicSplitPaneUI.java
@@ -89,7 +89,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// 3 components at a time.
// LEFT/TOP = 0
// RIGHT/BOTTOM = 1
- // DIVIDER = 2
+ // DIVIDER = 2
/**
* This array contains the components in the JSplitPane. The left/top
@@ -338,7 +338,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// Layout divider.
loc += sizes[0];
setComponentToSize(components[2], sizes[2], loc, insets, dims);
- // Layout component#2.
+ // Layout component#2.
loc += sizes[2];
setComponentToSize(components[1], sizes[1], loc, insets, dims);
}
@@ -483,7 +483,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
*/
protected void setComponentToSize(Component c, int size, int location,
Insets insets, Dimension containerSize)
- {
+ {
if (insets != null)
{
if (axis == SwingConstants.HORIZONTAL)
@@ -752,7 +752,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
tmpSizes[0] += newSpace / 2;
tmpSizes[1] += newSpace / 2;
-
+
layoutManager.setSizes(tmpSizes);
}
else if (e.getPropertyName().equals(JSplitPane.ORIENTATION_PROPERTY))
@@ -986,12 +986,12 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Returns the input map for the specified condition.
- *
+ *
* @param condition the condition.
- *
+ *
* @return The input map.
*/
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("SplitPane.ancestorInputMap");
@@ -1000,12 +1000,12 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Returns the action map for the {@link JSplitPane}. All sliders share
- * a single action map which is created the first time this method is
+ * a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("SplitPane.actionMap");
@@ -1020,18 +1020,18 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("toggleFocus",
+ map.put("toggleFocus",
new AbstractAction("toggleFocus") {
public void actionPerformed(ActionEvent event)
{
@@ -1039,7 +1039,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("startResize",
+ map.put("startResize",
new AbstractAction("startResize") {
public void actionPerformed(ActionEvent event)
{
@@ -1047,7 +1047,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("selectMax",
+ map.put("selectMax",
new AbstractAction("selectMax") {
public void actionPerformed(ActionEvent event)
{
@@ -1055,7 +1055,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("selectMin",
+ map.put("selectMin",
new AbstractAction("selectMin") {
public void actionPerformed(ActionEvent event)
{
@@ -1063,7 +1063,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("negativeIncrement",
+ map.put("negativeIncrement",
new AbstractAction("negativeIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -1074,7 +1074,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("positiveIncrement",
+ map.put("positiveIncrement",
new AbstractAction("positiveIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -1092,7 +1092,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// FIXME: implement this
}
}
- );
+ );
map.put("focusOutForward",
new AbstractAction("focusOutForward") {
public void actionPerformed(ActionEvent event)
@@ -1100,7 +1100,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// FIXME: implement this
}
}
- );
+ );
return map;
}
@@ -1112,7 +1112,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(splitPane,
+ SwingUtilities.replaceUIInputMap(splitPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(splitPane, map);
@@ -1124,7 +1124,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
protected void uninstallKeyboardActions()
{
SwingUtilities.replaceUIActionMap(splitPane, null);
- SwingUtilities.replaceUIInputMap(splitPane,
+ SwingUtilities.replaceUIInputMap(splitPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
diff --git a/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index fe360214c..c42f9caed 100644
--- a/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -82,7 +82,7 @@ import javax.swing.text.View;
/**
* This is the Basic Look and Feel's UI delegate for JTabbedPane.
- *
+ *
* @author Lillian Angel (langel@redhat.com)
* @author Kim Ho (kho@redhat.com)
* @author Roman Kennke (kennke@aicas.com)
@@ -90,11 +90,11 @@ import javax.swing.text.View;
*/
public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
-
+
static class NavigateAction extends AbstractAction
{
int direction;
-
+
NavigateAction(String name, int dir)
{
super(name);
@@ -108,9 +108,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
ui.navigateSelectedTab(direction);
}
-
+
}
-
+
static class NavigatePageDownAction extends AbstractAction
{
@@ -123,17 +123,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
JTabbedPane tp = (JTabbedPane) event.getSource();
BasicTabbedPaneUI ui = (BasicTabbedPaneUI) tp.getUI();
-
+
int i = tp.getSelectedIndex();
-
+
if (i < 0)
i = 0;
-
+
ui.selectNextTabInRun(i);
}
-
+
}
-
+
static class NavigatePageUpAction extends AbstractAction
{
@@ -146,17 +146,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
JTabbedPane tp = (JTabbedPane) event.getSource();
BasicTabbedPaneUI ui = (BasicTabbedPaneUI) tp.getUI();
-
+
int i = tp.getSelectedIndex();
-
+
if (i < 0)
i = 0;
-
+
ui.selectPreviousTabInRun(i);
- }
+ }
}
-
+
static class RequestFocusAction extends AbstractAction
{
@@ -169,7 +169,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
((JTabbedPane) event.getSource()).requestFocus();
}
-
+
}
static class RequestFocusForVisibleComponentAction extends AbstractAction
@@ -183,18 +183,18 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
public void actionPerformed(ActionEvent event)
{
JTabbedPane tp = (JTabbedPane) event.getSource();
-
+
// FIXME: This should select a suitable component within
// the tab content. However I dont know whether we have
// to search for this component or wether the called is
// supposed to do that.
tp.getSelectedComponent().requestFocus();
}
-
+
}
/**
- * A helper class that handles focus.
+ * A helper class that handles focus.
* <p>The purpose of this class is to implement a more flexible focus
* handling for the tabbed pane, which is used to determine whether the
* focus indicator should be painted or not. When in scrolling layout
@@ -262,7 +262,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
e.setSource(s);
}
}
-
+
/**
* This method is called when the mouse is pressed. The index cannot
* change to a tab that is not enabled.
@@ -281,9 +281,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
int placement = tabPane.getTabPlacement();
-
+
if (s == incrButton)
{
if(!incrButton.isEnabled())
@@ -294,7 +294,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
currentScrollOffset = getTabAreaInsets(placement).left;
for (int i = 0; i < currentScrollLocation; i++)
currentScrollOffset += rects[i].width;
@@ -305,30 +305,30 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
currentScrollOffset += rects[i].height;
break;
}
-
+
updateViewPosition();
updateButtons();
-
+
tabPane.repaint();
}
else if (s == decrButton)
{
if(!decrButton.isEnabled())
return;
-
+
// The scroll location may be zero but the offset
// greater than zero because of an adjustement to
// make a partially visible tab completely visible.
if (currentScrollLocation > 0)
currentScrollLocation--;
-
+
// Set the offset back to 0 and recompute it.
currentScrollOffset = 0;
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
// Take the tab area inset into account.
if (currentScrollLocation > 0)
currentScrollOffset = getTabAreaInsets(placement).left;
@@ -340,14 +340,14 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Take the tab area inset into account.
if (currentScrollLocation > 0)
currentScrollOffset = getTabAreaInsets(placement).top;
-
+
for (int i = 0; i < currentScrollLocation; i++)
currentScrollOffset += rects[i].height;
- }
-
+ }
+
updateViewPosition();
updateButtons();
-
+
tabPane.repaint();
}
else if (tabPane.isEnabled())
@@ -355,12 +355,12 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int index = tabForCoordinate(tabPane, e.getX(), e.getY());
if (!tabPane.isEnabledAt(index))
return;
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT
&& s == panel)
{
scrollTab(index, placement);
-
+
tabPane.setSelectedIndex(index);
tabPane.repaint();
}
@@ -370,9 +370,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabPane.revalidate();
tabPane.repaint();
}
-
+
}
-
+
}
/**
@@ -393,7 +393,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
int tabIndex = tabForCoordinate(tabPane, e.getX(), e.getY());
setRolloverTab(tabIndex);
}
@@ -416,7 +416,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
setRolloverTab(-1);
}
@@ -434,17 +434,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
ev.setSource(tabPane);
tabPane.dispatchEvent(ev);
-
+
ev.setSource(s);
}
int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY());
setRolloverTab(tabIndex);
}
-
- /** Modifies the mouse event to originate from
+
+ /** Modifies the mouse event to originate from
* the tabbed pane and redispatches it.
- *
+ *
* @param me
*/
void redispatchEvent(MouseEvent me)
@@ -455,10 +455,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
viewPos.y -= viewport.getY();
me.translatePoint(-viewPos.x, -viewPos.y);
tabPane.dispatchEvent(me);
-
+
me.translatePoint(viewPos.x, viewPos.y);
}
-
+
}
/**
@@ -483,18 +483,18 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (e.getPropertyName().equals("tabLayoutPolicy"))
{
currentScrollLocation = currentScrollOffset = 0;
-
+
layoutManager = createLayoutManager();
-
+
tabPane.setLayout(layoutManager);
}
else if (e.getPropertyName().equals("tabPlacement")
- && tabPane.getTabLayoutPolicy()
+ && tabPane.getTabLayoutPolicy()
== JTabbedPane.SCROLL_TAB_LAYOUT)
{
incrButton = createIncreaseButton();
decrButton = createDecreaseButton();
-
+
// If the tab placement value was changed of a tabbed pane
// in SCROLL_TAB_LAYOUT mode we investigate the change to
// implement the following behavior which was observed in
@@ -502,7 +502,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// The scrolling offset will be reset if we change to
// a direction which is orthogonal to the current
// direction and stays the same if it is parallel.
-
+
int oldPlacement = ((Integer) e.getOldValue()).intValue();
int newPlacement = ((Integer) e.getNewValue()).intValue();
switch (newPlacement)
@@ -512,22 +512,22 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (oldPlacement == JTabbedPane.TOP
|| oldPlacement == JTabbedPane.BOTTOM)
break out;
-
+
currentScrollOffset = getTabAreaInsets(newPlacement).left;
break;
default:
if (oldPlacement == JTabbedPane.LEFT
|| oldPlacement == JTabbedPane.RIGHT)
break out;
-
+
currentScrollOffset = getTabAreaInsets(newPlacement).top;
}
-
+
updateViewPosition();
updateButtons();
}
}
-
+
tabPane.revalidate();
tabPane.repaint();
}
@@ -592,7 +592,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
c = tabPane.getComponentAt(i);
if (c == null)
continue;
- dims = minimum ? c.getMinimumSize() : c.getPreferredSize();
+ dims = minimum ? c.getMinimumSize() : c.getPreferredSize();
if (dims != null)
{
height = Math.max(height, dims.height);
@@ -605,7 +605,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
|| tabPlacement == SwingConstants.BOTTOM)
{
width = Math.max(calculateMaxTabWidth(tabPlacement), width);
-
+
height += preferredTabAreaHeight(tabPlacement,
width - tabAreaInsets.left
- tabAreaInsets.right);
@@ -613,7 +613,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
{
height = Math.max(calculateMaxTabHeight(tabPlacement), height);
-
+
width += preferredTabAreaWidth(tabPlacement,
height - tabAreaInsets.top
- tabAreaInsets.bottom);
@@ -648,7 +648,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
Dimension size = tabPane.getSize();
-
+
// The coordinates of the upper left corner of the tab area.
int x;
int y;
@@ -787,11 +787,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
rotateTabRuns(tabPlacement, selectedRun);
}
}
-
+
// Suppress padding if we have only one tab run.
if (runCount == 1)
return;
-
+
// Pad the runs.
int tabRunOverlay = getTabRunOverlay(tabPlacement);
for (int i = runCount - 1; i >= 0; --i)
@@ -838,7 +838,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
x -= maxTabWidth - tabRunOverlay;
else
x += maxTabWidth - tabRunOverlay;
-
+
}
}
padSelectedTab(tabPlacement, selectedIndex);
@@ -859,13 +859,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Insets insets = tabPane.getInsets();
int selectedIndex = tabPane.getSelectedIndex();
-
+
Component selectedComponent = null;
if (selectedIndex >= 0)
selectedComponent = tabPane.getComponentAt(selectedIndex);
// The RI doesn't seem to change the component if the new selected
// component == null. This is probably so that applications can add
- // one single component for every tab.
+ // one single component for every tab.
if (selectedComponent != null)
{
setVisibleComponent(selectedComponent);
@@ -892,7 +892,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
compX = insets.left + contentBorderInsets.left;
compY = insets.top + contentBorderInsets.top;
break;
- case BOTTOM:
+ case BOTTOM:
tabAreaHeight = calculateTabAreaHeight(tabPlacement, runCount,
maxTabHeight);
compX = insets.left + contentBorderInsets.left;
@@ -902,7 +902,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
default:
tabAreaHeight = calculateTabAreaHeight(tabPlacement, runCount,
maxTabHeight);
-
+
compX = insets.left + contentBorderInsets.left;
compY = tabAreaHeight + insets.top + contentBorderInsets.top;
}
@@ -938,9 +938,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// If there is more free space in an adjacent run AND the tab
// in the run can fit in the adjacent run, move it. This method
// is not perfect, it is merely an approximation.
- // If you play around with Sun's JTabbedPane, you'll see that
- // it does do some pretty strange things with regards to not moving tabs
- // that should be moved.
+ // If you play around with Sun's JTabbedPane, you'll see that
+ // it does do some pretty strange things with regards to not moving tabs
+ // that should be moved.
// start = the x position where the tabs will begin
// max = the maximum position of where the tabs can go to
// (tabAreaInsets.left + the width of the tab area)
@@ -1046,7 +1046,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int runWidth = rects[end].x + rects[end].width;
int spaceRemaining = max - runWidth;
int numTabs = end - start + 1;
-
+
// now divvy up the space.
int spaceAllocated = spaceRemaining / numTabs;
int currX = rects[start].x;
@@ -1054,13 +1054,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
rects[i].x = currX;
rects[i].width += spaceAllocated;
-
+
currX += rects[i].width;
- // This is used because since the spaceAllocated
+ // This is used because since the spaceAllocated
// variable is an int, it rounds down. Sometimes,
// we don't fill an entire row, so we make it do
// so now.
-
+
if (i == end && rects[i].x + rects[i].width != max)
rects[i].width = max - rects[i].x;
}
@@ -1332,11 +1332,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
for (int i = 0; i < tabCount; i++)
{
width = calculateTabWidth(tabPlacement, i, fm);
-
+
// The proper instances should exists because
// assureRectsCreated() was being run already.
rects[i].setBounds(runWidth, top, width, maxHeight);
-
+
runWidth += width;
}
tabAreaRect.width = tabPane.getWidth() - insets.left - insets.right;
@@ -1396,7 +1396,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect.x = contentRect.x + contentRect.width;
}
}
-
+
// Unlike the behavior in the WRAP_TAB_LAYOUT the selected
// tab is not padded specially.
}
@@ -1415,7 +1415,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (tabCount == 0)
return;
int tabPlacement = tabPane.getTabPlacement();
-
+
if (tabPlacement == SwingConstants.TOP
|| tabPlacement == SwingConstants.BOTTOM)
{
@@ -1452,11 +1452,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
- incrDims.height,
incrDims.width, incrDims.height);
}
-
+
tabAreaRect.width -= decrDims.width + incrDims.width;
-
+
updateButtons();
-
+
incrButton.setVisible(true);
decrButton.setVisible(true);
}
@@ -1464,7 +1464,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
incrButton.setVisible(false);
decrButton.setVisible(false);
-
+
currentScrollOffset = 0;
currentScrollLocation = 0;
}
@@ -1524,9 +1524,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
}
viewport.setBounds(tabAreaRect.x, tabAreaRect.y, tabAreaRect.width,
tabAreaRect.height);
-
+
updateViewPosition();
-
+
viewport.repaint();
}
}
@@ -1550,7 +1550,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
selectedRun = getRunForTab(tabPane.getTabCount(),
tabPane.getSelectedIndex());
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT)
tabPane.revalidate();
tabPane.repaint();
@@ -1587,7 +1587,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
g.fillRect(0, currentScrollOffset,
tabAreaRect.width, tabAreaRect.height);
-
+
paintTabArea(g, placement, tabPane.getSelectedIndex());
}
}
@@ -1649,7 +1649,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
/** The starting visible tab in the run in SCROLL_TAB_MODE.
* This is package-private to avoid an accessor method. */
transient int currentScrollLocation;
-
+
transient int currentScrollOffset;
/** A reusable rectangle. */
@@ -1789,13 +1789,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
* The currently visible component.
*/
private Component visibleComponent;
-
+
private Color selectedColor;
-
+
private Rectangle tempTextRect = new Rectangle();
-
+
private Rectangle tempIconRect = new Rectangle();
-
+
/**
* Creates a new BasicTabbedPaneUI object.
*/
@@ -1884,10 +1884,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Point p = new Point(w, h);
return p;
}
-
+
/** TabbedPanes in scrolling mode should use this method to
* scroll properly to the tab given by the index argument.
- *
+ *
* @param index The tab to scroll to.
* @param placement The tab's placement.
*/
@@ -1902,7 +1902,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
if ((diff = rects[index].x
+ rects[index].width
- decrButton.getX() - currentScrollOffset) > 0)
@@ -1930,17 +1930,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
currentScrollOffset += diff;
}
-
+
currentScrollLocation = tabForCoordinate(tabPane,
rects[index].x,
currentScrollOffset);
}
-
+
updateViewPosition();
updateButtons();
}
}
-
+
/** Sets the enabled state of the increase and decrease button
* according to the current scrolling offset and tab pane width
* (or height in TOP/BOTTOM placement).
@@ -1948,7 +1948,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
final void updateButtons()
{
int tc = tabPane.getTabCount();
-
+
// The increase button should be enabled as long as the
// right/bottom border of the last tab is under the left/top
// border of the decrease button.
@@ -1978,7 +1978,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
final void updateViewPosition()
{
Point p = viewport.getViewPosition();
-
+
// The unneeded coordinate must be set to zero
// in order to correctly handle placement changes.
switch (tabPane.getTabPlacement())
@@ -1992,10 +1992,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
p.x = currentScrollOffset;
p.y = 0;
}
-
+
viewport.setViewPosition(p);
}
-
+
/**
* This method creates a new BasicTabbedPaneUI.
*
@@ -2019,12 +2019,12 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (c instanceof JTabbedPane)
{
tabPane = (JTabbedPane) c;
-
+
installComponents();
installDefaults();
installListeners();
installKeyboardActions();
-
+
layoutManager = createLayoutManager();
tabPane.setLayout(layoutManager);
}
@@ -2063,7 +2063,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
runCount = 1;
tabRuns[0] = 0;
-
+
incrButton = createIncreaseButton();
incrButton.addMouseListener(mouseListener);
@@ -2075,16 +2075,16 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
panel.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
panel.addMouseListener(mouseListener);
panel.addFocusListener(focusListener);
-
+
viewport = new ScrollingViewport();
viewport.setBackground(Color.LIGHT_GRAY);
viewport.setView(panel);
viewport.setLayout(null);
-
+
tabPane.add(incrButton);
tabPane.add(decrButton);
tabPane.add(viewport);
-
+
return new TabbedPaneScrollLayout();
}
}
@@ -2104,7 +2104,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
if (incrButton != null)
tabPane.remove(incrButton);
-
+
if (decrButton != null)
tabPane.remove(decrButton);
@@ -2140,7 +2140,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
contentBorderInsets
= UIManager.getInsets("TabbedPane.contentBorderInsets");
tabsOpaque = UIManager.getBoolean("TabbedPane.tabsOpaque");
-
+
// Although 'TabbedPane.contentAreaColor' is not defined in the defaults
// of BasicLookAndFeel it is used by this class.
selectedColor = UIManager.getColor("TabbedPane.contentAreaColor");
@@ -2162,7 +2162,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect = null;
contentRect = null;
tabRuns = null;
-
+
tempIconRect = null;
tempTextRect = null;
@@ -2176,7 +2176,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
shadow = null;
lightHighlight = null;
highlight = null;
-
+
selectedColor = null;
}
@@ -2205,13 +2205,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabPane.removePropertyChangeListener(propertyChangeListener);
tabPane.removeChangeListener(tabChangeListener);
tabPane.removeMouseListener(mouseListener);
-
+
if (incrButton != null)
incrButton.removeMouseListener(mouseListener);
-
+
if (decrButton != null)
decrButton.removeMouseListener(mouseListener);
-
+
if (panel != null)
{
panel.removeMouseListener(mouseListener);
@@ -2277,7 +2277,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
.replaceUIInputMap(tabPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
keyMap);
-
+
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(tabPane, map);
}
@@ -2332,11 +2332,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (tabPane.getTabCount() == 0)
return;
-
+
int index = tabPane.getSelectedIndex();
if (index < 0)
index = 0;
-
+
int tabPlacement = tabPane.getTabPlacement();
// Paint the tab area only in WRAP_TAB_LAYOUT Mode from this method
@@ -2349,7 +2349,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect.width, tabAreaRect.height);
paintTabArea(g, tabPlacement, index);
}
-
+
paintContentBorder(g, tabPlacement, index);
}
@@ -2363,9 +2363,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
*/
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
{
- // Please note: the ordering of the painting is important.
+ // Please note: the ordering of the painting is important.
// we WANT to paint the outermost run first and then work our way in.
-
+
// The following drawing code works for both tab layouts.
int tabCount = tabPane.getTabCount();
@@ -2387,7 +2387,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
}
}
}
-
+
// Paint selected tab in front of every other tab.
if (selectedIndex >= 0)
paintTab(g, tabPlacement, rects, selectedIndex,
@@ -2430,10 +2430,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Paint the text.
paintText(g, tabPlacement, tabPane.getFont(), fm, tabIndex, title,
textRect, isSelected);
-
+
// Paint icon if necessary.
paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected);
-
+
// Paint focus indicator.
paintFocusIndicator(g, tabPlacement, rects, tabIndex, iconRect, textRect,
isSelected);
@@ -2675,7 +2675,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
w = rect.width - 6;
h = rect.height - 5;
}
-
+
BasicGraphicsUtils.drawDashedRect(g, x, y, w, h);
}
}
@@ -2707,44 +2707,44 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
// Outer right line.
g.drawLine(x + w - 1, y + 2, x + w - 1, y + h);
-
+
// Upper right corner.
g.drawLine(x + w - 2, y + 1, x + w - 1, y + 2);
-
+
g.setColor(lightHighlight);
-
+
// Left line.
g.drawLine(x, y + 3, x, y + h);
-
+
// Upper line.
g.drawLine(x + 3, y, x + w - 3, y);
-
+
// Upper left corner.
g.drawLine(x, y + 2, x + 2, y);
-
+
break;
case SwingConstants.LEFT:
g.setColor(lightHighlight);
// Top line.
g.drawLine(x + 3, y, x + w - 1, y);
-
+
// Top left border.
g.drawLine(x + 2, y, x, y + 2);
-
+
// Left line.
g.drawLine(x, y + 3, x, y + h - 4);
-
+
// Bottom left corner.
g.drawLine(x, y + h - 3, x + 1, y + h - 2);
-
+
g.setColor(darkShadow);
// Outer bottom line.
g.drawLine(x + 2, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(shadow);
// Inner bottom line.
g.drawLine(x + 2, y + h - 2, x + w - 1, y + h - 2);
-
+
break;
case SwingConstants.BOTTOM:
g.setColor(shadow);
@@ -2757,17 +2757,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
// Outer right line.
g.drawLine(x + w - 1, y, x + w - 1, y + h - 3);
-
+
// Bottom right corner.
g.drawLine(x + w - 1, y + h - 2, x + w - 3, y + h);
-
+
// Bottom line.
g.drawLine(x + 2, y + h, x + w - 4, y + h);
-
+
g.setColor(lightHighlight);
// Left line.
g.drawLine(x, y, x, y + h - 3);
-
+
// Bottom left corner.
g.drawLine(x, y + h - 2, x + 1, y + h - 1);
break;
@@ -2775,31 +2775,31 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(lightHighlight);
// Top line.
g.drawLine(x, y, x + w - 3, y);
-
+
g.setColor(darkShadow);
// Top right corner.
g.drawLine(x + w - 2, y + 1, x + w - 1, y + 2);
-
+
// Outer right line.
g.drawLine(x + w - 1, y + 3, x + w - 1, y + h - 3);
-
+
// Bottom right corner.
g.drawLine(x + w - 2, y + h - 2, x + w - 3, y + h - 1);
-
+
// Bottom line.
g.drawLine(x, y + h - 1, x + w - 4, y + h - 1);
-
+
g.setColor(shadow);
-
+
// Inner right line.
g.drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3);
-
+
// Inner bottom line.
g.drawLine(x, y + h - 2, x + w - 3, y + h - 2);
-
+
break;
}
-
+
g.setColor(saved);
}
@@ -2820,7 +2820,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
boolean isSelected)
{
Color saved = g.getColor();
-
+
if (isSelected)
g.setColor(selectedColor);
else
@@ -2931,17 +2931,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
g.drawLine(x, y, startgap, y);
g.drawLine(endgap, y, x + w - 1, y);
-
+
g.setColor(selectedColor);
g.drawLine(startgap, y, endgap - 1, y);
}
else
g.drawLine(x, y, x + w, y);
-
+
g.setColor(selectedColor);
g.drawLine(x, y + 1, x + w - 1, y + 1);
g.drawLine(x, y + 2, x + w - 1, y + 2);
-
+
g.setColor(saved);
}
@@ -2971,13 +2971,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
g.drawLine(x, y, x, startgap);
g.drawLine(x, endgap, x, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(x, startgap, x, endgap - 1);
}
else
g.drawLine(x, y, x, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(x + 1, y + 1, x + 1, y + h - 4);
@@ -3014,7 +3014,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x, y + h - 1, startgap , y + h - 1);
g.drawLine(endgap, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(startgap, y + h - 1, endgap - 1, y + h - 1);
g.drawLine(startgap, y + h - 2, endgap - 1, y + h - 2);
@@ -3026,7 +3026,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
-
+
g.setColor(selectedColor);
g.drawLine(x + 1, y + h - 3, x + w - 2, y + h - 3);
@@ -3062,7 +3062,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x + w - 1, y, x + w - 1, startgap);
g.drawLine(x + w - 1, endgap, x + w - 1, y + h - 2);
-
+
g.setColor(selectedColor);
g.drawLine(x + w - 2, startgap, x + w - 2, endgap - 1);
g.drawLine(x + w - 1, startgap, x + w - 1, endgap - 1);
@@ -3074,7 +3074,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 2);
}
-
+
g.setColor(selectedColor);
g.drawLine(x + w - 3, y + 1, x + w - 3, y + h - 4);
@@ -3085,10 +3085,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
* <p>This method returns the bounds of a tab for the given index
* and shifts it by the current scrolling offset if the tabbed
* pane is in scrolling tab layout mode.</p>
- *
+ *
* <p>Subclassses should retrievs a tab's bounds by this method
* if they want to find out whether the tab is currently visible.</p>
- *
+ *
* @param pane The JTabbedPane.
* @param i The index to look for.
*
@@ -3099,13 +3099,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Need to re-layout container if tab does not exist.
if (i >= rects.length)
layoutManager.layoutContainer(pane);
-
+
// Properly shift coordinates if scrolling has taken
// place.
if (pane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
Rectangle r = new Rectangle(rects[i]);
-
+
switch(pane.getTabPlacement())
{
case SwingConstants.TOP:
@@ -3115,10 +3115,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
default:
r.y -= currentScrollOffset;
}
-
+
return r;
}
-
+
return rects[i];
}
@@ -3148,9 +3148,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Note: This code is tab layout mode agnostic.
if (! tabPane.isValid())
tabPane.validate();
-
+
int tabCount = tabPane.getTabCount();
-
+
// If the user clicked outside of any tab rect the
// selection should not change.
int index = tabPane.getSelectedIndex();
@@ -3168,7 +3168,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
/**
* <p>This method returns the tab bounds in the given rectangle.</p>
- *
+ *
* <p>The returned rectangle will be shifted by the current scroll
* offset if the tabbed pane is in scrolling tab layout mode.</p>.
*
@@ -3652,7 +3652,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
current = getNextTabIndexInRun(tabPane.getTabCount(),
current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3668,7 +3668,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
current = getPreviousTabIndexInRun(tabPane.getTabCount(),
current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3698,7 +3698,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
protected void selectPreviousTab(int current)
{
current = getPreviousTabIndex(current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3825,10 +3825,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int index = getNextTabIndex(base);
int run = getRunForTab(tabCount, base);
if (base == lastTabInRun(tabCount, run))
- index = (run > 0)
+ index = (run > 0)
? lastTabInRun(tabCount, getPreviousTabRun(run)) + 1
: 0;
-
+
return index;
}
@@ -3847,7 +3847,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int run = getRunForTab(tabCount, base);
if (index == lastTabInRun(tabCount, getPreviousTabRun(run)))
index = lastTabInRun(tabCount, run);
-
+
return index;
}
@@ -3933,8 +3933,8 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
break;
}
}
-
- ActionMap getActionMap()
+
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("TabbedPane.actionMap");
@@ -3950,25 +3950,25 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
-
+
map.put("navigatePageDown", new NavigatePageDownAction());
map.put("navigatePageUp", new NavigatePageUpAction());
map.put("navigateDown",
new NavigateAction("navigateDown", SwingConstants.SOUTH));
-
+
map.put("navigateUp",
new NavigateAction("navigateUp", SwingConstants.NORTH));
-
+
map.put("navigateLeft",
new NavigateAction("navigateLeft", SwingConstants.WEST));
-
+
map.put("navigateRight",
new NavigateAction("navigateRight", SwingConstants.EAST));
-
+
map.put("requestFocusForVisibleComponent",
new RequestFocusForVisibleComponentAction());
map.put("requestFocus", new RequestFocusAction());
-
+
return map;
}
diff --git a/javax/swing/plaf/basic/BasicTableHeaderUI.java b/javax/swing/plaf/basic/BasicTableHeaderUI.java
index 8a8eeb837..7ff234e6d 100644
--- a/javax/swing/plaf/basic/BasicTableHeaderUI.java
+++ b/javax/swing/plaf/basic/BasicTableHeaderUI.java
@@ -71,28 +71,28 @@ public class BasicTableHeaderUI extends TableHeaderUI
* where mouse cursor changes shape into "resize"
*/
static int COLUMN_BOUNDARY_TOLERANCE = 3;
-
+
public static ComponentUI createUI(JComponent h)
{
return new BasicTableHeaderUI();
}
-
+
/**
* The table header that is using this interface.
*/
protected JTableHeader header;
-
+
/**
* The mouse input listener, responsible for mouse manipulations with
* the table header.
*/
protected MouseInputListener mouseInputListener;
-
+
/**
* Paint the header cell.
*/
protected CellRendererPane rendererPane;
-
+
/**
* The header cell border.
*/
@@ -102,12 +102,12 @@ public class BasicTableHeaderUI extends TableHeaderUI
* Original mouse cursor prior to resizing.
*/
private Cursor originalCursor;
-
+
/**
* If not null, one of the columns is currently being dragged.
*/
Rectangle draggingHeaderRect;
-
+
/**
* Handles column movement and rearrangement by mouse. The same instance works
* both as mouse listener and the mouse motion listner.
@@ -117,7 +117,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
{
/**
* If true, the cursor is being already shown in the alternative "resize"
- * shape.
+ * shape.
*/
boolean showingResizeCursor;
@@ -127,11 +127,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
* column dragging).
*/
int draggingFrom = - 1;
-
+
/**
* The number of the column being dragged.
*/
- int draggingColumnNumber;
+ int draggingColumnNumber;
/**
* The previous preferred width of the column.
@@ -245,7 +245,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
if (onBoundary)
{
- originalCursor = header.getCursor();
+ originalCursor = header.getCursor();
if (p < x)
header.setCursor(Cursor.getPredefinedCursor(
Cursor.W_RESIZE_CURSOR));
@@ -351,7 +351,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
/**
* Stop the dragging session.
- *
+ *
* @param e the "mouse release" mouse event, needed to determing the final
* location for the dragged column.
*/
@@ -365,11 +365,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
// Find where have we dragged the column.
int x = e.getX();
int p = 0;
-
+
int col = model.getColumnCount() - 1;
int n = model.getColumnCount();
- // This loop does not find the column if the mouse if out of the
+ // This loop does not find the column if the mouse if out of the
// right boundary of the table header. Then we make this column the
// rightmost column.
Scan: for (int i = 0; i < n; i++)
@@ -385,17 +385,17 @@ public class BasicTableHeaderUI extends TableHeaderUI
header.getTable().moveColumn(draggingColumnNumber, col);
}
}
-
+
/**
* Create and return the mouse input listener.
- *
+ *
* @return the mouse listener ({@link MouseInputHandler}, if not overridden.
*/
protected MouseInputListener createMouseInputListener()
{
return new MouseInputHandler();
}
-
+
/**
* Construct a new BasicTableHeaderUI, create mouse listeners.
*/
@@ -448,7 +448,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
{
// AFAICS, the RI does nothing here.
}
-
+
/**
* Remove the previously installed listeners.
*/
@@ -464,9 +464,9 @@ public class BasicTableHeaderUI extends TableHeaderUI
uninstallKeyboardActions();
uninstallDefaults();
}
-
+
/**
- * Repaint the table header.
+ * Repaint the table header.
*/
public void paint(Graphics gfx, JComponent c)
{
@@ -474,7 +474,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
int ncols = cmod.getColumnCount();
if (ncols == 0)
return;
-
+
Rectangle clip = gfx.getClipBounds();
TableCellRenderer defaultRend = header.getDefaultRenderer();
@@ -505,38 +505,38 @@ public class BasicTableHeaderUI extends TableHeaderUI
bounds.width, bounds.height);
}
}
-
+
// This displays a running rectangle that is much simplier than the total
// animation, as it is seen in Sun's application.
// TODO animate the collumn dragging like in Sun's jre.
if (draggingHeaderRect != null)
{
- gfx.setColor(header.getForeground());
+ gfx.setColor(header.getForeground());
gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y + 2,
draggingHeaderRect.width - 1, draggingHeaderRect.height - 6);
}
}
-
+
/**
* Get the preferred header size.
- *
+ *
* @param ignored unused
- *
+ *
* @return the preferred size of the associated header.
*/
public Dimension getPreferredSize(JComponent ignored)
{
TableColumnModel cmod = header.getColumnModel();
TableCellRenderer defaultRend = header.getDefaultRenderer();
- int ncols = cmod.getColumnCount();
+ int ncols = cmod.getColumnCount();
Dimension ret = new Dimension(0, 0);
int spacing = 0;
- if (header.getTable() != null
+ if (header.getTable() != null
&& header.getTable().getIntercellSpacing() != null)
spacing = header.getTable().getIntercellSpacing().width;
-
- for (int i = 0; i < ncols; ++i)
+
+ for (int i = 0; i < ncols; ++i)
{
TableColumn col = cmod.getColumn(i);
TableCellRenderer rend = col.getHeaderRenderer();
@@ -556,11 +556,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
Dimension d = comp.getPreferredSize();
ret.width += spacing;
- ret.height = Math.max(d.height, ret.height);
+ ret.height = Math.max(d.height, ret.height);
}
ret.width = cmod.getTotalColumnWidth();
return ret;
}
-
-
+
+
}
diff --git a/javax/swing/plaf/basic/BasicTableUI.java b/javax/swing/plaf/basic/BasicTableUI.java
index a672173c7..f5a4bcb67 100644
--- a/javax/swing/plaf/basic/BasicTableUI.java
+++ b/javax/swing/plaf/basic/BasicTableUI.java
@@ -82,15 +82,15 @@ import javax.swing.table.TableModel;
public class BasicTableUI extends TableUI
{
- public static ComponentUI createUI(JComponent comp)
+ public static ComponentUI createUI(JComponent comp)
{
return new BasicTableUI();
}
- protected FocusListener focusListener;
- protected KeyListener keyListener;
- protected MouseInputListener mouseInputListener;
- protected CellRendererPane rendererPane;
+ protected FocusListener focusListener;
+ protected KeyListener keyListener;
+ protected MouseInputListener mouseInputListener;
+ protected CellRendererPane rendererPane;
protected JTable table;
/** The normal cell border. */
@@ -108,7 +108,7 @@ public class BasicTableUI extends TableUI
* Handles key events for the JTable. Key events should be handled through
* the InputMap/ActionMap mechanism since JDK1.3. This class is only there
* for backwards compatibility.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public class KeyHandler implements KeyListener
@@ -125,7 +125,7 @@ public class BasicTableUI extends TableUI
{
// Key events should be handled through the InputMap/ActionMap mechanism
// since JDK1.3. This class is only there for backwards compatibility.
-
+
// Editor activation is a specific kind of response to ''any''
// character key. Hence it is handled here.
if (!table.isEditing() && table.isEnabled())
@@ -208,13 +208,13 @@ public class BasicTableUI extends TableUI
ListSelectionModel rowModel = table.getSelectionModel();
if (lo_row != -1 && hi_row != -1)
{
- if (controlPressed && rowModel.getSelectionMode()
+ if (controlPressed && rowModel.getSelectionMode()
!= ListSelectionModel.SINGLE_SELECTION)
rowModel.addSelectionInterval(lo_row, hi_row);
else
rowModel.setSelectionInterval(lo_row, hi_row);
}
-
+
// Update the columns
int lo_col = table.columnAtPoint(begin);
int hi_col = table.columnAtPoint(curr);
@@ -222,14 +222,14 @@ public class BasicTableUI extends TableUI
getSelectionModel();
if (lo_col != -1 && hi_col != -1)
{
- if (controlPressed && colModel.getSelectionMode() !=
+ if (controlPressed && colModel.getSelectionMode() !=
ListSelectionModel.SINGLE_SELECTION)
colModel.addSelectionInterval(lo_col, hi_col);
else
colModel.setSelectionInterval(lo_col, hi_col);
}
}
-
+
/**
* For the double click, start the cell editor.
*/
@@ -254,7 +254,7 @@ public class BasicTableUI extends TableUI
}
}
- public void mouseDragged(MouseEvent e)
+ public void mouseDragged(MouseEvent e)
{
if (table.isEnabled())
{
@@ -278,7 +278,7 @@ public class BasicTableUI extends TableUI
// Nothing to do here.
}
- public void mousePressed(MouseEvent e)
+ public void mousePressed(MouseEvent e)
{
if (table.isEnabled())
{
@@ -292,12 +292,12 @@ public class BasicTableUI extends TableUI
//if control is pressed and the cell is already selected, deselect it
if (e.isControlDown() && table.isCellSelected(
table.rowAtPoint(begin), table.columnAtPoint(begin)))
- {
+ {
table.getSelectionModel().
- removeSelectionInterval(table.rowAtPoint(begin),
+ removeSelectionInterval(table.rowAtPoint(begin),
table.rowAtPoint(begin));
table.getColumnModel().getSelectionModel().
- removeSelectionInterval(table.columnAtPoint(begin),
+ removeSelectionInterval(table.columnAtPoint(begin),
table.columnAtPoint(begin));
}
else
@@ -314,7 +314,7 @@ public class BasicTableUI extends TableUI
}
}
- public void mouseReleased(MouseEvent e)
+ public void mouseReleased(MouseEvent e)
{
if (table.isEnabled())
{
@@ -374,12 +374,12 @@ public class BasicTableUI extends TableUI
}
}
- protected FocusListener createFocusListener()
+ protected FocusListener createFocusListener()
{
return new FocusHandler();
}
- protected MouseInputListener createMouseInputListener()
+ protected MouseInputListener createMouseInputListener()
{
return new MouseInputHandler();
}
@@ -396,16 +396,16 @@ public class BasicTableUI extends TableUI
}
/**
- * Return the maximum size of the table. The maximum height is the row
- * height times the number of rows. The maximum width is the sum of
+ * Return the maximum size of the table. The maximum height is the row
+ * height times the number of rows. The maximum width is the sum of
* the maximum widths of each column.
- *
+ *
* @param comp the component whose maximum size is being queried,
* this is ignored.
* @return a Dimension object representing the maximum size of the table,
* or null if the table has no elements.
*/
- public Dimension getMaximumSize(JComponent comp)
+ public Dimension getMaximumSize(JComponent comp)
{
int maxTotalColumnWidth = 0;
for (int i = 0; i < table.getColumnCount(); i++)
@@ -415,16 +415,16 @@ public class BasicTableUI extends TableUI
}
/**
- * Return the minimum size of the table. The minimum height is the row
- * height times the number of rows. The minimum width is the sum of
+ * Return the minimum size of the table. The minimum height is the row
+ * height times the number of rows. The minimum width is the sum of
* the minimum widths of each column.
- *
+ *
* @param comp the component whose minimum size is being queried,
* this is ignored.
* @return a Dimension object representing the minimum size of the table,
* or null if the table has no elements.
*/
- public Dimension getMinimumSize(JComponent comp)
+ public Dimension getMinimumSize(JComponent comp)
{
int minTotalColumnWidth = 0;
for (int i = 0; i < table.getColumnCount(); i++)
@@ -440,7 +440,7 @@ public class BasicTableUI extends TableUI
*
* @return the preferred size for the table of that UI
*/
- public Dimension getPreferredSize(JComponent comp)
+ public Dimension getPreferredSize(JComponent comp)
{
int prefTotalColumnWidth = 0;
TableColumnModel tcm = table.getColumnModel();
@@ -458,13 +458,13 @@ public class BasicTableUI extends TableUI
* Returns the table height. This helper method is used by
* {@link #getMinimumSize(JComponent)}, {@link #getPreferredSize(JComponent)}
* and {@link #getMaximumSize(JComponent)} to determine the table height.
- *
+ *
* @return the table height
*/
private int getHeight()
{
int height = 0;
- int rowCount = table.getRowCount();
+ int rowCount = table.getRowCount();
if (rowCount > 0 && table.getColumnCount() > 0)
{
Rectangle r = table.getCellRect(rowCount - 1, 0, true);
@@ -473,7 +473,7 @@ public class BasicTableUI extends TableUI
return height;
}
- protected void installDefaults()
+ protected void installDefaults()
{
LookAndFeel.installColorsAndFont(table, "Table.background",
"Table.foreground", "Table.font");
@@ -486,7 +486,7 @@ public class BasicTableUI extends TableUI
/**
* Installs keyboard actions on the table.
*/
- protected void installKeyboardActions()
+ protected void installKeyboardActions()
{
// Install the input map.
InputMap inputMap =
@@ -597,14 +597,14 @@ public class BasicTableUI extends TableUI
{
JTable table = (JTable) e.getSource();
- DefaultListSelectionModel rowModel
+ DefaultListSelectionModel rowModel
= (DefaultListSelectionModel) table.getSelectionModel();
- DefaultListSelectionModel colModel
+ DefaultListSelectionModel colModel
= (DefaultListSelectionModel) table.getColumnModel().getSelectionModel();
int rowLead = rowModel.getLeadSelectionIndex();
int rowMax = table.getModel().getRowCount() - 1;
-
+
int colLead = colModel.getLeadSelectionIndex();
int colMax = table.getModel().getColumnCount() - 1;
@@ -626,7 +626,7 @@ public class BasicTableUI extends TableUI
table.editCellAt(rowLead, colLead);
}
else if (command.equals("selectFirstRowExtendSelection"))
- {
+ {
rowModel.setLeadSelectionIndex(0);
}
else if (command.equals("selectFirstColumn"))
@@ -636,7 +636,7 @@ public class BasicTableUI extends TableUI
else if (command.equals("selectFirstColumnExtendSelection"))
{
colModel.setLeadSelectionIndex(0);
- }
+ }
else if (command.equals("selectLastRow"))
{
rowModel.setSelectionInterval(rowMax, rowMax);
@@ -670,11 +670,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (rowLead == getFirstVisibleRowIndex(table))
- target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
+ target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getFirstVisibleRowIndex(table);
-
+
rowModel.setLeadSelectionIndex(target);
colModel.setLeadSelectionIndex(colLead);
}
@@ -692,7 +692,7 @@ public class BasicTableUI extends TableUI
- getFirstVisibleColumnIndex(table) + 1));
else
target = getLastVisibleColumnIndex(table);
-
+
colModel.setSelectionInterval(target, target);
rowModel.setSelectionInterval(rowLead, rowLead);
}
@@ -705,11 +705,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getFirstVisibleColumnIndex(table))
- target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
+ target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getFirstVisibleColumnIndex(table);
-
+
colModel.setSelectionInterval(target, target);
rowModel.setSelectionInterval(rowLead, rowLead);
}
@@ -731,71 +731,71 @@ public class BasicTableUI extends TableUI
|| command.equals("selectPreviousColumnCell"))
{
// If nothing is selected, select the first cell in the table
- if (table.getSelectedRowCount() == 0 &&
+ if (table.getSelectedRowCount() == 0 &&
table.getSelectedColumnCount() == 0)
{
rowModel.setSelectionInterval(0, 0);
colModel.setSelectionInterval(0, 0);
return;
}
-
+
// If the lead selection index isn't selected (ie a remove operation
// happened, then set the lead to the first selected cell in the
// table
if (!table.isCellSelected(rowLead, colLead))
{
- rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(),
+ rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(),
rowModel.getMinSelectionIndex());
- colModel.addSelectionInterval(colModel.getMinSelectionIndex(),
+ colModel.addSelectionInterval(colModel.getMinSelectionIndex(),
colModel.getMinSelectionIndex());
return;
}
-
+
// multRowsSelected and multColsSelected tell us if multiple rows or
// columns are selected, respectively
boolean multRowsSelected, multColsSelected;
multRowsSelected = table.getSelectedRowCount() > 1 &&
table.getRowSelectionAllowed();
-
+
multColsSelected = table.getSelectedColumnCount() > 1 &&
table.getColumnSelectionAllowed();
-
+
// If there is just one selection, select the next cell, and wrap
// when you get to the edges of the table.
if (!multColsSelected && !multRowsSelected)
{
- if (command.indexOf("Column") != -1)
- advanceSingleSelection(colModel, colMax, rowModel, rowMax,
+ if (command.indexOf("Column") != -1)
+ advanceSingleSelection(colModel, colMax, rowModel, rowMax,
command.equals("selectPreviousColumnCell"));
else
- advanceSingleSelection(rowModel, rowMax, colModel, colMax,
+ advanceSingleSelection(rowModel, rowMax, colModel, colMax,
command.equals("selectPreviousRowCell"));
return;
}
-
-
+
+
// rowMinSelected and rowMaxSelected are the minimum and maximum
// values respectively of selected cells in the row selection model
// Similarly for colMinSelected and colMaxSelected.
- int rowMaxSelected = table.getRowSelectionAllowed() ?
+ int rowMaxSelected = table.getRowSelectionAllowed() ?
rowModel.getMaxSelectionIndex() : table.getModel().getRowCount() - 1;
- int rowMinSelected = table.getRowSelectionAllowed() ?
- rowModel.getMinSelectionIndex() : 0;
- int colMaxSelected = table.getColumnSelectionAllowed() ?
- colModel.getMaxSelectionIndex() :
+ int rowMinSelected = table.getRowSelectionAllowed() ?
+ rowModel.getMinSelectionIndex() : 0;
+ int colMaxSelected = table.getColumnSelectionAllowed() ?
+ colModel.getMaxSelectionIndex() :
table.getModel().getColumnCount() - 1;
- int colMinSelected = table.getColumnSelectionAllowed() ?
+ int colMinSelected = table.getColumnSelectionAllowed() ?
colModel.getMinSelectionIndex() : 0;
-
+
// If there are multiple rows and columns selected, select the next
- // cell and wrap at the edges of the selection.
- if (command.indexOf("Column") != -1)
+ // cell and wrap at the edges of the selection.
+ if (command.indexOf("Column") != -1)
advanceMultipleSelection(table, colModel, colMinSelected,
colMaxSelected, rowModel, rowMinSelected,
rowMaxSelected,
command.equals("selectPreviousColumnCell"),
true);
-
+
else
advanceMultipleSelection(table, rowModel, rowMinSelected,
rowMaxSelected, colModel, colMinSelected,
@@ -812,11 +812,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getFirstVisibleColumnIndex(table))
- target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
+ target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getFirstVisibleColumnIndex(table);
-
+
colModel.setLeadSelectionIndex(target);
rowModel.setLeadSelectionIndex(rowLead);
}
@@ -828,7 +828,7 @@ public class BasicTableUI extends TableUI
- getFirstVisibleRowIndex(table) + 1));
else
target = getLastVisibleRowIndex(table);
-
+
rowModel.setSelectionInterval(target, target);
colModel.setSelectionInterval(colLead, colLead);
}
@@ -836,11 +836,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getLastVisibleColumnIndex(table))
- target = Math.min(colMax, colLead + (getLastVisibleColumnIndex(table)
+ target = Math.min(colMax, colLead + (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getLastVisibleColumnIndex(table);
-
+
colModel.setLeadSelectionIndex(target);
rowModel.setLeadSelectionIndex(rowLead);
}
@@ -857,29 +857,29 @@ public class BasicTableUI extends TableUI
{
int target;
if (rowLead == getLastVisibleRowIndex(table))
- target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex(table)
+ target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getLastVisibleRowIndex(table);
-
+
rowModel.setLeadSelectionIndex(target);
colModel.setLeadSelectionIndex(colLead);
- }
+ }
else if (command.equals("scrollUpChangeSelection"))
{
int target;
if (rowLead == getFirstVisibleRowIndex(table))
- target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
+ target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getFirstVisibleRowIndex(table);
-
+
rowModel.setSelectionInterval(target, target);
colModel.setSelectionInterval(colLead, colLead);
}
else if (command.equals("selectNextRowChangeLead"))
{
- if (rowModel.getSelectionMode()
+ if (rowModel.getSelectionMode()
!= ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just "selectNextRow"
@@ -892,7 +892,7 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectPreviousRowChangeLead"))
{
- if (rowModel.getSelectionMode()
+ if (rowModel.getSelectionMode()
!= ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectPreviousRow
@@ -905,8 +905,8 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectNextColumnChangeLead"))
{
- if (colModel.getSelectionMode()
- != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ if (colModel.getSelectionMode()
+ != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectNextColumn
rowModel.setSelectionInterval(rowLead, rowLead);
@@ -918,14 +918,14 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectPreviousColumnChangeLead"))
{
- if (colModel.getSelectionMode()
- != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ if (colModel.getSelectionMode()
+ != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectPreviousColumn
rowModel.setSelectionInterval(rowLead, rowLead);
colModel.setSelectionInterval(Math.max(colLead - 1, 0),
Math.max(colLead - 1, 0));
-
+
}
else
colModel.moveLeadSelectionIndex(Math.max(colLead - 1, 0));
@@ -955,12 +955,12 @@ public class BasicTableUI extends TableUI
rowModel.removeSelectionInterval(rowLead, rowLead);
else
rowModel.addSelectionInterval(rowLead, rowLead);
-
+
if (colModel.isSelectedIndex(colLead))
colModel.removeSelectionInterval(colLead, colLead);
else
colModel.addSelectionInterval(colLead, colLead);
-
+
rowModel.setAnchorSelectionIndex(rowLead);
colModel.setAnchorSelectionIndex(colLead);
}
@@ -968,31 +968,31 @@ public class BasicTableUI extends TableUI
{
table.editingStopped(new ChangeEvent(command));
}
- else
+ else
{
// If we're here that means we bound this TableAction class
// to a keyboard input but we either want to ignore that input
// or we just haven't implemented its action yet.
-
+
// Uncomment the following line to print the names of unused bindings
// when their keys are pressed
-
+
// System.out.println ("not implemented: "+e.getActionCommand());
}
// Any commands whose keyStrokes should be used by the Editor should not
- // cause editing to be stopped: ie, the SPACE sends "addToSelection" but
+ // cause editing to be stopped: ie, the SPACE sends "addToSelection" but
// if the table is in editing mode, the space should not cause us to stop
// editing because it should be used by the Editor.
if (table.isEditing() && command != "startEditing"
&& command != "addToSelection")
table.editingStopped(new ChangeEvent("update"));
-
+
table.scrollRectToVisible(table.getCellRect(
- rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(),
+ rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(),
false));
}
-
+
/**
* Returns the column index of the first visible column.
* @return the column index of the first visible column.
@@ -1005,7 +1005,7 @@ public class BasicTableUI extends TableUI
r.translate((int) r.getWidth() - 1, 0);
return table.columnAtPoint(r.getLocation());
}
-
+
/**
* Returns the column index of the last visible column.
*
@@ -1016,9 +1016,9 @@ public class BasicTableUI extends TableUI
Rectangle r = table.getVisibleRect();
if (or.isLeftToRight())
r.translate((int) r.getWidth() - 1, 0);
- return table.columnAtPoint(r.getLocation());
+ return table.columnAtPoint(r.getLocation());
}
-
+
/**
* Returns the row index of the first visible row.
*
@@ -1031,7 +1031,7 @@ public class BasicTableUI extends TableUI
r.translate((int) r.getWidth() - 1, 0);
return table.rowAtPoint(r.getLocation());
}
-
+
/**
* Returns the row index of the last visible row.
*
@@ -1067,7 +1067,7 @@ public class BasicTableUI extends TableUI
* rows (ENTER)
* @param firstMin the first selected index in firstModel
* @param firstMax the last selected index in firstModel
- * @param secondModel the ListSelectionModel for rows (TAB) or
+ * @param secondModel the ListSelectionModel for rows (TAB) or
* columns (ENTER)
* @param secondMin the first selected index in secondModel
* @param secondMax the last selected index in secondModel
@@ -1076,41 +1076,41 @@ public class BasicTableUI extends TableUI
*/
void advanceMultipleSelection(JTable table, ListSelectionModel firstModel,
int firstMin,
- int firstMax, ListSelectionModel secondModel,
+ int firstMax, ListSelectionModel secondModel,
int secondMin, int secondMax, boolean reverse,
boolean eventIsTab)
{
- // If eventIsTab, all the "firsts" correspond to columns, otherwise, to
+ // If eventIsTab, all the "firsts" correspond to columns, otherwise, to
// rows "seconds" correspond to the opposite
int firstLead = firstModel.getLeadSelectionIndex();
int secondLead = secondModel.getLeadSelectionIndex();
- int numFirsts = eventIsTab ?
+ int numFirsts = eventIsTab ?
table.getModel().getColumnCount() : table.getModel().getRowCount();
- int numSeconds = eventIsTab ?
+ int numSeconds = eventIsTab ?
table.getModel().getRowCount() : table.getModel().getColumnCount();
// check if we have to wrap the "firsts" around, going to the other side
- if ((firstLead == firstMax && !reverse) ||
+ if ((firstLead == firstMax && !reverse) ||
(reverse && firstLead == firstMin))
{
- firstModel.addSelectionInterval(reverse ? firstMax : firstMin,
+ firstModel.addSelectionInterval(reverse ? firstMax : firstMin,
reverse ? firstMax : firstMin);
-
+
// check if we have to wrap the "seconds"
- if ((secondLead == secondMax && !reverse) ||
+ if ((secondLead == secondMax && !reverse) ||
(reverse && secondLead == secondMin))
- secondModel.addSelectionInterval(reverse ? secondMax : secondMin,
+ secondModel.addSelectionInterval(reverse ? secondMax : secondMin,
reverse ? secondMax : secondMin);
// if we're not wrapping the seconds, we have to find out where we
- // are within the secondModel and advance to the next cell (or
+ // are within the secondModel and advance to the next cell (or
// go back to the previous cell if reverse == true)
else
{
int[] secondsSelected;
- if (eventIsTab && table.getRowSelectionAllowed() ||
+ if (eventIsTab && table.getRowSelectionAllowed() ||
!eventIsTab && table.getColumnSelectionAllowed())
- secondsSelected = eventIsTab ?
+ secondsSelected = eventIsTab ?
table.getSelectedRows() : table.getSelectedColumns();
else
{
@@ -1129,9 +1129,9 @@ public class BasicTableUI extends TableUI
else
while (secondsSelected[secondIndex] >= secondLead)
secondIndex--;
-
+
// and select it - updating the lead selection index
- secondModel.addSelectionInterval(secondsSelected[secondIndex],
+ secondModel.addSelectionInterval(secondsSelected[secondIndex],
secondsSelected[secondIndex]);
}
}
@@ -1140,9 +1140,9 @@ public class BasicTableUI extends TableUI
else
{
int[] firstsSelected;
- if (eventIsTab && table.getColumnSelectionAllowed() ||
+ if (eventIsTab && table.getColumnSelectionAllowed() ||
!eventIsTab && table.getRowSelectionAllowed())
- firstsSelected = eventIsTab ?
+ firstsSelected = eventIsTab ?
table.getSelectedColumns() : table.getSelectedRows();
else
{
@@ -1155,16 +1155,16 @@ public class BasicTableUI extends TableUI
if (!reverse)
while (firstsSelected[firstIndex] <= firstLead)
firstIndex++;
- else
+ else
while (firstsSelected[firstIndex] >= firstLead)
firstIndex--;
- firstModel.addSelectionInterval(firstsSelected[firstIndex],
+ firstModel.addSelectionInterval(firstsSelected[firstIndex],
firstsSelected[firstIndex]);
secondModel.addSelectionInterval(secondLead, secondLead);
}
}
-
- /**
+
+ /**
* A helper method for the key bindings. Used because the actions
* for TAB, SHIFT-TAB, ENTER, and SHIFT-ENTER are very similar.
*
@@ -1180,15 +1180,15 @@ public class BasicTableUI extends TableUI
* @param reverse true if SHIFT was pressed for the event
*/
- void advanceSingleSelection(ListSelectionModel firstModel, int firstMax,
- ListSelectionModel secondModel, int secondMax,
+ void advanceSingleSelection(ListSelectionModel firstModel, int firstMax,
+ ListSelectionModel secondModel, int secondMax,
boolean reverse)
{
// for TABs, "first" corresponds to columns and "seconds" to rows.
// the opposite is true for ENTERs
int firstLead = firstModel.getLeadSelectionIndex();
int secondLead = secondModel.getLeadSelectionIndex();
-
+
// if we are going backwards subtract 2 because we later add 1
// for a net change of -1
if (reverse && (firstLead == 0))
@@ -1198,15 +1198,15 @@ public class BasicTableUI extends TableUI
secondLead += secondMax + 1;
secondLead -= 2;
}
-
+
// do we have to wrap the "seconds"?
if (reverse && (firstLead == 0) || !reverse && (firstLead == firstMax))
- secondModel.setSelectionInterval((secondLead + 1) % (secondMax + 1),
+ secondModel.setSelectionInterval((secondLead + 1) % (secondMax + 1),
(secondLead + 1) % (secondMax + 1));
// if not, just reselect the current lead
else
secondModel.setSelectionInterval(secondLead, secondLead);
-
+
// if we are going backwards, subtract 2 because we add 1 later
// for net change of -1
if (reverse)
@@ -1217,12 +1217,12 @@ public class BasicTableUI extends TableUI
firstLead -= 2;
}
// select the next "first"
- firstModel.setSelectionInterval((firstLead + 1) % (firstMax + 1),
+ firstModel.setSelectionInterval((firstLead + 1) % (firstMax + 1),
(firstLead + 1) % (firstMax + 1));
}
}
- protected void installListeners()
+ protected void installListeners()
{
if (focusListener == null)
focusListener = createFocusListener();
@@ -1232,7 +1232,7 @@ public class BasicTableUI extends TableUI
table.addKeyListener(keyListener);
if (mouseInputListener == null)
mouseInputListener = createMouseInputListener();
- table.addMouseListener(mouseInputListener);
+ table.addMouseListener(mouseInputListener);
table.addMouseMotionListener(mouseInputListener);
if (propertyChangeListener == null)
propertyChangeListener = new PropertyChangeHandler();
@@ -1259,17 +1259,17 @@ public class BasicTableUI extends TableUI
SwingUtilities.replaceUIActionMap(table, null);
}
- protected void uninstallListeners()
+ protected void uninstallListeners()
{
- table.removeFocusListener(focusListener);
+ table.removeFocusListener(focusListener);
table.removeKeyListener(keyListener);
- table.removeMouseListener(mouseInputListener);
+ table.removeMouseListener(mouseInputListener);
table.removeMouseMotionListener(mouseInputListener);
table.removePropertyChangeListener(propertyChangeListener);
propertyChangeListener = null;
}
- public void installUI(JComponent comp)
+ public void installUI(JComponent comp)
{
table = (JTable) comp;
rendererPane = new CellRendererPane();
@@ -1280,11 +1280,11 @@ public class BasicTableUI extends TableUI
installListeners();
}
- public void uninstallUI(JComponent c)
+ public void uninstallUI(JComponent c)
{
uninstallListeners();
uninstallKeyboardActions();
- uninstallDefaults();
+ uninstallDefaults();
table.remove(rendererPane);
rendererPane = null;
@@ -1308,11 +1308,11 @@ public class BasicTableUI extends TableUI
Component comp = table.prepareRenderer(rend, row, col);
rendererPane.paintComponent(g, comp, table, bounds);
}
-
+
/**
* Paint the associated table.
*/
- public void paint(Graphics gfx, JComponent ignored)
+ public void paint(Graphics gfx, JComponent ignored)
{
int ncols = table.getColumnCount();
int nrows = table.getRowCount();
@@ -1346,19 +1346,19 @@ public class BasicTableUI extends TableUI
{
widths[i] = cmodel.getColumn(i).getWidth() - columnMargin;
}
-
+
Rectangle bounds = table.getCellRect(r0, c0, false);
// The left boundary of the area being repainted.
int left = bounds.x;
-
+
// The top boundary of the area being repainted.
int top = bounds.y;
-
+
// The bottom boundary of the area being repainted.
int bottom;
-
+
// paint the cell contents
- Color grid = table.getGridColor();
+ Color grid = table.getGridColor();
for (int r = r0; r <= rn; ++r)
{
for (int c = c0; c <= cn; ++c)
@@ -1372,18 +1372,18 @@ public class BasicTableUI extends TableUI
// Update row height for tables with custom heights.
bounds.height = table.getRowHeight(r + 1) - rowMargin;
}
-
+
bottom = bounds.y - rowMargin;
// paint vertical grid lines
if (grid != null && table.getShowVerticalLines())
- {
+ {
Color save = gfx.getColor();
gfx.setColor(grid);
int x = left - columnMargin;
for (int c = c0; c <= cn; ++c)
{
- // The vertical grid is draw right from the cells, so we
+ // The vertical grid is draw right from the cells, so we
// add before drawing.
x += widths[c] + columnMargin;
gfx.drawLine(x, top, x, bottom);
@@ -1391,15 +1391,15 @@ public class BasicTableUI extends TableUI
gfx.setColor(save);
}
- // paint horizontal grid lines
+ // paint horizontal grid lines
if (grid != null && table.getShowHorizontalLines())
- {
+ {
Color save = gfx.getColor();
gfx.setColor(grid);
int y = top - rowMargin;
for (int r = r0; r <= rn; ++r)
{
- // The horizontal grid is draw below the cells, so we
+ // The horizontal grid is draw below the cells, so we
// add before drawing.
y += table.getRowHeight(r);
gfx.drawLine(left, y, p2.x, y);
diff --git a/javax/swing/plaf/basic/BasicTextAreaUI.java b/javax/swing/plaf/basic/BasicTextAreaUI.java
index 3f5aa27cf..b2541b453 100644
--- a/javax/swing/plaf/basic/BasicTextAreaUI.java
+++ b/javax/swing/plaf/basic/BasicTextAreaUI.java
@@ -1,4 +1,4 @@
-/* BasicTextAreaUI.java --
+/* BasicTextAreaUI.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,9 +65,9 @@ public class BasicTextAreaUI extends BasicTextUI
/**
* Create the view. Returns a WrappedPlainView if the text area
* has lineWrap set to true, otherwise returns a PlainView. If
- * lineWrap is true has to check whether the wrap style is word
+ * lineWrap is true has to check whether the wrap style is word
* or character and return an appropriate WrappedPlainView.
- *
+ *
* @param elem the element to create a View for
* @return an appropriate View for the element
*/
@@ -94,11 +94,11 @@ public class BasicTextAreaUI extends BasicTextUI
{
return "TextArea";
}
-
+
/**
* Receives notification whenever one of the text component's bound
* properties changes. This changes the view to WrappedPlainView
- * if setLineWrap(true) is called, and back to PlainView if
+ * if setLineWrap(true) is called, and back to PlainView if
* setLineWrap(false) is called.
*
* @param ev the property change event
diff --git a/javax/swing/plaf/basic/BasicTextFieldUI.java b/javax/swing/plaf/basic/BasicTextFieldUI.java
index 6792aa065..5f6a92757 100644
--- a/javax/swing/plaf/basic/BasicTextFieldUI.java
+++ b/javax/swing/plaf/basic/BasicTextFieldUI.java
@@ -60,7 +60,7 @@ public class BasicTextFieldUI extends BasicTextUI
{
return new FieldView(elem);
}
-
+
public static ComponentUI createUI(JComponent c)
{
return new BasicTextFieldUI();
@@ -85,7 +85,7 @@ public class BasicTextFieldUI extends BasicTextUI
* Receives notification whenever one of the text component's bound
* properties changes. Here we check for the editable and enabled
* properties and adjust the background color accordingly.
- *
+ *
* <p>The colors are only changed if they are not a
* <code>ColorUIResource</code>.</p>
*
diff --git a/javax/swing/plaf/basic/BasicTextPaneUI.java b/javax/swing/plaf/basic/BasicTextPaneUI.java
index a988c5a63..507e0a169 100644
--- a/javax/swing/plaf/basic/BasicTextPaneUI.java
+++ b/javax/swing/plaf/basic/BasicTextPaneUI.java
@@ -1,4 +1,4 @@
-/* BasicTextPaneUI.java --
+/* BasicTextPaneUI.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/plaf/basic/BasicTextUI.java b/javax/swing/plaf/basic/BasicTextUI.java
index e152a3034..bd7cc48b9 100644
--- a/javax/swing/plaf/basic/BasicTextUI.java
+++ b/javax/swing/plaf/basic/BasicTextUI.java
@@ -126,7 +126,7 @@ public abstract class BasicTextUI extends TextUI
private static class FocusHandler
implements FocusListener
{
- public void focusGained(FocusEvent e)
+ public void focusGained(FocusEvent e)
{
// Nothing to do here.
}
@@ -147,7 +147,7 @@ public abstract class BasicTextUI extends TextUI
{
if (sm != null)
sm.checkSystemClipboardAccess();
-
+
Clipboard cb = Toolkit.getDefaultToolkit().getSystemSelection();
if (cb != null)
{
@@ -291,7 +291,7 @@ public abstract class BasicTextUI extends TextUI
EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent());
factory = editorKit.getViewFactory();
if (factory == null)
- factory = BasicTextUI.this;
+ factory = BasicTextUI.this;
return factory;
}
@@ -317,7 +317,7 @@ public abstract class BasicTextUI extends TextUI
{
if (view != null)
view.setParent(null);
-
+
if (v != null)
v.setParent(this);
@@ -718,7 +718,7 @@ public abstract class BasicTextUI extends TextUI
if (color == null || color instanceof UIResource)
{
color = UIManager.getColor(prefix + ".selectionBackground");
- textComponent.setSelectionColor(color);
+ textComponent.setSelectionColor(color);
}
Insets margin = textComponent.getMargin();
@@ -756,7 +756,7 @@ public abstract class BasicTextUI extends TextUI
*/
protected void installListeners()
{
- //
+ //
if (SystemProperties.getProperty("gnu.swing.text.no-xlike-clipboard")
== null)
{
@@ -768,11 +768,11 @@ public abstract class BasicTextUI extends TextUI
/**
* Returns the name of the keymap for this type of TextUI.
- *
+ *
* This is implemented so that the classname of this TextUI
* without the package prefix is returned. This way subclasses
* don't have to override this method.
- *
+ *
* @return the name of the keymap for this TextUI
*/
protected String getKeymapName()
@@ -822,10 +822,10 @@ public abstract class BasicTextUI extends TextUI
getInputMap());
SwingUtilities.replaceUIActionMap(textComponent, getActionMap());
}
-
+
/**
* Creates an ActionMap to be installed on the text component.
- *
+ *
* @return an ActionMap to be installed on the text component
*/
private ActionMap getActionMap()
@@ -963,7 +963,7 @@ public abstract class BasicTextUI extends TextUI
*/
protected void uninstallKeyboardActions()
{
- SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED,
+ SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED,
null);
SwingUtilities.replaceUIActionMap(textComponent, null);
}
@@ -1150,7 +1150,7 @@ public abstract class BasicTextUI extends TextUI
highlighter.paint(g);
g.setColor(oldColor);
}
-
+
rootView.paint(g, getVisibleEditorRect());
if (caret != null && textComponent.hasFocus())
@@ -1482,11 +1482,11 @@ public abstract class BasicTextUI extends TextUI
// Return null if the component has no valid size.
if (width <= 0 || height <= 0)
return null;
-
+
Insets insets = textComponent.getInsets(cachedInsets);
return new Rectangle(insets.left, insets.top,
- width - insets.left - insets.right,
- height - insets.top - insets.bottom);
+ width - insets.left - insets.right,
+ height - insets.top - insets.bottom);
}
/**
@@ -1507,10 +1507,10 @@ public abstract class BasicTextUI extends TextUI
*/
protected void modelChanged()
{
- if (textComponent == null || rootView == null)
+ if (textComponent == null || rootView == null)
return;
ViewFactory factory = rootView.getViewFactory();
- if (factory == null)
+ if (factory == null)
return;
Document doc = textComponent.getDocument();
if (doc == null)
diff --git a/javax/swing/plaf/basic/BasicToggleButtonUI.java b/javax/swing/plaf/basic/BasicToggleButtonUI.java
index 921648670..4550f08e6 100644
--- a/javax/swing/plaf/basic/BasicToggleButtonUI.java
+++ b/javax/swing/plaf/basic/BasicToggleButtonUI.java
@@ -54,22 +54,22 @@ import javax.swing.plaf.ComponentUI;
*/
public class BasicToggleButtonUI extends BasicButtonUI
{
-
+
/**
* Returns a UI delegate for the specified component.
- *
- * @param component the component (should be an instance of
+ *
+ * @param component the component (should be an instance of
* {@link JToggleButton}).
- *
+ *
* @return An instance of <code>BasicToggleButtonUI</code>.
*/
public static ComponentUI createUI(JComponent component)
{
return new BasicToggleButtonUI();
- }
+ }
/**
- * Returns the prefix for entries in the {@link UIManager} defaults table
+ * Returns the prefix for entries in the {@link UIManager} defaults table
* (<code>"ToggleButton."</code> in this case).
*
* @return <code>"ToggleButton."</code>
@@ -80,14 +80,14 @@ public class BasicToggleButtonUI extends BasicButtonUI
}
/**
- * Paint the component, which is an {@link AbstractButton}, according to
+ * Paint the component, which is an {@link AbstractButton}, according to
* its current state.
*
* @param g The graphics context to paint with
* @param c The component to paint the state of
*/
public void paint(Graphics g, JComponent c)
- {
+ {
AbstractButton b = (AbstractButton) c;
Rectangle tr = new Rectangle();
@@ -102,13 +102,13 @@ public class BasicToggleButtonUI extends BasicButtonUI
SwingUtilities.calculateInnerArea(b, vr);
else
vr = SwingUtilities.getLocalBounds(b);
- String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
- b.getText(), currentIcon(b), b.getVerticalAlignment(),
- b.getHorizontalAlignment(), b.getVerticalTextPosition(),
- b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap()
+ String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ b.getText(), currentIcon(b), b.getVerticalAlignment(),
+ b.getHorizontalAlignment(), b.getVerticalTextPosition(),
+ b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap()
+ defaultTextShiftOffset);
- if ((b.getModel().isArmed() && b.getModel().isPressed())
+ if ((b.getModel().isArmed() && b.getModel().isPressed())
|| b.isSelected())
paintButtonPressed(g, b);
diff --git a/javax/swing/plaf/basic/BasicToolBarUI.java b/javax/swing/plaf/basic/BasicToolBarUI.java
index 7be69ec25..f5b2b2d1e 100644
--- a/javax/swing/plaf/basic/BasicToolBarUI.java
+++ b/javax/swing/plaf/basic/BasicToolBarUI.java
@@ -345,7 +345,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
protected Border createNonRolloverBorder()
{
Border b = UIManager.getBorder("ToolBar.nonrolloverBorder");
-
+
if (b == null)
{
b = new CompoundBorder(
@@ -355,7 +355,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
UIManager.getColor("Button.highlight")),
BasicBorders.getMarginBorder());
}
-
+
return b; }
/**
@@ -377,7 +377,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
protected Border createRolloverBorder()
{
Border b = UIManager.getBorder("ToolBar.rolloverBorder");
-
+
if (b == null)
{
b = new CompoundBorder(
@@ -387,7 +387,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
UIManager.getColor("Button.highlight")),
BasicBorders.getMarginBorder());
}
-
+
return b;
}
@@ -438,13 +438,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (loc != -1)
{
- dragWindow.setBorderColor(dockingBorderColor);
- dragWindow.setBackground(dockingColor);
+ dragWindow.setBorderColor(dockingBorderColor);
+ dragWindow.setBackground(dockingColor);
}
else
{
- dragWindow.setBorderColor(floatingBorderColor);
- dragWindow.setBackground(floatingColor);
+ dragWindow.setBorderColor(floatingBorderColor);
+ dragWindow.setBackground(floatingColor);
}
int w = 0;
@@ -458,13 +458,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (((cachedOrientation == SwingConstants.HORIZONTAL) && tmp)
|| ((cachedOrientation == VERTICAL) && ! tmp))
{
- w = cachedBounds.width;
- h = cachedBounds.height;
+ w = cachedBounds.width;
+ h = cachedBounds.height;
}
else
{
- w = cachedBounds.height;
- h = cachedBounds.width;
+ w = cachedBounds.height;
+ h = cachedBounds.width;
}
Point p = dragWindow.getOffset();
@@ -507,28 +507,28 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
newParent = ((RootPaneContainer) floatFrame).getContentPane();
else
{
- floatFrame.hide();
- newParent = origParent;
+ floatFrame.hide();
+ newParent = origParent;
}
String constraint;
switch (aoc)
{
case SwingConstants.EAST:
- constraint = BorderLayout.EAST;
- break;
+ constraint = BorderLayout.EAST;
+ break;
case SwingConstants.NORTH:
- constraint = BorderLayout.NORTH;
- break;
+ constraint = BorderLayout.NORTH;
+ break;
case SwingConstants.SOUTH:
- constraint = BorderLayout.SOUTH;
- break;
+ constraint = BorderLayout.SOUTH;
+ break;
case SwingConstants.WEST:
- constraint = BorderLayout.WEST;
- break;
+ constraint = BorderLayout.WEST;
+ break;
default:
- constraint = BorderLayout.CENTER;
- break;
+ constraint = BorderLayout.CENTER;
+ break;
}
int newOrientation = SwingConstants.HORIZONTAL;
@@ -538,8 +538,8 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (aoc != -1)
{
- constraintBeforeFloating = constraint;
- lastGoodOrientation = newOrientation;
+ constraintBeforeFloating = constraint;
+ lastGoodOrientation = newOrientation;
}
newParent.add(toolBar, constraint);
@@ -557,10 +557,10 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (aoc == -1)
{
- floatFrame.pack();
- floatFrame.setSize(dims.width + insets.left + insets.right,
- dims.height + insets.top + insets.bottom);
- floatFrame.show();
+ floatFrame.pack();
+ floatFrame.setSize(dims.width + insets.left + insets.right,
+ dims.height + insets.top + insets.bottom);
+ floatFrame.show();
}
newParent.invalidate();
@@ -776,14 +776,14 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
for (int i = 0; i < c.length; i++)
{
- if (c[i] instanceof JButton)
- {
- // Don't really care about anything other than JButtons
- JButton b = (JButton) c[i];
-
- if (b.getBorder() != null)
- borders.put(b, b.getBorder());
- }
+ if (c[i] instanceof JButton)
+ {
+ // Don't really care about anything other than JButtons
+ JButton b = (JButton) c[i];
+
+ if (b.getBorder() != null)
+ borders.put(b, b.getBorder());
+ }
}
}
@@ -798,11 +798,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (c instanceof JToolBar)
{
- toolBar = (JToolBar) c;
+ toolBar = (JToolBar) c;
installDefaults();
installComponents();
- installListeners();
- installKeyboardActions();
+ installListeners();
+ installKeyboardActions();
}
}
@@ -894,14 +894,14 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof AbstractButton)
{
- AbstractButton b = (AbstractButton) c;
- b.setRolloverEnabled(false);
+ AbstractButton b = (AbstractButton) c;
+ b.setRolloverEnabled(false);
// Save old border in hashtable.
- if (b.getBorder() != null)
+ if (b.getBorder() != null)
borders.put(b, b.getBorder());
-
- b.setBorder(nonRolloverBorder);
+
+ b.setBorder(nonRolloverBorder);
}
}
@@ -931,11 +931,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
AbstractButton b = (AbstractButton) c;
b.setRolloverEnabled(false);
-
+
// Save old border in hashtable.
if (b.getBorder() != null)
- borders.put(b, b.getBorder());
-
+ borders.put(b, b.getBorder());
+
b.setBorder(rolloverBorder);
}
}
@@ -1139,7 +1139,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mouseDragged(MouseEvent e)
{
if (isDragging)
- dragTo(e.getPoint(), origin);
+ dragTo(e.getPoint(), origin);
}
/**
@@ -1182,7 +1182,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mousePressed(MouseEvent e)
{
if (! toolBar.isFloatable())
- return;
+ return;
Point ssd = e.getPoint();
Insets insets = toolBar.getInsets();
@@ -1190,13 +1190,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
// Verify that this click occurs in the top inset.
if (toolBar.getOrientation() == SwingConstants.HORIZONTAL)
{
- if (e.getX() > insets.left)
- return;
+ if (e.getX() > insets.left)
+ return;
}
else
{
- if (e.getY() > insets.top)
- return;
+ if (e.getY() > insets.top)
+ return;
}
origin = new Point(0, 0);
@@ -1204,16 +1204,16 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
SwingUtilities.convertPointToScreen(ssd, toolBar);
if (! (SwingUtilities.getAncestorOfClass(Window.class, toolBar) instanceof UIResource))
- // Need to know who keeps the toolBar if it gets dragged back into it.
- origParent = toolBar.getParent();
-
+ // Need to know who keeps the toolBar if it gets dragged back into it.
+ origParent = toolBar.getParent();
+
if (toolBar.isShowing())
SwingUtilities.convertPointToScreen(origin, toolBar);
isDragging = true;
if (dragWindow != null)
- dragWindow.setOffset(new Point(cachedBounds.width / 2,
+ dragWindow.setOffset(new Point(cachedBounds.width / 2,
cachedBounds.height / 2));
dragTo(e.getPoint(), origin);
@@ -1227,7 +1227,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mouseReleased(MouseEvent e)
{
if (! isDragging || ! toolBar.isFloatable())
- return;
+ return;
isDragging = false;
floatAt(e.getPoint(), origin);
@@ -1267,7 +1267,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public Color getBorderColor()
{
if (borderColor == null)
- return Color.BLACK;
+ return Color.BLACK;
return borderColor;
}
@@ -1341,7 +1341,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void setOrientation(int o)
{
toolBar.setOrientation(o);
- if (dragWindow != null)
+ if (dragWindow != null)
dragWindow.setOrientation(o);
}
}
@@ -1364,10 +1364,10 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (origParent != null)
{
- origParent.add(toolBar,
- (constraintBeforeFloating != null)
- ? constraintBeforeFloating : BorderLayout.NORTH);
- toolBar.setOrientation(lastGoodOrientation);
+ origParent.add(toolBar,
+ (constraintBeforeFloating != null)
+ ? constraintBeforeFloating : BorderLayout.NORTH);
+ toolBar.setOrientation(lastGoodOrientation);
}
origParent.invalidate();
@@ -1410,16 +1410,16 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (e.getChild() instanceof JButton)
{
- JButton b = (JButton) e.getChild();
+ JButton b = (JButton) e.getChild();
- if (b.getBorder() != null)
- borders.put(b, b.getBorder());
+ if (b.getBorder() != null)
+ borders.put(b, b.getBorder());
}
if (isRolloverBorders())
- setBorderToRollover(e.getChild());
+ setBorderToRollover(e.getChild());
else
- setBorderToNonRollover(e.getChild());
+ setBorderToNonRollover(e.getChild());
cachedBounds = toolBar.getPreferredSize();
cachedOrientation = toolBar.getOrientation();
@@ -1479,7 +1479,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
/**
* Receives notification when the toolbar or one of it's component
* receives the keyboard input focus.
- *
+ *
* @param e the focus event
*/
public void focusGained(FocusEvent e)
@@ -1491,7 +1491,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
/**
* Receives notification when the toolbar or one of it's component
* looses the keyboard input focus.
- *
+ *
* @param e the focus event
*/
public void focusLost(FocusEvent e)
@@ -1522,15 +1522,15 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof JToolBar)
{
- JToolBar tb = (JToolBar) c;
- int orientation = tb.getOrientation();
-
- if (! tb.isFloatable())
- return new Insets(regular, regular, regular, regular);
- else if (orientation == SwingConstants.HORIZONTAL)
- return new Insets(regular, offset, regular, regular);
- else
- return new Insets(offset, regular, regular, regular);
+ JToolBar tb = (JToolBar) c;
+ int orientation = tb.getOrientation();
+
+ if (! tb.isFloatable())
+ return new Insets(regular, regular, regular, regular);
+ else if (orientation == SwingConstants.HORIZONTAL)
+ return new Insets(regular, offset, regular, regular);
+ else
+ return new Insets(offset, regular, regular, regular);
}
return new Insets(0, 0, 0, 0);
@@ -1568,9 +1568,9 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
int count = 0;
for (int i = x; i < (w + x); i += hgap)
- for (int j = ((count++ % 2) == 0) ? y : (y + (2 * size)); j < (h + y);
- j += vgap)
- g.fillRect(i, j, size, size);
+ for (int j = ((count++ % 2) == 0) ? y : (y + (2 * size)); j < (h + y);
+ j += vgap)
+ g.fillRect(i, j, size, size);
g.setColor(saved);
}
@@ -1590,20 +1590,20 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof JToolBar)
{
- JToolBar tb = (JToolBar) c;
-
- int orientation = tb.getOrientation();
-
- if (orientation == SwingConstants.HORIZONTAL)
- {
- paintBumps(g, x, y, offset, height, 1, Color.WHITE);
- paintBumps(g, x + 1, y + 1, offset - 1, height - 1, 1, Color.GRAY);
- }
- else
- {
- paintBumps(g, x, y, width, offset, 1, Color.WHITE);
- paintBumps(g, x + 1, y + 1, width - 1, offset - 1, 1, Color.GRAY);
- }
+ JToolBar tb = (JToolBar) c;
+
+ int orientation = tb.getOrientation();
+
+ if (orientation == SwingConstants.HORIZONTAL)
+ {
+ paintBumps(g, x, y, offset, height, 1, Color.WHITE);
+ paintBumps(g, x + 1, y + 1, offset - 1, height - 1, 1, Color.GRAY);
+ }
+ else
+ {
+ paintBumps(g, x, y, width, offset, 1, Color.WHITE);
+ paintBumps(g, x + 1, y + 1, width - 1, offset - 1, 1, Color.GRAY);
+ }
}
}
}
diff --git a/javax/swing/plaf/basic/BasicToolTipUI.java b/javax/swing/plaf/basic/BasicToolTipUI.java
index 94e7bc322..37c084bb8 100644
--- a/javax/swing/plaf/basic/BasicToolTipUI.java
+++ b/javax/swing/plaf/basic/BasicToolTipUI.java
@@ -80,7 +80,7 @@ public class BasicToolTipUI extends ToolTipUI
BasicHTML.updateRenderer(tip, text);
}
}
-
+
}
/** The shared instance of BasicToolTipUI used for all ToolTips. */
@@ -103,7 +103,7 @@ public class BasicToolTipUI extends ToolTipUI
}
/**
- * This method creates a new BasicToolTip UI for the given
+ * This method creates a new BasicToolTip UI for the given
* JComponent.
*
* @param c The JComponent to create a UI for.
@@ -245,10 +245,10 @@ public class BasicToolTipUI extends ToolTipUI
if (view != null)
view.paint(g, paintR);
else
- g.drawString(text, paintR.x + 3, paintR.y + ascent);
+ g.drawString(text, paintR.x + 3, paintR.y + ascent);
g.setFont(oldFont);
- g.setColor(saved);
+ g.setColor(saved);
}
/**
diff --git a/javax/swing/plaf/basic/BasicTreeUI.java b/javax/swing/plaf/basic/BasicTreeUI.java
index 1c28a5f96..af61a422a 100644
--- a/javax/swing/plaf/basic/BasicTreeUI.java
+++ b/javax/swing/plaf/basic/BasicTreeUI.java
@@ -109,7 +109,7 @@ import javax.swing.tree.VariableHeightLayoutCache;
/**
* A delegate providing the user interface for <code>JTree</code> according to
* the Basic look and feel.
- *
+ *
* @see javax.swing.JTree
* @author Lillian Angel (langel@redhat.com)
* @author Sascha Brawer (brawer@dandelis.ch)
@@ -174,7 +174,7 @@ public class BasicTreeUI
* Set to false when editing and shouldSelectCall() returns true meaning the
* node should be selected before editing, used in completeEditing.
* GNU Classpath editing is implemented differently, so this value is not
- * actually read anywhere. However it is always set correctly to maintain
+ * actually read anywhere. However it is always set correctly to maintain
* interoperability with the derived classes that read this field.
*/
protected boolean stopEditingInCompleteEditing;
@@ -248,7 +248,7 @@ public class BasicTreeUI
/** The max height of the nodes in the tree. */
int maxHeight;
-
+
/** The hash color. */
Color hashColor;
@@ -294,7 +294,7 @@ public class BasicTreeUI
/**
* Returns an instance of the UI delegate for the specified component.
- *
+ *
* @param c the <code>JComponent</code> for which we need a UI delegate for.
* @return the <code>ComponentUI</code> for c.
*/
@@ -305,7 +305,7 @@ public class BasicTreeUI
/**
* Returns the Hash color.
- *
+ *
* @return the <code>Color</code> of the Hash.
*/
protected Color getHashColor()
@@ -315,7 +315,7 @@ public class BasicTreeUI
/**
* Sets the Hash color.
- *
+ *
* @param color the <code>Color</code> to set the Hash to.
*/
protected void setHashColor(Color color)
@@ -325,7 +325,7 @@ public class BasicTreeUI
/**
* Sets the left child's indent value.
- *
+ *
* @param newAmount is the new indent value for the left child.
*/
public void setLeftChildIndent(int newAmount)
@@ -335,7 +335,7 @@ public class BasicTreeUI
/**
* Returns the indent value for the left child.
- *
+ *
* @return the indent value for the left child.
*/
public int getLeftChildIndent()
@@ -345,7 +345,7 @@ public class BasicTreeUI
/**
* Sets the right child's indent value.
- *
+ *
* @param newAmount is the new indent value for the right child.
*/
public void setRightChildIndent(int newAmount)
@@ -355,7 +355,7 @@ public class BasicTreeUI
/**
* Returns the indent value for the right child.
- *
+ *
* @return the indent value for the right child.
*/
public int getRightChildIndent()
@@ -365,7 +365,7 @@ public class BasicTreeUI
/**
* Sets the expanded icon.
- *
+ *
* @param newG is the new expanded icon.
*/
public void setExpandedIcon(Icon newG)
@@ -375,7 +375,7 @@ public class BasicTreeUI
/**
* Returns the current expanded icon.
- *
+ *
* @return the current expanded icon.
*/
public Icon getExpandedIcon()
@@ -385,7 +385,7 @@ public class BasicTreeUI
/**
* Sets the collapsed icon.
- *
+ *
* @param newG is the new collapsed icon.
*/
public void setCollapsedIcon(Icon newG)
@@ -395,7 +395,7 @@ public class BasicTreeUI
/**
* Returns the current collapsed icon.
- *
+ *
* @return the current collapsed icon.
*/
public Icon getCollapsedIcon()
@@ -405,7 +405,7 @@ public class BasicTreeUI
/**
* Updates the componentListener, if necessary.
- *
+ *
* @param largeModel sets this.largeModel to it.
*/
protected void setLargeModel(boolean largeModel)
@@ -421,7 +421,7 @@ public class BasicTreeUI
/**
* Returns true if largeModel is set
- *
+ *
* @return true if largeModel is set, otherwise false.
*/
protected boolean isLargeModel()
@@ -431,7 +431,7 @@ public class BasicTreeUI
/**
* Sets the row height.
- *
+ *
* @param rowHeight is the height to set this.rowHeight to.
*/
protected void setRowHeight(int rowHeight)
@@ -444,7 +444,7 @@ public class BasicTreeUI
/**
* Returns the current row height.
- *
+ *
* @return current row height.
*/
protected int getRowHeight()
@@ -455,7 +455,7 @@ public class BasicTreeUI
/**
* Sets the TreeCellRenderer to <code>tcr</code>. This invokes
* <code>updateRenderer</code>.
- *
+ *
* @param tcr is the new TreeCellRenderer.
*/
protected void setCellRenderer(TreeCellRenderer tcr)
@@ -469,15 +469,15 @@ public class BasicTreeUI
// Refresh the layout if necessary.
if (treeState != null)
{
- treeState.invalidateSizes();
- updateSize();
+ treeState.invalidateSizes();
+ updateSize();
}
}
/**
* Return currentCellRenderer, which will either be the trees renderer, or
* defaultCellRenderer, which ever was not null.
- *
+ *
* @return the current Cell Renderer
*/
protected TreeCellRenderer getCellRenderer()
@@ -490,7 +490,7 @@ public class BasicTreeUI
/**
* Sets the tree's model.
- *
+ *
* @param model to set the treeModel to.
*/
protected void setModel(TreeModel model)
@@ -515,7 +515,7 @@ public class BasicTreeUI
/**
* Returns the tree's model
- *
+ *
* @return treeModel
*/
protected TreeModel getModel()
@@ -525,7 +525,7 @@ public class BasicTreeUI
/**
* Sets the root to being visible.
- *
+ *
* @param newValue sets the visibility of the root
*/
protected void setRootVisible(boolean newValue)
@@ -536,7 +536,7 @@ public class BasicTreeUI
/**
* Returns true if the root is visible.
- *
+ *
* @return true if the root is visible.
*/
protected boolean isRootVisible()
@@ -546,7 +546,7 @@ public class BasicTreeUI
/**
* Determines whether the node handles are to be displayed.
- *
+ *
* @param newValue sets whether or not node handles should be displayed.
*/
protected void setShowsRootHandles(boolean newValue)
@@ -562,7 +562,7 @@ public class BasicTreeUI
/**
* Returns true if the node handles are to be displayed.
- *
+ *
* @return true if the node handles are to be displayed.
*/
protected boolean getShowsRootHandles()
@@ -572,7 +572,7 @@ public class BasicTreeUI
/**
* Sets the cell editor.
- *
+ *
* @param editor to set the cellEditor to.
*/
protected void setCellEditor(TreeCellEditor editor)
@@ -582,7 +582,7 @@ public class BasicTreeUI
/**
* Returns the <code>TreeCellEditor</code> for this tree.
- *
+ *
* @return the cellEditor for this tree.
*/
protected TreeCellEditor getCellEditor()
@@ -592,7 +592,7 @@ public class BasicTreeUI
/**
* Configures the receiver to allow, or not allow, editing.
- *
+ *
* @param newValue sets the receiver to allow editing if true.
*/
protected void setEditable(boolean newValue)
@@ -602,7 +602,7 @@ public class BasicTreeUI
/**
* Returns true if the receiver allows editing.
- *
+ *
* @return true if the receiver allows editing.
*/
protected boolean isEditable()
@@ -613,7 +613,7 @@ public class BasicTreeUI
/**
* Resets the selection model. The appropriate listeners are installed on the
* model.
- *
+ *
* @param newLSM resets the selection model.
*/
protected void setSelectionModel(TreeSelectionModel newLSM)
@@ -628,7 +628,7 @@ public class BasicTreeUI
/**
* Returns the current selection model.
- *
+ *
* @return the current selection model.
*/
protected TreeSelectionModel getSelectionModel()
@@ -640,7 +640,7 @@ public class BasicTreeUI
* Returns the Rectangle enclosing the label portion that the last item in
* path will be drawn to. Will return null if any component in path is
* currently valid.
- *
+ *
* @param tree is the current tree the path will be drawn to.
* @param path is the current path the tree to draw to.
* @return the Rectangle enclosing the label portion that the last item in the
@@ -664,7 +664,7 @@ public class BasicTreeUI
/**
* Returns the max height of all the nodes in the tree.
- *
+ *
* @param tree - the current tree
* @return the max height.
*/
@@ -690,11 +690,11 @@ public class BasicTreeUI
maxHeight = Math.max(maxHeight, iconHeight + gap);
}
-
+
treeState.setRowHeight(maxHeight);
return maxHeight;
}
-
+
/**
* Get the tree node icon.
*/
@@ -711,7 +711,7 @@ public class BasicTreeUI
/**
* Returns the path for passed in row. If row is not visible null is returned.
- *
+ *
* @param tree is the current tree to return path for.
* @param row is the row number of the row to return.
* @return the path for passed in row. If row is not visible null is returned.
@@ -724,7 +724,7 @@ public class BasicTreeUI
/**
* Returns the row that the last item identified in path is visible at. Will
* return -1 if any of the elments in the path are not currently visible.
- *
+ *
* @param tree is the current tree to return the row for.
* @param path is the path used to find the row.
* @return the row that the last item identified in path is visible at. Will
@@ -738,7 +738,7 @@ public class BasicTreeUI
/**
* Returns the number of rows that are being displayed.
- *
+ *
* @param tree is the current tree to return the number of rows for.
* @return the number of rows being displayed.
*/
@@ -752,7 +752,7 @@ public class BasicTreeUI
* currently visible this will return null, otherwise it'll always return a
* valid path. If you need to test if the returned object is exactly at x,y
* you should get the bounds for the returned path and test x,y against that.
- *
+ *
* @param tree the tree to search for the closest path
* @param x is the x coordinate of the location to search
* @param y is the y coordinate of the location to search
@@ -766,7 +766,7 @@ public class BasicTreeUI
/**
* Returns true if the tree is being edited. The item that is being edited can
* be returned by getEditingPath().
- *
+ *
* @param tree is the tree to check for editing.
* @return true if the tree is being edited.
*/
@@ -779,7 +779,7 @@ public class BasicTreeUI
* Stops the current editing session. This has no effect if the tree is not
* being edited. Returns true if the editor allows the editing session to
* stop.
- *
+ *
* @param tree is the tree to stop the editing on
* @return true if the editor allows the editing session to stop.
*/
@@ -796,7 +796,7 @@ public class BasicTreeUI
/**
* Cancels the current editing session.
- *
+ *
* @param tree is the tree to cancel the editing session on.
*/
public void cancelEditing(JTree tree)
@@ -811,7 +811,7 @@ public class BasicTreeUI
/**
* Selects the last item in path and tries to edit it. Editing will fail if
* the CellEditor won't allow it for the selected item.
- *
+ *
* @param tree is the tree to edit on.
* @param path is the path in tree to edit on.
*/
@@ -824,7 +824,7 @@ public class BasicTreeUI
/**
* Returns the path to the element that is being editted.
- *
+ *
* @param tree is the tree to get the editing path from.
* @return the path that is being edited.
*/
@@ -858,7 +858,7 @@ public class BasicTreeUI
updateDepthOffset();
setSelectionModel(tree.getSelectionModel());
configureLayoutCache();
- treeState.setRootVisible(tree.isRootVisible());
+ treeState.setRootVisible(tree.isRootVisible());
treeSelectionModel.setRowMapper(treeState);
updateSize();
}
@@ -887,7 +887,7 @@ public class BasicTreeUI
* Creates an instance of NodeDimensions that is able to determine the size of
* a given node in the tree. The node dimensions must be created before
* configuring the layout cache.
- *
+ *
* @return the NodeDimensions of a given node in the tree
*/
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
@@ -898,7 +898,7 @@ public class BasicTreeUI
/**
* Creates a listener that is reponsible for the updates the UI based on how
* the tree changes.
- *
+ *
* @return the PropertyChangeListener that is reposnsible for the updates
*/
protected PropertyChangeListener createPropertyChangeListener()
@@ -909,7 +909,7 @@ public class BasicTreeUI
/**
* Creates the listener responsible for updating the selection based on mouse
* events.
- *
+ *
* @return the MouseListener responsible for updating.
*/
protected MouseListener createMouseListener()
@@ -920,7 +920,7 @@ public class BasicTreeUI
/**
* Creates the listener that is responsible for updating the display when
* focus is lost/grained.
- *
+ *
* @return the FocusListener responsible for updating.
*/
protected FocusListener createFocusListener()
@@ -930,7 +930,7 @@ public class BasicTreeUI
/**
* Creates the listener reponsible for getting key events from the tree.
- *
+ *
* @return the KeyListener responsible for getting key events.
*/
protected KeyListener createKeyListener()
@@ -941,7 +941,7 @@ public class BasicTreeUI
/**
* Creates the listener responsible for getting property change events from
* the selection model.
- *
+ *
* @returns the PropertyChangeListener reponsible for getting property change
* events from the selection model.
*/
@@ -953,7 +953,7 @@ public class BasicTreeUI
/**
* Creates the listener that updates the display based on selection change
* methods.
- *
+ *
* @return the TreeSelectionListener responsible for updating.
*/
protected TreeSelectionListener createTreeSelectionListener()
@@ -963,7 +963,7 @@ public class BasicTreeUI
/**
* Creates a listener to handle events from the current editor
- *
+ *
* @return the CellEditorListener that handles events from the current editor
*/
protected CellEditorListener createCellEditorListener()
@@ -975,7 +975,7 @@ public class BasicTreeUI
* Creates and returns a new ComponentHandler. This is used for the large
* model to mark the validCachedPreferredSize as invalid when the component
* moves.
- *
+ *
* @return a new ComponentHandler.
*/
protected ComponentListener createComponentListener()
@@ -986,7 +986,7 @@ public class BasicTreeUI
/**
* Creates and returns the object responsible for updating the treestate when
* a nodes expanded state changes.
- *
+ *
* @return the TreeExpansionListener responsible for updating the treestate
*/
protected TreeExpansionListener createTreeExpansionListener()
@@ -997,7 +997,7 @@ public class BasicTreeUI
/**
* Creates the object responsible for managing what is expanded, as well as
* the size of nodes.
- *
+ *
* @return the object responsible for managing what is expanded.
*/
protected AbstractLayoutCache createLayoutCache()
@@ -1007,7 +1007,7 @@ public class BasicTreeUI
/**
* Returns the renderer pane that renderer components are placed in.
- *
+ *
* @return the rendererpane that render components are placed in.
*/
protected CellRendererPane createCellRendererPane()
@@ -1017,7 +1017,7 @@ public class BasicTreeUI
/**
* Creates a default cell editor.
- *
+ *
* @return the default cell editor.
*/
protected TreeCellEditor createDefaultCellEditor()
@@ -1035,7 +1035,7 @@ public class BasicTreeUI
/**
* Returns the default cell renderer that is used to do the stamping of each
* node.
- *
+ *
* @return the default cell renderer that is used to do the stamping of each
* node.
*/
@@ -1046,7 +1046,7 @@ public class BasicTreeUI
/**
* Returns a listener that can update the tree when the model changes.
- *
+ *
* @return a listener that can update the tree when the model changes.
*/
protected TreeModelListener createTreeModelListener()
@@ -1099,7 +1099,7 @@ public class BasicTreeUI
/**
* The vertical element of legs between nodes starts at the bottom of the
* parent node by default. This method makes the leg start below that.
- *
+ *
* @return the vertical leg buffer
*/
protected int getVerticalLegBuffer()
@@ -1111,7 +1111,7 @@ public class BasicTreeUI
* The horizontal element of legs between nodes starts at the right of the
* left-hand side of the child node by default. This method makes the leg end
* before that.
- *
+ *
* @return the horizontal leg buffer
*/
protected int getHorizontalLegBuffer()
@@ -1133,7 +1133,7 @@ public class BasicTreeUI
* Updates the expanded state of all the descendants of the <code>path</code>
* by getting the expanded descendants from the tree and forwarding to the
* tree state.
- *
+ *
* @param path the path used to update the expanded states
*/
protected void updateExpandedDescendants(TreePath path)
@@ -1146,7 +1146,7 @@ public class BasicTreeUI
/**
* Returns a path to the last child of <code>parent</code>
- *
+ *
* @param parent is the topmost path to specified
* @return a path to the last child of parent
*/
@@ -1206,24 +1206,24 @@ public class BasicTreeUI
{
if (tree != null)
{
- TreeCellRenderer rend = tree.getCellRenderer();
- if (rend != null)
- {
- createdRenderer = false;
- currentCellRenderer = rend;
- if (createdCellEditor)
- tree.setCellEditor(null);
- }
- else
- {
- tree.setCellRenderer(createDefaultCellRenderer());
- createdRenderer = true;
- }
+ TreeCellRenderer rend = tree.getCellRenderer();
+ if (rend != null)
+ {
+ createdRenderer = false;
+ currentCellRenderer = rend;
+ if (createdCellEditor)
+ tree.setCellEditor(null);
+ }
+ else
+ {
+ tree.setCellRenderer(createDefaultCellRenderer());
+ createdRenderer = true;
+ }
}
else
{
- currentCellRenderer = null;
- createdRenderer = false;
+ currentCellRenderer = null;
+ createdRenderer = false;
}
updateCellEditor();
@@ -1262,7 +1262,7 @@ public class BasicTreeUI
/**
* Messaged from the VisibleTreeNode after it has been expanded.
- *
+ *
* @param path is the path that has been expanded.
*/
protected void pathWasExpanded(TreePath path)
@@ -1289,11 +1289,11 @@ public class BasicTreeUI
{
LookAndFeel.installColorsAndFont(tree, "Tree.background",
"Tree.foreground", "Tree.font");
-
+
hashColor = UIManager.getColor("Tree.hash");
if (hashColor == null)
hashColor = Color.black;
-
+
tree.setOpaque(true);
rightChildIndent = UIManager.getInt("Tree.rightChildIndent");
@@ -1383,7 +1383,7 @@ public class BasicTreeUI
am.put(action.getValue(Action.NAME), action);
action = new TreeTraverseAction(1, "selectChild");
am.put(action.getValue(Action.NAME), action);
-
+
// TreeToggleAction.
action = new TreeToggleAction("toggleAndAnchor");
am.put(action.getValue(Action.NAME), action);
@@ -1401,20 +1401,20 @@ public class BasicTreeUI
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeLead");
am.put(action.getValue(Action.NAME), action);
-
+
// Tree editing actions
action = new TreeStartEditingAction("startEditing");
am.put(action.getValue(Action.NAME), action);
action = new TreeCancelEditingAction("cancel");
am.put(action.getValue(Action.NAME), action);
-
+
return am;
}
/**
* Converts the modifiers.
- *
+ *
* @param mod - modifier to convert
* @returns the new modifier
*/
@@ -1492,7 +1492,7 @@ public class BasicTreeUI
/**
* Install the UI for the component
- *
+ *
* @param c the component to install UI for
*/
public void installUI(JComponent c)
@@ -1506,7 +1506,7 @@ public class BasicTreeUI
installListeners();
completeUIInstall();
}
-
+
/**
* Uninstall the defaults for the tree
*/
@@ -1519,7 +1519,7 @@ public class BasicTreeUI
/**
* Uninstall the UI for the component
- *
+ *
* @param c the component to uninstall UI for
*/
public void uninstallUI(JComponent c)
@@ -1539,7 +1539,7 @@ public class BasicTreeUI
* method is invoked from the ComponentUI.update method when the specified
* component is being painted. Subclasses should override this method and use
* the specified Graphics object to render the content of the component.
- *
+ *
* @param g the Graphics context in which to paint
* @param c the component being painted; this argument is often ignored, but
* might be used if the UI object is stateless and shared by multiple
@@ -1548,9 +1548,9 @@ public class BasicTreeUI
public void paint(Graphics g, JComponent c)
{
JTree tree = (JTree) c;
-
+
int rows = treeState.getRowCount();
-
+
if (rows == 0)
// There is nothing to do if the tree is empty.
return;
@@ -1639,7 +1639,7 @@ public class BasicTreeUI
/**
* Ensures that the rows identified by beginRow through endRow are visible.
- *
+ *
* @param beginRow is the first row
* @param endRow is the last row
*/
@@ -1662,7 +1662,7 @@ public class BasicTreeUI
/**
* Sets the preferred minimum size.
- *
+ *
* @param newSize is the new preferred minimum size.
*/
public void setPreferredMinSize(Dimension newSize)
@@ -1672,7 +1672,7 @@ public class BasicTreeUI
/**
* Gets the preferred minimum size.
- *
+ *
* @returns the preferred minimum size.
*/
public Dimension getPreferredMinSize()
@@ -1686,7 +1686,7 @@ public class BasicTreeUI
/**
* Returns the preferred size to properly display the tree, this is a cover
* method for getPreferredSize(c, false).
- *
+ *
* @param c the component whose preferred size is being queried; this argument
* is often ignored but might be used if the UI object is stateless
* and shared by multiple components
@@ -1700,7 +1700,7 @@ public class BasicTreeUI
/**
* Returns the preferred size to represent the tree in c. If checkConsistancy
* is true, checkConsistancy is messaged first.
- *
+ *
* @param c the component whose preferred size is being queried.
* @param checkConsistancy if true must check consistancy
* @return the preferred size
@@ -1721,7 +1721,7 @@ public class BasicTreeUI
/**
* Returns the minimum size for this component. Which will be the min
* preferred size or (0,0).
- *
+ *
* @param c the component whose min size is being queried.
* @returns the preferred size or null
*/
@@ -1733,7 +1733,7 @@ public class BasicTreeUI
/**
* Returns the maximum size for the component, which will be the preferred
* size if the instance is currently in JTree or (0,0).
- *
+ *
* @param c the component whose preferred size is being queried
* @return the max size or null
*/
@@ -1763,7 +1763,7 @@ public class BasicTreeUI
* with stopEditing, if messageCancel is true the editor is messaged with
* cancelEditing. If messageTree is true, the treeModel is messaged with
* valueForPathChanged.
- *
+ *
* @param messageStop message to stop editing
* @param messageCancel message to cancel editing
* @param messageTree message to treeModel
@@ -1808,7 +1808,7 @@ public class BasicTreeUI
/**
* Will start editing for node if there is a cellEditor and shouldSelectCall
* returns true. This assumes that path is valid and visible.
- *
+ *
* @param path is the path to start editing
* @param event is the MouseEvent performed on the path
* @return true if successful
@@ -1826,7 +1826,7 @@ public class BasicTreeUI
{
if (ed.isCellEditable(event))
{
- editingRow = getRowForPath(tree, path);
+ editingRow = getRowForPath(tree, path);
Object value = path.getLastPathComponent();
boolean isSelected = tree.isPathSelected(path);
boolean isExpanded = tree.isExpanded(editingPath);
@@ -1852,7 +1852,7 @@ public class BasicTreeUI
}
else
editorHasDifferentSize = false;
-
+
// The editing component must be added to its container. We add the
// container, not the editing component itself.
tree.add(editingComponent);
@@ -1880,7 +1880,7 @@ public class BasicTreeUI
if (active != null)
{
MouseInputHandler ih = new MouseInputHandler(tree, active, event);
-
+
}
}
@@ -1910,13 +1910,13 @@ public class BasicTreeUI
}
else if (c.isFocusable())
c.requestFocus();
-
+
}
/**
* If the <code>mouseX</code> and <code>mouseY</code> are in the expand or
* collapse region of the row, this will toggle the row.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1932,7 +1932,7 @@ public class BasicTreeUI
* Returns true if the <code>mouseX</code> and <code>mouseY</code> fall in
* the area of row that is used to expand/collpse the node and the node at row
* does not represent a leaf.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1956,13 +1956,13 @@ public class BasicTreeUI
width = 18;
Insets i = tree.getInsets();
-
+
int depth;
if (isRootVisible())
depth = path.getPathCount()-1;
else
depth = path.getPathCount()-2;
-
+
int left = getRowX(tree.getRowForPath(path), depth)
- width + i.left;
cntlClick = mouseX >= left && mouseX <= left + width;
@@ -1973,7 +1973,7 @@ public class BasicTreeUI
/**
* Messaged when the user clicks the particular row, this invokes
* toggleExpandState.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1988,7 +1988,7 @@ public class BasicTreeUI
* expanding a path and JTree scroll on expand, ensureRowsAreVisible is
* invoked to scroll as many of the children to visible as possible (tries to
* scroll to last visible descendant of path).
- *
+ *
* @param path the path we are concerned with
*/
protected void toggleExpandState(TreePath path)
@@ -2006,17 +2006,17 @@ public class BasicTreeUI
* event as "toggle selection event" if the CTRL button was pressed while
* clicking. The event is not counted as toggle event if the associated
* tree does not support the multiple selection.
- *
+ *
* @param event is the MouseEvent performed on the row.
* @return true signifies a mouse event on the node should toggle the
* selection of only the row under the mouse.
*/
protected boolean isToggleSelectionEvent(MouseEvent event)
{
- return
- (tree.getSelectionModel().getSelectionMode() !=
+ return
+ (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION) &&
- ((event.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0);
+ ((event.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0);
}
/**
@@ -2025,24 +2025,24 @@ public class BasicTreeUI
* event" if the SHIFT button was pressed while clicking. The event is not
* counted as multiple selection event if the associated tree does not support
* the multiple selection.
- *
+ *
* @param event is the MouseEvent performed on the node.
* @return true signifies a mouse event on the node should select from the
* anchor point.
*/
protected boolean isMultiSelectEvent(MouseEvent event)
{
- return
- (tree.getSelectionModel().getSelectionMode() !=
+ return
+ (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION) &&
- ((event.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0);
+ ((event.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0);
}
/**
* Returning true indicates the row under the mouse should be toggled based on
* the event. This is invoked after checkForClickInExpandControl, implying the
* location is not in the expand (toggle) control.
- *
+ *
* @param event is the MouseEvent performed on the row.
* @return true indicates the row under the mouse should be toggled based on
* the event.
@@ -2065,10 +2065,10 @@ public class BasicTreeUI
* or deselected. If the event identifies a multi selection event, the
* selection is updated from the anchor point. Otherwise, the row is selected,
* and the previous selection is cleared.</p>
- *
+ *
* @param path is the path selected for an event
* @param event is the MouseEvent performed on the path.
- *
+ *
* @see #isToggleSelectionEvent(MouseEvent)
* @see #isMultiSelectEvent(MouseEvent)
*/
@@ -2108,7 +2108,7 @@ public class BasicTreeUI
/**
* Returns true if the node at <code>row</code> is a leaf.
- *
+ *
* @param row is the row we are concerned with.
* @return true if the node at <code>row</code> is a leaf.
*/
@@ -2121,7 +2121,7 @@ public class BasicTreeUI
Object node = pathForRow.getLastPathComponent();
return treeModel.isLeaf(node);
}
-
+
/**
* The action to start editing at the current lead selection path.
*/
@@ -2130,26 +2130,26 @@ public class BasicTreeUI
{
/**
* Creates the new tree cancel editing action.
- *
+ *
* @param name the name of the action (used in toString).
*/
public TreeStartEditingAction(String name)
{
super(name);
- }
-
+ }
+
/**
* Start editing at the current lead selection path.
- *
+ *
* @param e the ActionEvent that caused this action.
*/
public void actionPerformed(ActionEvent e)
{
TreePath lead = tree.getLeadSelectionPath();
- if (!tree.isEditing())
+ if (!tree.isEditing())
tree.startEditingAtPath(lead);
}
- }
+ }
/**
* Updates the preferred size when scrolling, if necessary.
@@ -2176,7 +2176,7 @@ public class BasicTreeUI
/**
* Invoked when the component's position changes.
- *
+ *
* @param e the event that occurs when moving the component
*/
public void componentMoved(ComponentEvent e)
@@ -2225,7 +2225,7 @@ public class BasicTreeUI
/**
* Returns the JScrollPane housing the JTree, or null if one isn't found.
- *
+ *
* @return JScrollPane housing the JTree, or null if one isn't found.
*/
protected JScrollPane getScrollPane()
@@ -2242,7 +2242,7 @@ public class BasicTreeUI
/**
* Public as a result of Timer. If the scrollBar is null, or not adjusting,
* this stops the timer and updates the sizing.
- *
+ *
* @param ae is the action performed
*/
public void actionPerformed(ActionEvent ae)
@@ -2276,7 +2276,7 @@ public class BasicTreeUI
/**
* Messaged when editing has stopped in the tree. Tells the listeners
* editing has stopped.
- *
+ *
* @param e is the notification event
*/
public void editingStopped(ChangeEvent e)
@@ -2287,7 +2287,7 @@ public class BasicTreeUI
/**
* Messaged when editing has been canceled in the tree. This tells the
* listeners the editor has canceled editing.
- *
+ *
* @param e is the notification event
*/
public void editingCanceled(ChangeEvent e)
@@ -2315,7 +2315,7 @@ public class BasicTreeUI
* row. Invoked when a component gains the keyboard focus. The method
* repaints the lead row that is shown differently when the tree is in
* focus.
- *
+ *
* @param e is the focus event that is activated
*/
public void focusGained(FocusEvent e)
@@ -2328,7 +2328,7 @@ public class BasicTreeUI
* row. Invoked when a component loses the keyboard focus. The method
* repaints the lead row that is shown differently when the tree is in
* focus.
- *
+ *
* @param e is the focus event that is deactivated
*/
public void focusLost(FocusEvent e)
@@ -2373,7 +2373,7 @@ public class BasicTreeUI
* element whose first letter matches the alphanumeric key pressed by the
* user. Subsequent same key presses move the keyboard focus to the next
* object that starts with the same letter.
- *
+ *
* @param e the key typed
*/
public void keyTyped(KeyEvent e)
@@ -2389,22 +2389,22 @@ public class BasicTreeUI
return;
}
}
-
+
// Not found below, search above:
for (int row = 0; row < tree.getLeadSelectionRow(); row++)
{
if (checkMatch(row, typed))
{
tree.setSelectionRow(row);
- tree.scrollRowToVisible(row);
+ tree.scrollRowToVisible(row);
return;
}
}
}
-
+
/**
* Check if the given tree row starts with this character
- *
+ *
* @param row the tree row
* @param typed the typed char, must be converted to lowercase
* @return true if the given tree row starts with this character
@@ -2424,7 +2424,7 @@ public class BasicTreeUI
/**
* Invoked when a key has been pressed.
- *
+ *
* @param e the key pressed
*/
public void keyPressed(KeyEvent e)
@@ -2434,7 +2434,7 @@ public class BasicTreeUI
/**
* Invoked when a key has been released
- *
+ *
* @param e the key released
*/
public void keyReleased(KeyEvent e)
@@ -2451,7 +2451,7 @@ public class BasicTreeUI
extends MouseAdapter
implements MouseMotionListener
{
-
+
/**
* If the cell has been selected on mouse press.
*/
@@ -2467,7 +2467,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been pressed on a component.
- *
+ *
* @param e is the mouse event that occured
*/
public void mousePressed(MouseEvent e)
@@ -2488,7 +2488,7 @@ public class BasicTreeUI
* MOUSE_DRAGGED events will continue to be delivered to the component where
* the drag originated until the mouse button is released (regardless of
* whether the mouse position is within the bounds of the component).
- *
+ *
* @param e is the mouse event that occured
*/
public void mouseDragged(MouseEvent e)
@@ -2499,7 +2499,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse button has been moved on a component (with no
* buttons no down).
- *
+ *
* @param e the mouse event that occured
*/
public void mouseMoved(MouseEvent e)
@@ -2509,7 +2509,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been released on a component.
- *
+ *
* @param e is the mouse event that occured
*/
public void mouseReleased(MouseEvent e)
@@ -2572,7 +2572,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param source that events are coming from
* @param destination that receives all events
* @param e is the event received
@@ -2590,7 +2590,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse button has been clicked (pressed and released) on
* a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseClicked(MouseEvent e)
@@ -2600,7 +2600,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been pressed on a component.
- *
+ *
* @param e mouse event that occured
*/
public void mousePressed(MouseEvent e)
@@ -2610,7 +2610,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been released on a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseReleased(MouseEvent e)
@@ -2621,7 +2621,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse enters a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseEntered(MouseEvent e)
@@ -2632,7 +2632,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse exits a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseExited(MouseEvent e)
@@ -2646,7 +2646,7 @@ public class BasicTreeUI
* MOUSE_DRAGGED events will continue to be delivered to the component where
* the drag originated until the mouse button is released (regardless of
* whether the mouse position is within the bounds of the component).
- *
+ *
* @param e mouse event that occured
*/
public void mouseDragged(MouseEvent e)
@@ -2657,7 +2657,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse cursor has been moved onto a component but no
* buttons have been pushed.
- *
+ *
* @param e mouse event that occured
*/
public void mouseMoved(MouseEvent e)
@@ -2716,7 +2716,7 @@ public class BasicTreeUI
* The calling method is responsible for determining the Y location. If
* bounds is null, a newly created Rectangle should be returned, otherwise
* the value should be placed in bounds and returned.
- *
+ *
* @param cell the value to be represented
* @param row row being queried
* @param depth the depth of the row
@@ -2762,13 +2762,13 @@ public class BasicTreeUI
// FIXME: The y should be handled by the layout cache.
size = new Rectangle(getRowX(row, depth), prefSize.height * row, prefSize.width,
prefSize.height);
-
+
return size;
}
/**
* Returns the amount to indent the given row
- *
+ *
* @return amount to indent the given row.
*/
protected int getRowX(int row, int depth)
@@ -2795,7 +2795,7 @@ public class BasicTreeUI
/**
* This method gets called when a bound property is changed.
- *
+ *
* @param event A PropertyChangeEvent object describing the event source and
* the property that has changed.
*/
@@ -2826,7 +2826,7 @@ public class BasicTreeUI
}
else if (property.equals(JTree.EDITABLE_PROPERTY))
setEditable(((Boolean) event.getNewValue()).booleanValue());
-
+
}
}
@@ -2848,7 +2848,7 @@ public class BasicTreeUI
/**
* This method gets called when a bound property is changed.
- *
+ *
* @param event A PropertyChangeEvent object describing the event source and
* the property that has changed.
*/
@@ -2866,7 +2866,7 @@ public class BasicTreeUI
{
/**
* Creates the new tree cancel editing action.
- *
+ *
* @param name the name of the action (used in toString).
*/
public TreeCancelEditingAction(String name)
@@ -2876,8 +2876,8 @@ public class BasicTreeUI
/**
* Invoked when an action occurs, cancels the cell editing (if the
- * tree cell is being edited).
- *
+ * tree cell is being edited).
+ *
* @param e event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -2904,7 +2904,7 @@ public class BasicTreeUI
/**
* Called whenever an item in the tree has been expanded.
- *
+ *
* @param event is the event that occured
*/
public void treeExpanded(TreeExpansionEvent event)
@@ -2919,7 +2919,7 @@ public class BasicTreeUI
/**
* Called whenever an item in the tree has been collapsed.
- *
+ *
* @param event is the event that occured
*/
public void treeCollapsed(TreeExpansionEvent event)
@@ -2947,7 +2947,7 @@ public class BasicTreeUI
/**
* Creates a new TreeHomeAction instance.
- *
+ *
* @param dir the direction to go to, <code>-1</code> for home,
* <code>1</code> for end
* @param name the name of the action
@@ -2960,7 +2960,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3027,7 +3027,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3051,7 +3051,7 @@ public class BasicTreeUI
/**
* Creates a new TreeIncrementAction.
- *
+ *
* @param dir up or down, <code>-1</code> for up, <code>1</code> for down
* @param name is the name of the direction
*/
@@ -3063,7 +3063,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3138,14 +3138,14 @@ public class BasicTreeUI
tree.setAnchorSelectionPath(newPath);
tree.setLeadSelectionPath(newPath);
}
-
+
// Ensure that the lead path is visible after the increment action.
tree.scrollPathToVisible(tree.getLeadSelectionPath());
}
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3177,7 +3177,7 @@ public class BasicTreeUI
* children will be null. Use e.getPath() to get the parent of the changed
* node(s). e.getChildIndices() returns the index(es) of the changed
* node(s).
- *
+ *
* @param e is the event that occured
*/
public void treeNodesChanged(TreeModelEvent e)
@@ -3191,7 +3191,7 @@ public class BasicTreeUI
* Invoked after nodes have been inserted into the tree. Use e.getPath() to
* get the parent of the new node(s). e.getChildIndices() returns the
* index(es) of the new node(s) in ascending order.
- *
+ *
* @param e is the event that occured
*/
public void treeNodesInserted(TreeModelEvent e)
@@ -3208,7 +3208,7 @@ public class BasicTreeUI
* siblings removed. Use e.getPath() to get the former parent of the deleted
* node(s). e.getChildIndices() returns, in ascending order, the index(es)
* the node(s) had before being deleted.
- *
+ *
* @param e is the event that occured
*/
public void treeNodesRemoved(TreeModelEvent e)
@@ -3224,7 +3224,7 @@ public class BasicTreeUI
* first element does not identify the current root node the first element
* should become the new root of the tree. Use e.getPath() to get the path
* to the node. e.getChildIndices() returns null.
- *
+ *
* @param e is the event that occured
*/
public void treeStructureChanged(TreeModelEvent e)
@@ -3249,7 +3249,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param direction up or down
* @param name is the name of the direction
*/
@@ -3261,7 +3261,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3358,7 +3358,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3385,7 +3385,7 @@ public class BasicTreeUI
/**
* Messaged when the selection changes in the tree we're displaying for.
* Stops editing, messages super and displays the changed paths.
- *
+ *
* @param event the event that characterizes the change.
*/
public void valueChanged(TreeSelectionEvent event)
@@ -3394,15 +3394,15 @@ public class BasicTreeUI
TreePath op = event.getOldLeadSelectionPath();
TreePath np = event.getNewLeadSelectionPath();
-
+
// Repaint of the changed lead selection path.
if (op != np)
{
- Rectangle o = treeState.getBounds(event.getOldLeadSelectionPath(),
+ Rectangle o = treeState.getBounds(event.getOldLeadSelectionPath(),
new Rectangle());
- Rectangle n = treeState.getBounds(event.getNewLeadSelectionPath(),
+ Rectangle n = treeState.getBounds(event.getNewLeadSelectionPath(),
new Rectangle());
-
+
if (o != null)
tree.repaint(o);
if (n != null)
@@ -3419,7 +3419,7 @@ public class BasicTreeUI
{
/**
* Creates a new TreeToggleAction.
- *
+ *
* @param name is the name of <code>Action</code> field
*/
public TreeToggleAction(String name)
@@ -3429,7 +3429,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3452,7 +3452,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled, false otherwise
*/
public boolean isEnabled()
@@ -3475,7 +3475,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param direction to traverse
* @param name is the name of the direction
*/
@@ -3487,7 +3487,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3512,7 +3512,7 @@ public class BasicTreeUI
// we just select the parent. We do not select the root if it
// is not visible.
TreePath parent = current.getParentPath();
- if (parent != null &&
+ if (parent != null &&
! (parent.getPathCount() == 1 && ! tree.isRootVisible()))
tree.setSelectionPath(parent);
}
@@ -3534,14 +3534,14 @@ public class BasicTreeUI
tree.expandPath(current);
}
}
-
+
// Ensure that the lead path is visible after the increment action.
tree.scrollPathToVisible(tree.getLeadSelectionPath());
}
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled, false otherwise
*/
public boolean isEnabled()
@@ -3553,7 +3553,7 @@ public class BasicTreeUI
/**
* Returns true if the LookAndFeel implements the control icons. Package
* private for use in inner classes.
- *
+ *
* @returns true if there are control icons
*/
boolean hasControlIcons()
@@ -3566,7 +3566,7 @@ public class BasicTreeUI
/**
* Returns control icon. It is null if the LookAndFeel does not implements the
* control icons. Package private for use in inner classes.
- *
+ *
* @return control icon if it exists.
*/
Icon getCurrentControlIcon(TreePath path)
@@ -3604,7 +3604,7 @@ public class BasicTreeUI
/**
* Returns the parent of the current node
- *
+ *
* @param root is the root of the tree
* @param node is the current node
* @return is the parent of the current node
@@ -3621,7 +3621,7 @@ public class BasicTreeUI
/**
* Recursively checks the tree for the specified node, starting at the root.
- *
+ *
* @param root is starting node to start searching at.
* @param node is the node to search for
* @return the parent node of node
@@ -3648,7 +3648,7 @@ public class BasicTreeUI
/**
* Selects the specified path in the tree depending on modes. Package private
* for use in inner classes.
- *
+ *
* @param tree is the tree we are selecting the path in
* @param path is the path we are selecting
*/
@@ -3657,7 +3657,7 @@ public class BasicTreeUI
if (path != null)
{
tree.setSelectionPath(path);
- tree.setLeadSelectionPath(path);
+ tree.setLeadSelectionPath(path);
tree.makeVisible(path);
tree.scrollPathToVisible(path);
}
@@ -3666,7 +3666,7 @@ public class BasicTreeUI
/**
* Returns the path from node to the root. Package private for use in inner
* classes.
- *
+ *
* @param node the node to get the path to
* @param depth the depth of the tree to return a path for
* @return an array of tree nodes that represent the path to node.
@@ -3689,7 +3689,7 @@ public class BasicTreeUI
/**
* Draws a vertical line using the given graphic context
- *
+ *
* @param g is the graphic context
* @param c is the component the new line will belong to
* @param x is the horizonal position
@@ -3706,7 +3706,7 @@ public class BasicTreeUI
/**
* Draws a horizontal line using the given graphic context
- *
+ *
* @param g is the graphic context
* @param c is the component the new line will belong to
* @param y is the vertical position
@@ -3723,7 +3723,7 @@ public class BasicTreeUI
/**
* Draws an icon at around a specific position
- *
+ *
* @param c is the component the new line will belong to
* @param g is the graphic context
* @param icon is the icon which will be drawn
@@ -3745,7 +3745,7 @@ public class BasicTreeUI
/**
* Draws a dashed horizontal line.
- *
+ *
* @param g - the graphics configuration.
* @param y - the y location to start drawing at
* @param x1 - the x location to start drawing at
@@ -3760,7 +3760,7 @@ public class BasicTreeUI
/**
* Draws a dashed vertical line.
- *
+ *
* @param g - the graphics configuration.
* @param x - the x location to start drawing at
* @param y1 - the y location to start drawing at
@@ -3776,7 +3776,7 @@ public class BasicTreeUI
/**
* Paints the expand (toggle) part of a row. The receiver should NOT modify
* clipBounds, or insets.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3806,7 +3806,7 @@ public class BasicTreeUI
* Paints the horizontal part of the leg. The receiver should NOT modify
* clipBounds, or insets. NOTE: parentRow can be -1 if the root is not
* visible.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3834,7 +3834,7 @@ public class BasicTreeUI
/**
* Paints the vertical part of the leg. The receiver should NOT modify
* clipBounds, insets.
- *
+ *
* @param g - the graphics configuration.
* @param clipBounds -
* @param insets -
@@ -3845,7 +3845,7 @@ public class BasicTreeUI
{
Rectangle bounds = getPathBounds(tree, path);
TreePath parent = path.getParentPath();
-
+
boolean paintLine;
if (isRootVisible())
paintLine = parent != null;
@@ -3854,7 +3854,7 @@ public class BasicTreeUI
if (paintLine)
{
Rectangle parentBounds = getPathBounds(tree, parent);
- paintVerticalLine(g, tree, parentBounds.x + 2 * gap,
+ paintVerticalLine(g, tree, parentBounds.x + 2 * gap,
parentBounds.y + parentBounds.height / 2,
bounds.y + bounds.height / 2);
}
@@ -3863,7 +3863,7 @@ public class BasicTreeUI
/**
* Paints the renderer part of a row. The receiver should NOT modify
* clipBounds, or insets.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3911,7 +3911,7 @@ public class BasicTreeUI
/**
* Returns true if the expand (toggle) control should be drawn for the
* specified row.
- *
+ *
* @param path - current path to check for.
* @param row - current row to check for.
* @param isExpanded - true if the path is expanded
@@ -3929,7 +3929,7 @@ public class BasicTreeUI
/**
* Returns the amount to indent the given row
- *
+ *
* @return amount to indent the given row.
*/
protected int getRowX(int row, int depth)
diff --git a/javax/swing/plaf/basic/BasicViewportUI.java b/javax/swing/plaf/basic/BasicViewportUI.java
index 51b902d64..11c7d6390 100644
--- a/javax/swing/plaf/basic/BasicViewportUI.java
+++ b/javax/swing/plaf/basic/BasicViewportUI.java
@@ -43,7 +43,7 @@ import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ViewportUI;
-public class BasicViewportUI extends ViewportUI
+public class BasicViewportUI extends ViewportUI
{
protected void installDefaults(JComponent c)
{
@@ -61,13 +61,13 @@ public class BasicViewportUI extends ViewportUI
return new BasicViewportUI();
}
- public void installUI(JComponent c)
+ public void installUI(JComponent c)
{
super.installUI(c);
installDefaults(c);
}
- public void uninstallUI(JComponent c)
+ public void uninstallUI(JComponent c)
{
super.uninstallUI(c);
uninstallDefaults(c);
diff --git a/javax/swing/plaf/metal/DefaultMetalTheme.java b/javax/swing/plaf/metal/DefaultMetalTheme.java
index 672676fa0..27c569f03 100644
--- a/javax/swing/plaf/metal/DefaultMetalTheme.java
+++ b/javax/swing/plaf/metal/DefaultMetalTheme.java
@@ -48,7 +48,7 @@ import javax.swing.plaf.FontUIResource;
/**
* The default theme for the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
*/
public class DefaultMetalTheme extends MetalTheme
@@ -57,15 +57,15 @@ public class DefaultMetalTheme extends MetalTheme
new ColorUIResource(102, 102, 153);
private static final ColorUIResource PRIMARY2 =
new ColorUIResource(153, 153, 204);
- private static final ColorUIResource PRIMARY3 =
+ private static final ColorUIResource PRIMARY3 =
new ColorUIResource(204, 204, 255);
- private static final ColorUIResource SECONDARY1 =
+ private static final ColorUIResource SECONDARY1 =
new ColorUIResource(102, 102, 102);
- private static final ColorUIResource SECONDARY2 =
+ private static final ColorUIResource SECONDARY2 =
new ColorUIResource(153, 153, 153);
- private static final ColorUIResource SECONDARY3 =
+ private static final ColorUIResource SECONDARY3 =
new ColorUIResource(204, 204, 204);
-
+
private static final FontUIResource SUB_TEXT_FONT =
new FontUIResource("Dialog", Font.PLAIN, 10);
private static final FontUIResource SYSTEM_TEXT_FONT =
@@ -74,7 +74,7 @@ public class DefaultMetalTheme extends MetalTheme
new FontUIResource("Dialog", Font.PLAIN, 12);
private static final FontUIResource WINDOW_TITLE_FONT =
new FontUIResource("Dialog", Font.BOLD, 12);
-
+
/**
* The control text font for swing.boldMetal=false.
*/
@@ -108,7 +108,7 @@ public class DefaultMetalTheme extends MetalTheme
* Indicates the menu text font.
*/
static final int MENU_TEXT_FONT = 2;
-
+
/**
* Creates a new instance of this theme.
*/
@@ -119,7 +119,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the name of the theme.
- *
+ *
* @return <code>"Steel"</code>.
*/
public String getName()
@@ -129,7 +129,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the first primary color for this theme.
- *
+ *
* @return The first primary color.
*/
protected ColorUIResource getPrimary1()
@@ -139,7 +139,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the second primary color for this theme.
- *
+ *
* @return The second primary color.
*/
protected ColorUIResource getPrimary2()
@@ -149,7 +149,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the third primary color for this theme.
- *
+ *
* @return The third primary color.
*/
protected ColorUIResource getPrimary3()
@@ -159,7 +159,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the first secondary color for this theme.
- *
+ *
* @return The first secondary color.
*/
protected ColorUIResource getSecondary1()
@@ -169,7 +169,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the second secondary color for this theme.
- *
+ *
* @return The second secondary color.
*/
protected ColorUIResource getSecondary2()
@@ -179,7 +179,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the third secondary color for this theme.
- *
+ *
* @return The third secondary color.
*/
protected ColorUIResource getSecondary3()
@@ -190,66 +190,66 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the font used for text on controls. In this case, the font is
* <code>FontUIResource("Dialog", Font.BOLD, 12)</code>, unless the
- * <code>swing.boldMetal</code> UI default is set to {@link Boolean#FALSE}
+ * <code>swing.boldMetal</code> UI default is set to {@link Boolean#FALSE}
* in which case it is <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
- *
+ *
* @return The font.
*/
public FontUIResource getControlTextFont()
{
return getFont(CONTROL_TEXT_FONT);
}
-
+
/**
* Returns the font used for text in menus. In this case, the font is
* <code>FontUIResource("Dialog", Font.BOLD, 12)</code>, unless the
- * <code>swing.boldMetal</code> UI default is set to {@link Boolean#FALSE}
+ * <code>swing.boldMetal</code> UI default is set to {@link Boolean#FALSE}
* in which case it is <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
- *
+ *
* @return The font used for text in menus.
*/
public FontUIResource getMenuTextFont()
{
return getFont(MENU_TEXT_FONT);
}
-
+
/**
* Returns the font used for sub text. In this case, the font is
* <code>FontUIResource("Dialog", Font.PLAIN, 10)</code>.
- *
+ *
* @return The font used for sub text.
*/
public FontUIResource getSubTextFont()
{
return SUB_TEXT_FONT;
}
-
+
/**
* Returns the font used for system text. In this case, the font is
* <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
- *
+ *
* @return The font used for system text.
*/
public FontUIResource getSystemTextFont()
{
return SYSTEM_TEXT_FONT;
}
-
+
/**
* Returns the font used for user text. In this case, the font is
* <code>FontUIResource("Dialog", Font.PLAIN, 12)</code>.
- *
- * @return The font used for user text.
+ *
+ * @return The font used for user text.
*/
public FontUIResource getUserTextFont()
{
return USER_TEXT_FONT;
}
-
+
/**
- * Returns the font used for window titles. In this case, the font is
+ * Returns the font used for window titles. In this case, the font is
* <code>FontUIResource("Dialog", Font.BOLD, 12)</code>.
- *
+ *
* @return The font used for window titles.
*/
public FontUIResource getWindowTitleFont()
diff --git a/javax/swing/plaf/metal/MetalBorders.java b/javax/swing/plaf/metal/MetalBorders.java
index d4e3a8497..253629998 100644
--- a/javax/swing/plaf/metal/MetalBorders.java
+++ b/javax/swing/plaf/metal/MetalBorders.java
@@ -104,15 +104,15 @@ public class MetalBorders
/**
* <p>A border used for {@link JButton} components.</p>
- *
+ *
* <p>This {@link Border} implementation can handle only instances of
* {@link AbstractButton} and their subclasses.</p>
- *
+ *
* <p>If the Metal Look and Feel's current theme is 'Ocean' the border
* will be painted with a special highlight when the mouse cursor if
* over the button (ie. the property <code>rollover</code> of the
* button's model is <code>true</code>) and is not a <b>direct</b>
- * child of a {@link JToolBar}.</p>
+ * child of a {@link JToolBar}.</p>
*/
public static class ButtonBorder extends AbstractBorder implements UIResource
{
@@ -230,7 +230,7 @@ public class MetalBorders
g.setColor(middle);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
+
// draw crossing pixels of both borders
g.setColor(shadow);
g.drawRect(x + 1, y + h - 2, 0, 0);
@@ -238,11 +238,11 @@ public class MetalBorders
}
}
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getInactiveControlTextColor());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
@@ -260,7 +260,7 @@ public class MetalBorders
int y, int w, int h)
{
ButtonModel bmodel = null;
-
+
// The RI will fail with a ClassCastException in such a situation.
// This code tries to be more helpful.
if (c instanceof AbstractButton)
@@ -304,11 +304,11 @@ public class MetalBorders
g.drawRect(x, y, w - 1, h - 1);
}
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getInactiveControlTextColor());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
@@ -325,7 +325,7 @@ public class MetalBorders
}
/**
- * Returns the insets of the <code>ButtonBorder</code> in the specified
+ * Returns the insets of the <code>ButtonBorder</code> in the specified
* <code>newInsets</code> object.
*
* @param c the component for which the border is used (ignored).
@@ -357,22 +357,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -387,12 +387,12 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 3;
}
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -400,13 +400,13 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
- g.setColor(MetalLookAndFeel.getControlDarkShadow());
- g.drawRect(x, y, w - 1, h - 1);
+ g.setColor(MetalLookAndFeel.getControlDarkShadow());
+ g.drawRect(x, y, w - 1, h - 1);
}
-
+
}
/**
@@ -416,7 +416,7 @@ public class MetalBorders
implements UIResource
{
private static final Insets borderInsets = new Insets(2, 2, 2, 2);
-
+
/**
* Creates a new border instance.
*/
@@ -424,27 +424,27 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (<code>null</code> not permitted).
- *
+ *
* @return The <code>newInsets</code> reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
@@ -453,12 +453,12 @@ public class MetalBorders
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -466,9 +466,9 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
- {
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawRect(x, y, w - 2, h - 2);
@@ -479,13 +479,13 @@ public class MetalBorders
g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1);
g.setColor(savedColor);
}
-
+
}
-
+
/**
- * A border used for a {@link JInternalFrame} when it is being used as a
+ * A border used for a {@link JInternalFrame} when it is being used as a
* palette.
- *
+ *
* @since 1.3
*/
public static class PaletteBorder extends AbstractBorder
@@ -500,12 +500,12 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
@@ -515,26 +515,26 @@ public class MetalBorders
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (<code>null</code> not permitted).
- *
+ *
* @return The <code>newInsets</code> reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
- {
+ {
newInsets.top = borderInsets.top;
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -542,26 +542,26 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
Color savedColor = g.getColor();
-
+
// draw the outline
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawRect(x, y, w - 1, h - 1);
-
+
// put a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
- g.fillRect(x, y + h - 1, 1, 1);
+ g.fillRect(x, y + h - 1, 1, 1);
g.setColor(savedColor);
}
}
-
+
/**
* A border used for the {@link JTextField} component.
*/
@@ -575,10 +575,10 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -586,7 +586,7 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
boolean enabledTextBorder;
@@ -608,7 +608,7 @@ public class MetalBorders
g.setColor(savedColor);
}
}
-
+
}
/**
@@ -626,27 +626,27 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (<code>null</code> not permitted).
- *
+ *
* @return The <code>newInsets</code> reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
@@ -655,12 +655,12 @@ public class MetalBorders
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -668,47 +668,47 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JInternalFrame f = (JInternalFrame) c;
if (f.isSelected())
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// fill the border background
g.fillRect(x, y, w, 5);
g.fillRect(x, y, 5, h);
g.fillRect(x + w - 5, y, 5, h);
g.fillRect(x, y + h - 5, w, 5);
-
+
// draw a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
// draw the lines
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 14, y + 2, x + w - 15, y + 2);
g.drawLine(x + 14, y + h - 3, x + w - 15, y + h - 3);
g.drawLine(x + 2, y + 14, x + 2, y + h - 15);
g.drawLine(x + w - 3, y + 14, x + w - 3, y + h - 15);
-
+
// draw the line highlights
if (f.isSelected())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
- else
+ else
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 15, y + 3, x + w - 14, y + 3);
g.drawLine(x + 15, y + h - 2, x + w - 14, y + h - 2);
g.drawLine(x + 3, y + 15, x + 3, y + h - 14);
g.drawLine(x + w - 2, y + 15, x + w - 2, y + h - 14);
}
-
+
}
/**
@@ -718,7 +718,7 @@ public class MetalBorders
public static class OptionDialogBorder extends AbstractBorder
implements UIResource
{
-
+
/**
* Creates a new border instance.
*/
@@ -726,22 +726,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -756,12 +756,12 @@ public class MetalBorders
newInsets.bottom = 3;
newInsets.right = 3;
}
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -769,10 +769,10 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JInternalFrame f = (JInternalFrame) c;
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
if (f.getContentPane() instanceof JOptionPane)
@@ -791,32 +791,32 @@ public class MetalBorders
Color bc = UIManager.getColor(
"OptionPane.warningDialog.border.background");
if (bc != null)
- g.setColor(bc);
+ g.setColor(bc);
}
else if (type == JOptionPane.ERROR_MESSAGE)
{
Color bc = UIManager.getColor(
"OptionPane.errorDialog.border.background");
if (bc != null)
- g.setColor(bc);
+ g.setColor(bc);
}
}
-
+
// fill the border background
g.fillRect(x, y, w, 3);
g.fillRect(x, y, 3, h);
g.fillRect(x + w - 3, y, 3, h);
g.fillRect(x, y + h - 3, w, 3);
-
+
// draw a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
}
-
+
}
/**
@@ -827,7 +827,7 @@ public class MetalBorders
{
/** The border insets. */
protected static Insets borderInsets = new Insets(2, 2, 2, 2);
-
+
/**
* Creates a new border instance.
*/
@@ -835,11 +835,11 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the component. A border is painted only if the
* component is a selected {@link JMenu} or an armed {@link JMenuItem}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate of the border area.
@@ -852,7 +852,7 @@ public class MetalBorders
{
Color dark = MetalLookAndFeel.getPrimaryControlDarkShadow();
Color light = MetalLookAndFeel.getPrimaryControlHighlight();
- if (c instanceof JMenu)
+ if (c instanceof JMenu)
{
JMenu menu = (JMenu) c;
if (menu.isSelected())
@@ -868,7 +868,7 @@ public class MetalBorders
else if (c instanceof JMenuItem)
{
JMenuItem item = (JMenuItem) c;
- if (item.isArmed())
+ if (item.isArmed())
{
g.setColor(dark);
g.drawLine(x, y, x + w, y);
@@ -883,27 +883,27 @@ public class MetalBorders
}
}
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Populates <code>insets</code> with the border insets, then returns it.
- *
+ *
* @param c the component (ignored).
* @param insets the object to populate with the border insets.
- *
+ *
* @return The border insets.
- *
+ *
* @throws NullPointerException if <code>insets</code> is <code>null</code>.
*/
public Insets getBorderInsets(Component c, Insets insets)
@@ -925,18 +925,18 @@ public class MetalBorders
{
/** The border insets. */
protected static Insets borderInsets = new Insets(1, 0, 1, 0);
-
+
/**
* Creates a new border instance.
*/
public MenuBarBorder()
{
}
-
+
/**
* Paints the border for the component. A border is painted only if the
* component is a selected {@link JMenu} or an armed {@link JMenuItem}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate of the border area.
@@ -957,30 +957,30 @@ public class MetalBorders
g.setColor(UIManager.getColor("MenuBar.borderColor"));
else
g.setColor(MetalLookAndFeel.getControlShadow());
-
+
g.drawLine(x, y + h - 1, x + w, y + h - 1);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Populates <code>insets</code> with the border insets, then returns it.
- *
+ *
* @param c the component (ignored).
* @param insets the object to populate with the border insets.
- *
+ *
* @return The border insets.
- *
+ *
* @throws NullPointerException if <code>insets</code> is <code>null</code>.
*/
public Insets getBorderInsets(Component c, Insets insets)
@@ -1002,7 +1002,7 @@ public class MetalBorders
{
/** The border insets. */
private static Insets insets = new Insets(1, 1, 2, 2);
-
+
/**
* Constructs a new ScrollPaneBorder.
*/
@@ -1010,7 +1010,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the border for the Component <code>c</code>.
*
@@ -1045,7 +1045,7 @@ public class MetalBorders
// paint left border line
g.drawLine(x, y, x, y + h - 2);
-
+
// paint right inner border line
g.drawLine(x + w - 2, y, x + w - 2, y + h + 1);
@@ -1067,11 +1067,11 @@ public class MetalBorders
g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2);
}
-
+
}
-
+
/**
- * A button border that is only visible when the mouse pointer is within
+ * A button border that is only visible when the mouse pointer is within
* the button's bounds.
*/
public static class RolloverButtonBorder
@@ -1084,10 +1084,10 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -1095,7 +1095,7 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
// TODO: What should be done here? Obviously the ButtonBorder already
@@ -1104,7 +1104,7 @@ public class MetalBorders
super.paintBorder(c, g, x, y, w, h);
}
}
-
+
/**
* This border is used in Toolbar buttons as inner border.
*/
@@ -1120,7 +1120,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the RolloverBorder.
*
@@ -1175,7 +1175,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the border, creating a new Insets instance
* with each call.
@@ -1187,7 +1187,7 @@ public class MetalBorders
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the insets of the border, using the supplied Insets instance.
*
@@ -1209,7 +1209,7 @@ public class MetalBorders
insets.bottom = borderInsets.bottom;
insets.right = borderInsets.right;
}
-
+
return insets;
}
@@ -1234,21 +1234,21 @@ public class MetalBorders
// draw dark outer border
g.setColor(darkShadow);
g.drawRect(x, y, w - 1, h - 1);
-
+
// draw highlighted inner border (only top and left)
g.setColor(light);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
}
-
+
}
/**
* A border used for the {@link JToggleButton} component.
- *
+ *
* @since 1.3
*/
public static class ToggleButtonBorder
- extends ButtonBorder
+ extends ButtonBorder
{
/**
* Creates a new border instance.
@@ -1257,7 +1257,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the toggle button border.
*
@@ -1272,7 +1272,7 @@ public class MetalBorders
int h)
{
ButtonModel bmodel = null;
-
+
if (c instanceof AbstractButton)
bmodel = ((AbstractButton) c).getModel();
@@ -1314,23 +1314,23 @@ public class MetalBorders
g.setColor(shadow);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
+
// draw crossing pixels of both borders
g.setColor(shadow);
g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2);
g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1);
-
+
}
// draw corners
g.setColor(middle);
g.drawLine(x, y + h - 1, x, y + h - 1);
g.drawLine(x + w - 1, y, x + w - 1, y);
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getControlDisabled());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
}
@@ -1348,22 +1348,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -1371,7 +1371,7 @@ public class MetalBorders
{
JToolBar tb = (JToolBar) c;
if (tb.getOrientation() == JToolBar.HORIZONTAL)
- {
+ {
if (newInsets == null)
newInsets = new Insets(2, 16, 2, 2);
else
@@ -1381,10 +1381,10 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 2;
}
- return newInsets;
+ return newInsets;
}
else // assume JToolBar.VERTICAL
- {
+ {
if (newInsets == null)
newInsets = new Insets(16, 2, 2, 2);
else
@@ -1394,14 +1394,14 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 2;
}
- return newInsets;
+ return newInsets;
}
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -1409,27 +1409,27 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JToolBar tb = (JToolBar) c;
if (tb.getOrientation() == JToolBar.HORIZONTAL)
{
- MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + 11, y + h - 5,
- MetalLookAndFeel.getControlHighlight(),
+ MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + 11, y + h - 5,
+ MetalLookAndFeel.getControlHighlight(),
MetalLookAndFeel.getControlDarkShadow());
}
else
- {
- MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + w - 5, y + 11,
- MetalLookAndFeel.getControlHighlight(),
+ {
+ MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + w - 5, y + 11,
+ MetalLookAndFeel.getControlHighlight(),
MetalLookAndFeel.getControlDarkShadow());
}
}
-
+
}
-
+
/**
* A border for table header cells.
*
@@ -1499,17 +1499,17 @@ public class MetalBorders
{
Border outer = new ButtonBorder();
Border inner = getMarginBorder();
- buttonBorder = new BorderUIResource.CompoundBorderUIResource(outer,
+ buttonBorder = new BorderUIResource.CompoundBorderUIResource(outer,
inner);
}
return buttonBorder;
}
-
+
/**
* Returns a border for use with {@link JToggleButton} components.
*
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getToggleButtonBorder()
@@ -1527,23 +1527,23 @@ public class MetalBorders
/**
* Returns a border instance that is used with a {@link JInternalFrame} when
* it is in the iconified state.
- *
+ *
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getDesktopIconBorder()
{
if (desktopIconBorder == null)
desktopIconBorder = new DesktopIconBorder();
- return desktopIconBorder;
+ return desktopIconBorder;
}
/**
* Returns a border for use by the {@link JTextField} component.
- *
+ *
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getTextFieldBorder()
@@ -1608,7 +1608,7 @@ public class MetalBorders
/**
* Returns a shared instance of a compound border for rollover buttons.
- *
+ *
* @return A shared border instance.
*/
static Border getRolloverBorder()
@@ -1617,7 +1617,7 @@ public class MetalBorders
{
Border outer = new MetalBorders.RolloverButtonBorder();
Border inner = MetalBorders.getMarginBorder();
- rolloverBorder = new BorderUIResource.CompoundBorderUIResource(outer,
+ rolloverBorder = new BorderUIResource.CompoundBorderUIResource(outer,
inner);
}
return rolloverBorder;
diff --git a/javax/swing/plaf/metal/MetalButtonListener.java b/javax/swing/plaf/metal/MetalButtonListener.java
index f2f778f95..7cf84e5f6 100644
--- a/javax/swing/plaf/metal/MetalButtonListener.java
+++ b/javax/swing/plaf/metal/MetalButtonListener.java
@@ -45,25 +45,25 @@ import javax.swing.plaf.basic.BasicButtonListener;
/**
* A listener for buttons under the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalButtonUI#createButtonListener
*/
-class MetalButtonListener extends BasicButtonListener
+class MetalButtonListener extends BasicButtonListener
{
-
+
/**
* Creates a new instance.
- *
+ *
* @param button the button.
*/
public MetalButtonListener(AbstractButton button)
{
super(button);
}
-
+
/**
* Handles property change events.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
diff --git a/javax/swing/plaf/metal/MetalButtonUI.java b/javax/swing/plaf/metal/MetalButtonUI.java
index 108b3b225..974f0a85a 100644
--- a/javax/swing/plaf/metal/MetalButtonUI.java
+++ b/javax/swing/plaf/metal/MetalButtonUI.java
@@ -74,7 +74,7 @@ public class MetalButtonUI
* The color used to draw the focus rectangle around the text and/or icon.
*/
protected Color focusColor;
-
+
/**
* The background color for the button when it is pressed.
*/
@@ -87,12 +87,12 @@ public class MetalButtonUI
/**
* Returns a UI delegate for the specified component.
- *
+ *
* @param c the component (should be a subclass of {@link AbstractButton}).
- *
+ *
* @return A new instance of <code>MetalButtonUI</code>.
*/
- public static ComponentUI createUI(JComponent c)
+ public static ComponentUI createUI(JComponent c)
{
if (sharedUI == null)
sharedUI = new MetalButtonUI();
@@ -143,9 +143,9 @@ public class MetalButtonUI
/**
* Installs the default settings for the specified button.
- *
+ *
* @param button the button.
- *
+ *
* @see #uninstallDefaults(AbstractButton)
*/
public void installDefaults(AbstractButton button)
@@ -157,7 +157,7 @@ public class MetalButtonUI
/**
* Removes the defaults added by {@link #installDefaults(AbstractButton)}.
*/
- public void uninstallDefaults(AbstractButton button)
+ public void uninstallDefaults(AbstractButton button)
{
// This is overridden to be public, for whatever reason.
super.uninstallDefaults(button);
@@ -166,22 +166,22 @@ public class MetalButtonUI
/**
* Paints the background of the button to indicate that it is in the
* "pressed" state.
- *
+ *
* @param g the graphics context.
* @param b the button.
*/
- protected void paintButtonPressed(Graphics g, AbstractButton b)
- {
+ protected void paintButtonPressed(Graphics g, AbstractButton b)
+ {
if (b.isContentAreaFilled())
{
g.setColor(getSelectColor());
g.fillRect(0, 0, b.getWidth(), b.getHeight());
}
}
-
- /**
+
+ /**
* Paints the focus rectangle around the button text and/or icon.
- *
+ *
* @param g the graphics context.
* @param b the button.
* @param viewRect the button bounds.
@@ -189,7 +189,7 @@ public class MetalButtonUI
* @param iconRect the icon bounds.
*/
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect,
- Rectangle textRect, Rectangle iconRect)
+ Rectangle textRect, Rectangle iconRect)
{
if (b.isEnabled() && b.hasFocus() && b.isFocusPainted())
{
@@ -201,17 +201,17 @@ public class MetalButtonUI
g.setColor(savedColor);
}
}
-
+
/**
* Paints the button text.
- *
+ *
* @param g the graphics context.
* @param c the button.
* @param textRect the text bounds.
* @param text the text to display.
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
- String text)
+ String text)
{
AbstractButton b = (AbstractButton) c;
Font f = b.getFont();
@@ -227,7 +227,7 @@ public class MetalButtonUI
{
g.setColor(getDisabledTextColor());
g.drawString(text, textRect.x, textRect.y + fm.getAscent());
- }
+ }
}
/**
diff --git a/javax/swing/plaf/metal/MetalCheckBoxIcon.java b/javax/swing/plaf/metal/MetalCheckBoxIcon.java
index 30ee93162..5e0ac066c 100644
--- a/javax/swing/plaf/metal/MetalCheckBoxIcon.java
+++ b/javax/swing/plaf/metal/MetalCheckBoxIcon.java
@@ -134,7 +134,7 @@ public class MetalCheckBoxIcon
MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(),
SwingConstants.VERTICAL, "CheckBox.gradient");
border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight());
-
+
AbstractButton b = (AbstractButton) c;
if (b.isSelected())
drawCheck(b, g, x, y);
diff --git a/javax/swing/plaf/metal/MetalCheckBoxUI.java b/javax/swing/plaf/metal/MetalCheckBoxUI.java
index c7941642e..11979e170 100644
--- a/javax/swing/plaf/metal/MetalCheckBoxUI.java
+++ b/javax/swing/plaf/metal/MetalCheckBoxUI.java
@@ -75,10 +75,10 @@ public class MetalCheckBoxUI
instance = new MetalCheckBoxUI();
return instance;
}
-
+
/**
* Returns the prefix for properties defined in the {@link UIDefaults} table.
- *
+ *
* @return The property prefix (<code>"CheckBox."</code>).
*/
public String getPropertyPrefix()
@@ -86,4 +86,3 @@ public class MetalCheckBoxUI
return "CheckBox.";
}
}
-
diff --git a/javax/swing/plaf/metal/MetalComboBoxButton.java b/javax/swing/plaf/metal/MetalComboBoxButton.java
index 265ea7ef6..8ec8bad72 100644
--- a/javax/swing/plaf/metal/MetalComboBoxButton.java
+++ b/javax/swing/plaf/metal/MetalComboBoxButton.java
@@ -63,22 +63,22 @@ public class MetalComboBoxButton
/** A reference to the JList. */
protected JList listBox;
-
+
/**
* Used for rendering the selected item.
*/
protected CellRendererPane rendererPane;
-
+
/** The button icon. */
protected Icon comboIcon;
-
+
/** Display just the icon, or the icon plus the label. */
protected boolean iconOnly;
-
+
/**
* Creates a new button.
- *
- * @param cb the combo that the button is used for (<code>null</code> not
+ *
+ * @param cb the combo that the button is used for (<code>null</code> not
* permitted).
* @param i the icon displayed on the button.
* @param pane the rendering pane.
@@ -87,13 +87,13 @@ public class MetalComboBoxButton
public MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane,
JList list)
{
- this(cb, i, cb.isEditable(), pane, list);
+ this(cb, i, cb.isEditable(), pane, list);
}
-
+
/**
* Creates a new button.
- *
- * @param cb the combo that the button is used for (<code>null</code> not
+ *
+ * @param cb the combo that the button is used for (<code>null</code> not
* permitted).
* @param i the icon displayed on the button.
* @param onlyIcon a flag that specifies whether the button displays only an
@@ -116,84 +116,84 @@ public class MetalComboBoxButton
setEnabled(comboBox.isEnabled());
setFocusable(comboBox.isEnabled());
}
-
+
/**
* Returns the combo box that the button is used with.
- *
+ *
* @return The combo box.
*/
public final JComboBox getComboBox()
{
return comboBox;
}
-
+
/**
* Sets the combo box that the button is used with.
- *
+ *
* @param cb the combo box.
*/
public final void setComboBox(JComboBox cb)
{
comboBox = cb;
}
-
+
/**
* Returns the icon displayed by the button. By default, this will be an
* instance of {@link MetalComboBoxIcon}.
- *
+ *
* @return The icon displayed by the button.
*/
public final Icon getComboIcon()
{
return comboIcon;
}
-
+
/**
* Sets the icon displayed by the button.
- *
+ *
* @param i the icon.
*/
public final void setComboIcon(Icon i)
{
comboIcon = i;
}
-
+
/**
* Returns a flag that controls whether the button displays an icon only,
* or text as well.
- *
+ *
* @return A boolean.
*/
public final boolean isIconOnly()
{
return iconOnly;
}
-
+
/**
* Sets the flag that controls whether the button displays an icon only,
* or text as well.
- *
+ *
* @param isIconOnly the flag.
*/
public final void setIconOnly(boolean isIconOnly)
{
iconOnly = isIconOnly;
}
-
+
/**
* Returns <code>false</code>, to indicate that this component is not part
* of the focus traversal group.
- *
+ *
* @return <code>false</code>
*/
public boolean isFocusTraversable()
{
return false;
}
-
+
/**
* Enables or disables the button.
- *
+ *
* @param enabled the new status.
*/
public void setEnabled(boolean enabled)
@@ -210,10 +210,10 @@ public class MetalComboBoxButton
setForeground(UIManager.getColor("ComboBox.disabledForeground"));
}
}
-
+
/**
* Paints the component.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -259,7 +259,7 @@ public class MetalComboBoxButton
Component comp = renderer.getListCellRendererComponent(listBox,
comboBox.getSelectedItem(), -1, false, false);
comp.setFont(rendererPane.getFont());
-
+
if ((model.isArmed() && model.isPressed())
|| (comboBox.isFocusOwner() && !comboBox.isPopupVisible()))
{
diff --git a/javax/swing/plaf/metal/MetalComboBoxEditor.java b/javax/swing/plaf/metal/MetalComboBoxEditor.java
index 11e415103..8872d74e2 100644
--- a/javax/swing/plaf/metal/MetalComboBoxEditor.java
+++ b/javax/swing/plaf/metal/MetalComboBoxEditor.java
@@ -65,10 +65,10 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -76,7 +76,7 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
g.translate(x, y);
@@ -123,11 +123,11 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
public Insets getBorderInsets(Component c)
{
return editorBorderInsets;
- }
+ }
}
-
+
/**
- * A subclass of {@link MetalComboBoxEditor} that implements the
+ * A subclass of {@link MetalComboBoxEditor} that implements the
* {@link javax.swing.plaf.UIResource} interface.
*/
public static class UIResource extends MetalComboBoxEditor
@@ -177,7 +177,7 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
/** The editor's border insets. */
protected static Insets editorBorderInsets = new Insets(2, 2, 2, 0);
-
+
/**
* Creates a new editor.
*/
@@ -186,5 +186,5 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
editor = new EditorTextField("", 9);
editor.setBorder(new MetalComboBoxEditorBorder());
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalComboBoxIcon.java b/javax/swing/plaf/metal/MetalComboBoxIcon.java
index 944ce3944..45c8eadc5 100644
--- a/javax/swing/plaf/metal/MetalComboBoxIcon.java
+++ b/javax/swing/plaf/metal/MetalComboBoxIcon.java
@@ -48,20 +48,20 @@ import javax.swing.Icon;
/**
* An icon used by the {@link MetalComboBoxUI} class.
*/
-public class MetalComboBoxIcon implements Icon, Serializable
+public class MetalComboBoxIcon implements Icon, Serializable
{
-
+
/**
* Creates a new icon.
*/
- public MetalComboBoxIcon()
+ public MetalComboBoxIcon()
{
// nothing required.
}
-
+
/**
* Returns the icon width, which for this icon is 10 pixels.
- *
+ *
* @return <code>10</code>.
*/
public int getIconWidth()
@@ -71,7 +71,7 @@ public class MetalComboBoxIcon implements Icon, Serializable
/**
* Returns the icon height, which for this icon is 5 pixels.
- *
+ *
* @return <code>5</code>.
*/
public int getIconHeight()
@@ -81,7 +81,7 @@ public class MetalComboBoxIcon implements Icon, Serializable
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the combo box (ignored here).
* @param g the graphics device.
* @param x the x coordinate.
diff --git a/javax/swing/plaf/metal/MetalComboBoxUI.java b/javax/swing/plaf/metal/MetalComboBoxUI.java
index 53d49c3dc..b9019b70d 100644
--- a/javax/swing/plaf/metal/MetalComboBoxUI.java
+++ b/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -78,22 +78,22 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
// Nothing to do here.
}
-
+
/**
* Arranges the editor (if visible) and button that comprise the combo
* box.
- *
+ *
* @param parent the parent.
*/
public void layoutContainer(Container parent)
{
layoutComboBox(parent, this);
}
-
+
/**
- * Calls the <code>layoutContainer(Container)</code> method in the super
+ * Calls the <code>layoutContainer(Container)</code> method in the super
* class.
- *
+ *
* @param parent the container.
*/
public void superLayout(Container parent)
@@ -101,9 +101,9 @@ public class MetalComboBoxUI extends BasicComboBoxUI
super.layoutContainer(parent);
}
}
-
+
/**
- * A listener used to handle property changes in the {@link JComboBox}
+ * A listener used to handle property changes in the {@link JComboBox}
* component, to ensure that the UI delegate accurately reflects the current
* state in the rendering onscreen.
*/
@@ -117,11 +117,11 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
// Nothing to do here.
}
-
+
/**
* Handles a property change event, updating the UI components as
* appropriate.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -156,7 +156,7 @@ public class MetalComboBoxUI extends BasicComboBoxUI
/**
* A popup menu for the combo-box.
- *
+ *
* @see #createPopup()
*
* @deprecated 1.4
@@ -165,20 +165,20 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
/**
* Creates a new popup.
- *
+ *
* @param cBox the combo box.
*/
public MetalComboPopup(JComboBox cBox)
{
- super(cBox);
+ super(cBox);
}
-
+
public void delegateFocus(MouseEvent e)
{
super.delegateFocus(e);
}
}
-
+
/**
* Constructs a new instance of MetalComboBoxUI.
*/
@@ -198,61 +198,61 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
return new MetalComboBoxUI();
}
-
+
/**
* Creates an editor for the combo box.
- *
+ *
* @return An editor.
*/
protected ComboBoxEditor createEditor()
{
- return new MetalComboBoxEditor.UIResource();
+ return new MetalComboBoxEditor.UIResource();
}
-
+
/**
* Creates a popup for the combo box.
- *
+ *
* @return A popup.
*/
protected ComboPopup createPopup()
{
return super.createPopup();
}
-
+
/**
* Creates a new button for use in rendering the JComboBox.
- *
+ *
* @return A button.
*/
protected JButton createArrowButton()
{
- JButton button = new MetalComboBoxButton(comboBox, new MetalComboBoxIcon(),
- currentValuePane, listBox);
+ JButton button = new MetalComboBoxButton(comboBox, new MetalComboBoxIcon(),
+ currentValuePane, listBox);
button.setMargin(new Insets(0, 1, 1, 3));
return button;
}
-
+
/**
* Creates a new property change listener.
- *
+ *
* @return A new property change listener.
*/
public PropertyChangeListener createPropertyChangeListener()
{
return new MetalPropertyChangeListener();
}
-
+
public void paint(Graphics g, JComponent c)
{
// do nothing, the button and text field are painted elsewhere
}
-
+
/**
* Updates the button and text field to reflect a change in the 'editable'
* property.
- *
+ *
* @param e the event.
- *
+ *
* @deprecated 1.4
*/
protected void editablePropertyChanged(PropertyChangeEvent e)
@@ -265,32 +265,32 @@ public class MetalComboBoxUI extends BasicComboBoxUI
comboBox.repaint();
}
}
-
+
/**
* Creates a new layout manager for the UI delegate.
- *
+ *
* @return A new layout manager.
*/
protected LayoutManager createLayoutManager()
{
return new MetalComboBoxLayoutManager();
}
-
+
/**
* Not used in Classpath.
- *
+ *
* @deprecated 1.4
*/
protected void removeListeners()
{
- // no longer used in JDK 1.4
+ // no longer used in JDK 1.4
}
-
+
/**
* Returns the minimum size for the combo.
- *
+ *
* @param c the component
- *
+ *
* @return The minimum size for the combo box.
*/
public Dimension getMinimumSize(JComponent c)
@@ -328,7 +328,7 @@ public class MetalComboBoxUI extends BasicComboBoxUI
isMinimumSizeDirty = false;
return new Dimension(cachedMinimumSize);
}
-
+
/**
* Configures the editor for this combo box.
*/
@@ -350,8 +350,8 @@ public class MetalComboBoxUI extends BasicComboBoxUI
if (focusListener != null)
editor.removeFocusListener(focusListener);
}
-
- /**
+
+ /**
* Lays out the ComboBox
*/
public void layoutComboBox(Container parent,
diff --git a/javax/swing/plaf/metal/MetalFileChooserUI.java b/javax/swing/plaf/metal/MetalFileChooserUI.java
index 9bded8232..df49edf61 100644
--- a/javax/swing/plaf/metal/MetalFileChooserUI.java
+++ b/javax/swing/plaf/metal/MetalFileChooserUI.java
@@ -100,17 +100,17 @@ import javax.swing.table.DefaultTableModel;
* A UI delegate for the {@link JFileChooser} component. This class is only
* partially implemented and is not usable yet.
*/
-public class MetalFileChooserUI
+public class MetalFileChooserUI
extends BasicFileChooserUI
{
-
+
/**
* A renderer for the files and directories in the file chooser table.
*/
class TableFileRenderer
extends DefaultTableCellRenderer
{
-
+
/**
* Creates a new renderer.
*/
@@ -118,17 +118,17 @@ public class MetalFileChooserUI
{
super();
}
-
+
/**
* Returns a component that can render the specified value.
- *
+ *
* @param table the table
* @param value the string value of the cell
* @param isSelected is the item selected?
* @param hasFocus does the item have the focus?
* @param row the row
* @param column the column
- *
+ *
* @return The renderer.
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -143,12 +143,12 @@ public class MetalFileChooserUI
}
else
setIcon(null);
-
+
setText(value.toString());
setOpaque(true);
setEnabled(table.isEnabled());
setFont(fileList.getFont());
-
+
if (startEditing && column == 0 || !isSelected)
{
setBackground(table.getBackground());
@@ -164,20 +164,20 @@ public class MetalFileChooserUI
setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
else
setBorder(noFocusBorder);
-
+
return this;
}
}
-
+
/**
* ActionListener for the list view.
*/
class ListViewActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the <code>ActionEvent</code> that occurred
*/
@@ -195,23 +195,23 @@ public class MetalFileChooserUI
if (index.length > 0)
for (int i = 0; i < index.length; i++)
fileList.getSelectionModel().addSelectionInterval(index[i], index[i]);
-
+
fc.add(fileListPanel, BorderLayout.CENTER);
fc.revalidate();
fc.repaint();
}
}
}
-
+
/**
* ActionListener for the details view.
*/
class DetailViewActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the <code>ActionEvent</code> that occurred
*/
@@ -223,7 +223,7 @@ public class MetalFileChooserUI
JFileChooser fc = getFileChooser();
listView = false;
fc.remove(fileListPanel);
-
+
if (fileTable == null)
createDetailsView(fc);
else
@@ -235,18 +235,18 @@ public class MetalFileChooserUI
for (int i = 0; i < index.length; i++)
fileTable.getSelectionModel().addSelectionInterval(index[i], index[i]);
}
-
+
fc.add(fileTablePanel, BorderLayout.CENTER);
fc.revalidate();
fc.repaint();
}
}
}
-
+
/**
* A property change listener.
*/
- class MetalFileChooserPropertyChangeListener
+ class MetalFileChooserPropertyChangeListener
implements PropertyChangeListener
{
/**
@@ -255,25 +255,25 @@ public class MetalFileChooserUI
public MetalFileChooserPropertyChangeListener()
{
}
-
+
/**
* Handles a property change event.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
{
JFileChooser filechooser = getFileChooser();
-
+
String n = e.getPropertyName();
if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY))
{
- int mode = -1;
+ int mode = -1;
if (filechooser.isMultiSelectionEnabled())
mode = ListSelectionModel.MULTIPLE_INTERVAL_SELECTION;
else
mode = ListSelectionModel.SINGLE_SELECTION;
-
+
if (listView)
fileList.setSelectionMode(mode);
else
@@ -282,7 +282,7 @@ public class MetalFileChooserUI
else if (n.equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
{
File file = filechooser.getSelectedFile();
-
+
if (file != null
&& filechooser.getDialogType() == JFileChooser.SAVE_DIALOG)
{
@@ -301,12 +301,12 @@ public class MetalFileChooserUI
filechooser.setApproveButtonToolTipText(saveButtonToolTipText);
}
}
-
+
if (file == null)
setFileName(null);
- else if (file.isFile() || filechooser.getFileSelectionMode()
- != JFileChooser.FILES_ONLY)
- setFileName(file.getName());
+ else if (file.isFile() || filechooser.getFileSelectionMode()
+ != JFileChooser.FILES_ONLY)
+ setFileName(file.getName());
int index = -1;
index = getModel().indexOf(file);
if (index >= 0)
@@ -327,7 +327,7 @@ public class MetalFileChooserUI
}
}
}
-
+
else if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY))
{
if (listView)
@@ -349,7 +349,7 @@ public class MetalFileChooserUI
boolean hasParent = currentDirectory.getParentFile() != null;
getChangeToParentDirectoryAction().setEnabled(hasParent);
}
-
+
else if (n.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY))
{
filterModel.propertyChange(e);
@@ -369,14 +369,14 @@ public class MetalFileChooserUI
getApproveButtonToolTipText(filechooser));
approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));
}
-
+
else if (n.equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
approveButton.setText(getApproveButtonText(filechooser));
-
+
else if (n.equals(
JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
approveButton.setToolTipText(getApproveButtonToolTipText(filechooser));
-
+
else if (n.equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));
@@ -393,7 +393,7 @@ public class MetalFileChooserUI
topPanel.repaint();
topPanel.doLayout();
}
-
+
else if (n.equals(
JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
{
@@ -404,7 +404,7 @@ public class MetalFileChooserUI
filechooser.removeChoosableFileFilter(
getAcceptAllFileFilter(filechooser));
}
-
+
else if (n.equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY))
{
JComponent old = (JComponent) e.getOldValue();
@@ -414,7 +414,7 @@ public class MetalFileChooserUI
if (newval != null)
getAccessoryPanel().add(newval);
}
-
+
if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)
|| n.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)
|| n.equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
@@ -425,7 +425,7 @@ public class MetalFileChooserUI
if (fileList != null)
fileList.removeAll();
startEditing = false;
-
+
// Set text on button back to original.
if (filechooser.getDialogType() == JFileChooser.SAVE_DIALOG)
{
@@ -434,16 +434,16 @@ public class MetalFileChooserUI
filechooser.setApproveButtonText(saveButtonText);
filechooser.setApproveButtonToolTipText(saveButtonToolTipText);
}
-
+
rescanCurrentDirectory(filechooser);
}
-
+
filechooser.revalidate();
filechooser.repaint();
}
}
-
- /**
+
+ /**
* A combo box model containing the selected directory and all its parent
* directories.
*/
@@ -453,46 +453,46 @@ public class MetalFileChooserUI
{
/** Storage for the items in the model. */
private List items;
-
+
/** The index of the selected item. */
private int selectedIndex;
-
+
/**
* Creates a new model.
*/
- public DirectoryComboBoxModel()
+ public DirectoryComboBoxModel()
{
items = new java.util.ArrayList();
selectedIndex = -1;
}
-
+
/**
* Returns the number of items in the model.
- *
+ *
* @return The number of items in the model.
*/
public int getSize()
{
return items.size();
}
-
+
/**
* Returns the item at the specified index.
- *
+ *
* @param index the item index.
- *
+ *
* @return The item.
*/
public Object getElementAt(int index)
{
return items.get(index);
}
-
+
/**
* Returns the depth of the item at the given <code>index</code>.
- *
+ *
* @param index the item index.
- *
+ *
* @return The depth.
*/
public int getDepth(int index)
@@ -502,22 +502,22 @@ public class MetalFileChooserUI
/**
* Returns the selected item, or <code>null</code> if no item is selected.
- *
+ *
* @return The selected item, or <code>null</code>.
*/
public Object getSelectedItem()
{
- if (selectedIndex >= 0)
+ if (selectedIndex >= 0)
return items.get(selectedIndex);
else
return null;
}
-
+
/**
* Sets the selected item. This clears all the directories from the
* existing list, and repopulates it with the new selected directory
* and all its parent directories.
- *
+ *
* @param selectedDirectory the selected directory.
*/
public void setSelectedItem(Object selectedDirectory)
@@ -533,7 +533,7 @@ public class MetalFileChooserUI
selectedIndex = items.indexOf(selectedDirectory);
fireContentsChanged(this, 0, items.size() - 1);
}
-
+
}
/**
@@ -549,10 +549,10 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Handles the action event.
- *
+ *
* @param e the event.
*/
public void actionPerformed(ActionEvent e)
@@ -581,17 +581,17 @@ public class MetalFileChooserUI
{
indentIcon = new IndentIcon();
}
-
+
/**
- * Returns a component that can be used to paint the given value within
+ * Returns a component that can be used to paint the given value within
* the list.
- *
+ *
* @param list the list.
* @param value the value (a {@link File}).
* @param index the item index.
* @param isSelected is the item selected?
* @param cellHasFocus does the list cell have focus?
- *
+ *
* @return The list cell renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
@@ -671,7 +671,7 @@ public class MetalFileChooserUI
{
icon.paintIcon(c, g, x + depth * INDENT, y);
}
-
+
}
/**
@@ -680,7 +680,7 @@ public class MetalFileChooserUI
protected class FileRenderer
extends DefaultListCellRenderer
{
-
+
/**
* Creates a new renderer.
*/
@@ -688,16 +688,16 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Returns a component that can render the specified value.
- *
+ *
* @param list the list.
* @param value the value (a {@link File}).
* @param index the index.
* @param isSelected is the item selected?
* @param cellHasFocus does the item have the focus?
- *
+ *
* @return The renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
@@ -751,7 +751,7 @@ public class MetalFileChooserUI
/** The index of the selected file filter. */
private Object selected;
-
+
/**
* Creates a new model.
*/
@@ -761,10 +761,10 @@ public class MetalFileChooserUI
filters[0] = getAcceptAllFileFilter(getFileChooser());
selected = filters[0];
}
-
+
/**
* Handles property changes.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -788,10 +788,10 @@ public class MetalFileChooserUI
fireContentsChanged(this, 0, filters.length);
}
}
-
+
/**
* Sets the selected filter.
- *
+ *
* @param filter the filter (<code>null</code> ignored).
*/
public void setSelectedItem(Object filter)
@@ -802,39 +802,39 @@ public class MetalFileChooserUI
fireContentsChanged(this, -1, -1);
}
}
-
+
/**
* Returns the selected file filter.
- *
+ *
* @return The selected file filter.
*/
public Object getSelectedItem()
{
return selected;
}
-
+
/**
* Returns the number of items in the model.
- *
+ *
* @return The number of items in the model.
*/
public int getSize()
{
return filters.length;
}
-
+
/**
* Returns the item at the specified index.
- *
+ *
* @param index the item index.
- *
+ *
* @return The item at the specified index.
*/
public Object getElementAt(int index)
{
return filters[index];
}
-
+
}
/**
@@ -850,23 +850,23 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
- * Returns a component that can be used to paint the given value within
+ * Returns a component that can be used to paint the given value within
* the list.
- *
+ *
* @param list the list.
* @param value the value (a {@link FileFilter}).
* @param index the item index.
* @param isSelected is the item selected?
* @param cellHasFocus does the list cell have focus?
- *
+ *
* @return This component as the renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus)
{
- super.getListCellRendererComponent(list, value, index, isSelected,
+ super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
FileFilter filter = (FileFilter) value;
setText(filter.getDescription());
@@ -876,10 +876,10 @@ public class MetalFileChooserUI
/**
* A listener for selection events in the file list.
- *
+ *
* @see #createListSelectionListener(JFileChooser)
*/
- class MetalFileChooserSelectionListener
+ class MetalFileChooserSelectionListener
implements ListSelectionListener
{
/**
@@ -916,28 +916,28 @@ public class MetalFileChooserUI
protected class SingleClickListener
extends MouseAdapter
{
-
+
/** Stores instance of the list */
JList list;
-
- /**
+
+ /**
* Stores the current file that is being edited.
* It is null if nothing is currently being edited.
*/
File editFile;
-
+
/** The current file chooser. */
JFileChooser fc;
-
+
/** The last file selected. */
Object lastSelected;
-
+
/** The textfield used for editing. */
JTextField editField;
-
+
/**
* Creates a new listener.
- *
+ *
* @param list the directory/file list.
*/
public SingleClickListener(JList list)
@@ -948,10 +948,10 @@ public class MetalFileChooserUI
lastSelected = null;
startEditing = false;
}
-
+
/**
* Receives notification of a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -974,10 +974,10 @@ public class MetalFileChooserUI
else
completeEditing();
}
-
+
/**
* Sets up the text editor for the current file.
- *
+ *
* @param index -
* the current index of the item in the list to be edited.
*/
@@ -991,7 +991,7 @@ public class MetalFileChooserUI
startEditing = true;
editField = new JTextField(editFile.getName());
editField.addActionListener(new EditingActionListener());
-
+
Icon icon = getFileView(fc).getIcon(editFile);
if (icon != null)
{
@@ -1000,9 +1000,9 @@ public class MetalFileChooserUI
bounds.width -= padding;
}
editField.setBounds(bounds);
-
+
list.add(editField);
-
+
editField.requestFocus();
editField.selectAll();
}
@@ -1010,8 +1010,8 @@ public class MetalFileChooserUI
completeEditing();
list.repaint();
}
-
- /**
+
+ /**
* Completes the editing.
*/
void completeEditing()
@@ -1020,12 +1020,12 @@ public class MetalFileChooserUI
{
String text = editField.getText();
if (text != null && text != "" && !text.equals(fc.getName(editFile)))
- {
- File f = fc.getFileSystemView().
- createFileObject(fc.getCurrentDirectory(), text);
+ {
+ File f = fc.getFileSystemView().
+ createFileObject(fc.getCurrentDirectory(), text);
if ( editFile.renameTo(f) )
rescanCurrentDirectory(fc);
- }
+ }
list.remove(editField);
}
startEditing = false;
@@ -1034,22 +1034,22 @@ public class MetalFileChooserUI
editField = null;
list.repaint();
}
-
+
/**
* ActionListener for the editing text field.
*/
class EditingActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the <code>ActionEvent</code> that occurred
*/
public void actionPerformed(ActionEvent e)
{
- if (editField != null)
+ if (editField != null)
completeEditing();
}
}
@@ -1070,19 +1070,19 @@ public class MetalFileChooserUI
/** The last selected file. */
Object lastSelected;
-
- /**
+
+ /**
* Stores the current file that is being edited.
* It is null if nothing is currently being edited.
*/
File editFile;
-
+
/** The textfield used for editing. */
JTextField editField;
/**
* Creates a new listener.
- *
+ *
* @param table the directory/file table
* @param fc the JFileChooser
*/
@@ -1099,7 +1099,7 @@ public class MetalFileChooserUI
/**
* Receives notification of a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -1167,7 +1167,7 @@ public class MetalFileChooserUI
/**
* Sets up the text editor for the current file.
- *
+ *
* @param row -
* the current row of the item in the list to be edited.
*/
@@ -1184,9 +1184,9 @@ public class MetalFileChooserUI
// Need to adjust y pos
bounds.y = row * table.getRowHeight();
editField.setBounds(bounds);
-
+
table.add(editField);
-
+
editField.requestFocus();
editField.selectAll();
}
@@ -1194,8 +1194,8 @@ public class MetalFileChooserUI
completeEditing();
table.repaint();
}
-
- /**
+
+ /**
* Completes the editing.
*/
void completeEditing()
@@ -1214,26 +1214,26 @@ public class MetalFileChooserUI
editField = null;
table.repaint();
}
-
+
/**
* ActionListener for the editing text field.
*/
class EditingActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the <code>ActionEvent</code> that occurred
*/
public void actionPerformed(ActionEvent e)
{
- if (editField != null)
+ if (editField != null)
completeEditing();
}
}
-
+
/**
* Closes the dialog.
*/
@@ -1243,91 +1243,91 @@ public class MetalFileChooserUI
if (owner instanceof JDialog)
((JDialog) owner).dispose();
}
- }
-
+ }
+
/** The text for a label describing the directory combo box. */
private String directoryLabel;
-
+
private JComboBox directoryComboBox;
-
+
/** The model for the directory combo box. */
DirectoryComboBoxModel directoryModel;
-
+
/** The text for a label describing the file text field. */
private String fileLabel;
-
+
/** The file name text field. */
private JTextField fileTextField;
-
+
/** The text for a label describing the filter combo box. */
private String filterLabel;
- /**
- * The top panel (contains the directory combo box and the control buttons).
+ /**
+ * The top panel (contains the directory combo box and the control buttons).
*/
private JPanel topPanel;
-
+
/** A panel containing the control buttons ('up', 'home' etc.). */
private JPanel controls;
- /**
- * The panel that contains the filename field and the filter combobox.
+ /**
+ * The panel that contains the filename field and the filter combobox.
*/
private JPanel bottomPanel;
- /**
- * The panel that contains the 'Open' (or 'Save') and 'Cancel' buttons.
+ /**
+ * The panel that contains the 'Open' (or 'Save') and 'Cancel' buttons.
*/
private JPanel buttonPanel;
-
+
private JButton approveButton;
-
+
/** The file list. */
JList fileList;
-
+
/** The file table. */
JTable fileTable;
-
+
/** The panel containing the file list. */
JPanel fileListPanel;
-
+
/** The panel containing the file table. */
JPanel fileTablePanel;
-
+
/** The filter combo box model. */
private FilterComboBoxModel filterModel;
/** The action map. */
private ActionMap actionMap;
-
+
/** True if currently in list view. */
boolean listView;
-
+
/** True if we can or have started editing a cell. */
boolean startEditing;
-
+
/** The scrollpane used for the table and list. */
JScrollPane scrollPane;
-
+
/** The text for the label when saving. */
String save;
-
+
/** The text for the label when opening a directory. */
String look;
-
+
/** The label for the file combo box. */
JLabel dirLabel;
-
+
/** Listeners. */
ListSelectionListener listSelList;
MouseListener doubleClickList;
SingleClickListener singleClickList;
TableClickListener tableClickList;
-
+
/**
* A factory method that returns a UI delegate for the specified
* component.
- *
+ *
* @param c the component (which should be a {@link JFileChooser}).
*/
public static ComponentUI createUI(JComponent c)
@@ -1338,7 +1338,7 @@ public class MetalFileChooserUI
/**
* Creates a new instance of this UI delegate.
- *
+ *
* @param filechooser the file chooser component.
*/
public MetalFileChooserUI(JFileChooser filechooser)
@@ -1353,16 +1353,16 @@ public class MetalFileChooserUI
super.installUI(c);
actionMap = createActionMap();
}
-
+
public void uninstallUI(JComponent c)
{
super.uninstallUI(c);
actionMap = null;
}
-
+
/**
* Installs the sub-components of the file chooser.
- *
+ *
* @param fc the file chooser component.
*/
public void installComponents(JFileChooser fc)
@@ -1373,7 +1373,7 @@ public class MetalFileChooserUI
topPanel.add(dirLabel, BorderLayout.WEST);
this.controls = new JPanel();
addControlButtons();
-
+
JPanel dirPanel = new JPanel(new VerticalMidLayout());
directoryModel = createDirectoryComboBoxModel(fc);
directoryComboBox = new JComboBox(directoryModel);
@@ -1383,16 +1383,16 @@ public class MetalFileChooserUI
topPanel.add(controls, BorderLayout.EAST);
topPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
fc.add(topPanel, BorderLayout.NORTH);
-
+
JPanel list = createList(fc);
list.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
fc.add(list, BorderLayout.CENTER);
-
+
JPanel bottomPanel = getBottomPanel();
filterModel = createFilterComboBoxModel();
JComboBox fileFilterCombo = new JComboBox(filterModel);
fileFilterCombo.setRenderer(createFilterComboBoxRenderer());
-
+
fileTextField = new JTextField();
JPanel fileNamePanel = new JPanel(new VerticalMidLayout());
fileNamePanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 5));
@@ -1401,21 +1401,21 @@ public class MetalFileChooserUI
row1.add(new JLabel(this.fileLabel), BorderLayout.WEST);
row1.add(fileNamePanel);
bottomPanel.add(row1);
-
+
JPanel row2 = new JPanel(new BorderLayout());
row2.add(new JLabel(this.filterLabel), BorderLayout.WEST);
row2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
row2.add(fileFilterCombo);
bottomPanel.add(row2);
JPanel buttonPanel = new JPanel(new ButtonLayout());
-
+
approveButton = new JButton(getApproveSelectionAction());
approveButton.setText(getApproveButtonText(fc));
approveButton.setToolTipText(getApproveButtonToolTipText(fc));
approveButton.setMnemonic(getApproveButtonMnemonic(fc));
buttonPanel.add(approveButton);
buttonPanel.setBorder(BorderFactory.createEmptyBorder(8, 0, 0, 0));
-
+
JButton cancelButton = new JButton(getCancelSelectionAction());
cancelButton.setText(cancelButtonText);
cancelButton.setToolTipText(cancelButtonToolTipText);
@@ -1424,14 +1424,14 @@ public class MetalFileChooserUI
bottomPanel.add(buttonPanel, BorderLayout.SOUTH);
bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 8, 8));
fc.add(bottomPanel, BorderLayout.SOUTH);
-
+
fc.add(getAccessoryPanel(), BorderLayout.EAST);
}
-
+
/**
- * Uninstalls the components added by
+ * Uninstalls the components added by
* {@link #installComponents(JFileChooser)}.
- *
+ *
* @param fc the file chooser.
*/
public void uninstallComponents(JFileChooser fc)
@@ -1444,27 +1444,27 @@ public class MetalFileChooserUI
fileListPanel = null;
fc.remove(topPanel);
topPanel = null;
-
+
directoryModel = null;
fileTextField = null;
directoryComboBox = null;
}
-
+
/**
- * Returns the panel that contains the 'Open' (or 'Save') and 'Cancel'
+ * Returns the panel that contains the 'Open' (or 'Save') and 'Cancel'
* buttons.
- *
+ *
* @return The panel.
*/
protected JPanel getButtonPanel()
{
- return buttonPanel;
+ return buttonPanel;
}
-
+
/**
* Creates and returns a new panel that will be used for the controls at
* the bottom of the file chooser.
- *
+ *
* @return A new panel.
*/
protected JPanel getBottomPanel()
@@ -1473,15 +1473,15 @@ public class MetalFileChooserUI
bottomPanel = new JPanel(new GridLayout(3, 2));
return bottomPanel;
}
-
+
/**
* Fetches localised strings for use by the labels and buttons on the
* file chooser.
- *
+ *
* @param fc the file chooser.
*/
protected void installStrings(JFileChooser fc)
- {
+ {
super.installStrings(fc);
look = "Look In: ";
save = "Save In: ";
@@ -1489,38 +1489,38 @@ public class MetalFileChooserUI
directoryLabel = save;
else
directoryLabel = look;
-
+
fileLabel = "File Name: ";
filterLabel = "Files of Type: ";
-
+
this.cancelButtonMnemonic = 0;
this.cancelButtonText = "Cancel";
this.cancelButtonToolTipText = "Abort file chooser dialog";
-
+
this.directoryOpenButtonMnemonic = 0;
this.directoryOpenButtonText = "Open";
this.directoryOpenButtonToolTipText = "Open selected directory";
-
+
this.helpButtonMnemonic = 0;
this.helpButtonText = "Help";
this.helpButtonToolTipText = "Filechooser help";
-
+
this.openButtonMnemonic = 0;
this.openButtonText = "Open";
this.openButtonToolTipText = "Open selected file";
-
+
this.saveButtonMnemonic = 0;
this.saveButtonText = "Save";
this.saveButtonToolTipText = "Save selected file";
-
+
this.updateButtonMnemonic = 0;
this.updateButtonText = "Update";
- this.updateButtonToolTipText = "Update directory listing";
+ this.updateButtonToolTipText = "Update directory listing";
}
-
+
/**
* Installs the listeners required.
- *
+ *
* @param fc the file chooser.
*/
protected void installListeners(JFileChooser fc)
@@ -1535,8 +1535,8 @@ public class MetalFileChooserUI
fileList.addMouseListener(singleClickList);
super.installListeners(fc);
}
-
- protected void uninstallListeners(JFileChooser fc)
+
+ protected void uninstallListeners(JFileChooser fc)
{
super.uninstallListeners(fc);
fc.removePropertyChangeListener(filterModel);
@@ -1544,21 +1544,21 @@ public class MetalFileChooserUI
fileList.removeListSelectionListener(listSelList);
fileList.removeMouseListener(doubleClickList);
fileList.removeMouseListener(singleClickList);
-
+
if (fileTable != null)
fileTable.removeMouseListener(tableClickList);
}
-
+
protected ActionMap getActionMap()
{
if (actionMap == null)
actionMap = createActionMap();
return actionMap;
}
-
+
/**
* Creates and returns an action map.
- *
+ *
* @return The action map.
*/
protected ActionMap createActionMap()
@@ -1572,9 +1572,9 @@ public class MetalFileChooserUI
/**
* Creates a panel containing a list of files.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return A panel.
*/
protected JPanel createList(JFileChooser fc)
@@ -1600,41 +1600,41 @@ public class MetalFileChooserUI
fileListPanel.setPreferredSize(new Dimension(405, 135));
return fileListPanel;
}
-
+
/**
* Creates a panel containing a table within a scroll pane.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The details view.
*/
protected JPanel createDetailsView(JFileChooser fc)
{
fileTablePanel = new JPanel(new BorderLayout());
-
+
Object[] cols = new Object[] {"Name", "Size", "Modified"};
Object[][] rows = new Object[fileList.getModel().getSize()][3];
-
+
fileTable = new JTable(new DefaultTableModel(rows, cols));
-
+
if (fc.isMultiSelectionEnabled())
fileTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
else
fileTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
+
fileTable.setShowGrid(false);
fileTable.setColumnSelectionAllowed(false);
fileTable.setDefaultRenderer(Object.class, new TableFileRenderer());
tableClickList = new TableClickListener(fileTable, fc);
fileTable.addMouseListener(tableClickList);
-
- return updateTable();
+
+ return updateTable();
}
-
+
/**
* Sets the values in the table, and puts it in the panel.
- *
+ *
* @return the panel containing the table.
*/
JPanel updateTable()
@@ -1671,10 +1671,10 @@ public class MetalFileChooserUI
return fileTablePanel;
}
-
+
/**
* Formats bytes into the appropriate size.
- *
+ *
* @param bytes the number of bytes to convert
* @return a string representation of the size
*/
@@ -1686,7 +1686,7 @@ public class MetalFileChooserUI
long gb = (long) Math.pow(2, 30);
double size = 0;
String id = "";
-
+
if ((bytes / gb) >= 1)
{
size = (double) bytes / (double) gb;
@@ -1707,27 +1707,27 @@ public class MetalFileChooserUI
size = bytes;
id = "Bytes";
}
-
+
return nf.format(size) + " " + id;
}
/**
* Creates a listener that monitors selections in the directory/file list
* and keeps the {@link JFileChooser} component up to date.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The listener.
- *
+ *
* @see #installListeners(JFileChooser)
*/
public ListSelectionListener createListSelectionListener(JFileChooser fc)
{
return new MetalFileChooserSelectionListener();
}
-
+
/**
* Returns the preferred size for the file chooser component.
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize(JComponent c)
@@ -1740,7 +1740,7 @@ public class MetalFileChooserUI
/**
* Returns the minimum size for the file chooser component.
- *
+ *
* @return The minimum size.
*/
public Dimension getMinimumSize(JComponent c)
@@ -1750,25 +1750,25 @@ public class MetalFileChooserUI
Dimension fl = fileListPanel.getMinimumSize();
return new Dimension(fl.width, tp.height + bp.height + fl.height);
}
-
+
/**
* Returns the maximum size for the file chooser component.
- *
+ *
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent c)
{
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
}
-
+
/**
* Creates a property change listener that monitors the {@link JFileChooser}
* for property change events and updates the component display accordingly.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The property change listener.
- *
+ *
* @see #installListeners(JFileChooser)
*/
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
@@ -1778,10 +1778,10 @@ public class MetalFileChooserUI
/**
* Creates and returns a new instance of {@link DirectoryComboBoxModel}.
- *
+ *
* @return A new instance of {@link DirectoryComboBoxModel}.
*/
- protected MetalFileChooserUI.DirectoryComboBoxModel
+ protected MetalFileChooserUI.DirectoryComboBoxModel
createDirectoryComboBoxModel(JFileChooser fc)
{
return new DirectoryComboBoxModel();
@@ -1790,9 +1790,9 @@ public class MetalFileChooserUI
/**
* Creates a new instance of the renderer used in the directory
* combo box.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The renderer.
*/
protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(
@@ -1803,23 +1803,23 @@ public class MetalFileChooserUI
/**
* Creates and returns a new instance of {@link FilterComboBoxModel}.
- *
+ *
* @return A new instance of {@link FilterComboBoxModel}.
*/
protected FilterComboBoxModel createFilterComboBoxModel()
{
- return new FilterComboBoxModel();
+ return new FilterComboBoxModel();
}
/**
* Creates and returns a new instance of {@link FilterComboBoxRenderer}.
- *
+ *
* @return A new instance of {@link FilterComboBoxRenderer}.
*/
- protected MetalFileChooserUI.FilterComboBoxRenderer
+ protected MetalFileChooserUI.FilterComboBoxRenderer
createFilterComboBoxRenderer()
{
- return new FilterComboBoxRenderer();
+ return new FilterComboBoxRenderer();
}
/**
@@ -1832,26 +1832,26 @@ public class MetalFileChooserUI
upButton.setIcon(this.upFolderIcon);
upButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(upButton);
-
+
JButton homeButton = new JButton(getGoHomeAction());
homeButton.setText(null);
homeButton.setIcon(this.homeFolderIcon);
homeButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(homeButton);
-
+
JButton newFolderButton = new JButton(getNewFolderAction());
newFolderButton.setText(null);
newFolderButton.setIcon(this.newFolderIcon);
newFolderButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(newFolderButton);
-
+
JToggleButton listButton = new JToggleButton(this.listViewIcon);
listButton.setMargin(new Insets(0, 0, 0, 0));
listButton.addActionListener(new ListViewActionListener());
listButton.setSelected(true);
- listView = true;
+ listView = true;
controls.add(listButton);
-
+
JToggleButton detailButton = new JToggleButton(this.detailsViewIcon);
detailButton.setMargin(new Insets(0, 0, 0, 0));
detailButton.addActionListener(new DetailViewActionListener());
@@ -1862,7 +1862,7 @@ public class MetalFileChooserUI
buttonGroup.add(listButton);
buttonGroup.add(detailButton);
}
-
+
/**
* Removes all the buttons from the control panel.
*/
@@ -1872,10 +1872,10 @@ public class MetalFileChooserUI
controls.revalidate();
controls.repaint();
}
-
+
/**
* Updates the current directory.
- *
+ *
* @param fc the file chooser to update.
*/
public void rescanCurrentDirectory(JFileChooser fc)
@@ -1887,43 +1887,43 @@ public class MetalFileChooserUI
else
createList(fc);
}
-
+
/**
* Returns the file name in the text field.
- *
+ *
* @return The file name.
*/
public String getFileName()
{
String result = null;
- if (fileTextField != null)
+ if (fileTextField != null)
result = fileTextField.getText();
return result;
}
-
+
/**
* Sets the file name in the text field.
- *
+ *
* @param filename the file name.
*/
public void setFileName(String filename)
{
fileTextField.setText(filename);
}
-
+
/**
* DOCUMENT ME!!
- *
+ *
* @param e - DOCUMENT ME!
*/
public void valueChanged(ListSelectionEvent e)
{
// FIXME: Not sure what we should be doing here, if anything.
}
-
+
/**
* Returns the approve button.
- *
+ *
* @return The approve button.
*/
protected JButton getApproveButton(JFileChooser fc)
@@ -1939,10 +1939,10 @@ public class MetalFileChooserUI
{
/**
* Performs the layout.
- *
+ *
* @param parent the container.
*/
- public void layoutContainer(Container parent)
+ public void layoutContainer(Container parent)
{
int count = parent.getComponentCount();
if (count > 0)
@@ -1952,32 +1952,32 @@ public class MetalFileChooserUI
Dimension prefSize = c.getPreferredSize();
int h = parent.getHeight() - insets.top - insets.bottom;
int adj = Math.max(0, (h - prefSize.height) / 2);
- c.setBounds(insets.left, insets.top + adj, parent.getWidth()
- - insets.left - insets.right,
+ c.setBounds(insets.left, insets.top + adj, parent.getWidth()
+ - insets.left - insets.right,
(int) Math.min(prefSize.getHeight(), h));
}
}
-
+
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
return preferredLayoutSize(parent);
}
-
+
/**
* Returns the preferred layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The preferred layout size.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
if (parent.getComponentCount() > 0)
{
@@ -1985,26 +1985,26 @@ public class MetalFileChooserUI
}
else return null;
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param name the name the component is associated with.
* @param component the component.
*/
- public void addLayoutComponent(String name, Component component)
+ public void addLayoutComponent(String name, Component component)
{
// do nothing
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param component the component.
*/
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
// do nothing
}
@@ -2017,13 +2017,13 @@ public class MetalFileChooserUI
class ButtonLayout implements LayoutManager
{
static final int GAP = 4;
-
+
/**
* Performs the layout.
- *
+ *
* @param parent the container.
*/
- public void layoutContainer(Container parent)
+ public void layoutContainer(Container parent)
{
int count = parent.getComponentCount();
if (count > 0)
@@ -2036,7 +2036,7 @@ public class MetalFileChooserUI
Dimension prefSize = c.getPreferredSize();
maxW = Math.max(prefSize.width, maxW);
}
-
+
// then position the buttons
Insets insets = parent.getInsets();
int availableH = parent.getHeight() - insets.top - insets.bottom;
@@ -2044,42 +2044,42 @@ public class MetalFileChooserUI
for (int i = count - 1; i >= 0; i--)
{
Component c = parent.getComponent(i);
- Dimension prefSize = c.getPreferredSize();
+ Dimension prefSize = c.getPreferredSize();
int adj = Math.max(0, (availableH - prefSize.height) / 2);
currentX = currentX - prefSize.width;
- c.setBounds(currentX, insets.top + adj, prefSize.width,
+ c.setBounds(currentX, insets.top + adj, prefSize.width,
(int) Math.min(prefSize.getHeight(), availableH));
currentX = currentX - GAP;
}
}
}
-
+
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
return preferredLayoutSize(parent);
}
-
+
/**
* Returns the preferred layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The preferred layout size.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
Insets insets = parent.getInsets();
int maxW = 0;
int maxH = 0;
int count = parent.getComponentCount();
- if (count > 0)
+ if (count > 0)
{
for (int i = 0; i < count; i++)
{
@@ -2089,29 +2089,29 @@ public class MetalFileChooserUI
maxH = Math.max(d.height, maxH);
}
}
- return new Dimension(maxW * count + GAP * (count - 1) + insets.left
+ return new Dimension(maxW * count + GAP * (count - 1) + insets.left
+ insets.right, maxH + insets.top + insets.bottom);
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param name the name the component is associated with.
* @param component the component.
*/
- public void addLayoutComponent(String name, Component component)
+ public void addLayoutComponent(String name, Component component)
{
// do nothing
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param component the component.
*/
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
// do nothing
}
diff --git a/javax/swing/plaf/metal/MetalIconFactory.java b/javax/swing/plaf/metal/MetalIconFactory.java
index 2817336a8..5382577c3 100644
--- a/javax/swing/plaf/metal/MetalIconFactory.java
+++ b/javax/swing/plaf/metal/MetalIconFactory.java
@@ -60,67 +60,67 @@ import javax.swing.plaf.UIResource;
/**
* Creates icons for the {@link MetalLookAndFeel}.
*/
-public class MetalIconFactory implements Serializable
+public class MetalIconFactory implements Serializable
{
/** A constant representing "dark". */
public static final boolean DARK = false;
-
+
/** A constant representing "light". */
public static final boolean LIGHT = true;
-
+
/** A shared instance of the MenuArrowIcon. */
private static Icon menuArrow;
-
+
/** A shared instance of the MenuItemArrowIcon. */
private static Icon menuItemArrow;
-
+
/**
* An icon displayed for {@link JCheckBoxMenuItem} components.
*/
- private static class CheckBoxMenuItemIcon
- implements Icon, UIResource, Serializable
+ private static class CheckBoxMenuItemIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public CheckBoxMenuItemIcon()
+ public CheckBoxMenuItemIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon (10 pixels).
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 10;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon (10 pixels).
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 10;
}
-
+
/**
* Paints the icon.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
JCheckBoxMenuItem item = (JCheckBoxMenuItem) c;
-
+
if (item.isArmed())
g.setColor(MetalLookAndFeel.getBlack());
else
@@ -129,7 +129,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x, y + 1, x, y + 8);
g.drawLine(x + 2, y + 8, x + 8, y + 8);
g.drawLine(x + 8, y + 2, x + 8, y + 7);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, y + 1, x + 7, y + 1);
g.drawLine(x + 1, y + 2, x + 1, y + 7);
@@ -145,56 +145,56 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 8 - i, y + i, x + 9 - i, y + i);
}
- }
+ }
}
/**
* An icon used for the "detail view" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserDetailViewIcon()
*/
- private static class FileChooserDetailViewIcon
+ private static class FileChooserDetailViewIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserDetailViewIcon()
+ public FileChooserDetailViewIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -204,7 +204,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 3, x + 6, y + 7);
g.drawLine(x + 2, y + 7, x + 6, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 7);
-
+
// file 2 outline
g.drawLine(x + 2, y + 10, x + 5, y + 10);
g.drawLine(x + 6, y + 11, x + 6, y + 15);
@@ -214,157 +214,157 @@ public class MetalIconFactory implements Serializable
// detail lines
g.drawLine(x + 8, y + 5, x + 15, y + 5);
g.drawLine(x + 8, y + 13, x + 15, y + 13);
-
+
// fill files
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 3, 3, 4);
g.fillRect(x + 3, y + 11, 3, 4);
-
+
// highlight files
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 4, y + 4, x + 4, y + 5);
g.drawLine(x + 4, y + 12, x + 4, y + 13);
-
+
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used for the "home folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserHomeFolderIcon()
*/
- private static class FileChooserHomeFolderIcon
+ private static class FileChooserHomeFolderIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserHomeFolderIcon()
+ public FileChooserHomeFolderIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
-
+
// roof
g.drawLine(x + 1, y + 8, x + 8, y + 1);
g.drawLine(x + 8, y + 1, x + 15, y + 8);
-
+
// base of house
g.drawLine(x + 3, y + 6, x + 3, y + 15);
g.drawLine(x + 3, y + 15, x + 13, y + 15);
g.drawLine(x + 13, y + 6, x + 13, y + 15);
-
+
// door frame
g.drawLine(x + 6, y + 9, x + 6, y + 15);
g.drawLine(x + 6, y + 9, x + 10, y + 9);
g.drawLine(x + 10, y + 9, x + 10, y + 15);
-
+
// chimney
g.drawLine(x + 11, y + 2, x + 11, y + 4);
g.drawLine(x + 12, y + 2, x + 12, y + 5);
-
+
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// roof paint
int xx = x + 8;
for (int i = 0; i < 4; i++)
g.drawLine(xx - i, y + 2 + i, xx + i, y + 2 + i);
g.fillRect(x + 4, y + 6, 9, 2);
-
+
// door knob
g.drawLine(x + 9, y + 12, x + 9, y + 12);
-
+
// house paint
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.drawLine(x + 4, y + 8, x + 12, y + 8);
g.fillRect(x + 4, y + 9, 2, 6);
g.fillRect(x + 11, y + 9, 2, 6);
-
+
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An icon used for the "list view" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserListViewIcon()
*/
- private static class FileChooserListViewIcon
- implements Icon, UIResource, Serializable
+ private static class FileChooserListViewIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserListViewIcon()
+ public FileChooserListViewIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -374,37 +374,37 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 3, x + 6, y + 7);
g.drawLine(x + 2, y + 7, x + 6, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 7);
-
+
// file 2 outline
g.drawLine(x + 2, y + 10, x + 5, y + 10);
g.drawLine(x + 6, y + 11, x + 6, y + 15);
g.drawLine(x + 2, y + 15, x + 6, y + 15);
g.drawLine(x + 2, y + 10, x + 2, y + 15);
-
+
// file 3 outline
g.drawLine(x + 10, y + 2, x + 13, y + 2);
g.drawLine(x + 14, y + 3, x + 14, y + 7);
g.drawLine(x + 10, y + 7, x + 14, y + 7);
g.drawLine(x + 10, y + 2, x + 10, y + 7);
-
+
// file 4 outline
g.drawLine(x + 10, y + 10, x + 13, y + 10);
g.drawLine(x + 14, y + 11, x + 14, y + 15);
g.drawLine(x + 10, y + 15, x + 14, y + 15);
g.drawLine(x + 10, y + 10, x + 10, y + 15);
-
+
g.drawLine(x + 8, y + 5, x + 8, y + 5);
g.drawLine(x + 8, y + 13, x + 8, y + 13);
g.drawLine(x + 16, y + 5, x + 16, y + 5);
g.drawLine(x + 16, y + 13, x + 16, y + 13);
-
+
// fill files
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 3, 3, 4);
g.fillRect(x + 3, y + 11, 3, 4);
g.fillRect(x + 11, y + 3, 3, 4);
g.fillRect(x + 11, y + 11, 3, 4);
-
+
// highlight files
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 4, y + 4, x + 4, y + 5);
@@ -413,113 +413,113 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 12, x + 12, y + 13);
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An icon used for the "new folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserNewFolderIcon()
*/
- private static class FileChooserNewFolderIcon
+ private static class FileChooserNewFolderIcon
implements Icon, UIResource, Serializable
{
- /**
+ /**
* Creates a new icon.
*/
- public FileChooserNewFolderIcon()
+ public FileChooserNewFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
-
+
g.drawLine(x + 2, y + 5, x + 9, y + 5);
g.drawLine(x + 10, y + 6, x + 15, y + 6);
g.drawLine(x + 15, y + 5, x + 15, y + 14);
g.drawLine(x + 2, y + 14, x + 15, y + 14);
g.drawLine(x + 1, y + 6, x + 1, y + 14);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(x + 11, y + 3, x + 15, y + 3);
g.drawLine(x + 10, y + 4, x + 15, y + 4);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 7, 7, 7);
g.fillRect(x + 10, y + 8, 5, 6);
g.drawLine(x + 10, y + 5, x + 14, y + 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 10, y + 7, x + 14, y + 7);
g.drawLine(x + 2, y + 6, x + 9, y + 6);
g.drawLine(x + 2, y + 6, x + 2, y + 13);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used for the "up folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserNewFolderIcon()
*/
- private static class FileChooserUpFolderIcon extends FileChooserNewFolderIcon
+ private static class FileChooserUpFolderIcon extends FileChooserNewFolderIcon
{
/**
* Creates a new icon.
*/
- public FileChooserUpFolderIcon()
+ public FileChooserUpFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
// draw the folder
super.paintIcon(c, g, x, y);
-
+
// now draw the up arrow
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 8, y + 9, x + 8, y + 16);
@@ -527,128 +527,128 @@ public class MetalIconFactory implements Serializable
for (int i = 0; i < 4; i++)
g.drawLine(xx - i, y + 9 + i, xx + i, y + 9 + i);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon representing a file (drawn as a piece of paper with the top-right
* corner turned down).
*/
- public static class FileIcon16 implements Icon, Serializable
+ public static class FileIcon16 implements Icon, Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
/**
- * Returns the height of the icon, in pixels. The height returned is
- * <code>16</code> plus the value returned by
+ * Returns the height of the icon, in pixels. The height returned is
+ * <code>16</code> plus the value returned by
* {@link #getAdditionalHeight()}.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16 + getAdditionalHeight();
}
-
+
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics context.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
y = y + getShift();
g.setColor(MetalLookAndFeel.getBlack());
- g.drawLine(x, y, x + 9, y);
- g.drawLine(x, y + 1, x, y + 15);
- g.drawLine(x, y + 15, x + 12, y + 15);
- g.drawLine(x + 12, y + 15, x + 12, y + 6);
- g.drawLine(x + 12, y + 6, x + 9, y);
+ g.drawLine(x, y, x + 9, y);
+ g.drawLine(x, y + 1, x, y + 15);
+ g.drawLine(x, y + 15, x + 12, y + 15);
+ g.drawLine(x + 12, y + 15, x + 12, y + 6);
+ g.drawLine(x + 12, y + 6, x + 9, y);
g.drawLine(x + 7, y + 2, x + 11, y + 6);
g.drawLine(x + 8, y + 1, x + 9, y + 1);
g.setColor(MetalLookAndFeel.getPrimaryControl());
- g.drawLine(x + 1, y + 1, x + 7, y + 1);
- g.drawLine(x + 1, y + 1, x + 1, y + 14);
- g.drawLine(x + 1, y + 14, x + 11, y + 14);
- g.drawLine(x + 11, y + 14, x + 11, y + 7);
+ g.drawLine(x + 1, y + 1, x + 7, y + 1);
+ g.drawLine(x + 1, y + 1, x + 1, y + 14);
+ g.drawLine(x + 1, y + 14, x + 11, y + 14);
+ g.drawLine(x + 11, y + 14, x + 11, y + 7);
g.drawLine(x + 8, y + 2, x + 10, y + 4);
}
-
+
/**
- * Returns the additional height for the icon. The
+ * Returns the additional height for the icon. The
* {@link #getIconHeight()} method adds this value to the icon height it
* returns. Subclasses can override this method to adjust the icon height.
- *
+ *
* @return The additional height (<code>0</code> unless overridden).
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 0;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
- * The default value is zero, but subclasses may override this (for
+ * Returns the vertical shift, in pixels, applied when painting the icon.
+ * The default value is zero, but subclasses may override this (for
* example, see {@link TreeLeafIcon}).
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 0;
}
-
+
}
-
+
/**
* An icon representing a folder.
*/
- public static class FolderIcon16 implements Icon, Serializable
+ public static class FolderIcon16 implements Icon, Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
- * Returns the height of the icon, in pixels. The height returned is
- * <code>16</code> plus the value returned by
+ * Returns the height of the icon, in pixels. The height returned is
+ * <code>16</code> plus the value returned by
* {@link #getAdditionalHeight()}.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16 + getAdditionalHeight();
}
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
y = y + getShift();
g.setColor(MetalLookAndFeel.getBlack());
@@ -666,37 +666,37 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 9, y + 4, x + 15, y + 4);
g.drawLine(x + 10, y + 3, x + 15, y + 3);
}
-
+
/**
- * Returns the additional height for the icon. The
+ * Returns the additional height for the icon. The
* {@link #getIconHeight()} method adds this value to the icon height it
* returns. Subclasses can override this method to adjust the icon height.
- *
+ *
* @return The additional height (<code>0</code> unless overridden).
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 0;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
- * The default value is zero, but subclasses may override this (for
+ * Returns the vertical shift, in pixels, applied when painting the icon.
+ * The default value is zero, but subclasses may override this (for
* example, see {@link TreeFolderIcon}).
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 0;
}
-
+
}
/**
* An icon used by the {@link MetalInternalFrameUI} class when the frame
* is displayed as a palette.
- *
+ *
* @since 1.3
*/
public static class PaletteCloseIcon
@@ -704,33 +704,33 @@ public class MetalIconFactory implements Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 7;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 7;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
AbstractButton button = (AbstractButton) c;
@@ -752,9 +752,9 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 5, y + 3, x + 6, y + 2);
g.drawLine(x + 6, y + 6, x + 6, y + 6);
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An {@link Icon} implementation for {@link JCheckBox}es in the
* Metal Look &amp; Feel.
@@ -799,13 +799,13 @@ public class MetalIconFactory implements Serializable
* Paints the icon, taking into account whether or not the component is
* enabled, selected and/or armed.
*
- * @param c the Component to draw on (must be an instance of
+ * @param c the Component to draw on (must be an instance of
* {@link JRadioButton})
* @param g the Graphics context to draw with
* @param x the X position
* @param y the Y position
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
if (UIManager.get("RadioButton.gradient") != null)
MetalUtils.paintGradient(g, x + 2, y + 2, 8, 8,
@@ -842,13 +842,13 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 4, x + 10, y + 7);
g.fillRect(x + 2, y + 2, 8, 8);
}
- else
+ else
{
// only draw inner highlight if not filled
if (b.isEnabled())
{
g.setColor(MetalLookAndFeel.getWhite());
-
+
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);
@@ -862,7 +862,7 @@ public class MetalIconFactory implements Serializable
if (b.isEnabled())
{
g.setColor(MetalLookAndFeel.getWhite());
-
+
// outer
g.drawLine(x + 10, y + 1, x + 10, y + 1);
g.drawLine(x + 11, y + 2, x + 11, y + 3);
@@ -873,7 +873,7 @@ public class MetalIconFactory implements Serializable
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())
@@ -885,52 +885,52 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 4, y + 8, x + 7, y + 8);
}
g.setColor(savedColor);
- }
+ }
}
/**
* An icon displayed for {@link JRadioButtonMenuItem} components.
*/
- private static class RadioButtonMenuItemIcon
- implements Icon, UIResource, Serializable
+ private static class RadioButtonMenuItemIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public RadioButtonMenuItemIcon()
+ public RadioButtonMenuItemIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 10;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 10;
}
/**
* Paints the icon.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
JRadioButtonMenuItem item = (JRadioButtonMenuItem) c;
@@ -943,7 +943,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 7, x + 1, y + 7);
g.drawLine(x, y + 2, x, y + 6);
g.drawLine(x + 1, y + 1, x + 1, y + 1);
-
+
if (item.isSelected())
{
g.drawLine(x + 3, y + 2, x + 5, y + 2);
@@ -962,14 +962,14 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 3, x + 1, y + 6);
g.drawLine(x + 2, y + 2, x + 2, y + 2);
g.setColor(savedColor);
- }
+ }
}
/**
* The icon used to display the thumb control on a horizontally oriented
* {@link JSlider} component.
*/
- private static class HorizontalSliderThumbIcon
+ private static class HorizontalSliderThumbIcon
implements Icon, UIResource, Serializable
{
@@ -984,52 +984,52 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public HorizontalSliderThumbIcon()
+ public HorizontalSliderThumbIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 15;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
- * Paints the icon, taking into account whether or not the component has
+ * Paints the icon, taking into account whether or not the component has
* the focus.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
boolean enabled = false;
boolean focus = false;
if (c != null)
{
enabled = c.isEnabled();
- focus = c.hasFocus();
+ focus = c.hasFocus();
}
-
+
// draw the outline
- if (enabled)
+ if (enabled)
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
@@ -1038,8 +1038,8 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 8, x + 7, y + 15);
g.drawLine(x + 6, y + 14, x, y + 8);
g.drawLine(x, y + 7, x, y + 1);
-
-// The following is commented out until the masking for the gradient painting
+
+// The following is commented out until the masking for the gradient painting
// is working correctly
// // Fill the icon.
// if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme
@@ -1098,7 +1098,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 2, x + 2, y + 2);
g.drawLine(x + 6, y + 2, x + 6, y + 2);
g.drawLine(x + 10, y + 2, x + 10, y + 2);
-
+
g.drawLine(x + 4, y + 4, x + 4, y + 4);
g.drawLine(x + 8, y + 4, x + 8, y + 4);
@@ -1107,62 +1107,62 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 6, x + 10, y + 6);
}
- }
+ }
}
-
+
/**
- * An icon used for the 'close' button in the title frame of a
+ * An icon used for the 'close' button in the title frame of a
* {@link JInternalFrame}.
*/
- private static class InternalFrameCloseIcon
+ private static class InternalFrameCloseIcon
implements Icon, UIResource, Serializable
{
/** The icon size in pixels. */
private int size;
-
+
/**
* Creates a new icon.
- *
+ *
* @param size the icon size (width and height) in pixels.
*/
- public InternalFrameCloseIcon(int size)
+ public InternalFrameCloseIcon(int size)
{
this.size = size;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return size;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return size;
}
-
+
/**
* Paints the icon.
- *
+ *
* @param c the component (an {@link JInternalFrame} is expected).
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
AbstractButton b = (AbstractButton) c;
-
+
// fill the interior
if (b.getModel().isPressed())
// FIXME: also need to take into account whether the internal frame is
@@ -1171,7 +1171,7 @@ public class MetalIconFactory implements Serializable
else
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 10, 10);
-
+
// draw the outline box and the cross
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
@@ -1191,7 +1191,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 13, y + 2, x + 13, y + 12);
g.drawLine(x + 2, y + 12, x + 2, y + 12);
g.drawLine(x + 12, y + 2, x + 12, y + 2);
-
+
g.fillRect(x + 4, y + 4, 2, 2);
g.fillRect(x + 5, y + 5, 4, 4);
g.drawLine(x + 9, y + 4, x + 10, y + 4);
@@ -1200,21 +1200,21 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 4, y + 9, x + 5, y + 9);
g.drawLine(x + 9, y + 8, x + 9, y + 10);
g.drawLine(x + 8, y + 9, x + 10, y + 9);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x, y, x + 13, y);
g.drawLine(x, y + 1, x, y + 13);
g.drawLine(x + 3, y + 4, x + 4, y + 3);
g.drawLine(x + 3, y + 9, x + 5, y + 7);
g.drawLine(x + 7, y + 5, x + 9, y + 3);
-
+
g.drawLine(x + 12, y + 3, x + 12, y + 11);
g.drawLine(x + 3, y + 12, x + 12, y + 12);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, y + 14, x + 14, y + 14);
g.drawLine(x + 14, y + 1, x + 14, y + 14);
-
+
if (!b.getModel().isPressed())
{
g.drawLine(x + 5, y + 10, x + 5, y + 10);
@@ -1225,53 +1225,53 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 11, x + 10, y + 11);
}
g.setColor(savedColor);
- }
+ }
}
/**
* The icon displayed at the top-left corner of a {@link JInternalFrame}.
*/
private static class InternalFrameDefaultMenuIcon
- implements Icon, UIResource, Serializable
+ implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameDefaultMenuIcon()
+ public InternalFrameDefaultMenuIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.fillRect(x + 1, y, 14, 2);
@@ -1279,10 +1279,10 @@ public class MetalIconFactory implements Serializable
g.fillRect(x + 1, y + 14, 14, 2);
g.fillRect(x + 14, y + 1, 2, 14);
g.drawLine(x + 2, y + 5, x + 14, y + 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 12, 3);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(x + 3, y + 3, x + 3, y + 3);
g.drawLine(x + 6, y + 3, x + 6, y + 3);
@@ -1295,59 +1295,59 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 5, y + 2, x + 5, y + 2);
g.drawLine(x + 8, y + 2, x + 8, y + 2);
g.drawLine(x + 11, y + 2, x + 11, y + 2);
- }
+ }
}
/**
- * An icon used in the title frame of a {@link JInternalFrame}. When you
+ * An icon used in the title frame of a {@link JInternalFrame}. When you
* maximise an internal frame, this icon will replace the 'maximise' icon to
* provide a 'restore' option.
*/
private static class InternalFrameAltMaximizeIcon
- implements Icon, UIResource, Serializable
+ implements Icon, UIResource, Serializable
{
/** The icon size in pixels. */
private int size;
-
+
/**
* Creates a new icon.
- *
+ *
* @param size the icon size in pixels.
*/
- public InternalFrameAltMaximizeIcon(int size)
+ public InternalFrameAltMaximizeIcon(int size)
{
this.size = size;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return size;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return size;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
@@ -1359,27 +1359,27 @@ public class MetalIconFactory implements Serializable
else
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 6, 7, 7);
-
-
+
+
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 12, y + 1, x + 13, y + 1);
g.drawLine(x + 11, y + 2, x + 12, y + 2);
g.drawLine(x + 10, y + 3, x + 11, y + 3);
g.drawLine(x + 8, y + 2, x + 8, y + 3);
g.fillRect(x + 8, y + 4, 3, 3);
g.drawLine(x + 11, y + 6, x + 12, y + 6);
-
+
g.drawLine(x + 1, y + 5, x + 5, y + 5);
g.drawLine(x + 1, y + 6, x + 1, y + 12);
g.drawLine(x + 9, y + 9, x + 9, y + 12);
g.drawLine(x + 1, y + 13, x + 9, y + 13);
-
+
g.drawLine(x + 2, y + 12, x + 2, y + 12);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 12, y, x + 9, y + 3);
g.drawLine(x + 7, y + 1, x + 8, y + 1);
@@ -1390,7 +1390,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 3, y + 12, x + 8, y + 12);
g.drawLine(x + 8, y + 8, x + 8, y + 11);
g.drawLine(x + 9, y + 8, x + 9, y + 8);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 13, y + 2);
@@ -1399,67 +1399,67 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 5, x + 6, y + 5);
g.drawLine(x + 10, y + 8, x + 10, y + 13);
g.drawLine(x + 1, y + 14, x + 10, y + 14);
-
+
if (!b.getModel().isPressed())
{
g.drawLine(x + 2, y + 6, x + 6, y + 6);
g.drawLine(x + 2, y + 6, x + 2, y + 11);
}
-
+
g.setColor(savedColor);
- }
+ }
}
-
+
/**
- * An icon used for the 'maximize' button in the title frame of a
+ * An icon used for the 'maximize' button in the title frame of a
* {@link JInternalFrame}.
*/
- private static class InternalFrameMaximizeIcon
+ private static class InternalFrameMaximizeIcon
implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameMaximizeIcon()
+ public InternalFrameMaximizeIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
-
+
AbstractButton b = (AbstractButton) c;
-
+
// fill the interior
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
@@ -1471,7 +1471,7 @@ public class MetalIconFactory implements Serializable
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 9, y + 1, x + 10, y + 1);
g.fillRect(x + 11, y + 1, 3, 3);
g.fillRect(x + 12, y + 4, 2, 2);
@@ -1481,7 +1481,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 6, x + 1, y + 12);
g.drawLine(x + 9, y + 6, x + 9, y + 12);
g.drawLine(x + 1, y + 13, x + 9, y + 13);
-
+
// fill
g.drawLine(x + 7, y + 6, x + 8, y + 6);
g.drawLine(x + 6, y + 7, x + 8, y + 7);
@@ -1491,7 +1491,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 11, x + 3, y + 11);
g.drawLine(x + 2, y + 12, x + 4, y + 12);
g.drawLine(x + 8, y + 8, x + 8, y + 8);
-
+
// draw black
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 8, y, x + 13, y);
@@ -1499,11 +1499,11 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 2, x + 9, y + 3);
g.drawLine(x, y + 4, x + 8, y + 4);
g.drawLine(x, y + 5, x, y + 13);
-
+
g.drawLine(x + 2, y + 10, x + 6, y + 6);
g.drawLine(x + 8, y + 9, x + 8, y + 11);
g.drawLine(x + 5, y + 12, x + 8, y + 12);
-
+
// draw white
g.setColor(MetalLookAndFeel.getWhite());
if (!b.getModel().isPressed())
@@ -1512,89 +1512,89 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 7, x + 2, y + 9);
g.drawLine(x + 4, y + 11, x + 7, y + 8);
}
-
+
g.drawLine(x + 1, y + 14, x + 10, y + 14);
g.drawLine(x + 10, y + 5, x + 10, y + 13);
-
+
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 11, y + 5);
g.drawLine(x + 13, y + 6, x + 14, y + 6);
g.drawLine(x + 14, y + 1, x + 14, y + 5);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used in the title frame of a {@link JInternalFrame}.
*/
- private static class InternalFrameMinimizeIcon
+ private static class InternalFrameMinimizeIcon
implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameMinimizeIcon()
+ public InternalFrameMinimizeIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
-
+
AbstractButton b = (AbstractButton) c;
-
+
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
else
- // FIXME: here the color depends on whether or not the internal frame
- // is selected
+ // FIXME: here the color depends on whether or not the internal frame
+ // is selected
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 12, y + 1, x + 13, y + 1);
g.drawLine(x + 11, y + 2, x + 12, y + 2);
g.drawLine(x + 10, y + 3, x + 11, y + 3);
g.drawLine(x + 8, y + 2, x + 8, y + 3);
g.fillRect(x + 8, y + 4, 3, 3);
g.drawLine(x + 11, y + 6, x + 12, y + 6);
-
+
g.drawLine(x + 1, y + 8, x + 6, y + 8);
g.drawLine(x + 1, y + 9, x + 1, y + 12);
g.drawLine(x + 6, y + 9, x + 6, y + 12);
g.drawLine(x + 1, y + 13, x + 6, y + 13);
-
+
g.drawLine(x + 5, y + 9, x + 5, y + 9);
g.drawLine(x + 2, y + 12, x + 2, y + 12);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 12, y, x + 9, y + 3);
g.drawLine(x + 7, y + 1, x + 8, y + 1);
@@ -1604,7 +1604,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 3, y + 12, x + 5, y + 12);
g.drawLine(x + 5, y + 10, x + 5, y + 11);
g.drawLine(x + 11, y + 5, x + 12, y + 5);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 13, y + 2);
@@ -1625,14 +1625,14 @@ public class MetalIconFactory implements Serializable
}
g.setColor(savedColor);
- }
+ }
}
/**
* The icon used to display the thumb control on a horizontally oriented
* {@link JSlider} component.
*/
- private static class VerticalSliderThumbIcon
+ private static class VerticalSliderThumbIcon
implements Icon, UIResource, Serializable
{
/**
@@ -1646,53 +1646,53 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public VerticalSliderThumbIcon()
+ public VerticalSliderThumbIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 15;
}
-
+
/**
* Paints the icon taking into account whether the slider control has the
* focus or not.
- *
+ *
* @param c the slider (must be a non-<code>null</code> instance of
* {@link JSlider}.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
boolean enabled = false;
boolean focus = false;
if (c != null)
{
enabled = c.isEnabled();
- focus = c.hasFocus();
+ focus = c.hasFocus();
}
-
+
// draw the outline
- if (enabled)
+ if (enabled)
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
@@ -1701,8 +1701,8 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 8, x + 8, y + 14);
g.drawLine(x + 8, y + 14, x + 1, y + 14);
g.drawLine(x, y + 13, x, y + 1);
-
-// The following is commented out until the masking for the gradient painting
+
+// The following is commented out until the masking for the gradient painting
// is working correctly
// // Fill the icon.
// if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme
@@ -1768,57 +1768,57 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 2, x + 6, y + 2);
g.drawLine(x + 6, y + 6, x + 6, y + 6);
g.drawLine(x + 6, y + 10, x + 6, y + 10);
-
+
}
- }
+ }
}
-
+
/**
* A tree control icon. This icon can be in one of two states: expanded and
* collapsed.
*/
public static class TreeControlIcon implements Icon, Serializable
{
-
+
/** ???. */
protected boolean isLight;
-
+
/** A flag that controls whether or not the icon is collapsed. */
private boolean collapsed;
-
+
/**
* Creates a new icon.
- *
+ *
* @param isCollapsed a flag that controls whether the icon is in the
* collapsed state or the expanded state.
*/
- public TreeControlIcon(boolean isCollapsed)
+ public TreeControlIcon(boolean isCollapsed)
{
collapsed = isCollapsed;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
@@ -1840,31 +1840,31 @@ public class MetalIconFactory implements Serializable
g.drawOval(x, y, w, w);
g.setColor(dark);
g.fillOval(x + 1, y + 1, w - 1, w - 1);
-
+
if (collapsed)
g.fillRect(x + w, y + wHalf + 1, w, 2);
else
g.fillRect(x + wHalf + 1, y + w, 2, w);
-
+
g.setColor(white);
g.fillRect(x + wHalf + 1, y + wHalf + 1, 2, 2);
- }
-
+ }
+
/**
* Simply calls {@link #paintIcon(Component, Graphics, int, int)}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintMe(Component c, Graphics g, int x, int y)
+ public void paintMe(Component c, Graphics g, int x, int y)
{
- paintIcon(c, g, x, y);
+ paintIcon(c, g, x, y);
}
}
-
+
/**
* A tree folder icon.
*/
@@ -1873,34 +1873,34 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public TreeFolderIcon()
+ public TreeFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the additional height for this icon, in this case <code>2</code>
* pixels.
- *
+ *
* @return <code>2</code>.
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 2;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
+ * Returns the vertical shift, in pixels, applied when painting the icon.
* This overridden method returns <code>-1</code>.
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return -1;
}
}
-
+
/**
* A tree leaf icon.
*/
@@ -1909,29 +1909,29 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public TreeLeafIcon()
+ public TreeLeafIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the additional height for this icon, in this case <code>4</code>
* pixels.
- *
+ *
* @return <code>4</code>.
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 4;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
+ * Returns the vertical shift, in pixels, applied when painting the icon.
* This overridden method returns <code>2</code>.
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 2;
}
@@ -1939,51 +1939,51 @@ public class MetalIconFactory implements Serializable
/**
* An icon representing a hard disk.
- *
+ *
* @see MetalIconFactory#getTreeHardDriveIcon()
*/
- private static class TreeHardDriveIcon
+ private static class TreeHardDriveIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeHardDriveIcon()
+ public TreeHardDriveIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -1993,7 +1993,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 7, x + 14, y + 8);
g.drawLine(x + 1, y + 10, x + 1, y + 11);
g.drawLine(x + 14, y + 10, x + 14, y + 11);
-
+
g.drawLine(x + 2, y + 3, x + 3, y + 3);
g.drawLine(x + 12, y + 3, x + 13, y + 3);
g.drawLine(x + 2, y + 6, x + 3, y + 6);
@@ -2002,25 +2002,25 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 9, x + 13, y + 9);
g.drawLine(x + 2, y + 12, x + 3, y + 12);
g.drawLine(x + 12, y + 12, x + 13, y + 12);
-
+
g.drawLine(x + 4, y + 2, x + 11, y + 2);
g.drawLine(x + 4, y + 7, x + 11, y + 7);
g.drawLine(x + 4, y + 10, x + 11, y + 10);
g.drawLine(x + 4, y + 13, x + 11, y + 13);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.fillRect(x + 4, y + 3, 2, 2);
g.drawLine(x + 6, y + 4, x + 6, y + 4);
g.drawLine(x + 7, y + 3, x + 9, y + 3);
g.drawLine(x + 8, y + 4, x + 8, y + 4);
g.drawLine(x + 11, y + 3, x + 11, y + 3);
- g.fillRect(x + 2, y + 4, 2, 2);
- g.fillRect(x + 2, y + 7, 2, 2);
- g.fillRect(x + 2, y + 10, 2, 2);
+ g.fillRect(x + 2, y + 4, 2, 2);
+ g.fillRect(x + 2, y + 7, 2, 2);
+ g.fillRect(x + 2, y + 10, 2, 2);
g.drawLine(x + 4, y + 6, x + 4, y + 6);
g.drawLine(x + 4, y + 9, x + 4, y + 9);
g.drawLine(x + 4, y + 12, x + 4, y + 12);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 13, y + 4, x + 13, y + 4);
g.drawLine(x + 12, y + 5, x + 13, y + 5);
@@ -2028,7 +2028,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 8, x + 13, y + 8);
g.drawLine(x + 13, y + 10, x + 13, y + 10);
g.drawLine(x + 12, y + 11, x + 13, y + 11);
-
+
g.drawLine(x + 10, y + 5, x + 10, y + 5);
g.drawLine(x + 7, y + 6, x + 7, y + 6);
g.drawLine(x + 9, y + 6, x + 9, y + 6);
@@ -2045,136 +2045,136 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 11, y + 12, x + 11, y + 12);
g.setColor(saved);
- }
- }
-
+ }
+ }
+
/**
* An icon representing a floppy disk.
- *
+ *
* @see MetalIconFactory#getTreeFloppyDriveIcon()
*/
- private static class TreeFloppyDriveIcon
+ private static class TreeFloppyDriveIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeFloppyDriveIcon()
+ public TreeFloppyDriveIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 1, y + 1, x + 13, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + 14);
g.drawLine(x + 1, y + 14, x + 14, y + 14);
g.drawLine(x + 14, y + 2, x + 14, y + 14);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 12, 12);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(x + 5, y + 2, 6, 5);
g.drawLine(x + 4, y + 8, x + 11, y + 8);
g.drawLine(x + 3, y + 9, x + 3, y + 13);
g.drawLine(x + 12, y + 9, x + 12, y + 13);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.fillRect(x + 8, y + 3, 2, 3);
g.fillRect(x + 4, y + 9, 8, 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
g.drawLine(x + 5, y + 10, x + 9, y + 10);
g.drawLine(x + 5, y + 12, x + 8, y + 12);
g.setColor(saved);
- }
- }
+ }
+ }
/**
* An icon representing a computer.
- *
+ *
* @see MetalIconFactory#getTreeComputerIcon()
*/
- private static class TreeComputerIcon
+ private static class TreeComputerIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeComputerIcon()
+ public TreeComputerIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return <code>16</code>.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 3, y + 1, x + 12, y + 1);
g.drawLine(x + 2, y + 2, x + 2, y + 8);
@@ -2189,20 +2189,20 @@ public class MetalIconFactory implements Serializable
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 5, y + 4, 6, 4);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 6, y + 12, x + 8, y + 12);
g.drawLine(x + 10, y + 12, x + 12, y + 12);
g.setColor(saved);
- }
- }
-
+ }
+ }
+
/** The icon returned by {@link #getCheckBoxIcon()}. */
private static Icon checkBoxIcon;
-
+
/** The icon returned by {@link #getCheckBoxMenuItemIcon()}. */
private static Icon checkBoxMenuItemIcon;
-
+
/** The icon returned by {@link #getFileChooserDetailViewIcon()}. */
private static Icon fileChooserDetailViewIcon;
@@ -2229,49 +2229,49 @@ public class MetalIconFactory implements Serializable
/** The icon returned by {@link #getTreeComputerIcon()}. */
private static Icon treeComputerIcon;
-
+
/** The icon instance returned by {@link #getTreeFloppyDriveIcon()}. */
private static Icon treeFloppyDriveIcon;
-
+
/** The icon instance returned by {@link #getTreeHardDriveIcon()}. */
private static Icon treeHardDriveIcon;
-
+
/** The icon instance returned by {@link #getHorizontalSliderThumbIcon()}. */
private static Icon horizontalSliderThumbIcon;
/** The icon instance returned by {@link #getVerticalSliderThumbIcon()}. */
private static Icon verticalSliderThumbIcon;
-
+
/**
- * Creates a new instance. All the methods are static, so creating an
+ * Creates a new instance. All the methods are static, so creating an
* instance isn't necessary.
*/
- public MetalIconFactory()
+ public MetalIconFactory()
{
// Nothing to do here.
}
/**
* Returns an icon for use when rendering the {@link JCheckBox} component.
- *
+ *
* @return A check box icon.
- *
+ *
* @since 1.3
*/
- public static Icon getCheckBoxIcon()
+ public static Icon getCheckBoxIcon()
{
if (checkBoxIcon == null)
checkBoxIcon = new MetalCheckBoxIcon();
return checkBoxIcon;
}
-
+
/**
- * Returns an icon for use when rendering the {@link JCheckBoxMenuItem}
+ * Returns an icon for use when rendering the {@link JCheckBoxMenuItem}
* component.
- *
+ *
* @return An icon.
*/
- public static Icon getCheckBoxMenuItemIcon()
+ public static Icon getCheckBoxMenuItemIcon()
{
if (checkBoxMenuItemIcon == null)
checkBoxMenuItemIcon = new CheckBoxMenuItemIcon();
@@ -2280,58 +2280,58 @@ public class MetalIconFactory implements Serializable
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserDetailViewIcon()
+ public static Icon getFileChooserDetailViewIcon()
{
if (fileChooserDetailViewIcon == null)
fileChooserDetailViewIcon = new FileChooserDetailViewIcon();
return fileChooserDetailViewIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserHomeFolderIcon()
+ public static Icon getFileChooserHomeFolderIcon()
{
if (fileChooserHomeFolderIcon == null)
fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon();
- return fileChooserHomeFolderIcon;
+ return fileChooserHomeFolderIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserListViewIcon()
+ public static Icon getFileChooserListViewIcon()
{
if (fileChooserListViewIcon == null)
fileChooserListViewIcon = new FileChooserListViewIcon();
return fileChooserListViewIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserNewFolderIcon()
+ public static Icon getFileChooserNewFolderIcon()
{
if (fileChooserNewFolderIcon == null)
fileChooserNewFolderIcon = new FileChooserNewFolderIcon();
return fileChooserNewFolderIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserUpFolderIcon()
+ public static Icon getFileChooserUpFolderIcon()
{
if (fileChooserUpFolderIcon == null)
fileChooserUpFolderIcon = new FileChooserUpFolderIcon();
@@ -2352,10 +2352,10 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance of the icon used in a {@link JRadioButtonMenuItem}.
- *
+ *
* @return A new icon instance.
*/
- public static Icon getRadioButtonMenuItemIcon()
+ public static Icon getRadioButtonMenuItemIcon()
{
if (radioButtonMenuItemIcon == null)
radioButtonMenuItemIcon = new RadioButtonMenuItemIcon();
@@ -2365,25 +2365,25 @@ public class MetalIconFactory implements Serializable
/**
* Returns the icon used to display the thumb for a horizontally oriented
* {@link JSlider}.
- *
+ *
* @return The icon.
*/
- public static Icon getHorizontalSliderThumbIcon()
+ public static Icon getHorizontalSliderThumbIcon()
{
if (horizontalSliderThumbIcon == null)
horizontalSliderThumbIcon = new HorizontalSliderThumbIcon();
return horizontalSliderThumbIcon;
}
-
+
/**
* Creates a new icon used to represent the 'close' button in the title
* pane of a {@link JInternalFrame}.
- *
+ *
* @param size the icon size.
- *
+ *
* @return A close icon.
*/
- public static Icon getInternalFrameCloseIcon(int size)
+ public static Icon getInternalFrameCloseIcon(int size)
{
return new InternalFrameCloseIcon(size);
}
@@ -2391,39 +2391,39 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new icon for the menu in a {@link JInternalFrame}. This is the
* icon displayed at the top left of the frame.
- *
+ *
* @return A menu icon.
*/
- public static Icon getInternalFrameDefaultMenuIcon()
+ public static Icon getInternalFrameDefaultMenuIcon()
{
if (internalFrameDefaultMenuIcon == null)
internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon();
return internalFrameDefaultMenuIcon;
}
-
+
/**
* Creates a new icon for the 'maximize' button in a {@link JInternalFrame}.
- *
+ *
* @param size the icon size in pixels.
- *
+ *
* @return The icon.
- *
+ *
* @see #getInternalFrameAltMaximizeIcon(int)
*/
- public static Icon getInternalFrameMaximizeIcon(int size)
+ public static Icon getInternalFrameMaximizeIcon(int size)
{
return new InternalFrameMaximizeIcon();
}
-
+
/**
* Returns the icon used for the minimize button in the frame title for a
* {@link JInternalFrame}.
- *
+ *
* @param size the icon size in pixels (ignored by this implementation).
- *
+ *
* @return The icon.
*/
- public static Icon getInternalFrameMinimizeIcon(int size)
+ public static Icon getInternalFrameMinimizeIcon(int size)
{
return new InternalFrameMinimizeIcon();
}
@@ -2431,94 +2431,94 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new icon for the 'restore' button in a {@link JInternalFrame}
* that has been maximised.
- *
+ *
* @param size the icon size in pixels.
- *
+ *
* @return The icon.
- *
+ *
* @see #getInternalFrameMaximizeIcon(int)
*/
- public static Icon getInternalFrameAltMaximizeIcon(int size)
+ public static Icon getInternalFrameAltMaximizeIcon(int size)
{
return new InternalFrameAltMaximizeIcon(size);
}
-
+
/**
* Returns the icon used to display the thumb for a vertically oriented
* {@link JSlider}.
- *
+ *
* @return The icon.
*/
- public static Icon getVerticalSliderThumbIcon()
+ public static Icon getVerticalSliderThumbIcon()
{
if (verticalSliderThumbIcon == null)
verticalSliderThumbIcon = new VerticalSliderThumbIcon();
return verticalSliderThumbIcon;
}
-
+
/**
* Creates and returns a new tree folder icon.
- *
+ *
* @return A new tree folder icon.
- */
- public static Icon getTreeFolderIcon()
+ */
+ public static Icon getTreeFolderIcon()
{
return new TreeFolderIcon();
}
-
+
/**
* Creates and returns a new tree leaf icon.
- *
+ *
* @return A new tree leaf icon.
*/
- public static Icon getTreeLeafIcon()
+ public static Icon getTreeLeafIcon()
{
return new TreeLeafIcon();
}
-
+
/**
* Creates and returns a tree control icon.
- *
- * @param isCollapsed a flag that controls whether the icon is in the
+ *
+ * @param isCollapsed a flag that controls whether the icon is in the
* collapsed or expanded state.
- *
+ *
* @return A tree control icon.
*/
- public static Icon getTreeControlIcon(boolean isCollapsed)
+ public static Icon getTreeControlIcon(boolean isCollapsed)
{
return new TreeControlIcon(isCollapsed);
}
/**
* Returns a <code>16x16</code> icon representing a computer.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeComputerIcon()
+ public static Icon getTreeComputerIcon()
{
if (treeComputerIcon == null)
treeComputerIcon = new TreeComputerIcon();
- return treeComputerIcon;
+ return treeComputerIcon;
}
-
+
/**
* Returns a <code>16x16</code> icon representing a floppy disk.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeFloppyDriveIcon()
+ public static Icon getTreeFloppyDriveIcon()
{
if (treeFloppyDriveIcon == null)
treeFloppyDriveIcon = new TreeFloppyDriveIcon();
return treeFloppyDriveIcon;
}
-
+
/**
* Returns a <code>16x16</code> icon representing a hard disk.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeHardDriveIcon()
+ public static Icon getTreeHardDriveIcon()
{
if (treeHardDriveIcon == null)
treeHardDriveIcon = new TreeHardDriveIcon();
@@ -2527,9 +2527,9 @@ public class MetalIconFactory implements Serializable
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
- * points to the right. This is displayed in menu items that have a
+ * points to the right. This is displayed in menu items that have a
* sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuArrowIcon()
@@ -2558,11 +2558,11 @@ public class MetalIconFactory implements Serializable
};
return menuArrow;
}
-
+
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
* points to the right. This is displayed in menu items that have a sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuItemArrowIcon()
@@ -2591,10 +2591,10 @@ public class MetalIconFactory implements Serializable
};
return menuItemArrow;
}
-
+
/**
* Returns a new instance of a 13 x 13 icon showing a small black check mark.
- *
+ *
* @return The icon.
*/
public static Icon getMenuItemCheckIcon()
diff --git a/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java b/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
index dd0c48639..08de77446 100644
--- a/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
+++ b/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
@@ -60,16 +60,16 @@ import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
/**
- * The title pane for a {@link JInternalFrame} (see
- * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can
- * be displayed in two styles: one for regular internal frames, and the other
+ * The title pane for a {@link JInternalFrame} (see
+ * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can
+ * be displayed in two styles: one for regular internal frames, and the other
* for "palette" style internal frames.
*/
-public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
+public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
-
+
/**
- * A property change handler that listens for changes to the
+ * A property change handler that listens for changes to the
* <code>JInternalFrame.isPalette</code> property and updates the title
* pane as appropriate.
*/
@@ -83,11 +83,11 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
super();
}
-
+
/**
* Handles <code>JInternalFrame.isPalette</code> property changes, with all
* other property changes being passed to the superclass.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -111,7 +111,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/**
* A layout manager for the title pane.
- *
+ *
* @see #createLayout()
*/
private class MetalTitlePaneLayout implements LayoutManager
@@ -176,8 +176,8 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
}
Dimension titlePreferredSize = title.getPreferredSize();
- title.setBounds(insets.left + 5, insets.top,
- Math.min(titlePreferredSize.width, loc - insets.left - 10),
+ title.setBounds(insets.left + 5, insets.top,
+ Math.min(titlePreferredSize.width, loc - insets.left - 10),
height);
}
@@ -224,26 +224,26 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/** A flag indicating whether the title pane uses the palette style. */
protected boolean isPalette;
-
- /**
+
+ /**
* The icon used for the close button - this is fetched from the look and
- * feel defaults using the key <code>InternalFrame.paletteCloseIcon</code>.
+ * feel defaults using the key <code>InternalFrame.paletteCloseIcon</code>.
*/
protected Icon paletteCloseIcon;
-
+
/**
- * The height of the title pane when <code>isPalette</code> is
- * <code>true</code>. This value is fetched from the look and feel defaults
+ * The height of the title pane when <code>isPalette</code> is
+ * <code>true</code>. This value is fetched from the look and feel defaults
* using the key <code>InternalFrame.paletteTitleHeight</code>.
*/
protected int paletteTitleHeight;
-
+
/** The label used to display the title for the internal frame. */
JLabel title;
-
+
/**
* Creates a new title pane for the specified frame.
- *
+ *
* @param f the internal frame.
*/
public MetalInternalFrameTitlePane(JInternalFrame f)
@@ -251,7 +251,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
super(f);
isPalette = false;
}
-
+
/**
* Fetches the colors used in the title pane.
*/
@@ -262,21 +262,21 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
selectedTitleColor = MetalLookAndFeel.getWindowTitleBackground();
notSelectedTextColor = MetalLookAndFeel.getInactiveControlTextColor();
notSelectedTitleColor = MetalLookAndFeel.getWindowTitleInactiveBackground();
-
+
paletteTitleHeight = UIManager.getInt("InternalFrame.paletteTitleHeight");
paletteCloseIcon = UIManager.getIcon("InternalFrame.paletteCloseIcon");
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16);
- title = new JLabel(frame.getTitle(),
- MetalIconFactory.getInternalFrameDefaultMenuIcon(),
+ title = new JLabel(frame.getTitle(),
+ MetalIconFactory.getInternalFrameDefaultMenuIcon(),
SwingConstants.LEFT);
}
-
+
/**
* Clears the colors used for the title pane.
*/
protected void uninstallDefaults()
- {
+ {
super.uninstallDefaults();
selectedTextColor = null;
selectedTitleColor = null;
@@ -286,14 +286,14 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
minIcon = null;
title = null;
}
-
+
/**
* Calls the super class to create the buttons, then calls
- * <code>setBorderPainted(false)</code> and
+ * <code>setBorderPainted(false)</code> and
* <code>setContentAreaFilled(false)</code> for each button.
*/
protected void createButtons()
- {
+ {
super.createButtons();
closeButton.setBorderPainted(false);
closeButton.setContentAreaFilled(false);
@@ -302,7 +302,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
maxButton.setBorderPainted(false);
maxButton.setContentAreaFilled(false);
}
-
+
/**
* Overridden to do nothing.
*/
@@ -310,21 +310,21 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
// do nothing
}
-
+
/**
* Overridden to do nothing.
*/
protected void showSystemMenu()
{
- // do nothing
+ // do nothing
}
-
+
/**
* Adds the sub components of the title pane.
*/
protected void addSubComponents()
{
- // FIXME: this method is probably overridden to only add the required
+ // FIXME: this method is probably overridden to only add the required
// buttons
add(title);
add(closeButton);
@@ -335,19 +335,19 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/**
* Creates a new instance of <code>MetalTitlePaneLayout</code> (not part of
* the public API).
- *
+ *
* @return A new instance of <code>MetalTitlePaneLayout</code>.
*/
protected LayoutManager createLayout()
{
return new MetalTitlePaneLayout();
}
-
+
/**
* Draws the title pane in the palette style.
- *
+ *
* @param g the graphics device.
- *
+ *
* @see #paintComponent(Graphics)
*/
public void paintPalette(Graphics g)
@@ -362,22 +362,22 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
SwingConstants.VERTICAL,
"InternalFrame.activeTitleGradient");
}
- MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
+ MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
- paletteCloseIcon.getIconWidth() - 13, b.height - 5,
- MetalLookAndFeel.getPrimaryControlHighlight(),
+ MetalLookAndFeel.getPrimaryControlHighlight(),
MetalLookAndFeel.getBlack());
-
+
// draw a line separating the title pane from the frame content
Dimension d = getSize();
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
g.setColor(savedColor);
}
/**
* Paints a representation of the current state of the internal frame.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -394,13 +394,13 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// put a dot in each of the top corners
g.drawLine(0, 0, 0, 0);
g.drawLine(d.width - 1, 0, d.width - 1, 0);
-
+
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
// draw the metal pattern
if (UIManager.get("InternalFrame.activeTitleGradient") != null
&& frame.isSelected())
@@ -415,22 +415,22 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
int endX = startX;
if (iconButton.isVisible())
endX = Math.max(iconButton.getX(), endX);
- else if (maxButton.isVisible())
+ else if (maxButton.isVisible())
endX = Math.max(maxButton.getX(), endX);
else if (closeButton.isVisible())
endX = Math.max(closeButton.getX(), endX);
endX -= 7;
if (endX > startX)
- MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX,
+ MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX,
getHeight() - 6, Color.white, Color.gray);
}
g.setColor(savedColor);
}
-
+
/**
- * Sets the flag that controls whether the title pane is drawn in the
+ * Sets the flag that controls whether the title pane is drawn in the
* palette style or the regular style.
- *
+ *
* @param b the new value of the flag.
*/
public void setPalette(boolean b)
@@ -444,15 +444,14 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
else
closeButton.setIcon(closeIcon);
}
-
+
/**
* Creates and returns a property change handler for the title pane.
- *
+ *
* @return The property change handler.
*/
protected PropertyChangeListener createPropertyChangeListener()
{
- return new MetalInternalFrameTitlePanePropertyChangeHandler();
+ return new MetalInternalFrameTitlePanePropertyChangeHandler();
}
}
-
diff --git a/javax/swing/plaf/metal/MetalInternalFrameUI.java b/javax/swing/plaf/metal/MetalInternalFrameUI.java
index abe6a2817..5eda2ff5e 100644
--- a/javax/swing/plaf/metal/MetalInternalFrameUI.java
+++ b/javax/swing/plaf/metal/MetalInternalFrameUI.java
@@ -54,16 +54,16 @@ import javax.swing.plaf.basic.BasicInternalFrameUI;
public class MetalInternalFrameUI
extends BasicInternalFrameUI
{
- /**
- * The key (<code>JInternalFrame.isPalette</code>) for the client property
- * that controls whether the internal frame is displayed using the palette
- * style.
+ /**
+ * The key (<code>JInternalFrame.isPalette</code>) for the client property
+ * that controls whether the internal frame is displayed using the palette
+ * style.
*/
protected static String IS_PALETTE = "JInternalFrame.isPalette";
/**
* Constructs a new instance of <code>MetalInternalFrameUI</code>.
- *
+ *
* @param frame the frame.
*/
public MetalInternalFrameUI(JInternalFrame frame)
@@ -82,10 +82,10 @@ public class MetalInternalFrameUI
{
return new MetalInternalFrameUI((JInternalFrame) component);
}
-
+
/**
* Sets the fields and properties for the component.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -101,23 +101,23 @@ public class MetalInternalFrameUI
/**
* Creates and returns the component that will be used for the north pane
- * of the {@link JInternalFrame}.
- *
+ * of the {@link JInternalFrame}.
+ *
* @param w the internal frame.
- *
+ *
* @return A new instance of {@link MetalInternalFrameTitlePane}.
*/
protected JComponent createNorthPane(JInternalFrame w)
{
titlePane = new MetalInternalFrameTitlePane(w);
- return titlePane;
+ return titlePane;
}
-
+
/**
* Sets the state of the {@link JInternalFrame} to reflect whether or not
* it is using the palette style. When a frame is displayed as a palette,
* it uses a different border and the title pane is drawn differently.
- *
+ *
* @param isPalette use the palette style?
*/
public void setPalette(boolean isPalette)
@@ -129,17 +129,17 @@ public class MetalInternalFrameUI
else
frame.setBorder(new MetalBorders.InternalFrameBorder());
}
-
+
/** A listener that is used to handle IS_PALETTE property changes. */
private PropertyChangeListener paletteListener;
-
+
/**
* Adds the required listeners.
*/
protected void installListeners()
{
- super.installListeners();
- paletteListener = new PropertyChangeListener()
+ super.installListeners();
+ paletteListener = new PropertyChangeListener()
{
public void propertyChange(PropertyChangeEvent e)
{
@@ -154,7 +154,7 @@ public class MetalInternalFrameUI
};
frame.addPropertyChangeListener(paletteListener);
}
-
+
/**
* Removes the listeners used.
*/
diff --git a/javax/swing/plaf/metal/MetalLabelUI.java b/javax/swing/plaf/metal/MetalLabelUI.java
index 12b858e0a..915e5016d 100644
--- a/javax/swing/plaf/metal/MetalLabelUI.java
+++ b/javax/swing/plaf/metal/MetalLabelUI.java
@@ -79,12 +79,12 @@ public class MetalLabelUI
metalLabelUI = new MetalLabelUI();
return metalLabelUI;
}
-
+
/**
- * Draws the text for a disabled label, using the color defined in the
+ * Draws the text for a disabled label, using the color defined in the
* {@link UIManager} defaults with the key
* <code>Label.disabledForeground</code>.
- *
+ *
* @param l the label.
* @param g the graphics device.
* @param s the label text.
diff --git a/javax/swing/plaf/metal/MetalLookAndFeel.java b/javax/swing/plaf/metal/MetalLookAndFeel.java
index 25c624b74..acc3fedde 100644
--- a/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -56,7 +56,7 @@ import javax.swing.plaf.basic.BasicLookAndFeel;
/**
* A custom look and feel that is designed to look similar across different
- * operating systems. To install this look and feel, add the following code
+ * operating systems. To install this look and feel, add the following code
* (or something similar) near the start of your application:</p>
* <pre>
* try
@@ -69,12 +69,12 @@ import javax.swing.plaf.basic.BasicLookAndFeel;
* }</pre>
*/
public class MetalLookAndFeel extends BasicLookAndFeel
-{
+{
private static final long serialVersionUID = 6680646159193457980L;
-
+
/** The current theme. */
private static MetalTheme theme;
-
+
/**
* Creates a new instance of the Metal look and feel.
*/
@@ -95,7 +95,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
* Returns <code>false</code> to indicate that this look and feel does not
* attempt to emulate the look and feel of native applications on the host
* platform.
- *
+ *
* @return <code>false</code>.
*/
public boolean isNativeLookAndFeel()
@@ -106,7 +106,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns <code>true</code> to indicate that this look and feel is supported
* on all platforms.
- *
+ *
* @return <code>true</code>.
*/
public boolean isSupportedLookAndFeel()
@@ -117,7 +117,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns a string describing the look and feel. In this case, the method
* returns "Metal look and feel".
- *
+ *
* @return A string describing the look and feel.
*/
public String getDescription()
@@ -127,7 +127,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the look and feel identifier.
- *
+ *
* @return "MetalLookAndFeel".
*/
public String getID()
@@ -137,7 +137,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the look and feel name.
- *
+ *
* @return "MetalLookAndFeel".
*/
public String getName()
@@ -156,7 +156,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the accelerator foreground color from the installed theme.
- *
+ *
* @return The accelerator foreground color.
*/
public static ColorUIResource getAcceleratorForeground()
@@ -167,9 +167,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the accelerator selected foreground color from the installed
+ * Returns the accelerator selected foreground color from the installed
* theme.
- *
+ *
* @return The accelerator selected foreground color.
*/
public static ColorUIResource getAcceleratorSelectedForeground()
@@ -181,7 +181,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color black from the installed theme.
- *
+ *
* @return The color black.
*/
public static ColorUIResource getBlack()
@@ -193,7 +193,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the control color from the installed theme.
- *
+ *
* @return The control color.
*/
public static ColorUIResource getControl()
@@ -206,7 +206,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for dark shadows on controls, from the installed
* theme.
- *
+ *
* @return The color used for dark shadows on controls.
*/
public static ColorUIResource getControlDarkShadow()
@@ -218,7 +218,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for disabled controls, from the installed theme.
- *
+ *
* @return The color used for disabled controls.
*/
public static ColorUIResource getControlDisabled()
@@ -231,7 +231,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw highlights for controls, from the installed
* theme.
- *
+ *
* @return The color used to draw highlights for controls.
*/
public static ColorUIResource getControlHighlight()
@@ -242,9 +242,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used to display control info, from the installed
+ * Returns the color used to display control info, from the installed
* theme.
- *
+ *
* @return The color used to display control info.
*/
public static ColorUIResource getControlInfo()
@@ -257,7 +257,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw shadows for controls, from the installed
* theme.
- *
+ *
* @return The color used to draw shadows for controls.
*/
public static ColorUIResource getControlShadow()
@@ -269,7 +269,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for text on controls, from the installed theme.
- *
+ *
* @return The color used for text on controls.
*/
public static ColorUIResource getControlTextColor()
@@ -281,7 +281,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for text on controls, from the installed theme.
- *
+ *
* @return The font used for text on controls.
*/
public static FontUIResource getControlTextFont()
@@ -292,9 +292,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used for the desktop background, from the installed
+ * Returns the color used for the desktop background, from the installed
* theme.
- *
+ *
* @return The color used for the desktop background.
*/
public static ColorUIResource getDesktopColor()
@@ -305,9 +305,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used to draw focus highlights, from the installed
+ * Returns the color used to draw focus highlights, from the installed
* theme.
- *
+ *
* @return The color used to draw focus highlights.
*/
public static ColorUIResource getFocusColor()
@@ -320,7 +320,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw highlighted text, from the installed
* theme.
- *
+ *
* @return The color used to draw highlighted text.
*/
public static ColorUIResource getHighlightedTextColor()
@@ -333,7 +333,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw text on inactive controls, from the
* installed theme.
- *
+ *
* @return The color used to draw text on inactive controls.
*/
public static ColorUIResource getInactiveControlTextColor()
@@ -346,7 +346,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw inactive system text, from the installed
* theme.
- *
+ *
* @return The color used to draw inactive system text.
*/
public static ColorUIResource getInactiveSystemTextColor()
@@ -358,9 +358,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for menu items, from the installed theme.
- *
+ *
* @return The background color for menu items.
- *
+ *
* @see #getMenuSelectedBackground()
*/
public static ColorUIResource getMenuBackground()
@@ -373,9 +373,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for disabled menu items, from the installed
* theme.
- *
+ *
* @return The foreground color for disabled menu items.
- *
+ *
* @see #getMenuForeground()
*/
public static ColorUIResource getMenuDisabledForeground()
@@ -387,9 +387,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for menu items, from the installed theme.
- *
+ *
* @return The foreground color for menu items.
- *
+ *
* @see #getMenuDisabledForeground()
* @see #getMenuSelectedForeground()
*/
@@ -403,9 +403,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for selected menu items, from the installed
* theme.
- *
+ *
* @return The background color for selected menu items.
- *
+ *
* @see #getMenuBackground()
*/
public static ColorUIResource getMenuSelectedBackground()
@@ -418,9 +418,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for selected menu items, from the installed
* theme.
- *
+ *
* @return The foreground color for selected menu items.
- *
+ *
* @see #getMenuForeground()
*/
public static ColorUIResource getMenuSelectedForeground()
@@ -432,7 +432,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for text in menus, from the installed theme.
- *
+ *
* @return The font used for text in menus.
*/
public static FontUIResource getMenuTextFont()
@@ -444,7 +444,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the primary color for controls, from the installed theme.
- *
+ *
* @return The primary color for controls.
*/
public static ColorUIResource getPrimaryControl()
@@ -455,9 +455,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the dark shadow on controls, from the
+ * Returns the primary color for the dark shadow on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the dark shadow on controls.
*/
public static ColorUIResource getPrimaryControlDarkShadow()
@@ -468,9 +468,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the highlight on controls, from the
+ * Returns the primary color for the highlight on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the highlight on controls.
*/
public static ColorUIResource getPrimaryControlHighlight()
@@ -481,9 +481,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the information on controls, from the
+ * Returns the primary color for the information on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the information on controls.
*/
public static ColorUIResource getPrimaryControlInfo()
@@ -496,7 +496,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the primary color for the shadow on controls, from the installed
* theme.
- *
+ *
* @return The primary color for the shadow on controls.
*/
public static ColorUIResource getPrimaryControlShadow()
@@ -508,7 +508,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for separators, from the installed theme.
- *
+ *
* @return The background color for separators.
*/
public static ColorUIResource getSeparatorBackground()
@@ -520,7 +520,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for separators, from the installed theme.
- *
+ *
* @return The foreground color for separators.
*/
public static ColorUIResource getSeparatorForeground()
@@ -532,7 +532,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for sub text, from the installed theme.
- *
+ *
* @return The font used for sub text.
*/
public static FontUIResource getSubTextFont()
@@ -544,7 +544,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for system text, from the installed theme.
- *
+ *
* @return The color used for system text.
*/
public static ColorUIResource getSystemTextColor()
@@ -556,7 +556,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for system text, from the installed theme.
- *
+ *
* @return The font used for system text.
*/
public static FontUIResource getSystemTextFont()
@@ -568,7 +568,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to highlight text, from the installed theme.
- *
+ *
* @return The color used to highlight text.
*/
public static ColorUIResource getTextHighlightColor()
@@ -580,7 +580,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to display user text, from the installed theme.
- *
+ *
* @return The color used to display user text.
*/
public static ColorUIResource getUserTextColor()
@@ -592,7 +592,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for user text, obtained from the current theme.
- *
+ *
* @return The font used for user text.
*/
public static FontUIResource getUserTextFont()
@@ -604,7 +604,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for white, from the installed theme.
- *
+ *
* @return The color used for white.
*/
public static ColorUIResource getWhite()
@@ -616,7 +616,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window background color, from the installed theme.
- *
+ *
* @return The window background color.
*/
public static ColorUIResource getWindowBackground()
@@ -628,7 +628,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title background color, from the installed theme.
- *
+ *
* @return The window title background color.
*/
public static ColorUIResource getWindowTitleBackground()
@@ -640,9 +640,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title font from the current theme.
- *
+ *
* @return The window title font.
- *
+ *
* @see MetalTheme
*/
public static FontUIResource getWindowTitleFont()
@@ -654,7 +654,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title foreground color, from the installed theme.
- *
+ *
* @return The window title foreground color.
*/
public static ColorUIResource getWindowTitleForeground()
@@ -665,9 +665,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the background color for an inactive window title, from the
+ * Returns the background color for an inactive window title, from the
* installed theme.
- *
+ *
* @return The background color for an inactive window title.
*/
public static ColorUIResource getWindowTitleInactiveBackground()
@@ -678,9 +678,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the foreground color for an inactive window title, from the
+ * Returns the foreground color for an inactive window title, from the
* installed theme.
- *
+ *
* @return The foreground color for an inactive window title.
*/
public static ColorUIResource getWindowTitleInactiveForeground()
@@ -691,17 +691,17 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Sets the current theme for the look and feel. Note that the theme must be
- * set <em>before</em> the look and feel is installed. To change the theme
- * for an already running application that is using the
- * {@link MetalLookAndFeel}, first set the theme with this method, then
- * create a new instance of {@link MetalLookAndFeel} and install it in the
+ * Sets the current theme for the look and feel. Note that the theme must be
+ * set <em>before</em> the look and feel is installed. To change the theme
+ * for an already running application that is using the
+ * {@link MetalLookAndFeel}, first set the theme with this method, then
+ * create a new instance of {@link MetalLookAndFeel} and install it in the
* usual way (see {@link UIManager#setLookAndFeel(LookAndFeel)}).
- *
+ *
* @param theme the theme (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>theme</code> is <code>null</code>.
- *
+ *
* @see #getCurrentTheme()
*/
public static void setCurrentTheme(MetalTheme theme)
@@ -934,7 +934,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"EditorPane.inactiveForeground", getInactiveSystemTextColor(),
"EditorPane.selectionBackground", getTextHighlightColor(),
"EditorPane.selectionForeground", getHighlightedTextColor(),
-
+
"FormattedTextField.background", getWindowBackground(),
"FormattedTextField.border",
new BorderUIResource(MetalBorders.getTextFieldBorder()),
@@ -946,15 +946,15 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"FormattedTextField.selectionBackground", getTextHighlightColor(),
"FormattedTextField.selectionForeground", getHighlightedTextColor(),
- "FileChooser.upFolderIcon",
+ "FileChooser.upFolderIcon",
MetalIconFactory.getFileChooserUpFolderIcon(),
- "FileChooser.listViewIcon",
+ "FileChooser.listViewIcon",
MetalIconFactory.getFileChooserListViewIcon(),
- "FileChooser.newFolderIcon",
+ "FileChooser.newFolderIcon",
MetalIconFactory.getFileChooserNewFolderIcon(),
- "FileChooser.homeFolderIcon",
+ "FileChooser.homeFolderIcon",
MetalIconFactory.getFileChooserHomeFolderIcon(),
- "FileChooser.detailsViewIcon",
+ "FileChooser.detailsViewIcon",
MetalIconFactory.getFileChooserDetailViewIcon(),
"FileChooser.fileNameLabelMnemonic", new Integer(78),
"FileChooser.filesOfTypeLabelMnemonic", new Integer(84),
@@ -974,15 +974,15 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"InternalFrame.borderLight", getControlHighlight(),
"InternalFrame.borderShadow", getControlShadow(),
"InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(),
- "InternalFrame.closeIcon",
+ "InternalFrame.closeIcon",
MetalIconFactory.getInternalFrameCloseIcon(16),
"InternalFrame.closeSound", "sounds/FrameClose.wav",
"InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(),
"InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(),
- "InternalFrame.maximizeIcon",
+ "InternalFrame.maximizeIcon",
MetalIconFactory.getInternalFrameMaximizeIcon(16),
"InternalFrame.maximizeSound", "sounds/FrameMaximize.wav",
- "InternalFrame.iconifyIcon",
+ "InternalFrame.iconifyIcon",
MetalIconFactory.getInternalFrameMinimizeIcon(16),
"InternalFrame.minimizeSound", "sounds/FrameMinimize.wav",
"InternalFrame.paletteBorder", new MetalBorders.PaletteBorder(),
@@ -1002,7 +1002,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"List.foreground", getUserTextColor(),
"List.selectionBackground", getTextHighlightColor(),
"List.selectionForeground", getHighlightedTextColor(),
- "List.focusCellHighlightBorder",
+ "List.focusCellHighlightBorder",
new LineBorderUIResource(MetalLookAndFeel.getFocusColor()),
"Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),
@@ -1047,7 +1047,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"OptionPane.informationSound", "sounds/OptionPaneInformation.wav",
"OptionPane.questionSound", "sounds/OptionPaneQuestion.wav",
"OptionPane.warningSound", "sounds/OptionPaneWarning.wav",
- "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51),
+ "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51),
"OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153),
"OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0),
"OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102),
@@ -1114,16 +1114,16 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"RadioButtonMenuItem.background", getMenuBackground(),
"RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(),
"RadioButtonMenuItem.borderPainted", Boolean.TRUE,
- "RadioButtonMenuItem.checkIcon",
+ "RadioButtonMenuItem.checkIcon",
MetalIconFactory.getRadioButtonMenuItemIcon(),
"RadioButtonMenuItem.commandSound", "sounds/MenuItemCommand.wav",
"RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(),
"RadioButtonMenuItem.font", getMenuTextFont(),
"RadioButtonMenuItem.foreground", getMenuForeground(),
"RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
- "RadioButtonMenuItem.selectionBackground",
+ "RadioButtonMenuItem.selectionBackground",
MetalLookAndFeel.getMenuSelectedBackground(),
- "RadioButtonMenuItem.selectionForeground",
+ "RadioButtonMenuItem.selectionForeground",
MetalLookAndFeel.getMenuSelectedForeground(),
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
@@ -1154,12 +1154,12 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0),
"Slider.foreground", getPrimaryControlShadow(),
"Slider.highlight", getControlHighlight(),
- "Slider.horizontalThumbIcon",
+ "Slider.horizontalThumbIcon",
MetalIconFactory.getHorizontalSliderThumbIcon(),
"Slider.majorTickLength", new Integer(6),
"Slider.shadow", getControlShadow(),
"Slider.trackWidth", new Integer(7),
- "Slider.verticalThumbIcon",
+ "Slider.verticalThumbIcon",
MetalIconFactory.getVerticalSliderThumbIcon(),
"Spinner.arrowButtonInsets", new InsetsUIResource(0, 0, 0, 0),
@@ -1197,7 +1197,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
// new properties in OceanTheme:
// TabbedPane.contentAreaColor
// TabbedPane.unselectedBackground
-
+
"Table.background", getWindowBackground(),
"Table.focusCellBackground", getWindowBackground(),
"Table.focusCellForeground", getControlTextColor(),
@@ -1235,7 +1235,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"TextField.selectionBackground", getTextHighlightColor(),
"TextField.selectionForeground", getHighlightedTextColor(),
"TextField.shadow", getControlShadow(),
-
+
"TextPane.background", getWindowBackground(),
"TextPane.caretForeground", getUserTextColor(),
"TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
@@ -1341,7 +1341,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
* an instance of {@link OceanTheme}.
*
* @return The current theme (never <code>null</code>).
- *
+ *
* @see #setCurrentTheme(MetalTheme)
*/
public static MetalTheme getCurrentTheme()
diff --git a/javax/swing/plaf/metal/MetalMenuBarUI.java b/javax/swing/plaf/metal/MetalMenuBarUI.java
index 2cc52ed73..35f2b05c0 100644
--- a/javax/swing/plaf/metal/MetalMenuBarUI.java
+++ b/javax/swing/plaf/metal/MetalMenuBarUI.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.basic.BasicMenuBarUI;
/**
* A UI implementation for MenuBar in the Metal Look &amp; Feel.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*
* @since 1.5
@@ -84,7 +84,7 @@ public class MetalMenuBarUI extends BasicMenuBarUI
{
MetalUtils.paintGradient(g, 0, 0, c.getWidth(), height,
SwingConstants.VERTICAL, "MenuBar.gradient");
-
+
paint(g, c);
}
else
diff --git a/javax/swing/plaf/metal/MetalProgressBarUI.java b/javax/swing/plaf/metal/MetalProgressBarUI.java
index 0f28818b9..005c5f0d8 100644
--- a/javax/swing/plaf/metal/MetalProgressBarUI.java
+++ b/javax/swing/plaf/metal/MetalProgressBarUI.java
@@ -51,7 +51,7 @@ import javax.swing.plaf.basic.BasicProgressBarUI;
* A UI delegate for the {@link JProgressBar} component.
*/
public class MetalProgressBarUI extends BasicProgressBarUI
-{
+{
/**
* Constructs a new instance of <code>MetalProgressBarUI</code>.
*/
@@ -88,7 +88,7 @@ public class MetalProgressBarUI extends BasicProgressBarUI
int w = progressBar.getWidth();
int h = progressBar.getHeight();
int orientation = progressBar.getOrientation();
-
+
Color shadow = MetalLookAndFeel.getControlShadow();
g.setColor(shadow);
diff --git a/javax/swing/plaf/metal/MetalRadioButtonUI.java b/javax/swing/plaf/metal/MetalRadioButtonUI.java
index 57f5bbe3e..0f7f3b101 100644
--- a/javax/swing/plaf/metal/MetalRadioButtonUI.java
+++ b/javax/swing/plaf/metal/MetalRadioButtonUI.java
@@ -60,13 +60,13 @@ public class MetalRadioButtonUI
/** Used to draw the focus rectangle. */
protected Color focusColor;
-
+
/** Used to fill the icon when the button is pressed. */
protected Color selectColor;
-
+
/** Used to draw disabled text. */
protected Color disabledTextColor;
-
+
/**
* Constructs a new instance of <code>MetalRadioButtonUI</code>.
*/
@@ -86,10 +86,10 @@ public class MetalRadioButtonUI
{
return new MetalRadioButtonUI();
}
-
+
/**
* Sets the default values for the specified button.
- *
+ *
* @param b the button.
*/
public void installDefaults(AbstractButton b)
@@ -100,10 +100,10 @@ public class MetalRadioButtonUI
focusColor = UIManager.getColor(prefix + "focus");
selectColor = UIManager.getColor(prefix + "select");
}
-
+
/**
* Clears any defaults set in the installDefaults() method.
- *
+ *
* @param b the {@link JRadioButton}.
*/
protected void uninstallDefaults(AbstractButton b)
@@ -113,50 +113,50 @@ public class MetalRadioButtonUI
focusColor = null;
selectColor = null;
}
-
+
/**
* Returns the color used to fill the {@link JRadioButton}'s icon when the
- * button is pressed. The default color is obtained from the
- * {@link UIManager} defaults via an entry with the key
+ * button is pressed. The default color is obtained from the
+ * {@link UIManager} defaults via an entry with the key
* <code>RadioButton.select</code>.
- *
+ *
* @return The select color.
*/
protected Color getSelectColor()
{
- return selectColor;
+ return selectColor;
}
-
+
/**
* Returns the color for the {@link JRadioButton}'s text when the button is
* disabled. The default color is obtained from the {@link UIManager}
* defaults via an entry with the key <code>RadioButton.disabledText</code>.
- *
+ *
* @return The disabled text color.
*/
protected Color getDisabledTextColor()
{
return disabledTextColor;
}
-
+
/**
- * Returns the color used to draw the focus rectangle when the
- * {@link JRadioButton} has the focus. The default color is obtained from
- * the {@link UIManager} defaults via an entry with the key
+ * Returns the color used to draw the focus rectangle when the
+ * {@link JRadioButton} has the focus. The default color is obtained from
+ * the {@link UIManager} defaults via an entry with the key
* <code>RadioButton.focus</code>.
- *
+ *
* @return The color used to draw the focus rectangle.
- *
+ *
* @see #paintFocus(Graphics, Rectangle, Dimension)
*/
protected Color getFocusColor()
{
return focusColor;
}
-
+
/**
* Paints the {@link JRadioButton}.
- *
+ *
* @param g the graphics device.
* @param c the component (an instance of {@link JRadioButton}).
*/
@@ -166,10 +166,10 @@ public class MetalRadioButtonUI
// FIXME: disabled text isn't being drawn correctly, it's possible that
// it could be done here...
}
-
+
/**
* Paints the focus rectangle for the {@link JRadioButton}.
- *
+ *
* @param g the graphics device.
* @param t the bounding rectangle for the text.
* @param d ???
@@ -179,5 +179,5 @@ public class MetalRadioButtonUI
g.setColor(focusColor);
g.drawRect(t.x - 1, t.y - 1, t.width + 1, t.height + 1);
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalRootPaneUI.java b/javax/swing/plaf/metal/MetalRootPaneUI.java
index eaee5bf92..84f1303f6 100644
--- a/javax/swing/plaf/metal/MetalRootPaneUI.java
+++ b/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -76,8 +76,8 @@ import javax.swing.plaf.basic.BasicRootPaneUI;
/**
* A UI delegate for the {@link JRootPane} component. This implementation
- * supports the JRootPane <code>windowDecorationStyle</code> property.
- *
+ * supports the JRootPane <code>windowDecorationStyle</code> property.
+ *
* @author Roman Kennke (kennke@aicas.com)
*
* @since 1.4
@@ -115,7 +115,7 @@ public class MetalRootPaneUI
newInsets.bottom = 5;
newInsets.right = 5;
}
- return newInsets;
+ return newInsets;
}
/**
@@ -132,7 +132,7 @@ public class MetalRootPaneUI
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component
* @param g the graphics device
* @param x the x-coordinate
@@ -140,7 +140,7 @@ public class MetalRootPaneUI
* @param w the width
* @param h the height
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
JRootPane f = (JRootPane) c;
@@ -149,31 +149,31 @@ public class MetalRootPaneUI
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// Fill the border background.
g.fillRect(x, y, w, 5);
g.fillRect(x, y, 5, h);
g.fillRect(x + w - 5, y, 5, h);
g.fillRect(x, y + h - 5, w, 5);
-
+
// Draw a dot in each corner.
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
// Draw the lines.
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 14, y + 2, x + w - 15, y + 2);
g.drawLine(x + 14, y + h - 3, x + w - 15, y + h - 3);
g.drawLine(x + 2, y + 14, x + 2, y + h - 15);
g.drawLine(x + w - 3, y + 14, x + w - 3, y + h - 15);
-
+
// Draw the line highlights.
if (frame.isActive())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
- else
+ else
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 15, y + 3, x + w - 14, y + 3);
g.drawLine(x + 15, y + h - 2, x + w - 14, y + h - 2);
@@ -248,7 +248,7 @@ public class MetalRootPaneUI
{
super("Close");
}
-
+
/**
* This method is called when something closes the frame.
*
@@ -316,7 +316,7 @@ public class MetalRootPaneUI
f.setExtendedState(Frame.ICONIFIED);
}
}
-
+
}
/**
@@ -437,8 +437,8 @@ public class MetalRootPaneUI
}
Dimension titlePreferredSize = title.getPreferredSize();
- title.setBounds(insets.left + 5, insets.top,
- Math.min(titlePreferredSize.width, loc - insets.left - 10),
+ title.setBounds(insets.left + 5, insets.top,
+ Math.min(titlePreferredSize.width, loc - insets.left - 10),
height);
}
@@ -501,7 +501,7 @@ public class MetalRootPaneUI
/** The icon displayed in the close button. */
Icon closeIcon;
-
+
/**
* The background color of the TitlePane when the JInternalFrame is not
* selected.
@@ -653,7 +653,7 @@ public class MetalRootPaneUI
/**
* Paints a representation of the current state of the internal frame.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -667,13 +667,13 @@ public class MetalRootPaneUI
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// put a dot in each of the top corners
g.drawLine(0, 0, 0, 0);
g.drawLine(d.width - 1, 0, d.width - 1, 0);
-
+
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
// draw the metal pattern
if (UIManager.get("InternalFrame.activeTitleGradient") != null
&& frame.isActive())
@@ -688,7 +688,7 @@ public class MetalRootPaneUI
int endX = startX;
if (iconButton.isVisible())
endX = Math.max(iconButton.getX(), endX);
- else if (maxButton.isVisible())
+ else if (maxButton.isVisible())
endX = Math.max(maxButton.getX(), endX);
else if (closeButton.isVisible())
endX = Math.max(closeButton.getX(), endX);
@@ -709,10 +709,10 @@ public class MetalRootPaneUI
if (!isOpaque())
return;
-
+
Color saved = g.getColor();
Dimension dims = getSize();
-
+
Color bg = getBackground();
if (frame.isActive())
bg = selectedTitleColor;
@@ -736,8 +736,8 @@ public class MetalRootPaneUI
maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16);
Frame frame = (Frame) SwingUtilities.getWindowAncestor(rootPane);
- title = new JLabel(frame.getTitle(),
- MetalIconFactory.getInternalFrameDefaultMenuIcon(),
+ title = new JLabel(frame.getTitle(),
+ MetalIconFactory.getInternalFrameDefaultMenuIcon(),
SwingConstants.LEFT);
}
}
@@ -770,7 +770,7 @@ public class MetalRootPaneUI
* The cached layout info for the title pane.
*/
private Rectangle titlePaneBounds;
-
+
/**
* The cached preferred size.
*/
@@ -832,7 +832,7 @@ public class MetalRootPaneUI
public void removeLayoutComponent(Component component)
{
// TODO Auto-generated method stub
-
+
}
public Dimension preferredLayoutSize(Container parent)
@@ -894,7 +894,7 @@ public class MetalRootPaneUI
// 4. The menuBar is positioned at the upper edge of layeredPane.
// 5. The contentPane fills viewable region minus menuBar minus
// titlePane, if present.
-
+
// +-------------------------------+
// | JLayeredPane |
// | +--------------------------+ |
@@ -952,7 +952,7 @@ public class MetalRootPaneUI
contentPane.setBounds(contentPaneBounds);
titlePane.setBounds(titlePaneBounds);
}
-
+
}
/**
diff --git a/javax/swing/plaf/metal/MetalScrollBarUI.java b/javax/swing/plaf/metal/MetalScrollBarUI.java
index 4c75fcb4f..5f0cbe4be 100644
--- a/javax/swing/plaf/metal/MetalScrollBarUI.java
+++ b/javax/swing/plaf/metal/MetalScrollBarUI.java
@@ -59,30 +59,30 @@ import javax.swing.plaf.basic.BasicScrollBarUI;
*/
public class MetalScrollBarUI extends BasicScrollBarUI
{
-
+
/**
* A property change handler for the UI delegate that monitors for
* changes to the "JScrollBar.isFreeStanding" property, and updates
* the buttons and track rendering as appropriate.
*/
- class MetalScrollBarPropertyChangeHandler
+ class MetalScrollBarPropertyChangeHandler
extends BasicScrollBarUI.PropertyChangeHandler
{
/**
* Creates a new handler.
- *
+ *
* @see #createPropertyChangeListener()
*/
public MetalScrollBarPropertyChangeHandler()
{
// Nothing to do here.
}
-
+
/**
* Handles a property change event. If the event name is
- * <code>JSlider.isFreeStanding</code>, this method updates the
+ * <code>JSlider.isFreeStanding</code>, this method updates the
* delegate, otherwise the event is passed up to the super class.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -100,7 +100,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
super.propertyChange(e);
}
}
-
+
/** The name for the 'free standing' property. */
public static final String FREE_STANDING_PROP = "JScrollBar.isFreeStanding";
@@ -108,34 +108,34 @@ public class MetalScrollBarUI extends BasicScrollBarUI
private static final Dimension MIN_THUMB_SIZE = new Dimension(15, 15);
/** The minimum thumb size for a scroll bar that is free standing. */
- private static final Dimension MIN_THUMB_SIZE_FREE_STANDING
+ private static final Dimension MIN_THUMB_SIZE_FREE_STANDING
= new Dimension(17, 17);
-
+
/** The button that increases the value in the scroll bar. */
protected MetalScrollButton increaseButton;
-
+
/** The button that decreases the value in the scroll bar. */
protected MetalScrollButton decreaseButton;
-
- /**
- * The scroll bar width.
+
+ /**
+ * The scroll bar width.
*/
protected int scrollBarWidth;
-
- /**
- * A flag that indicates whether the scroll bar is "free standing", which
- * means it has complete borders and can be used anywhere in the UI. A
+
+ /**
+ * A flag that indicates whether the scroll bar is "free standing", which
+ * means it has complete borders and can be used anywhere in the UI. A
* scroll bar which is not free standing has borders missing from one
* side, and relies on being part of another container with its own borders
* to look right visually. */
protected boolean isFreeStanding = true;
-
- /**
- * The color for the scroll bar shadow (this is read from the UIDefaults in
+
+ /**
+ * The color for the scroll bar shadow (this is read from the UIDefaults in
* the installDefaults() method).
*/
Color scrollBarShadowColor;
-
+
/**
* Constructs a new instance of <code>MetalScrollBarUI</code>, with no
* specific initialisation.
@@ -161,9 +161,9 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* Installs the defaults.
*/
protected void installDefaults()
- {
- // need to initialise isFreeStanding before calling the super class,
- // so that the value is set when createIncreaseButton() and
+ {
+ // need to initialise isFreeStanding before calling the super class,
+ // so that the value is set when createIncreaseButton() and
// createDecreaseButton() are called (unless there is somewhere earlier
// that we can do this).
Boolean prop = (Boolean) scrollbar.getClientProperty(FREE_STANDING_PROP);
@@ -172,35 +172,35 @@ public class MetalScrollBarUI extends BasicScrollBarUI
scrollBarWidth = UIManager.getInt("ScrollBar.width");
super.installDefaults();
}
-
+
/**
* Creates a property change listener for the delegate to use. This
- * overrides the method to provide a custom listener for the
- * {@link MetalLookAndFeel} that can handle the
+ * overrides the method to provide a custom listener for the
+ * {@link MetalLookAndFeel} that can handle the
* <code>JScrollBar.isFreeStanding</code> property.
- *
+ *
* @return A property change listener.
*/
protected PropertyChangeListener createPropertyChangeListener()
{
return new MetalScrollBarPropertyChangeHandler();
}
-
+
/**
* Creates a new button to use as the control at the lower end of the
* {@link JScrollBar}. This method assigns the new button (an instance of
- * {@link MetalScrollButton} to the {@link #decreaseButton} field, and also
- * returns the button. The button width is determined by the
+ * {@link MetalScrollButton} to the {@link #decreaseButton} field, and also
+ * returns the button. The button width is determined by the
* <code>ScrollBar.width</code> setting in the UI defaults.
- *
+ *
* @param orientation the orientation of the button ({@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}).
- *
+ *
* @return The button.
*/
protected JButton createDecreaseButton(int orientation)
{
- decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,
+ decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,
isFreeStanding);
return decreaseButton;
}
@@ -208,25 +208,25 @@ public class MetalScrollBarUI extends BasicScrollBarUI
/**
* Creates a new button to use as the control at the upper end of the
* {@link JScrollBar}. This method assigns the new button (an instance of
- * {@link MetalScrollButton} to the {@link #increaseButton} field, and also
- * returns the button. The button width is determined by the
+ * {@link MetalScrollButton} to the {@link #increaseButton} field, and also
+ * returns the button. The button width is determined by the
* <code>ScrollBar.width</code> setting in the UI defaults.
- *
+ *
* @param orientation the orientation of the button ({@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}).
- *
+ *
* @return The button.
*/
protected JButton createIncreaseButton(int orientation)
{
- increaseButton = new MetalScrollButton(orientation, scrollBarWidth,
+ increaseButton = new MetalScrollButton(orientation, scrollBarWidth,
isFreeStanding);
return increaseButton;
}
-
+
/**
* Paints the track for the scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param trackBounds the track bounds.
@@ -234,20 +234,20 @@ public class MetalScrollBarUI extends BasicScrollBarUI
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
{
g.setColor(MetalLookAndFeel.getControl());
- g.fillRect(trackBounds.x, trackBounds.y, trackBounds.width,
+ g.fillRect(trackBounds.x, trackBounds.y, trackBounds.width,
trackBounds.height);
- if (scrollbar.getOrientation() == HORIZONTAL)
- paintTrackHorizontal(g, c, trackBounds.x, trackBounds.y,
+ if (scrollbar.getOrientation() == HORIZONTAL)
+ paintTrackHorizontal(g, c, trackBounds.x, trackBounds.y,
trackBounds.width, trackBounds.height);
- else
- paintTrackVertical(g, c, trackBounds.x, trackBounds.y,
+ else
+ paintTrackVertical(g, c, trackBounds.x, trackBounds.y,
trackBounds.width, trackBounds.height);
-
+
}
-
+
/**
* Paints the track for a horizontal scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param x the x-coordinate for the track bounds.
@@ -255,7 +255,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* @param w the width for the track bounds.
* @param h the height for the track bounds.
*/
- private void paintTrackHorizontal(Graphics g, JComponent c,
+ private void paintTrackHorizontal(Graphics g, JComponent c,
int x, int y, int w, int h)
{
if (c.isEnabled())
@@ -264,12 +264,12 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
-
+
g.setColor(scrollBarShadowColor);
g.drawLine(x + 1, y + 1, x + 1, y + h - 1);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
-
- if (isFreeStanding)
+
+ if (isFreeStanding)
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(x, y + h - 2, x + w - 1, y + h - 2);
@@ -290,10 +290,10 @@ public class MetalScrollBarUI extends BasicScrollBarUI
}
}
}
-
+
/**
* Paints the track for a vertical scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param x the x-coordinate for the track bounds.
@@ -301,7 +301,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* @param w the width for the track bounds.
* @param h the height for the track bounds.
*/
- private void paintTrackVertical(Graphics g, JComponent c,
+ private void paintTrackVertical(Graphics g, JComponent c,
int x, int y, int w, int h)
{
if (c.isEnabled())
@@ -310,12 +310,12 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(scrollBarShadowColor);
g.drawLine(x + 1, y + 1, x + w - 1, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
- if (isFreeStanding)
+
+ if (isFreeStanding)
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(x + w - 2, y, x + w - 2, y + h - 1);
@@ -351,7 +351,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
return;
if (scrollbar.getOrientation() == HORIZONTAL)
paintThumbHorizontal(g, c, thumbBounds);
- else
+ else
paintThumbVertical(g, c, thumbBounds);
// Draw the pattern when the theme is not Ocean.
@@ -367,19 +367,19 @@ public class MetalScrollBarUI extends BasicScrollBarUI
/**
* Paints the thumb for a horizontal scroll bar.
- *
+ *
* @param g the graphics device.
* @param c the scroll bar component.
* @param thumbBounds the thumb bounds.
*/
- private void paintThumbHorizontal(Graphics g, JComponent c,
- Rectangle thumbBounds)
+ private void paintThumbHorizontal(Graphics g, JComponent c,
+ Rectangle thumbBounds)
{
int x = thumbBounds.x;
int y = thumbBounds.y;
int w = thumbBounds.width;
int h = thumbBounds.height;
-
+
// First we fill the background.
MetalTheme theme = MetalLookAndFeel.getCurrentTheme();
if (theme instanceof OceanTheme
@@ -408,7 +408,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
}
-
+
// then the highlight
g.setColor(thumbHighlightColor);
if (isFreeStanding)
@@ -421,7 +421,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 1, y + 1, x + w - 3, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 1);
}
-
+
// draw the shadow line
g.setColor(UIManager.getColor("ScrollBar.shadow"));
g.drawLine(x + w, y + 1, x + w, y + h - 1);
@@ -440,22 +440,22 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(middle + 3, y + 5, middle + 3, y + h - 4);
}
}
-
+
/**
* Paints the thumb for a vertical scroll bar.
- *
+ *
* @param g the graphics device.
* @param c the scroll bar component.
* @param thumbBounds the thumb bounds.
*/
- private void paintThumbVertical(Graphics g, JComponent c,
+ private void paintThumbVertical(Graphics g, JComponent c,
Rectangle thumbBounds)
{
int x = thumbBounds.x;
int y = thumbBounds.y;
int w = thumbBounds.width;
int h = thumbBounds.height;
-
+
// First we fill the background.
MetalTheme theme = MetalLookAndFeel.getCurrentTheme();
if (theme instanceof OceanTheme
@@ -484,7 +484,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
-
+
// then the highlight
g.setColor(thumbHighlightColor);
if (isFreeStanding)
@@ -497,7 +497,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 1, y + 1, x + w - 1, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 3);
}
-
+
// draw the shadow line
g.setColor(UIManager.getColor("ScrollBar.shadow"));
g.drawLine(x + 1, y + h, x + w - 2, y + h);
@@ -516,10 +516,10 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 5, middle + 3, x + w - 4, middle + 3);
}
}
-
+
/**
- * Returns the minimum thumb size. For a free standing scroll bar the
- * minimum size is <code>17 x 17</code> pixels, whereas for a non free
+ * Returns the minimum thumb size. For a free standing scroll bar the
+ * minimum size is <code>17 x 17</code> pixels, whereas for a non free
* standing scroll bar the minimum size is <code>15 x 15</code> pixels.
*
* @return The minimum thumb size.
@@ -580,6 +580,5 @@ public class MetalScrollBarUI extends BasicScrollBarUI
width += insets.left + insets.right;
return new Dimension(width, height);
- }
+ }
}
-
diff --git a/javax/swing/plaf/metal/MetalScrollButton.java b/javax/swing/plaf/metal/MetalScrollButton.java
index 8678f680d..3273908b3 100644
--- a/javax/swing/plaf/metal/MetalScrollButton.java
+++ b/javax/swing/plaf/metal/MetalScrollButton.java
@@ -47,32 +47,32 @@ import javax.swing.plaf.basic.BasicArrowButton;
/**
* A button used by the {@link MetalScrollBarUI}. The button appearance
- * varies according to the button direction, whether or not it is part of a
- * "free standing" scroll bar, and the current state of the button.
+ * varies according to the button direction, whether or not it is part of a
+ * "free standing" scroll bar, and the current state of the button.
*/
-public class MetalScrollButton extends BasicArrowButton
+public class MetalScrollButton extends BasicArrowButton
{
-
- /**
+
+ /**
* The maximum size for buttons.
* @see #getMaximumSize()
*/
- private static Dimension maximumSize;
-
+ private static Dimension maximumSize;
+
/** The width of the button. */
private int buttonWidth;
-
- /**
- * A flag that indicates whether the button is part of a free standing
+
+ /**
+ * A flag that indicates whether the button is part of a free standing
* scroll bar. This affects how the border is drawn.
*/
private boolean freeStanding;
-
+
/**
* Creates a new button.
- *
- * @param direction the direction (this should be one of {@link #NORTH},
- * {@link #SOUTH}, {@link #EAST} and {@link #WEST}, but
+ *
+ * @param direction the direction (this should be one of {@link #NORTH},
+ * {@link #SOUTH}, {@link #EAST} and {@link #WEST}, but
* this is not enforced).
* @param width the button width.
* @param freeStanding a flag indicating whether the scroll button is free
@@ -85,31 +85,31 @@ public class MetalScrollButton extends BasicArrowButton
this.freeStanding = freeStanding;
setFocusable(false);
}
-
+
/**
* Returns the button width.
- *
+ *
* @return The button width.
*/
public int getButtonWidth()
{
- return buttonWidth;
+ return buttonWidth;
}
/**
* Sets the free standing flag. This controls how the button border is
* drawn.
- *
+ *
* @param freeStanding the new value of the flag.
*/
public void setFreeStanding(boolean freeStanding)
{
this.freeStanding = freeStanding;
}
-
+
/**
* Paints the button.
- *
+ *
* @param g the graphics device.
*/
public void paint(Graphics g)
@@ -122,16 +122,16 @@ public class MetalScrollButton extends BasicArrowButton
else
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(0, 0, bounds.width, bounds.height);
-
+
paintArrow(g, bounds.width, bounds.height);
-
+
// paint a border manually - I tried using a real (custom) Border
- // but couldn't get it to stay set for the button, something was
+ // but couldn't get it to stay set for the button, something was
// overwriting it...
- if (freeStanding)
+ if (freeStanding)
{
if (direction == WEST)
- paintWestBorderFreeStanding(g, bounds.width, bounds.height);
+ paintWestBorderFreeStanding(g, bounds.width, bounds.height);
else if (direction == EAST)
paintEastBorderFreeStanding(g, bounds.width, bounds.height);
else if (direction == SOUTH)
@@ -142,7 +142,7 @@ public class MetalScrollButton extends BasicArrowButton
else
{
if (direction == WEST)
- paintWestBorder(g, bounds.width, bounds.height);
+ paintWestBorder(g, bounds.width, bounds.height);
else if (direction == EAST)
paintEastBorder(g, bounds.width, bounds.height);
else if (direction == SOUTH)
@@ -151,14 +151,14 @@ public class MetalScrollButton extends BasicArrowButton
paintNorthBorder(g, bounds.width, bounds.height);
}
}
-
+
private void paintArrow(Graphics g, int w, int h)
{
if (isEnabled())
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDisabled());
-
+
if (direction == SOUTH)
{
int x = w / 2;
@@ -178,7 +178,7 @@ public class MetalScrollButton extends BasicArrowButton
int x = w / 2 - 3;
int y = h / 2;
for (int i = 1; i < 5; i++)
- g.drawLine(x + i, y - i, x + i, y + i - 1);
+ g.drawLine(x + i, y - i, x + i, y + i - 1);
}
else // assume NORTH
{
@@ -191,12 +191,12 @@ public class MetalScrollButton extends BasicArrowButton
/**
* Paints the border for a button with a {@link #NORTH} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
*/
- private void paintNorthBorderFreeStanding(Graphics g, int w, int h)
+ private void paintNorthBorderFreeStanding(Graphics g, int w, int h)
{
if (isEnabled())
{
@@ -205,12 +205,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
g.drawLine(2, h - 1, w - 2, h - 1);
g.drawLine(w - 2, 2, w - 2, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, 1, h - 2);
g.drawLine(1, 1, w - 3, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
g.drawLine(w - 2, 1, w - 2, 1);
@@ -223,11 +223,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #SOUTH} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -241,12 +241,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
g.drawLine(2, h - 1, w - 2, h - 1);
g.drawLine(w - 2, 2, w - 2, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, 1, h - 1);
g.drawLine(1, 1, w - 1, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
g.drawLine(w - 1, 1, w - 1, 1);
@@ -259,11 +259,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with an {@link #EAST} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -276,12 +276,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 2, 0);
g.drawLine(w - 2, 0, w - 2, h - 2);
g.drawLine(0, h - 2, w - 2, h - 2);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(0, 1, w - 1, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
g.drawLine(0, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(w - 2, 1, w - 2, 1);
}
@@ -293,11 +293,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, h - 1, w - 1, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #WEST} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -310,12 +310,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 1, 0);
g.drawLine(0, 0, 0, h - 2);
g.drawLine(0, h - 2, w - 1, h - 2);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, w - 1, 1);
g.drawLine(1, 1, 1, h - 1);
g.drawLine(1, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 2, 1, h - 2);
}
@@ -327,22 +327,22 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, h - 1, w - 1, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #NORTH} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
*/
- private void paintNorthBorder(Graphics g, int w, int h)
+ private void paintNorthBorder(Graphics g, int w, int h)
{
if (isEnabled())
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(0, 0, 0, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 0, 1, h - 1);
g.drawLine(1, 0, w - 1, 0);
@@ -353,11 +353,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #SOUTH} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -369,11 +369,11 @@ public class MetalScrollButton extends BasicArrowButton
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(0, 0, 0, h - 1);
g.drawLine(0, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 0, 1, h - 1);
g.drawLine(1, 0, w - 1, 0);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
}
@@ -387,7 +387,7 @@ public class MetalScrollButton extends BasicArrowButton
/**
* Paints the border for a button with an {@link #EAST} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -409,11 +409,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 1, 0);
}
}
-
+
/**
* Paints the border for a button with a {@link #WEST} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -435,11 +435,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, bounds.width - 1, 0);
}
}
-
+
/**
- * Returns the preferred size for the button, which varies depending on
+ * Returns the preferred size for the button, which varies depending on
* the direction of the button and whether or not it is free standing.
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize()
@@ -447,9 +447,9 @@ public class MetalScrollButton extends BasicArrowButton
int adj = 1;
if (!freeStanding)
adj = 2;
-
+
if (direction == EAST)
- return new Dimension(buttonWidth - adj, buttonWidth);
+ return new Dimension(buttonWidth - adj, buttonWidth);
else if (direction == WEST)
return new Dimension(buttonWidth - 2, buttonWidth);
else if (direction == SOUTH)
@@ -457,27 +457,27 @@ public class MetalScrollButton extends BasicArrowButton
else // assume NORTH
return new Dimension(buttonWidth, buttonWidth - 2);
}
-
+
/**
* Returns the minimum size for the button.
- *
+ *
* @return The minimum size for the button.
*/
public Dimension getMinimumSize()
{
return getPreferredSize();
}
-
+
/**
* Returns the maximum size for the button.
- *
+ *
* @return <code>Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE)</code>.
*/
public Dimension getMaximumSize()
{
if (maximumSize == null)
maximumSize = new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
- return maximumSize;
+ return maximumSize;
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalScrollPaneUI.java b/javax/swing/plaf/metal/MetalScrollPaneUI.java
index ae14af3ca..09a47c300 100644
--- a/javax/swing/plaf/metal/MetalScrollPaneUI.java
+++ b/javax/swing/plaf/metal/MetalScrollPaneUI.java
@@ -71,12 +71,12 @@ public class MetalScrollPaneUI
{
return new MetalScrollPaneUI();
}
-
+
/**
- * Configures the specified component appropriate for the look and feel.
- * This method is invoked when the ComponentUI instance is being installed
- * as the UI delegate on the specified component. This method should
- * completely configure the component for the look and feel,
+ * Configures the specified component appropriate for the look and feel.
+ * This method is invoked when the ComponentUI instance is being installed
+ * as the UI delegate on the specified component. This method should
+ * completely configure the component for the look and feel,
* including the following:
* 1. Install any default property values for color, fonts, borders,
* icons, opacity, etc. on the component. Whenever possible, property
@@ -87,8 +87,8 @@ public class MetalScrollPaneUI
* 5. Create/install a PropertyChangeListener on the component in order
* to detect and respond to component property changes appropriately.
* 6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
- * 7. Initialize any appropriate instance data.
- *
+ * 7. Initialize any appropriate instance data.
+ *
* @param c - the component to install the ui on
*/
public void installUI(JComponent c)
@@ -101,11 +101,11 @@ public class MetalScrollPaneUI
}
/**
- * Reverses configuration which was done on the specified component
- * during installUI. This method is invoked when this UIComponent
- * instance is being removed as the UI delegate for the specified
- * component. This method should undo the configuration performed in
- * installUI, being careful to leave the JComponent instance in a
+ * Reverses configuration which was done on the specified component
+ * during installUI. This method is invoked when this UIComponent
+ * instance is being removed as the UI delegate for the specified
+ * component. This method should undo the configuration performed in
+ * installUI, being careful to leave the JComponent instance in a
* clean state (no extraneous listeners, look-and-feel-specific property
* objects, etc.). This should include the following:
* 1. Remove any UI-set borders from the component.
@@ -113,8 +113,8 @@ public class MetalScrollPaneUI
* 3. Remove any UI-added sub-components from the component.
* 4. Remove any UI-added event/property listeners from the component.
* 5. Remove any UI-installed keyboard UI from the component.
- * 6. Nullify any allocated instance data objects to allow for GC.
- *
+ * 6. Nullify any allocated instance data objects to allow for GC.
+ *
* @param c - the component to uninstall the ui on
*/
public void uninstallUI(JComponent c)
@@ -128,17 +128,17 @@ public class MetalScrollPaneUI
/**
* Installs listeners on scrollPane
- *
+ *
* @param scrollPane - the component to install the listeners on
*/
public void installListeners(JScrollPane scrollPane)
{
super.installListeners(scrollPane);
}
-
+
/**
* Uninstalls listeners on scrollPane
- *
+ *
* @param scrollPane - the component to uninstall the listeners on
*/
public void uninstallListeners(JScrollPane scrollPane)
@@ -148,7 +148,7 @@ public class MetalScrollPaneUI
/**
* TODO
- *
+ *
* @return TODO
*/
protected PropertyChangeListener createScrollBarSwapListener()
diff --git a/javax/swing/plaf/metal/MetalSeparatorUI.java b/javax/swing/plaf/metal/MetalSeparatorUI.java
index 6d7818f8b..8afa98c97 100644
--- a/javax/swing/plaf/metal/MetalSeparatorUI.java
+++ b/javax/swing/plaf/metal/MetalSeparatorUI.java
@@ -83,13 +83,13 @@ public class MetalSeparatorUI
}
/**
- * The separator is made of two lines. The top line will be
+ * The separator is made of two lines. The top line will be
* the Metal theme color separatorForeground (or left line if it's vertical).
* The bottom or right line will be the Metal theme color
* separatorBackground.
- * The two lines will
- * be centered inside the bounds box. If the separator is horizontal,
- * then it will be vertically centered, or if it's vertical, it will
+ * The two lines will
+ * be centered inside the bounds box. If the separator is horizontal,
+ * then it will be vertically centered, or if it's vertical, it will
* be horizontally centered.
*
* @param g The Graphics object to paint with
@@ -107,9 +107,9 @@ public class MetalSeparatorUI
s = (JSeparator) c;
else
return;
-
+
if (s.getOrientation() == JSeparator.HORIZONTAL)
- {
+ {
int midAB = r.height / 2;
g.setColor(c1);
g.drawLine(r.x, r.y + midAB - 1, r.x + r.width, r.y + midAB - 1);
diff --git a/javax/swing/plaf/metal/MetalSliderUI.java b/javax/swing/plaf/metal/MetalSliderUI.java
index b3e8707c9..e85c32462 100644
--- a/javax/swing/plaf/metal/MetalSliderUI.java
+++ b/javax/swing/plaf/metal/MetalSliderUI.java
@@ -74,11 +74,11 @@ public class MetalSliderUI extends BasicSliderUI
{
// Nothing to do here.
}
-
+
/**
* Handles property change events. Events with the name "JSlider.isFilled"
* are handled here, and other events are passed to the superclass.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -89,38 +89,38 @@ public class MetalSliderUI extends BasicSliderUI
if (b == null)
filledSlider = false;
else
- filledSlider = b.booleanValue();
+ filledSlider = b.booleanValue();
}
else
super.propertyChange(e);
}
}
-
+
/** The thumb color (unused, because an icon is used to draw the thumb). */
protected static Color thumbColor;
-
- /**
+
+ /**
* The highlight color used for drawing the track rect when the slider is
* enabled.
*/
protected static Color highlightColor;
-
+
/**
* The shadow color used for drawing the track rect when the slider is
* enabled.
*/
protected static Color darkShadowColor;
-
+
/** The track width. */
protected static int trackWidth = UIManager.getInt("Slider.trackWidth");
-
+
/** The length of the major tick marks. */
protected static int tickLength = UIManager.getInt("Slider.majorTickLength");
-
+
/** The icon used for the thumb control of horizontally oriented sliders. */
protected static Icon horizThumbIcon = UIManager.getIcon(
"Slider.horizontalThumbIcon");
-
+
/** The icon used for the thumb control of vertically oriented sliders. */
protected static Icon vertThumbIcon = UIManager.getIcon(
"Slider.verticalThumbIcon");
@@ -130,8 +130,8 @@ public class MetalSliderUI extends BasicSliderUI
/** A key to look up the filledSlider setting in the {@link UIManager}. */
protected final String SLIDER_FILL = "JSlider.isFilled";
-
- /**
+
+ /**
* A flag that controls whether or not the track is filled up to the value
* of the slider.
*/
@@ -159,38 +159,38 @@ public class MetalSliderUI extends BasicSliderUI
{
return new MetalSliderUI();
}
-
+
/**
* Installs the default for this UI delegate in the supplied component.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
{
super.installUI(c);
Boolean b = (Boolean) c.getClientProperty(SLIDER_FILL);
- if (b != null)
+ if (b != null)
filledSlider = b.booleanValue();
}
/**
- * Creates a property change listener for the slider.
- *
+ * Creates a property change listener for the slider.
+ *
* @param slider the slider.
- *
+ *
* @return A new instance of {@link MetalPropertyListener}.
*/
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
{
- return new MetalPropertyListener();
+ return new MetalPropertyListener();
}
-
+
/**
* Paints the thumb icon for the slider.
- *
+ *
* @param g the graphics device.
*/
- public void paintThumb(Graphics g)
+ public void paintThumb(Graphics g)
{
Color save = g.getColor();
g.setColor(thumbColor);
@@ -200,10 +200,10 @@ public class MetalSliderUI extends BasicSliderUI
vertThumbIcon.paintIcon(slider, g, thumbRect.x, thumbRect.y);
g.setColor(save);
}
-
+
/**
* Paints the track along which the thumb control moves.
- *
+ *
* @param g the graphics device.
*/
public void paintTrack(Graphics g)
@@ -215,10 +215,10 @@ public class MetalSliderUI extends BasicSliderUI
int trackY = trackRect.y + (trackRect.height - getTrackWidth()) / 2;
int trackW = trackRect.width;
int trackH = getTrackWidth();
-
+
// draw border
if (slider.isEnabled())
- BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
+ BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
darkShadowColor, shadowColor, darkShadowColor, highlightColor);
else
{
@@ -233,7 +233,7 @@ public class MetalSliderUI extends BasicSliderUI
{
int xPos = xPositionForValue(slider.getValue());
int x = slider.getInverted() ? xPos : trackRect.x;
- int w = slider.getInverted() ? trackX + trackW - xPos
+ int w = slider.getInverted() ? trackX + trackW - xPos
: xPos - trackRect.x;
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, trackY + 1, x + w - 3, trackY + 1);
@@ -245,11 +245,11 @@ public class MetalSliderUI extends BasicSliderUI
g.drawLine(x + 1, trackY + 4, x + w - 3, trackY + 4);
}
}
- else if (filledSlider)
+ else if (filledSlider)
{
int xPos = xPositionForValue(slider.getValue());
int x = slider.getInverted() ? xPos : trackRect.x;
- int w = slider.getInverted() ? trackX + trackW - xPos
+ int w = slider.getInverted() ? trackX + trackW - xPos
: xPos - trackRect.x;
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(x + 1, trackY + 1, w - 3, getTrackWidth() - 3);
@@ -257,7 +257,7 @@ public class MetalSliderUI extends BasicSliderUI
{
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(x + 1, trackY + 1, x + w - 3, trackY + 1);
- g.drawLine(x + 1, trackY + 1, x + 1,
+ g.drawLine(x + 1, trackY + 1, x + 1,
trackY + getTrackWidth() - 3);
}
}
@@ -269,7 +269,7 @@ public class MetalSliderUI extends BasicSliderUI
int trackW = getTrackWidth();
int trackH = trackRect.height;
if (slider.isEnabled())
- BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
+ BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
darkShadowColor, shadowColor, darkShadowColor, highlightColor);
else
{
@@ -284,9 +284,9 @@ public class MetalSliderUI extends BasicSliderUI
{
int yPos = yPositionForValue(slider.getValue());
int y = slider.getInverted() ? trackY : yPos;
- int h = slider.getInverted() ? yPos - trackY
+ int h = slider.getInverted() ? yPos - trackY
: trackY + trackH - yPos;
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(trackX + 1, y + 1, trackX + 1, y + h - 3);
g.setColor(UIManager.getColor("Slider.altTrackColor"));
@@ -297,11 +297,11 @@ public class MetalSliderUI extends BasicSliderUI
g.drawLine(trackX + 4, y + 1, trackX + 4, y + h - 3);
}
}
- else if (filledSlider)
+ else if (filledSlider)
{
int yPos = yPositionForValue(slider.getValue());
int y = slider.getInverted() ? trackY : yPos;
- int h = slider.getInverted() ? yPos - trackY
+ int h = slider.getInverted() ? yPos - trackY
: trackY + trackH - yPos;
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(trackX + 1, y + 1, getTrackWidth() - 3, h - 3);
@@ -314,14 +314,14 @@ public class MetalSliderUI extends BasicSliderUI
}
}
}
-
+
/**
- * Draws the focus rectangle for the slider. The Metal look and feel
- * indicates that the {@link JSlider} has the focus by changing the color of
- * the thumb control - this is handled elsewhere and so this method is empty
+ * Draws the focus rectangle for the slider. The Metal look and feel
+ * indicates that the {@link JSlider} has the focus by changing the color of
+ * the thumb control - this is handled elsewhere and so this method is empty
* (it overrides the method in the {@link BasicSliderUI} class to prevent
* a default focus highlight from being drawn).
- *
+ *
* @param g the graphics device.
*/
public void paintFocus(Graphics g)
@@ -329,25 +329,25 @@ public class MetalSliderUI extends BasicSliderUI
thumbColor = getFocusColor();
paintThumb(g);
}
-
+
/**
* Returns the size of the thumb icon.
- *
+ *
* @return The size of the thumb icon.
*/
protected Dimension getThumbSize()
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
- return new Dimension(horizThumbIcon.getIconWidth(),
+ return new Dimension(horizThumbIcon.getIconWidth(),
horizThumbIcon.getIconHeight());
else
- return new Dimension(vertThumbIcon.getIconWidth(),
+ return new Dimension(vertThumbIcon.getIconWidth(),
vertThumbIcon.getIconHeight());
}
-
+
/**
* Returns the length of the major tick marks.
- *
+ *
* @return The length of the major tick marks.
*/
public int getTickLength()
@@ -357,31 +357,31 @@ public class MetalSliderUI extends BasicSliderUI
len += 2;
return len;
}
-
+
/**
* Returns the track width.
- *
+ *
* @return The track width.
*/
protected int getTrackWidth()
{
return trackWidth;
}
-
+
/**
* Returns the track length.
- *
+ *
* @return The track length.
*/
protected int getTrackLength()
{
- return slider.getOrientation() == JSlider.HORIZONTAL
+ return slider.getOrientation() == JSlider.HORIZONTAL
? tickRect.width : tickRect.height;
}
-
+
/**
* Returns the thumb overhang.
- *
+ *
* @return The thumb overhang.
*/
protected int getThumbOverhang()
@@ -389,16 +389,16 @@ public class MetalSliderUI extends BasicSliderUI
// FIXME: for what might this method be used?
return 0;
}
-
+
protected void scrollDueToClickInTrack(int dir)
{
// FIXME: for what might this method be overridden?
super.scrollDueToClickInTrack(dir);
}
-
+
/**
* Paints the minor ticks for a slider with a horizontal orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param x the x value for the tick.
@@ -406,7 +406,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds,
int x)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -414,10 +414,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength / 2);
}
-
+
/**
* Paints the major ticks for a slider with a horizontal orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param x the x value for the tick.
@@ -425,7 +425,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds,
int x)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -433,10 +433,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength - 1);
}
-
+
/**
* Paints the minor ticks for a slider with a vertical orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param y the y value for the tick.
@@ -444,7 +444,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -452,10 +452,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength / 2, y);
}
-
+
/**
* Paints the major ticks for a slider with a vertical orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param y the y value for the tick.
@@ -463,7 +463,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -471,5 +471,5 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength, y);
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalSplitPaneDivider.java b/javax/swing/plaf/metal/MetalSplitPaneDivider.java
index a3069daa9..051499834 100644
--- a/javax/swing/plaf/metal/MetalSplitPaneDivider.java
+++ b/javax/swing/plaf/metal/MetalSplitPaneDivider.java
@@ -197,13 +197,13 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
/** The light color in the pattern. */
Color light;
-
+
/** The JSplitPane the divider is on. */
JSplitPane splitPane;
/** The split pane orientation. */
int orientation;
-
+
/**
* Creates a new instance of <code>MetalSplitPaneDivider</code>.
*
@@ -232,7 +232,7 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
g.setColor(UIManager.getColor("SplitPane.dividerFocusColor"));
g.fillRect(0, 0, s.width, s.height);
}
-
+
// Paint border if one exists.
Border border = getBorder();
if (border != null)
diff --git a/javax/swing/plaf/metal/MetalSplitPaneUI.java b/javax/swing/plaf/metal/MetalSplitPaneUI.java
index dbcc0910d..5b8f2127e 100644
--- a/javax/swing/plaf/metal/MetalSplitPaneUI.java
+++ b/javax/swing/plaf/metal/MetalSplitPaneUI.java
@@ -78,7 +78,7 @@ public class MetalSplitPaneUI extends BasicSplitPaneUI
* The divider returned by this method is a {@link BasicSplitPaneDivider}
* that is drawn using the Metal look.
*
- * @return the default divider to use for <code>JSplitPane</code>s.
+ * @return the default divider to use for <code>JSplitPane</code>s.
*/
public BasicSplitPaneDivider createDefaultDivider()
{
diff --git a/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/javax/swing/plaf/metal/MetalTabbedPaneUI.java
index 53eaa3cac..77705ba0e 100644
--- a/javax/swing/plaf/metal/MetalTabbedPaneUI.java
+++ b/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -57,15 +57,15 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
/**
- * A {@link LayoutManager} responsible for placing all the tabs and the
- * visible component inside the {@link JTabbedPane}. This class is only used
+ * A {@link LayoutManager} responsible for placing all the tabs and the
+ * visible component inside the {@link JTabbedPane}. This class is only used
* for {@link JTabbedPane#WRAP_TAB_LAYOUT}.
*
* @specnote Apparently this class was intended to be protected,
* but was made public by a compiler bug and is now
* public for compatibility.
*/
- public class TabbedPaneLayout
+ public class TabbedPaneLayout
extends BasicTabbedPaneUI.TabbedPaneLayout
{
/**
@@ -75,12 +75,12 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
// Nothing to do here.
}
-
+
/**
- * Overridden to do nothing, because tab runs are not rotated in the
+ * Overridden to do nothing, because tab runs are not rotated in the
* {@link MetalLookAndFeel}.
- *
- * @param tabPlacement the tab placement (one of {@link #TOP},
+ *
+ * @param tabPlacement the tab placement (one of {@link #TOP},
* {@link #BOTTOM}, {@link #LEFT} or {@link #RIGHT}).
* @param selectedRun the index of the selected run.
*/
@@ -88,18 +88,18 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
// do nothing, because tab runs are not rotated in the MetalLookAndFeel
}
-
+
/**
* Overridden to do nothing, because the selected tab does not have extra
* padding in the {@link MetalLookAndFeel}.
- *
- * @param tabPlacement the tab placement (one of {@link #TOP},
+ *
+ * @param tabPlacement the tab placement (one of {@link #TOP},
* {@link #BOTTOM}, {@link #LEFT} or {@link #RIGHT}).
* @param selectedIndex the index of the selected tab.
*/
protected void padSelectedTab(int tabPlacement, int selectedIndex)
{
- // do nothing, because the selected tab does not have extra padding in
+ // do nothing, because the selected tab does not have extra padding in
// the MetalLookAndFeel
}
@@ -162,10 +162,10 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
return new MetalTabbedPaneUI();
}
-
+
/**
* Creates and returns an instance of {@link TabbedPaneLayout}.
- *
+ *
* @return A layout manager used by this UI delegate.
*/
protected LayoutManager createLayoutManager()
@@ -174,12 +174,12 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
? new MetalTabbedPaneUI.TabbedPaneLayout()
: super.createLayoutManager();
}
-
+
/**
* Paints the border for a single tab.
- *
+ *
* @param g the graphics device.
- * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
+ * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
* {@link #BOTTOM} or {@link #RIGHT}).
* @param tabIndex the index of the tab to draw the border for.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -188,15 +188,15 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
* @param h the height for the tab's bounding rectangle.
* @param isSelected indicates whether or not the tab is selected.
*/
- protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,
- int x, int y, int w, int h, boolean isSelected)
+ protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,
+ int x, int y, int w, int h, boolean isSelected)
{
int bottom = y + h - 1;
int right = x + w - 1;
switch (tabPlacement)
{
- case LEFT:
+ case LEFT:
paintLeftTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
break;
case BOTTOM:
@@ -206,7 +206,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
paintRightTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
break;
case TOP:
- default:
+ default:
paintTopTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
}
}
@@ -214,7 +214,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
/**
* Paints the border for a tab assuming that the tab position is at the top
* ({@link #TOP}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -306,11 +306,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the left
* ({@link #LEFT}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -436,11 +436,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the right
* ({@link #RIGHT}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -545,11 +545,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
}
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the bottom
* ({@link #BOTTOM}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -606,7 +606,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
if (isOcean && isSelected)
{
g.drawLine(0, 0, 0, bottom - 5);
-
+
// Paint a connecting line to the tab below for all
// but the first tab in the last run.
if (tabIndex != tabRuns[runCount-1])
@@ -657,9 +657,9 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
/**
* Paints the background for a tab.
- *
+ *
* @param g the graphics device.
- * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
+ * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
* {@link #BOTTOM} or {@link #RIGHT}).
* @param tabIndex the index of the tab to draw the border for.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -696,7 +696,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.fillRect(x + 2, y + 5, 2, h - 5);
}
}
-
+
/**
* This method paints the focus rectangle around the selected tab.
*
@@ -719,19 +719,19 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.setColor(focus);
g.translate(rect.x, rect.y);
-
+
switch (tabPlacement)
{
case LEFT:
// Top line
g.drawLine(7, 2, rect.width-2, 2);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(rect.width-2, rect.height-2, 3, rect.height-2);
-
+
// Left line
g.drawLine(2, rect.height-3, 2, 7);
@@ -741,13 +741,13 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
case RIGHT:
// Top line
g.drawLine(1, 2, rect.width-8, 2);
-
+
// Slant
g.drawLine(rect.width-7, 2, rect.width-3, 6);
-
+
// Right line
g.drawLine(rect.width-3, 7, rect.width-3, rect.height-3);
-
+
// Bottom line
g.drawLine(rect.width-3, rect.height-2, 2, rect.height-2);
@@ -757,51 +757,51 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
case BOTTOM:
// Top line
g.drawLine(2, 1, rect.width-2, 1);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(7, rect.height-3, rect.width-2, rect.height-3);
-
+
// Slant
g.drawLine(6, rect.height-3, 2, rect.height-7);
-
+
// Left line
g.drawLine(2, rect.height-8, 2, 2);
-
+
break;
case TOP:
default:
// Top line
g.drawLine(6, 2, rect.width-2, 2);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(3, rect.height-3, rect.width-2, rect.height-3);
-
+
// Left line
g.drawLine(2, rect.height-3, 2, 7);
-
+
// Slant
g.drawLine(2, 6, 6, 2);
-
+
}
-
+
g.translate(-rect.x, -rect.y);
}
}
-
+
/**
- * Returns <code>true</code> if the tabs in the specified run should be
+ * Returns <code>true</code> if the tabs in the specified run should be
* padded to make the run fill the width/height of the {@link JTabbedPane}.
- *
+ *
* @param tabPlacement the tab placement for the {@link JTabbedPane} (one of
* {@link #TOP}, {@link #BOTTOM}, {@link #LEFT} and {@link #RIGHT}).
* @param run the run index.
- *
+ *
* @return A boolean.
*/
protected boolean shouldPadTabRun(int tabPlacement, int run)
@@ -824,14 +824,14 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
tabsOpaque = UIManager.getBoolean("TabbedPane.tabsOpaque");
minTabWidth = 0;
}
-
+
/**
* Returns the color for the gap.
- *
+ *
* @param currentRun - The current run to return the color for
* @param x - The x position of the current run
* @param y - The y position of the current run
- *
+ *
* @return the color for the gap in the current run.
*/
protected Color getColorForGap(int currentRun, int x, int y)
@@ -842,23 +842,23 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
return selectColor;
return tabAreaBackground;
}
-
+
/**
* Returns true if the gap should be filled in.
- *
+ *
* @param currentRun - The current run
* @param tabIndex - The current tab
* @param x - The x position of the tab
* @param y - The y position of the tab
- *
- * @return true if the gap at the current run should be filled
+ *
+ * @return true if the gap at the current run should be filled
*/
protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)
{
// As far as I can tell, the gap is never filled in.
return false;
}
-
+
/**
* Paints the highlight below the tab, if there is one.
*/
@@ -867,14 +867,14 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
int selected = tabPane.getSelectedIndex();
int tabPlacement = tabPane.getTabPlacement();
Rectangle bounds = getTabBounds(tabPane, selected);
-
+
hg.setColor(selectColor);
int x = bounds.x;
int y = bounds.y;
int w = bounds.width;
int h = bounds.height;
- if (tabPlacement == TOP)
+ if (tabPlacement == TOP)
hg.fillRect(x, y + h - 2, w, 30);
else if (tabPlacement == LEFT)
hg.fillRect(x + w - 1, y, 20, h);
@@ -882,17 +882,17 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
hg.fillRect(x, y - h + 2, w, 30);
else if (tabPlacement == RIGHT)
hg.fillRect(x - 18, y, 20, h);
- else
+ else
throw new AssertionError("Unrecognised 'tabPlacement' argument.");
hg = null;
}
-
+
/**
- * Returns true if we should rotate the tab runs.
- *
+ * Returns true if we should rotate the tab runs.
+ *
* @param tabPlacement - The current tab placement.
* @param selectedRun - The selected run.
- *
+ *
* @return true if the tab runs should be rotated.
*/
protected boolean shouldRotateTabRuns(int tabPlacement,
@@ -1052,7 +1052,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
int w, int h)
{
g.setColor(darkShadow);
-
+
// If tabs are not placed on BOTTOM, or if the selected tab is not in the
// run directly below the content or the selected tab is not visible,
// then we draw an unbroken line.
@@ -1144,7 +1144,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x, y + 1, x, y + h - 2);
- }
+ }
}
else
{
@@ -1163,7 +1163,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
}
}
}
-
+
}
/**
@@ -1251,7 +1251,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
bg = unselectedBackground;
return bg;
}
-
+
protected int getTabLabelShiftX(int tabPlacement,
int index,
boolean isSelected)
@@ -1265,5 +1265,5 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
return 0;
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalTextFieldUI.java b/javax/swing/plaf/metal/MetalTextFieldUI.java
index 30738b37c..f7b18dbd4 100644
--- a/javax/swing/plaf/metal/MetalTextFieldUI.java
+++ b/javax/swing/plaf/metal/MetalTextFieldUI.java
@@ -69,10 +69,10 @@ public class MetalTextFieldUI extends BasicTextFieldUI
{
return new MetalTextFieldUI();
}
-
+
/**
* This method gets called when a bound property is changed on the associated
- * JTextComponent. This is a hook which UI implementations may change to
+ * JTextComponent. This is a hook which UI implementations may change to
* reflect how the UI displays bound properties of JTextComponent subclasses.
*/
public void propertyChange(PropertyChangeEvent evt)
diff --git a/javax/swing/plaf/metal/MetalTheme.java b/javax/swing/plaf/metal/MetalTheme.java
index d5131af2e..209cbbe5e 100644
--- a/javax/swing/plaf/metal/MetalTheme.java
+++ b/javax/swing/plaf/metal/MetalTheme.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.FontUIResource;
* The base class for themes used by the {@link MetalLookAndFeel}. A default
* theme ({@link DefaultMetalTheme}) is provided, or you can create and use
* your own.
- *
+ *
* @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
*/
public abstract class MetalTheme
@@ -67,14 +67,14 @@ public abstract class MetalTheme
/**
* Returns the name of the theme.
- *
+ *
* @return The name of the theme.
*/
public abstract String getName();
/**
* Adds custom entries to the UI defaults table. This method is empty.
- *
+ *
* @param table the table.
*/
public void addCustomEntriesToTable(UIDefaults table)
@@ -87,7 +87,7 @@ public abstract class MetalTheme
/**
* Returns the accelerator foreground color. The default implementation
* returns the color from {@link #getPrimary1()}.
- *
+ *
* @return The accelerator foreground color.
*/
public ColorUIResource getAcceleratorForeground()
@@ -96,20 +96,20 @@ public abstract class MetalTheme
}
/**
- * Returns the accelerator selected foreground color. The default
+ * Returns the accelerator selected foreground color. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The accelerator selected foreground color.
*/
public ColorUIResource getAcceleratorSelectedForeground()
{
return getBlack();
}
-
+
/**
- * Returns the control color. The default implementation returns the color
+ * Returns the control color. The default implementation returns the color
* from {@link #getSecondary3()}.
- *
+ *
* @return The control color.
*/
public ColorUIResource getControl()
@@ -118,9 +118,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for dark shadows on controls. The default
+ * Returns the color used for dark shadows on controls. The default
* implementation returns the color from {@link #getSecondary1()}.
- *
+ *
* @return The color used for dark shadows on controls.
*/
public ColorUIResource getControlDarkShadow()
@@ -131,7 +131,7 @@ public abstract class MetalTheme
/**
* Returns the color used for disabled controls. The default implementation
* returns the color from {@link #getSecondary1()}.
- *
+ *
* @return The color used for disabled controls.
*/
public ColorUIResource getControlDisabled()
@@ -140,9 +140,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw highlights for controls. The default
+ * Returns the color used to draw highlights for controls. The default
* implementation returns the color from {@link #getWhite()}.
- *
+ *
* @return The color used to draw highlights for controls.
*/
public ColorUIResource getControlHighlight()
@@ -151,9 +151,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to display control info. The default
+ * Returns the color used to display control info. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used to display control info.
*/
public ColorUIResource getControlInfo()
@@ -162,9 +162,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw shadows for controls. The default
+ * Returns the color used to draw shadows for controls. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The color used to draw shadows for controls.
*/
public ColorUIResource getControlShadow()
@@ -175,7 +175,7 @@ public abstract class MetalTheme
/**
* Returns the color used for text on controls. The default implementation
* returns the color from {@link #getControlInfo()}.
- *
+ *
* @return The color used for text on controls.
*/
public ColorUIResource getControlTextColor()
@@ -184,9 +184,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for the desktop background. The default
+ * Returns the color used for the desktop background. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The color used for the desktop background.
*/
public ColorUIResource getDesktopColor()
@@ -195,9 +195,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw focus highlights. The default
+ * Returns the color used to draw focus highlights. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The color used to draw focus highlights.
*/
public ColorUIResource getFocusColor()
@@ -208,7 +208,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw highlighted text. The default
* implementation returns the color from {@link #getHighlightedTextColor()}.
- *
+ *
* @return The color used to draw highlighted text.
*/
public ColorUIResource getHighlightedTextColor()
@@ -219,7 +219,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw text on inactive controls. The default
* implementation returns the color from {@link #getControlDisabled()}.
- *
+ *
* @return The color used to draw text on inactive controls.
*/
public ColorUIResource getInactiveControlTextColor()
@@ -230,7 +230,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw inactive system text. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The color used to draw inactive system text.
*/
public ColorUIResource getInactiveSystemTextColor()
@@ -241,9 +241,9 @@ public abstract class MetalTheme
/**
* Returns the background color for menu items. The default implementation
* returns the color from {@link #getSecondary3()}.
- *
+ *
* @return The background color for menu items.
- *
+ *
* @see #getMenuSelectedBackground()
*/
public ColorUIResource getMenuBackground()
@@ -252,11 +252,11 @@ public abstract class MetalTheme
}
/**
- * Returns the foreground color for disabled menu items. The default
+ * Returns the foreground color for disabled menu items. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The foreground color for disabled menu items.
- *
+ *
* @see #getMenuForeground()
*/
public ColorUIResource getMenuDisabledForeground()
@@ -267,9 +267,9 @@ public abstract class MetalTheme
/**
* Returns the foreground color for menu items. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The foreground color for menu items.
- *
+ *
* @see #getMenuDisabledForeground()
* @see #getMenuSelectedForeground()
*/
@@ -279,11 +279,11 @@ public abstract class MetalTheme
}
/**
- * Returns the background color for selected menu items. The default
+ * Returns the background color for selected menu items. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The background color for selected menu items.
- *
+ *
* @see #getMenuBackground()
*/
public ColorUIResource getMenuSelectedBackground()
@@ -292,11 +292,11 @@ public abstract class MetalTheme
}
/**
- * Returns the foreground color for selected menu items. The default
+ * Returns the foreground color for selected menu items. The default
* implementation returns the value from {@link #getBlack()}.
- *
+ *
* @return The foreground color for selected menu items.
- *
+ *
* @see #getMenuForeground()
*/
public ColorUIResource getMenuSelectedForeground()
@@ -307,7 +307,7 @@ public abstract class MetalTheme
/**
* Returns the primary color for controls. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The primary color for controls.
*/
public ColorUIResource getPrimaryControl()
@@ -316,9 +316,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the dark shadow on controls. The default
+ * Returns the primary color for the dark shadow on controls. The default
* implementation returns the color from {@link #getPrimary1()}.
- *
+ *
* @return The primary color for the dark shadow on controls.
*/
public ColorUIResource getPrimaryControlDarkShadow()
@@ -327,9 +327,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the highlight on controls. The default
+ * Returns the primary color for the highlight on controls. The default
* implementation returns the color from {@link #getWhite()}.
- *
+ *
* @return The primary color for the highlight on controls.
*/
public ColorUIResource getPrimaryControlHighlight()
@@ -338,9 +338,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the information on controls. The default
+ * Returns the primary color for the information on controls. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The primary color for the information on controls.
*/
public ColorUIResource getPrimaryControlInfo()
@@ -349,9 +349,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the shadow on controls. The default
+ * Returns the primary color for the shadow on controls. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The primary color for the shadow on controls.
*/
public ColorUIResource getPrimaryControlShadow()
@@ -362,7 +362,7 @@ public abstract class MetalTheme
/**
* Returns the background color for separators. The default implementation
* returns the color from {@link #getWhite()}.
- *
+ *
* @return The background color for separators.
*/
public ColorUIResource getSeparatorBackground()
@@ -373,7 +373,7 @@ public abstract class MetalTheme
/**
* Returns the foreground color for separators. The default implementation
* returns the value from {@link #getPrimary1()}.
- *
+ *
* @return The foreground color for separators.
*/
public ColorUIResource getSeparatorForeground()
@@ -382,9 +382,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for system text. The default implementation
+ * Returns the color used for system text. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used for system text.
*/
public ColorUIResource getSystemTextColor()
@@ -395,7 +395,7 @@ public abstract class MetalTheme
/**
* Returns the color used to highlight text. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The color used to highlight text.
*/
public ColorUIResource getTextHighlightColor()
@@ -406,18 +406,18 @@ public abstract class MetalTheme
/**
* Returns the color used to display user text. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used to display user text.
*/
public ColorUIResource getUserTextColor()
{
return getBlack();
}
-
+
/**
* Returns the window background color. The default implementation returns
* the color from {@link #getWhite()}.
- *
+ *
* @return The window background color.
*/
public ColorUIResource getWindowBackground()
@@ -428,7 +428,7 @@ public abstract class MetalTheme
/**
* Returns the window title background color. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The window title background color.
*/
public ColorUIResource getWindowTitleBackground()
@@ -439,7 +439,7 @@ public abstract class MetalTheme
/**
* Returns the window title foreground color. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The window title foreground color.
*/
public ColorUIResource getWindowTitleForeground()
@@ -450,7 +450,7 @@ public abstract class MetalTheme
/**
* Returns the background color for an inactive window title. The default
* implementation returns the color from {@link #getSecondary3()}.
- *
+ *
* @return The background color for an inactive window title.
*/
public ColorUIResource getWindowTitleInactiveBackground()
@@ -461,7 +461,7 @@ public abstract class MetalTheme
/**
* Returns the foreground color for an inactive window title. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The foreground color for an inactive window title.
*/
public ColorUIResource getWindowTitleInactiveForeground()
@@ -471,7 +471,7 @@ public abstract class MetalTheme
/**
* Returns the color used for black.
- *
+ *
* @return The color used for black.
*/
protected ColorUIResource getBlack()
@@ -481,7 +481,7 @@ public abstract class MetalTheme
/**
* Returns the color used for white.
- *
+ *
* @return The color used for white.
*/
protected ColorUIResource getWhite()
@@ -491,86 +491,86 @@ public abstract class MetalTheme
/**
* Returns the first primary color for this theme.
- *
+ *
* @return The first primary color.
*/
protected abstract ColorUIResource getPrimary1();
-
+
/**
* Returns the second primary color for this theme.
- *
+ *
* @return The second primary color.
*/
protected abstract ColorUIResource getPrimary2();
/**
* Returns the third primary color for this theme.
- *
+ *
* @return The third primary color.
*/
protected abstract ColorUIResource getPrimary3();
-
+
/**
* Returns the first secondary color for this theme.
- *
+ *
* @return The first secondary color.
*/
protected abstract ColorUIResource getSecondary1();
/**
* Returns the second secondary color for this theme.
- *
+ *
* @return The second secondary color.
*/
protected abstract ColorUIResource getSecondary2();
/**
* Returns the third secondary color for this theme.
- *
+ *
* @return The third secondary color.
*/
protected abstract ColorUIResource getSecondary3();
/**
* Returns the font used for text on controls.
- *
+ *
* @return The font used for text on controls.
*/
public abstract FontUIResource getControlTextFont();
/**
* Returns the font used for text in menus.
- *
+ *
* @return The font used for text in menus.
*/
public abstract FontUIResource getMenuTextFont();
/**
* Returns the font used for sub text.
- *
+ *
* @return The font used for sub text.
*/
public abstract FontUIResource getSubTextFont();
-
+
/**
* Returns the font used for system text.
- *
+ *
* @return The font used for system text.
*/
public abstract FontUIResource getSystemTextFont();
-
+
/**
* Returns the font used for user text.
- *
+ *
* @return The font used for user text.
*/
public abstract FontUIResource getUserTextFont();
/**
* Returns the font used for window titles.
- *
+ *
* @return The font used for window titles.
*/
public abstract FontUIResource getWindowTitleFont();
-
+
}
diff --git a/javax/swing/plaf/metal/MetalToggleButtonUI.java b/javax/swing/plaf/metal/MetalToggleButtonUI.java
index 8c7a46e3a..2dacd7fec 100644
--- a/javax/swing/plaf/metal/MetalToggleButtonUI.java
+++ b/javax/swing/plaf/metal/MetalToggleButtonUI.java
@@ -113,9 +113,9 @@ public class MetalToggleButtonUI
}
/**
- * Returns the color for the text label of disabled buttons. The value
+ * Returns the color for the text label of disabled buttons. The value
* is initialised in the {@link #installDefaults(AbstractButton)} method
- * by reading the <code>ToggleButton.disabledText</code> item from the UI
+ * by reading the <code>ToggleButton.disabledText</code> item from the UI
* defaults.
*
* @return The color for the text label of disabled buttons.
@@ -127,7 +127,7 @@ public class MetalToggleButtonUI
/**
* Updates the button with the defaults for this look and feel.
- *
+ *
* @param b the button.
*/
public void installDefaults(AbstractButton b)
@@ -137,10 +137,10 @@ public class MetalToggleButtonUI
selectColor = UIManager.getColor(getPropertyPrefix() + "select");
disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText");
}
-
+
/**
- * Paints the button background when it is pressed/selected.
- *
+ * Paints the button background when it is pressed/selected.
+ *
* @param g the graphics device.
* @param b the button.
*/
@@ -155,19 +155,19 @@ public class MetalToggleButtonUI
g.setColor(saved);
}
}
-
+
/**
* Paints the text for the button.
- *
+ *
* As of JDK 1.4 this method is obsolete.
- * Use {@link BasicButtonUI#paintText(java.awt.Graphics,
+ * Use {@link BasicButtonUI#paintText(java.awt.Graphics,
* javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String)}.
*
* @param g the graphics device.
* @param c the component.
* @param textRect the bounds for the text.
* @param text the text.
- *
+ *
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
String text)
@@ -185,10 +185,10 @@ public class MetalToggleButtonUI
g.setFont(savedFont);
g.setColor(savedColor);
}
-
+
/**
* Draws the focus highlight around the text and icon.
- *
+ *
* @param g the graphics device.
* @param b the button.
*/
@@ -201,7 +201,7 @@ public class MetalToggleButtonUI
g.setColor(focusColor);
Rectangle fr = iconRect.union(textRect);
g.drawRect(fr.x - 1, fr.y - 1, fr.width + 1, fr.height + 1);
- g.setColor(saved);
+ g.setColor(saved);
}
/**
@@ -226,5 +226,5 @@ public class MetalToggleButtonUI
else
super.update(g, c);
}
-
+
}
diff --git a/javax/swing/plaf/metal/MetalToolBarUI.java b/javax/swing/plaf/metal/MetalToolBarUI.java
index 1848c1f16..64e679c67 100644
--- a/javax/swing/plaf/metal/MetalToolBarUI.java
+++ b/javax/swing/plaf/metal/MetalToolBarUI.java
@@ -59,12 +59,12 @@ import javax.swing.plaf.basic.BasicToolBarUI;
*/
public class MetalToolBarUI extends BasicToolBarUI
{
-
+
/**
- * A listener (no longer used) that responds when components are added to or
+ * A listener (no longer used) that responds when components are added to or
* removed from the {@link JToolBar}. The required behaviour is now
- * handled in the super class.
- *
+ * handled in the super class.
+ *
* @see MetalToolBarUI#createContainerListener()
*/
protected class MetalContainerListener
@@ -81,9 +81,9 @@ public class MetalToolBarUI extends BasicToolBarUI
/**
* A listener (no longer used) that responds to property change events in a
- * {@link JToolBar} component. The required behaviour is now handled in the
- * super class.
- *
+ * {@link JToolBar} component. The required behaviour is now handled in the
+ * super class.
+ *
* @see MetalToolBarUI#createRolloverListener()
*/
protected class MetalRolloverListener
@@ -97,16 +97,16 @@ public class MetalToolBarUI extends BasicToolBarUI
// Nothing to do here.
}
}
-
- /**
+
+ /**
* The container listener (an implementation specific field, according to the
* spec, and not used in GNU Classpath).
*/
protected ContainerListener contListener;
-
- /**
+
+ /**
* The rollover listener (an implementation specific field, according to the
- * spec, and not used in GNU Classpath).
+ * spec, and not used in GNU Classpath).
*/
protected PropertyChangeListener rolloverListener;
@@ -129,43 +129,43 @@ public class MetalToolBarUI extends BasicToolBarUI
{
return new MetalToolBarUI();
}
-
+
/**
* Returns <code>null</code> as permitted by recent versions of the API
- * specification. Originally it seems this method returned a new instance of
+ * specification. Originally it seems this method returned a new instance of
* {@link MetalRolloverListener}, but this is now redundant.
- *
+ *
* @return <code>null</code>.
*/
protected PropertyChangeListener createRolloverListener()
{
return null;
}
-
+
/**
* Returns <code>null</code> as permitted by recent versions of the API
- * specification. Originally it seems this method returned a new instance of
+ * specification. Originally it seems this method returned a new instance of
* {@link MetalContainerListener}, but this is now redundant.
- *
+ *
* @return <code>null</code>.
*/
protected ContainerListener createContainerListener()
{
return null;
}
-
+
/**
* Returns a border with no rollover effect for buttons in the tool bar.
- *
+ *
* @return A border.
- *
+ *
* @see MetalBorders#getToolbarButtonBorder()
*/
protected Border createNonRolloverBorder()
{
- return MetalBorders.getToolbarButtonBorder();
+ return MetalBorders.getToolbarButtonBorder();
}
-
+
/**
* Sets the offset for the window used for dragging the toolbar.
* It is set as long as the window is not null (it has been installed).
@@ -175,23 +175,23 @@ public class MetalToolBarUI extends BasicToolBarUI
if (dragWindow != null)
dragWindow.setOffset(p);
}
-
- /**
+
+ /**
* Creates and returns an instance of MetalDockingListener.
- *
+ *
* @return an instance of MetalDockingListener.
*/
protected MouseInputListener createDockingListener()
{
return new MetalDockingListener(toolBar);
}
-
+
/**
* This is the MouseHandler class that allows the user to drag the JToolBar
* in and out of the parent and dock it if it can.
*/
protected class MetalDockingListener extends BasicToolBarUI.DockingListener
- {
+ {
/**
* Creates a new DockingListener object.
*
@@ -201,7 +201,7 @@ public class MetalToolBarUI extends BasicToolBarUI
{
super(t);
}
-
+
/**
* This method is called when the mouse is pressed in the JToolBar. If the
* press doesn't occur in a place where it causes the JToolBar to be
@@ -214,7 +214,7 @@ public class MetalToolBarUI extends BasicToolBarUI
super.mousePressed(e);
setDragOffset(new Point(e.getX(), e.getY()));
}
-
+
/**
* This method is called when the mouse is dragged. It delegates the drag
* painting to the dragTo method.
@@ -223,7 +223,7 @@ public class MetalToolBarUI extends BasicToolBarUI
*/
public void mouseDragged(MouseEvent e)
{
- // Does not do anything differently than dragging
+ // Does not do anything differently than dragging
// BasicToolBarUI.DockingListener
super.mouseDragged(e);
}
diff --git a/javax/swing/plaf/metal/MetalToolTipUI.java b/javax/swing/plaf/metal/MetalToolTipUI.java
index 6647cc02d..742ff2204 100644
--- a/javax/swing/plaf/metal/MetalToolTipUI.java
+++ b/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -63,38 +63,38 @@ import javax.swing.plaf.basic.BasicToolTipUI;
public class MetalToolTipUI
extends BasicToolTipUI
{
- /**
- * The amount of space between the tool tip text and the accelerator
- * description (if visible).
+ /**
+ * The amount of space between the tool tip text and the accelerator
+ * description (if visible).
*/
public static final int padSpaceBetweenStrings = 12;
/** The shared UI instance. */
private static MetalToolTipUI instance;
-
+
/** A flag controlling the visibility of the accelerator (if there is one). */
private boolean isAcceleratorHidden;
-
+
/** A string representing the accelerator key for the component. */
private String acceleratorString;
-
- /**
+
+ /**
* The delimiter for the accelerator string.
*/
private String acceleratorDelimiter;
-
+
/** The font for the accelerator string. */
private Font acceleratorFont;
-
+
/** The color for the accelerator string. */
private Color acceleratorForeground;
-
+
/** The active border. */
private Border activeBorder;
-
+
/** The inactive border. */
private Border inactiveBorder;
-
+
/**
* Constructs a new instance of <code>MetalToolTipUI</code>.
*/
@@ -124,21 +124,21 @@ public class MetalToolTipUI
instance = new MetalToolTipUI();
return instance;
}
-
+
/**
- * Returns a string representing the accelerator key (if there is one) for
+ * Returns a string representing the accelerator key (if there is one) for
* the component that the tool tip belongs to.
- *
+ *
* @return A string representing the accelerator key.
*/
public String getAcceleratorString()
{
- return acceleratorString;
+ return acceleratorString;
}
-
+
/**
* Installs the UI for the specified component (a {@link JToolTip}).
- *
+ *
* @param c the {@link JToolTip} component.
*/
public void installUI(JComponent c)
@@ -151,12 +151,12 @@ public class MetalToolTipUI
c.setBorder(activeBorder);
else
c.setBorder(inactiveBorder);
- }
+ }
}
-
+
/**
* Clears the defaults set in {@link #installUI(JComponent)}.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -165,7 +165,7 @@ public class MetalToolTipUI
if (c.getBorder() instanceof UIResource)
c.setBorder(null);
}
-
+
/**
* Returns <code>true</code> if the accelerator string is hidden, and
* <code>false</code> otherwise. This setting is controlled by the
@@ -177,12 +177,12 @@ public class MetalToolTipUI
{
return isAcceleratorHidden;
}
-
+
/**
* Returns the preferred size for the {@link JToolTip} component.
- *
+ *
* @param c the component (a {@link JToolTip}).
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize(JComponent c)
@@ -196,10 +196,10 @@ public class MetalToolTipUI
}
return d;
}
-
+
/**
* Paints the tool tip.
- *
+ *
* @param g the graphics context.
* @param c the {@link JToolTip} component.
*/
@@ -208,14 +208,14 @@ public class MetalToolTipUI
super.paint(g, c);
// Somehow paint accelerator. Keep care for possible HTML rendering.
}
-
+
/**
- * Returns a string representing the accelerator for the component, or
+ * Returns a string representing the accelerator for the component, or
* <code>null</code> if the component has no accelerator.
- *
+ *
* @param c the component.
- *
- * @return A string representing the accelerator (possibly
+ *
+ * @return A string representing the accelerator (possibly
* <code>null</code>).
*/
private String fetchAcceleratorString(JComponent c)
@@ -240,19 +240,19 @@ public class MetalToolTipUI
mne = button.getMnemonic();
}
if (mne > 0)
- ks = KeyStroke.getKeyStroke(Character.toUpperCase((char) mne),
+ ks = KeyStroke.getKeyStroke(Character.toUpperCase((char) mne),
InputEvent.ALT_MASK, false);
if (ks != null)
result = acceleratorToString(ks);
}
return result;
}
-
+
/**
* Returns a string representing an accelerator.
- *
+ *
* @param accelerator the accelerator (<code>null</code> not permitted).
- *
+ *
* @return A string representing an accelerator.
*/
private String acceleratorToString(KeyStroke accelerator)
@@ -262,9 +262,9 @@ public class MetalToolTipUI
int modifiers = accelerator.getModifiers();
char keyChar = accelerator.getKeyChar();
int keyCode = accelerator.getKeyCode();
-
+
if (modifiers != 0)
- modifiersText = KeyEvent.getKeyModifiersText(modifiers)
+ modifiersText = KeyEvent.getKeyModifiersText(modifiers)
+ acceleratorDelimiter;
if (keyCode == KeyEvent.VK_UNDEFINED)
diff --git a/javax/swing/plaf/metal/MetalTreeUI.java b/javax/swing/plaf/metal/MetalTreeUI.java
index ed1e5b4d8..bdfa2d4f6 100644
--- a/javax/swing/plaf/metal/MetalTreeUI.java
+++ b/javax/swing/plaf/metal/MetalTreeUI.java
@@ -69,7 +69,7 @@ public class MetalTreeUI extends BasicTreeUI
if (e.getPropertyName().equals(LINE_STYLE_PROPERTY))
decodeLineStyle(e.getNewValue());
}
-
+
}
/**
@@ -137,7 +137,7 @@ public class MetalTreeUI extends BasicTreeUI
{
return new MetalTreeUI();
}
-
+
/**
* The horizontal element of legs between nodes starts at the right of the
* left-hand side of the child node by default. This method makes the
@@ -150,19 +150,19 @@ public class MetalTreeUI extends BasicTreeUI
/**
* Configures the specified component appropriate for the look and feel.
- * This method is invoked when the ComponentUI instance is being installed
- * as the UI delegate on the specified component. This method should completely
+ * This method is invoked when the ComponentUI instance is being installed
+ * as the UI delegate on the specified component. This method should completely
* configure the component for the look and feel, including the following:
- * 1. Install any default property values for color, fonts, borders, icons,
+ * 1. Install any default property values for color, fonts, borders, icons,
* opacity, etc. on the component. Whenever possible, property values
* initialized by the client program should not be overridden.
* 2. Install a LayoutManager on the component if necessary.
* 3. Create/add any required sub-components to the component.
* 4. Create/install event listeners on the component.
- * 5. Create/install a PropertyChangeListener on the component in order
+ * 5. Create/install a PropertyChangeListener on the component in order
* to detect and respond to component property changes appropriately.
* 6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
- * 7. Initialize any appropriate instance data.
+ * 7. Initialize any appropriate instance data.
*/
public void installUI(JComponent c)
{
@@ -174,21 +174,21 @@ public class MetalTreeUI extends BasicTreeUI
lineStyleListener = new LineStyleListener();
c.addPropertyChangeListener(lineStyleListener);
}
-
+
/**
- * Reverses configuration which was done on the specified component during
- * installUI. This method is invoked when this UIComponent instance is being
- * removed as the UI delegate for the specified component. This method should
- * undo the configuration performed in installUI, being careful to leave the
- * JComponent instance in a clean state (no extraneous listeners,
- * look-and-feel-specific property objects, etc.). This should include
+ * Reverses configuration which was done on the specified component during
+ * installUI. This method is invoked when this UIComponent instance is being
+ * removed as the UI delegate for the specified component. This method should
+ * undo the configuration performed in installUI, being careful to leave the
+ * JComponent instance in a clean state (no extraneous listeners,
+ * look-and-feel-specific property objects, etc.). This should include
* the following:
* 1. Remove any UI-set borders from the component.
* 2. Remove any UI-set layout managers on the component.
* 3. Remove any UI-added sub-components from the component.
* 4. Remove any UI-added event/property listeners from the component.
* 5. Remove any UI-installed keyboard UI from the component.
- * 6. Nullify any allocated instance data objects to allow for GC.
+ * 6. Nullify any allocated instance data objects to allow for GC.
*/
public void uninstallUI(JComponent c)
{
@@ -197,13 +197,13 @@ public class MetalTreeUI extends BasicTreeUI
c.removePropertyChangeListener(lineStyleListener);
lineStyleListener = null;
}
-
+
/**
* This function converts between the string passed into the client
* property and the internal representation (currently an int).
- *
+ *
* @param lineStyleFlag - String representation
- */
+ */
protected void decodeLineStyle(Object lineStyleFlag)
{
if (lineStyleFlag == null || lineStyleFlag.equals(LINE_STYLE_VALUE_ANGLED))
@@ -218,7 +218,7 @@ public class MetalTreeUI extends BasicTreeUI
/**
* Checks if the location is in expand control.
- *
+ *
* @param row - current row
* @param rowLevel - current level
* @param mouseX - current x location of the mouse click
@@ -227,33 +227,33 @@ public class MetalTreeUI extends BasicTreeUI
protected boolean isLocationInExpandControl(int row, int rowLevel,
int mouseX, int mouseY)
{
- return super.isLocationInExpandControl(tree.getPathForRow(row),
+ return super.isLocationInExpandControl(tree.getPathForRow(row),
mouseX, mouseY);
}
-
+
/**
- * Paints the specified component appropriate for the look and feel.
- * This method is invoked from the ComponentUI.update method when the
- * specified component is being painted. Subclasses should override this
- * method and use the specified Graphics object to render the content of
+ * Paints the specified component appropriate for the look and feel.
+ * This method is invoked from the ComponentUI.update method when the
+ * specified component is being painted. Subclasses should override this
+ * method and use the specified Graphics object to render the content of
* the component.
- *
+ *
* @param g - the current graphics configuration.
* @param c - the current component to draw
*/
public void paint(Graphics g, JComponent c)
{
// Calls BasicTreeUI's paint since it takes care of painting all
- // types of icons.
+ // types of icons.
super.paint(g, c);
if (lineStyle == LINE_STYLE_HORIZONTAL)
paintHorizontalSeparators(g, c);
}
-
+
/**
* Paints the horizontal separators.
- *
+ *
* @param g - the current graphics configuration.
* @param c - the current component to draw
*/
@@ -282,14 +282,14 @@ public class MetalTreeUI extends BasicTreeUI
}
}
-
+
/**
- * Paints the vertical part of the leg. The receiver should NOT modify
+ * Paints the vertical part of the leg. The receiver should NOT modify
* clipBounds, insets.
- *
+ *
* @param g - the current graphics configuration.
* @param clipBounds -
- * @param insets -
+ * @param insets -
* @param path - the current path
*/
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds,
@@ -311,7 +311,7 @@ public class MetalTreeUI extends BasicTreeUI
boolean isLeaf)
{
if (lineStyle == LINE_STYLE_ANGLED)
- super.paintHorizontalPartOfLeg(g, clipBounds, insets, bounds, path, row,
+ super.paintHorizontalPartOfLeg(g, clipBounds, insets, bounds, path, row,
isExpanded, hasBeenExpanded, isLeaf);
}
}
diff --git a/javax/swing/plaf/metal/MetalUtils.java b/javax/swing/plaf/metal/MetalUtils.java
index 0c3a38d5c..247f92265 100644
--- a/javax/swing/plaf/metal/MetalUtils.java
+++ b/javax/swing/plaf/metal/MetalUtils.java
@@ -180,7 +180,7 @@ class MetalUtils
{
paintGradient(g, x, y, w, h, dir, uiProp, null);
}
-
+
/**
* Paints the typical Metal gradient. See {@link #paintGradient(Graphics,
* int, int, int, int, float, float, Color, Color, Color, int, int[][])}
@@ -216,14 +216,14 @@ class MetalUtils
/**
* Paints the typical Metal gradient. The gradient is painted as follows:
* <pre>
- *
+ *
* +-------+--------+--------+-----------------------------+
* | | | | |
* +-------+--------+--------+-----------------------------+
* c1 -> c2 -- c2 -> c1 --------> c3
* < -g1- > < -g2- > < -g1- >
* </pre>
- *
+ *
* There are 4 distinct areas in this gradient:
* <ol>
* <li>A gradient from color 1 to color 2 with the relative width specified
@@ -306,7 +306,7 @@ class MetalUtils
float g1, float g2, Color c1, Color c2,
Color c3, int[][] mask)
{
-
+
if (g instanceof Graphics2D
&& SystemProperties.getProperty("gnu.javax.swing.noGraphics2D") == null)
{
diff --git a/javax/swing/plaf/metal/OceanTheme.java b/javax/swing/plaf/metal/OceanTheme.java
index 1ea0bc243..6a6a3f5aa 100644
--- a/javax/swing/plaf/metal/OceanTheme.java
+++ b/javax/swing/plaf/metal/OceanTheme.java
@@ -130,19 +130,19 @@ public class OceanTheme extends DefaultMetalTheme
/**
* Returns the OceanTheme's color for disabled menu foreground,
- *
+ *
*/
public ColorUIResource getMenuDisabledForeground()
{
return INACTIVE_CONTROL_TEXT;
}
-
+
/**
* Returns the OceanTheme's color for black, the RGB value
* (51, 51, 51).
*
- * @return Returns the OceanTheme's value for black
+ * @return Returns the OceanTheme's value for black
*/
protected ColorUIResource getBlack()
{
@@ -157,7 +157,7 @@ public class OceanTheme extends DefaultMetalTheme
{
return PRIMARY1;
}
-
+
/**
* Return the OceanTheme's value for primary 2, the RGB value
* (163, 184, 204).
@@ -166,7 +166,7 @@ public class OceanTheme extends DefaultMetalTheme
{
return PRIMARY2;
}
-
+
/**
* Return the OceanTheme's value for primary 1, the RGB value
* (184, 207, 229).
diff --git a/javax/swing/plaf/multi/MultiButtonUI.java b/javax/swing/plaf/multi/MultiButtonUI.java
index ac2a5fa91..044f65141 100644
--- a/javax/swing/plaf/multi/MultiButtonUI.java
+++ b/javax/swing/plaf/multi/MultiButtonUI.java
@@ -53,32 +53,32 @@ import javax.swing.plaf.ComponentUI;
* A UI delegate that that coordinates multiple {@link ButtonUI} instances, one
* from the primary look and feel, and one or more from the auxiliary look and
* feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiButtonUI extends ButtonUI
+public class MultiButtonUI extends ButtonUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiButtonUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiButtonUI()
+ public MultiButtonUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiButtonUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiButtonUI extends ButtonUI
MultiButtonUI mui = new MultiButtonUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiButtonUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiButtonUI extends ButtonUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiButtonUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiButtonUI extends ButtonUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiButtonUI</code>. The first item in the array is always
+ * <code>MultiButtonUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiButtonUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiButtonUI extends ButtonUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiButtonUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiButtonUI extends ButtonUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiButtonUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiButtonUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
-} \ No newline at end of file
+
+}
diff --git a/javax/swing/plaf/multi/MultiColorChooserUI.java b/javax/swing/plaf/multi/MultiColorChooserUI.java
index 8adb9500b..1a9684928 100644
--- a/javax/swing/plaf/multi/MultiColorChooserUI.java
+++ b/javax/swing/plaf/multi/MultiColorChooserUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ColorChooserUI;
import javax.swing.plaf.ComponentUI;
/**
- * A UI delegate that that coordinates multiple {@link ColorChooserUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ColorChooserUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiColorChooserUI extends ColorChooserUI
+public class MultiColorChooserUI extends ColorChooserUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiColorChooserUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiColorChooserUI()
+ public MultiColorChooserUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a <code>MultiColorChooserUI</code>
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a <code>MultiColorChooserUI</code>
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiColorChooserUI extends ColorChooserUI
MultiColorChooserUI mui = new MultiColorChooserUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiColorChooserUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiColorChooserUI extends ColorChooserUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiColorChooserUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiColorChooserUI extends ColorChooserUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiColorChooserUI</code>. The first item in the array is always
+ * <code>MultiColorChooserUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiColorChooserUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiColorChooserUI extends ColorChooserUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiColorChooserUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiColorChooserUI extends ColorChooserUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiColorChooserUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiColorChooserUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiComboBoxUI.java b/javax/swing/plaf/multi/MultiComboBoxUI.java
index 33b432152..f16987399 100644
--- a/javax/swing/plaf/multi/MultiComboBoxUI.java
+++ b/javax/swing/plaf/multi/MultiComboBoxUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComboBoxUI;
import javax.swing.plaf.ComponentUI;
/**
- * A UI delegate that that coordinates multiple {@link ComboBoxUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ComboBoxUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiComboBoxUI extends ComboBoxUI
+public class MultiComboBoxUI extends ComboBoxUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiComboBoxUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiComboBoxUI()
+ public MultiComboBoxUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a <code>MultiComboBoxUI</code>
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a <code>MultiComboBoxUI</code>
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiComboBoxUI extends ComboBoxUI
MultiComboBoxUI mui = new MultiComboBoxUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiComboBoxUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiComboBoxUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiComboBoxUI extends ComboBoxUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiComboBoxUI</code>. The first item in the array is always
+ * <code>MultiComboBoxUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiComboBoxUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiComboBoxUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiComboBoxUI extends ComboBoxUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,25 +227,25 @@ public class MultiComboBoxUI extends ComboBoxUI
/* Dimension ignored = */ ui.getPreferredSize(c);
}
return result;
- }
-
+ }
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,15 +349,15 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
- * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method
+ * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method
* for all the UI delegates managed by this <code>MultiComboBoxUI</code>.
- *
+ *
* @param c the component.
* @param visible the visible state.
*/
- public void setPopupVisible(JComboBox c, boolean visible)
+ public void setPopupVisible(JComboBox c, boolean visible)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -368,21 +368,21 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The result for the UI delegate from the primary look and feel.
+ *
+ * @return The result for the UI delegate from the primary look and feel.
*/
- public boolean isPopupVisible(JComboBox c)
+ public boolean isPopupVisible(JComboBox c)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComboBoxUI ui = (ComboBoxUI) iterator.next();
result = ui.isPopupVisible(c);
@@ -397,23 +397,23 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all
- * the UI delegates managed by this <code>MultiComboBoxUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all
+ * the UI delegates managed by this <code>MultiComboBoxUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
+ *
* @return <code>true</code> if the combo box is traversable according to the
- * UI delegate in the primary look and feel, and <code>false</code>
- * otherwise.
+ * UI delegate in the primary look and feel, and <code>false</code>
+ * otherwise.
*/
- public boolean isFocusTraversable(JComboBox c)
+ public boolean isFocusTraversable(JComboBox c)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComboBoxUI ui = (ComboBoxUI) iterator.next();
result = ui.isFocusTraversable(c);
diff --git a/javax/swing/plaf/multi/MultiDesktopIconUI.java b/javax/swing/plaf/multi/MultiDesktopIconUI.java
index 186ce32fe..091566ecf 100644
--- a/javax/swing/plaf/multi/MultiDesktopIconUI.java
+++ b/javax/swing/plaf/multi/MultiDesktopIconUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.DesktopIconUI;
/**
- * A UI delegate that that coordinates multiple {@link DesktopIconUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link DesktopIconUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiDesktopIconUI extends DesktopIconUI
+public class MultiDesktopIconUI extends DesktopIconUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiDesktopIconUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiDesktopIconUI()
+ public MultiDesktopIconUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiDesktopIconUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiDesktopIconUI extends DesktopIconUI
MultiDesktopIconUI mui = new MultiDesktopIconUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopIconUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopIconUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiDesktopIconUI extends DesktopIconUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiDesktopIconUI</code>. The first item in the array is always
+ * <code>MultiDesktopIconUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopIconUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiDesktopIconUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -226,25 +226,25 @@ public class MultiDesktopIconUI extends DesktopIconUI
/* Dimension ignored = */ ui.getPreferredSize(c);
}
return result;
- }
-
+ }
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiDesktopIconUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiDesktopPaneUI.java b/javax/swing/plaf/multi/MultiDesktopPaneUI.java
index d48fb2b01..fb62257b8 100644
--- a/javax/swing/plaf/multi/MultiDesktopPaneUI.java
+++ b/javax/swing/plaf/multi/MultiDesktopPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.DesktopPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link DesktopPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link DesktopPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiDesktopPaneUI extends DesktopPaneUI
+public class MultiDesktopPaneUI extends DesktopPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiDesktopPaneUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiDesktopPaneUI()
+ public MultiDesktopPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiDesktopPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
MultiDesktopPaneUI mui = new MultiDesktopPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiDesktopPaneUI</code>. The first item in the array is always
+ * <code>MultiDesktopPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiDesktopPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiDesktopPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiDesktopPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiFileChooserUI.java b/javax/swing/plaf/multi/MultiFileChooserUI.java
index 719f04374..2ab8841f9 100644
--- a/javax/swing/plaf/multi/MultiFileChooserUI.java
+++ b/javax/swing/plaf/multi/MultiFileChooserUI.java
@@ -54,35 +54,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.FileChooserUI;
/**
- * A UI delegate that that coordinates multiple {@link FileChooserUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link FileChooserUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiFileChooserUI extends FileChooserUI
+public class MultiFileChooserUI extends FileChooserUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiFileChooserUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiFileChooserUI()
+ public MultiFileChooserUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiFileChooserUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -90,11 +90,11 @@ public class MultiFileChooserUI extends FileChooserUI
MultiFileChooserUI mui = new MultiFileChooserUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiFileChooserUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -108,9 +108,9 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiFileChooserUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -122,39 +122,39 @@ public class MultiFileChooserUI extends FileChooserUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiFileChooserUI</code>. The first item in the array is always
+ * <code>MultiFileChooserUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -167,11 +167,11 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiFileChooserUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -186,9 +186,9 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiFileChooserUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -201,24 +201,24 @@ public class MultiFileChooserUI extends FileChooserUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -231,24 +231,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -261,24 +261,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -291,24 +291,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -321,25 +321,25 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -352,24 +352,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link FileChooserUI#getAcceptAllFileFilter(JFileChooser)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the filter for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the filter for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The filter returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The filter returned by the UI delegate from the primary
+ * look and feel.
*/
- public FileFilter getAcceptAllFileFilter(JFileChooser chooser)
+ public FileFilter getAcceptAllFileFilter(JFileChooser chooser)
{
FileFilter result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getAcceptAllFileFilter(chooser);
@@ -385,21 +385,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getFileView(JFileChooser)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the view for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the view for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The view returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The view returned by the UI delegate from the primary
+ * look and feel.
*/
- public FileView getFileView(JFileChooser chooser)
+ public FileView getFileView(JFileChooser chooser)
{
FileView result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getFileView(chooser);
@@ -415,21 +415,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getApproveButtonText(JFileChooser)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the text for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the text for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The text returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The text returned by the UI delegate from the primary
+ * look and feel.
*/
- public String getApproveButtonText(JFileChooser chooser)
+ public String getApproveButtonText(JFileChooser chooser)
{
String result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getApproveButtonText(chooser);
@@ -445,21 +445,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getDialogTitle(JFileChooser)} method
- * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
- * returning the title for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiFileChooserUI</code>,
+ * returning the title for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The title returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The title returned by the UI delegate from the primary
+ * look and feel.
*/
- public String getDialogTitle(JFileChooser chooser)
+ public String getDialogTitle(JFileChooser chooser)
{
String result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getDialogTitle(chooser);
@@ -474,13 +474,13 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)}
- * method for all the UI delegates managed by this
+ * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)}
+ * method for all the UI delegates managed by this
* <code>MultiFileChooserUI</code>.
- *
+ *
* @param chooser the file chooser.
*/
- public void rescanCurrentDirectory(JFileChooser chooser)
+ public void rescanCurrentDirectory(JFileChooser chooser)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -491,14 +491,14 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)}
- * method for all the UI delegates managed by this
+ * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)}
+ * method for all the UI delegates managed by this
* <code>MultiFileChooserUI</code>.
- *
+ *
* @param chooser the file chooser.
* @param file the file.
*/
- public void ensureFileIsVisible(JFileChooser chooser, File file)
+ public void ensureFileIsVisible(JFileChooser chooser, File file)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
diff --git a/javax/swing/plaf/multi/MultiInternalFrameUI.java b/javax/swing/plaf/multi/MultiInternalFrameUI.java
index 01d1df6a1..37b2ee3af 100644
--- a/javax/swing/plaf/multi/MultiInternalFrameUI.java
+++ b/javax/swing/plaf/multi/MultiInternalFrameUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.InternalFrameUI;
/**
- * A UI delegate that that coordinates multiple {@link InternalFrameUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link InternalFrameUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiInternalFrameUI extends InternalFrameUI
+public class MultiInternalFrameUI extends InternalFrameUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiInternalFrameUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiInternalFrameUI()
+ public MultiInternalFrameUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a <code>MultiInternalFrameUI</code>
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a <code>MultiInternalFrameUI</code>
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,12 +86,12 @@ public class MultiInternalFrameUI extends InternalFrameUI
MultiInternalFrameUI mui = new MultiInternalFrameUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
-
+
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiInternalFrameUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiInternalFrameUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiInternalFrameUI extends InternalFrameUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiInternalFrameUI</code>. The first item in the array is always
+ * <code>MultiInternalFrameUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiInternalFrameUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiInternalFrameUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -228,24 +228,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiInternalFrameUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,5 +349,5 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiLabelUI.java b/javax/swing/plaf/multi/MultiLabelUI.java
index ba5b9d473..2f0e7d06e 100644
--- a/javax/swing/plaf/multi/MultiLabelUI.java
+++ b/javax/swing/plaf/multi/MultiLabelUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.LabelUI;
/**
- * A UI delegate that that coordinates multiple {@link LabelUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link LabelUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiLabelUI extends LabelUI
+public class MultiLabelUI extends LabelUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiLabelUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiLabelUI()
+ public MultiLabelUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiLabelUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiLabelUI extends LabelUI
MultiLabelUI mui = new MultiLabelUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiLabelUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiLabelUI extends LabelUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiLabelUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiLabelUI extends LabelUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiLabelUI</code>. The first item in the array is always
+ * <code>MultiLabelUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiLabelUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiLabelUI extends LabelUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiLabelUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiLabelUI extends LabelUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiLabelUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiLabelUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiListUI.java b/javax/swing/plaf/multi/MultiListUI.java
index 78c22419f..d6b77f5b4 100644
--- a/javax/swing/plaf/multi/MultiListUI.java
+++ b/javax/swing/plaf/multi/MultiListUI.java
@@ -53,35 +53,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ListUI;
/**
- * A UI delegate that that coordinates multiple {@link ListUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ListUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiListUI extends ListUI
+public class MultiListUI extends ListUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiListUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiListUI()
+ public MultiListUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiListUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -89,11 +89,11 @@ public class MultiListUI extends ListUI
MultiListUI mui = new MultiListUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiListUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -107,9 +107,9 @@ public class MultiListUI extends ListUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiListUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -121,39 +121,39 @@ public class MultiListUI extends ListUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiListUI</code>. The first item in the array is always
+ * <code>MultiListUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -166,11 +166,11 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiListUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -185,9 +185,9 @@ public class MultiListUI extends ListUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiListUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -200,24 +200,24 @@ public class MultiListUI extends ListUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,24 +230,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -260,24 +260,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -290,24 +290,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiListUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -320,25 +320,25 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiListUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -351,25 +351,25 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ListUI#locationToIndex(JList, Point)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the index for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the index for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param location the location.
- *
- * @return The index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int locationToIndex(JList list, Point location)
+ public int locationToIndex(JList list, Point location)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.locationToIndex(list, location);
@@ -385,22 +385,22 @@ public class MultiListUI extends ListUI
/**
* Calls the {@link ListUI#indexToLocation(JList, int)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param index the index.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public Point indexToLocation(JList list, int index)
+ public Point indexToLocation(JList list, int index)
{
Point result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.indexToLocation(list, index);
@@ -416,23 +416,23 @@ public class MultiListUI extends ListUI
/**
* Calls the {@link ListUI#getCellBounds(JList, int, int)} method for all
- * the UI delegates managed by this <code>MultiListUI</code>,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiListUI</code>,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param index1 the first index.
* @param index2 the second index.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getCellBounds(JList list, int index1, int index2)
+ public Rectangle getCellBounds(JList list, int index1, int index2)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.getCellBounds(list, index1, index2);
diff --git a/javax/swing/plaf/multi/MultiLookAndFeel.java b/javax/swing/plaf/multi/MultiLookAndFeel.java
index 12351655a..4e81fd054 100644
--- a/javax/swing/plaf/multi/MultiLookAndFeel.java
+++ b/javax/swing/plaf/multi/MultiLookAndFeel.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.ComponentUI;
* A look and feel that provides the ability to use auxiliary look and feels
* in addition to the primary look and feel.
*/
-public class MultiLookAndFeel extends LookAndFeel
+public class MultiLookAndFeel extends LookAndFeel
{
/**
@@ -59,62 +59,62 @@ public class MultiLookAndFeel extends LookAndFeel
{
// Nothing to do here.
}
-
+
/**
* Returns the name for the look and feel.
- *
+ *
* @return "Multiplexing Look and Feel".
*/
public String getName()
{
return "Multiplexing Look and Feel";
}
-
+
/**
* Returns an identifier for the look and feel.
- *
+ *
* @return "Multiplex".
*/
public String getID()
{
- return "Multiplex";
+ return "Multiplex";
}
-
+
/**
* Returns a description of the look and feel.
- *
+ *
* @return A description of the look and feel.
*/
public String getDescription()
{
- return "Allows multiple UI instances per component instance";
+ return "Allows multiple UI instances per component instance";
}
-
+
/**
- * Returns <code>false</code> to indicate that this look and feel is not
+ * Returns <code>false</code> to indicate that this look and feel is not
* native to any platform.
- *
+ *
* @return <code>false</code>.
*/
public boolean isNativeLookAndFeel()
{
- return false;
+ return false;
}
/**
* Returns <code>true</code> always, since this look and feel is supported on
* all platforms.
- *
+ *
* @return <code>true</code>.
*/
public boolean isSupportedLookAndFeel()
{
return true;
}
-
+
/**
* Creates and returns the UI defaults for this look and feel.
- *
+ *
* @return The UI defaults.
*/
public UIDefaults getDefaults()
@@ -123,7 +123,7 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("ButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
defaults.put("CheckBoxUI", "javax.swing.plaf.multi.MultiButtonUI");
defaults.put("CheckBoxMenuItemUI", "javax.swing.plaf.multi.MultiMenuItemUI");
- defaults.put("ColorChooserUI",
+ defaults.put("ColorChooserUI",
"javax.swing.plaf.multi.MultiColorChooserUI");
defaults.put("ComboBoxUI", "javax.swing.plaf.multi.MultiComboBoxUI");
defaults.put("DesktopPaneUI", "javax.swing.plaf.multi.MultiDesktopPaneUI");
@@ -131,7 +131,7 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("EditorPaneUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("FileChooserUI", "javax.swing.plaf.multi.MultiFileChooserUI");
defaults.put("FormattedTextFieldUI", "javax.swing.plaf.multi.MultiTextUI");
- defaults.put("InternalFrameUI",
+ defaults.put("InternalFrameUI",
"javax.swing.plaf.multi.MultiInternalFrameUI");
defaults.put("LabelUI", "javax.swing.plaf.multi.MultiLabelUI");
defaults.put("ListUI", "javax.swing.plaf.multi.MultiListUI");
@@ -142,11 +142,11 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("PanelUI", "javax.swing.plaf.multi.MultiPanelUI");
defaults.put("PasswordFieldUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("PopupMenuUI", "javax.swing.plaf.multi.MultiPopupMenuUI");
- defaults.put("PopupMenuSeparatorUI",
+ defaults.put("PopupMenuSeparatorUI",
"javax.swing.plaf.multi.MultiSeparatorUI");
defaults.put("ProgressBarUI", "javax.swing.plaf.multi.MultiProgressBarUI");
defaults.put("RadioButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
- defaults.put("RadioButtonMenuItemUI",
+ defaults.put("RadioButtonMenuItemUI",
"javax.swing.plaf.multi.MultiMenuItemUI");
defaults.put("RootPaneUI", "javax.swing.plaf.multi.MultiRootPaneUI");
defaults.put("ScrollBarUI", "javax.swing.plaf.multi.MultiScrollBarUI");
@@ -162,43 +162,43 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("TextFieldUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("TextPaneUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("ToggleButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
- defaults.put("ToolBarSeparatorUI",
+ defaults.put("ToolBarSeparatorUI",
"javax.swing.plaf.multi.MultiSeparatorUI");
defaults.put("ToolBarUI", "javax.swing.plaf.multi.MultiToolBarUI");
defaults.put("ToolTipUI", "javax.swing.plaf.multi.MultiToolTipUI");
defaults.put("ViewportUI", "javax.swing.plaf.multi.MultiViewportUI");
return defaults;
}
-
+
/**
* Creates the UI delegates for the <code>target</code> component and
* returns a multiplexing UI delegate (<code>mui</code>) if there are
* multiple delegates.
- *
+ *
* @param mui a multiplexing UI delegate appropriate for the component.
* @param uis a vector into which the UI delegates will be added.
* @param target the target component.
- *
+ *
* @return A UI delegate.
*/
- public static ComponentUI createUIs(ComponentUI mui, Vector uis,
+ public static ComponentUI createUIs(ComponentUI mui, Vector uis,
JComponent target)
{
// get primary UI delegate for 'target', and add it to uis
ComponentUI ui = null;
LookAndFeel primary = UIManager.getLookAndFeel();
- if (primary != null)
+ if (primary != null)
{
ui = UIManager.getUI(target);
uis.add(ui);
}
- // for any auxiliary look and feels in use, get the UI delegate and add
+ // for any auxiliary look and feels in use, get the UI delegate and add
// it to uis
LookAndFeel[] auxlafs = UIManager.getAuxiliaryLookAndFeels();
for (int i = 0; i < auxlafs.length; i++)
{
LookAndFeel auxlaf = auxlafs[i];
- // FIXME: here I call getDefaults() to get the UI delegate from the
+ // FIXME: here I call getDefaults() to get the UI delegate from the
// auxiliary look and feel. But getDefaults() creates a new set of
// defaults every time it is called, which is wasteful. Unfortunately
// I cannot find another way to get the UI delegate, so I'm doing it
@@ -208,36 +208,36 @@ public class MultiLookAndFeel extends LookAndFeel
if (ui != null)
uis.add(ui);
}
- // if uis contains more than 1 delegate, return mui, otherwise return
+ // if uis contains more than 1 delegate, return mui, otherwise return
// the primary delegate
if (uis.size() > 1)
return mui;
else
- return ui;
+ return ui;
}
-
+
/**
* Returns an array containing the same {@link ComponentUI} instances as
* <code>uis</code>. If <code>uis</code> is <code>null</code>, a zero-length
* array is returned.
- *
- * @param uis a list of {@link ComponentUI} references (<code>null</code>
+ *
+ * @param uis a list of {@link ComponentUI} references (<code>null</code>
* permitted).
- *
+ *
* @return An array containing the same {@link ComponentUI} instances as
* <code>uis</code>, or <code>null</code> if <code>uis</code> is
- * empty.
+ * empty.
*/
protected static ComponentUI[] uisToArray(Vector uis)
{
- if (uis == null)
+ if (uis == null)
return new ComponentUI[0];
int size = uis.size();
- if (size == 0)
+ if (size == 0)
return null;
ComponentUI[] result = new ComponentUI[size];
uis.copyInto(result);
- return result;
+ return result;
}
}
diff --git a/javax/swing/plaf/multi/MultiMenuBarUI.java b/javax/swing/plaf/multi/MultiMenuBarUI.java
index a8e805af1..5b43f6bd8 100644
--- a/javax/swing/plaf/multi/MultiMenuBarUI.java
+++ b/javax/swing/plaf/multi/MultiMenuBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.MenuBarUI;
/**
- * A UI delegate that that coordinates multiple {@link MenuBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MenuBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiMenuBarUI extends MenuBarUI
+public class MultiMenuBarUI extends MenuBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiMenuBarUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiMenuBarUI()
+ public MultiMenuBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiMenuBarUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiMenuBarUI extends MenuBarUI
MultiMenuBarUI mui = new MultiMenuBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuBarUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiMenuBarUI extends MenuBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuBarUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiMenuBarUI extends MenuBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiMenuBarUI</code>. The first item in the array is always
+ * <code>MultiMenuBarUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiMenuBarUI extends MenuBarUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiMenuBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiMenuBarUI extends MenuBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiMenuBarUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiMenuBarUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiMenuItemUI.java b/javax/swing/plaf/multi/MultiMenuItemUI.java
index ccab5feec..6d361b086 100644
--- a/javax/swing/plaf/multi/MultiMenuItemUI.java
+++ b/javax/swing/plaf/multi/MultiMenuItemUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.MenuItemUI;
/**
- * A UI delegate that that coordinates multiple {@link MenuItemUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MenuItemUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiMenuItemUI extends MenuItemUI
+public class MultiMenuItemUI extends MenuItemUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiMenuItemUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiMenuItemUI()
+ public MultiMenuItemUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiItemUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiMenuItemUI extends MenuItemUI
MultiMenuItemUI mui = new MultiMenuItemUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuItemUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiMenuItemUI extends MenuItemUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuItemUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiMenuItemUI extends MenuItemUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiMenuItemUI</code>. The first item in the array is always
+ * <code>MultiMenuItemUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiMenuItemUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiMenuItemUI extends MenuItemUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiMenuItemUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiMenuItemUI extends MenuItemUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiMenuItemUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiMenuItemUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiOptionPaneUI.java b/javax/swing/plaf/multi/MultiOptionPaneUI.java
index 8d6f3861c..eaa4a4257 100644
--- a/javax/swing/plaf/multi/MultiOptionPaneUI.java
+++ b/javax/swing/plaf/multi/MultiOptionPaneUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.OptionPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link OptionPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link OptionPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiOptionPaneUI extends OptionPaneUI
+public class MultiOptionPaneUI extends OptionPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiOptionPaneUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiOptionPaneUI()
+ public MultiOptionPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiOptionPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiOptionPaneUI extends OptionPaneUI
MultiOptionPaneUI mui = new MultiOptionPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiOptionPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiOptionPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiOptionPaneUI extends OptionPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiOptionPaneUI</code>. The first item in the array is always
+ * <code>MultiOptionPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiOptionPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiOptionPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -228,24 +228,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiOptionPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,14 +349,14 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
* all the UI delegates managed by this <code>MultiOptionPaneUI</code>.
- *
+ *
* @param pane the option pane.
*/
- public void selectInitialValue(JOptionPane pane)
+ public void selectInitialValue(JOptionPane pane)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -367,21 +367,21 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)}
- * method for all the UI delegates managed by this
- * <code>MultiOptionPaneUI</code>, returning the result for the UI delegate
- * from the primary look and feel.
- *
+ * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)}
+ * method for all the UI delegates managed by this
+ * <code>MultiOptionPaneUI</code>, returning the result for the UI delegate
+ * from the primary look and feel.
+ *
* @param pane the option pane.
- *
- * @return The result for the UI delegate from the primary look and feel.
+ *
+ * @return The result for the UI delegate from the primary look and feel.
*/
- public boolean containsCustomComponents(JOptionPane pane)
+ public boolean containsCustomComponents(JOptionPane pane)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
OptionPaneUI ui = (OptionPaneUI) iterator.next();
result = ui.containsCustomComponents(pane);
diff --git a/javax/swing/plaf/multi/MultiPanelUI.java b/javax/swing/plaf/multi/MultiPanelUI.java
index 67629b2fe..7b84599d0 100644
--- a/javax/swing/plaf/multi/MultiPanelUI.java
+++ b/javax/swing/plaf/multi/MultiPanelUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.PanelUI;
/**
- * A UI delegate that that coordinates multiple {@link PanelUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link PanelUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiPanelUI extends PanelUI
+public class MultiPanelUI extends PanelUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiPanelUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiPanelUI()
+ public MultiPanelUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiPanelUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiPanelUI extends PanelUI
MultiPanelUI mui = new MultiPanelUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiPanelUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiPanelUI extends PanelUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiPanelUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiPanelUI extends PanelUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiPanelUI</code>. The first item in the array is always
+ * <code>MultiPanelUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiPanelUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiPanelUI extends PanelUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiPanelUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiPanelUI extends PanelUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiPanelUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiPanelUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiPopupMenuUI.java b/javax/swing/plaf/multi/MultiPopupMenuUI.java
index 161429d29..0afaaf74e 100644
--- a/javax/swing/plaf/multi/MultiPopupMenuUI.java
+++ b/javax/swing/plaf/multi/MultiPopupMenuUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.PopupMenuUI;
/**
- * A UI delegate that that coordinates multiple {@link PopupMenuUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link PopupMenuUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiPopupMenuUI extends PopupMenuUI
+public class MultiPopupMenuUI extends PopupMenuUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiPopupMenuUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiPopupMenuUI()
+ public MultiPopupMenuUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiPopupMenuUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiPopupMenuUI extends PopupMenuUI
MultiPopupMenuUI mui = new MultiPopupMenuUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiPopupMenuUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiPopupMenuUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiPopupMenuUI extends PopupMenuUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiPopupMenuUI</code>. The first item in the array is always
+ * <code>MultiPopupMenuUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiPopupMenuUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiPopupMenuUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiPopupMenuUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiProgressBarUI.java b/javax/swing/plaf/multi/MultiProgressBarUI.java
index c5dbbe815..0395bdd2d 100644
--- a/javax/swing/plaf/multi/MultiProgressBarUI.java
+++ b/javax/swing/plaf/multi/MultiProgressBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ProgressBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ProgressBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ProgressBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiProgressBarUI extends ProgressBarUI
+public class MultiProgressBarUI extends ProgressBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiProgressBarUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiProgressBarUI()
+ public MultiProgressBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiProgressBarUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiProgressBarUI extends ProgressBarUI
MultiProgressBarUI mui = new MultiProgressBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiProgressBarUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiProgressBarUI extends ProgressBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiProgressBarUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiProgressBarUI extends ProgressBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiProgressBarUI</code>. The first item in the array is always
+ * <code>MultiProgressBarUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiProgressBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiProgressBarUI extends ProgressBarUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiProgressBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiProgressBarUI extends ProgressBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiProgressBarUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiProgressBarUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiRootPaneUI.java b/javax/swing/plaf/multi/MultiRootPaneUI.java
index bd0cb5c1d..69c7ffe1b 100644
--- a/javax/swing/plaf/multi/MultiRootPaneUI.java
+++ b/javax/swing/plaf/multi/MultiRootPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.RootPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link RootPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link RootPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiRootPaneUI extends RootPaneUI
+public class MultiRootPaneUI extends RootPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiRootPanelUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiRootPaneUI()
+ public MultiRootPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiRootPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiRootPaneUI extends RootPaneUI
MultiRootPaneUI mui = new MultiRootPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiRootPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiRootPaneUI extends RootPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiRootPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiRootPaneUI extends RootPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiRootPaneUI</code>. The first item in the array is always
+ * <code>MultiRootPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiRootPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiRootPaneUI extends RootPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiRootPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiRootPaneUI extends RootPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiRootPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiRootPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiScrollBarUI.java b/javax/swing/plaf/multi/MultiScrollBarUI.java
index 1a993b840..4ec8b3fca 100644
--- a/javax/swing/plaf/multi/MultiScrollBarUI.java
+++ b/javax/swing/plaf/multi/MultiScrollBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ScrollBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ScrollBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ScrollBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiScrollBarUI extends ScrollBarUI
+public class MultiScrollBarUI extends ScrollBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiScrollBarUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiScrollBarUI()
+ public MultiScrollBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiScrollBarUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiScrollBarUI extends ScrollBarUI
MultiScrollBarUI mui = new MultiScrollBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollBarUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiScrollBarUI extends ScrollBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollBarUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiScrollBarUI extends ScrollBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiScrollBarUI</code>. The first item in the array is always
+ * <code>MultiScrollBarUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiScrollBarUI extends ScrollBarUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiScrollBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiScrollBarUI extends ScrollBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,21 +230,21 @@ public class MultiScrollBarUI extends ScrollBarUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiScrollBarUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiScrollBarUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiScrollPaneUI.java b/javax/swing/plaf/multi/MultiScrollPaneUI.java
index a50c3ba7f..5a0bc1ebf 100644
--- a/javax/swing/plaf/multi/MultiScrollPaneUI.java
+++ b/javax/swing/plaf/multi/MultiScrollPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ScrollPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link ScrollPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ScrollPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiScrollPaneUI extends ScrollPaneUI
+public class MultiScrollPaneUI extends ScrollPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiScrollPaneUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiScrollPaneUI()
+ public MultiScrollPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiScrollPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI
MultiScrollPaneUI mui = new MultiScrollPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiScrollPaneUI extends ScrollPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiScrollPaneUI</code>. The first item in the array is always
+ * <code>MultiScrollPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiScrollPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiScrollPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiScrollPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiSeparatorUI.java b/javax/swing/plaf/multi/MultiSeparatorUI.java
index f8e4feae7..fbd9712fe 100644
--- a/javax/swing/plaf/multi/MultiSeparatorUI.java
+++ b/javax/swing/plaf/multi/MultiSeparatorUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SeparatorUI;
/**
- * A UI delegate that that coordinates multiple {@link MultiSeparatorUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MultiSeparatorUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSeparatorUI extends SeparatorUI
+public class MultiSeparatorUI extends SeparatorUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiSeparatorUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSeparatorUI()
+ public MultiSeparatorUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiSeparatorUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSeparatorUI extends SeparatorUI
MultiSeparatorUI mui = new MultiSeparatorUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSeparatorUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSeparatorUI extends SeparatorUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSeparatorUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSeparatorUI extends SeparatorUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiSeparatorUI</code>. The first item in the array is always
+ * <code>MultiSeparatorUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiSeparatorUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSeparatorUI extends SeparatorUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiSeparatorUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSeparatorUI extends SeparatorUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiSeparatorUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSeparatorUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiSliderUI.java b/javax/swing/plaf/multi/MultiSliderUI.java
index 8a4aab6e0..cb896c547 100644
--- a/javax/swing/plaf/multi/MultiSliderUI.java
+++ b/javax/swing/plaf/multi/MultiSliderUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SliderUI;
/**
- * A UI delegate that that coordinates multiple {@link SliderUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SliderUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSliderUI extends SliderUI
+public class MultiSliderUI extends SliderUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiSliderUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSliderUI()
+ public MultiSliderUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiSliderUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSliderUI extends SliderUI
MultiSliderUI mui = new MultiSliderUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSliderUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSliderUI extends SliderUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSliderUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSliderUI extends SliderUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiSliderUI</code>. The first item in the array is always
+ * <code>MultiSliderUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiSliderUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSliderUI extends SliderUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiSliderUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSliderUI extends SliderUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiSliderUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSliderUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiSpinnerUI.java b/javax/swing/plaf/multi/MultiSpinnerUI.java
index 70068e82a..fd805f9cb 100644
--- a/javax/swing/plaf/multi/MultiSpinnerUI.java
+++ b/javax/swing/plaf/multi/MultiSpinnerUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SpinnerUI;
/**
- * A UI delegate that that coordinates multiple {@link SpinnerUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SpinnerUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSpinnerUI extends SpinnerUI
+public class MultiSpinnerUI extends SpinnerUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiSpinnerUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSpinnerUI()
+ public MultiSpinnerUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiSpinnerUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSpinnerUI extends SpinnerUI
MultiSpinnerUI mui = new MultiSpinnerUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSpinnerUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSpinnerUI extends SpinnerUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSpinnerUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSpinnerUI extends SpinnerUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiSpinnerUI</code>. The first item in the array is always
+ * <code>MultiSpinnerUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiSpinnerUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSpinnerUI extends SpinnerUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiSpinnerUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSpinnerUI extends SpinnerUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiSpinnerUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSpinnerUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiSplitPaneUI.java b/javax/swing/plaf/multi/MultiSplitPaneUI.java
index 70ea4f13b..1eb2e41f5 100644
--- a/javax/swing/plaf/multi/MultiSplitPaneUI.java
+++ b/javax/swing/plaf/multi/MultiSplitPaneUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SplitPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link SplitPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SplitPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSplitPaneUI extends SplitPaneUI
+public class MultiSplitPaneUI extends SplitPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiSplitPaneUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSplitPaneUI()
+ public MultiSplitPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiSplitPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiSplitPaneUI extends SplitPaneUI
MultiSplitPaneUI mui = new MultiSplitPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiSplitPaneUI extends SplitPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiSplitPaneUI</code>. The first item in the array is always
+ * <code>MultiSplitPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -231,21 +231,21 @@ public class MultiSplitPaneUI extends SplitPaneUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,14 +349,14 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method
+ * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method
* for all the UI delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param pane the component.
*/
- public void resetToPreferredSizes(JSplitPane pane)
+ public void resetToPreferredSizes(JSplitPane pane)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -367,13 +367,13 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method
+ * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method
* for all the UI delegates managed by this <code>MultiSplitPaneUI</code>.
- *
+ *
* @param pane the component.
* @param location the location.
*/
- public void setDividerLocation(JSplitPane pane, int location)
+ public void setDividerLocation(JSplitPane pane, int location)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -385,21 +385,21 @@ public class MultiSplitPaneUI extends SplitPaneUI
/**
* Calls the {@link SplitPaneUI#getDividerLocation(JSplitPane)} method for all
- * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getDividerLocation(JSplitPane pane)
+ public int getDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getDividerLocation(pane);
@@ -414,22 +414,22 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#getMinimumDividerLocation(JSplitPane)} method
- * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link SplitPaneUI#getMinimumDividerLocation(JSplitPane)} method
+ * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getMinimumDividerLocation(JSplitPane pane)
+ public int getMinimumDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getMinimumDividerLocation(pane);
@@ -444,22 +444,22 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#getMaximumDividerLocation(JSplitPane)} method
- * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link SplitPaneUI#getMaximumDividerLocation(JSplitPane)} method
+ * for all the UI delegates managed by this <code>MultiSplitPaneUI</code>,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getMaximumDividerLocation(JSplitPane pane)
+ public int getMaximumDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getMaximumDividerLocation(pane);
@@ -474,14 +474,14 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane,
- * Graphics)} method for all the UI delegates managed by this
+ * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane,
+ * Graphics)} method for all the UI delegates managed by this
* <code>MultiSplitPaneUI</code>.
- *
+ *
* @param pane the component.
* @param g the graphics device.
*/
- public void finishedPaintingChildren(JSplitPane pane, Graphics g)
+ public void finishedPaintingChildren(JSplitPane pane, Graphics g)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
diff --git a/javax/swing/plaf/multi/MultiTabbedPaneUI.java b/javax/swing/plaf/multi/MultiTabbedPaneUI.java
index 2a2599bde..3f9d22af4 100644
--- a/javax/swing/plaf/multi/MultiTabbedPaneUI.java
+++ b/javax/swing/plaf/multi/MultiTabbedPaneUI.java
@@ -52,35 +52,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TabbedPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link TabbedPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TabbedPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTabbedPaneUI extends TabbedPaneUI
+public class MultiTabbedPaneUI extends TabbedPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiTabbedPaneUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTabbedPaneUI()
+ public MultiTabbedPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiTabbedPaneUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -88,11 +88,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
MultiTabbedPaneUI mui = new MultiTabbedPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTabbedPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -106,9 +106,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTabbedPaneUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -120,39 +120,39 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiTabbedPaneUI</code>. The first item in the array is always
+ * <code>MultiTabbedPaneUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -165,11 +165,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiTabbedPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -184,9 +184,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiTabbedPaneUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -199,24 +199,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -232,21 +232,21 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -259,24 +259,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -289,24 +289,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -319,25 +319,25 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTabbedPaneUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -350,26 +350,26 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)}
- * method for all the UI delegates managed by this
- * <code>MultiTabbedPaneUI</code>, returning the tab index for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)}
+ * method for all the UI delegates managed by this
+ * <code>MultiTabbedPaneUI</code>, returning the tab index for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
- * @return The tab index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The tab index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int tabForCoordinate(JTabbedPane pane, int x, int y)
+ public int tabForCoordinate(JTabbedPane pane, int x, int y)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.tabForCoordinate(pane, x, y);
@@ -384,23 +384,23 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)}
- * method for all the UI delegates managed by this
- * <code>MultiTabbedPaneUI</code>, returning the bounds for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)}
+ * method for all the UI delegates managed by this
+ * <code>MultiTabbedPaneUI</code>, returning the bounds for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
* @param index the index.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getTabBounds(JTabbedPane pane, int index)
+ public Rectangle getTabBounds(JTabbedPane pane, int index)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.getTabBounds(pane, index);
@@ -415,22 +415,22 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)}
- * method for all the UI delegates managed by this
- * <code>MultiTabbedPaneUI</code>, returning the nt for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)}
+ * method for all the UI delegates managed by this
+ * <code>MultiTabbedPaneUI</code>, returning the nt for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getTabRunCount(JTabbedPane pane)
+ public int getTabRunCount(JTabbedPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.getTabRunCount(pane);
diff --git a/javax/swing/plaf/multi/MultiTableHeaderUI.java b/javax/swing/plaf/multi/MultiTableHeaderUI.java
index 6c59cef6c..972303bec 100644
--- a/javax/swing/plaf/multi/MultiTableHeaderUI.java
+++ b/javax/swing/plaf/multi/MultiTableHeaderUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TableHeaderUI;
/**
- * A UI delegate that that coordinates multiple {@link TableHeaderUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TableHeaderUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTableHeaderUI extends TableHeaderUI
+public class MultiTableHeaderUI extends TableHeaderUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiTableHeaderUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTableHeaderUI()
+ public MultiTableHeaderUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiTableHeaderUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiTableHeaderUI extends TableHeaderUI
MultiTableHeaderUI mui = new MultiTableHeaderUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTableHeaderUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTableHeaderUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiTableHeaderUI extends TableHeaderUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiTableHeaderUI</code>. The first item in the array is always
+ * <code>MultiTableHeaderUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiTableHeaderUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiTableHeaderUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTableHeaderUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiTableUI.java b/javax/swing/plaf/multi/MultiTableUI.java
index 2e5b5bcf5..1cd1a4c88 100644
--- a/javax/swing/plaf/multi/MultiTableUI.java
+++ b/javax/swing/plaf/multi/MultiTableUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TableUI;
/**
- * A UI delegate that that coordinates multiple {@link TableUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TableUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTableUI extends TableUI
+public class MultiTableUI extends TableUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiTableUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTableUI()
+ public MultiTableUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiTableUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiTableUI extends TableUI
MultiTableUI mui = new MultiTableUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTableUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiTableUI extends TableUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTableUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiTableUI extends TableUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiTableUI</code>. The first item in the array is always
+ * <code>MultiTableUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiTableUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiTableUI extends TableUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiTableUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiTableUI extends TableUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiTableUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTableUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiTextUI.java b/javax/swing/plaf/multi/MultiTextUI.java
index c5dee247d..392fd9811 100644
--- a/javax/swing/plaf/multi/MultiTextUI.java
+++ b/javax/swing/plaf/multi/MultiTextUI.java
@@ -58,35 +58,35 @@ import javax.swing.text.View;
import javax.swing.text.Position.Bias;
/**
- * A UI delegate that that coordinates multiple {@link TextUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TextUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTextUI extends TextUI
+public class MultiTextUI extends TextUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiTextUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTextUI()
+ public MultiTextUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiTextUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -94,11 +94,11 @@ public class MultiTextUI extends TextUI
MultiTextUI mui = new MultiTextUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTextUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -112,9 +112,9 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTextUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -126,39 +126,39 @@ public class MultiTextUI extends TextUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiTextUI</code>. The first item in the array is always
+ * <code>MultiTextUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -171,11 +171,11 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiTextUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -190,9 +190,9 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiTextUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -205,24 +205,24 @@ public class MultiTextUI extends TextUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -235,24 +235,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -265,24 +265,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -295,24 +295,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -325,25 +325,25 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -356,25 +356,25 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link TextUI#modelToView(JTextComponent, int)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
public Rectangle modelToView(JTextComponent tc, int pos)
- throws BadLocationException
+ throws BadLocationException
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.modelToView(tc, pos);
@@ -389,23 +389,23 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)}
- * method for all the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)}
+ * method for all the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
public Rectangle modelToView(JTextComponent tc, int pos, Bias bias)
- throws BadLocationException
+ throws BadLocationException
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.modelToView(tc, pos, bias);
@@ -421,22 +421,22 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#viewToModel(JTextComponent, Point)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param t the text component.
* @param pt the point.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
- public int viewToModel(JTextComponent t, Point pt)
+ public int viewToModel(JTextComponent t, Point pt)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.viewToModel(t, pt);
@@ -451,22 +451,22 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method
- * for all the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method
+ * for all the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
- public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias)
+ public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.viewToModel(tc, loc, outBias);
@@ -481,48 +481,48 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int,
+ * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int,
* Position.Bias, int, Position.Bias[])} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
public int getNextVisualPositionFrom(JTextComponent tc, int pos, Bias bias,
- int direction, Bias[] outBias) throws BadLocationException
+ int direction, Bias[] outBias) throws BadLocationException
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
- result = ui.getNextVisualPositionFrom(tc, pos, bias, direction,
+ result = ui.getNextVisualPositionFrom(tc, pos, bias, direction,
outBias);
}
// return values from auxiliary UI delegates are ignored
while (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
- /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias,
+ /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias,
direction, outBias);
}
return result;
}
/**
- * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for
+ * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for
* all the UI delegates managed by this <code>MultiTextUI</code>.
- *
+ *
* @param tc the component.
* @param start the start position.
* @param end the end position.
*/
- public void damageRange(JTextComponent tc, int start, int end)
+ public void damageRange(JTextComponent tc, int start, int end)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -533,10 +533,10 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#damageRange(JTextComponent, int, int,
- * Position.Bias, Position.Bias)} method for all the UI delegates managed by
+ * Calls the {@link TextUI#damageRange(JTextComponent, int, int,
+ * Position.Bias, Position.Bias)} method for all the UI delegates managed by
* this <code>MultiTextUI</code>.
- *
+ *
* @param tc the component.
* @param start the start position.
* @param end the end position.
@@ -544,7 +544,7 @@ public class MultiTextUI extends TextUI
* @param endBias the end bias.
*/
public void damageRange(JTextComponent tc, int start, int end,
- Bias startBias, Bias endBias)
+ Bias startBias, Bias endBias)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -556,21 +556,21 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#getEditorKit(JTextComponent)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the editor kit for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the editor kit for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The editor kit returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The editor kit returned by the UI delegate from the primary
+ * look and feel.
*/
- public EditorKit getEditorKit(JTextComponent tc)
+ public EditorKit getEditorKit(JTextComponent tc)
{
EditorKit result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.getEditorKit(tc);
@@ -586,21 +586,21 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#getRootView(JTextComponent)} method for all
- * the UI delegates managed by this <code>MultiTextUI</code>,
- * returning the view for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTextUI</code>,
+ * returning the view for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The view returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The view returned by the UI delegate from the primary
+ * look and feel.
*/
- public View getRootView(JTextComponent tc)
+ public View getRootView(JTextComponent tc)
{
View result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.getRootView(tc);
diff --git a/javax/swing/plaf/multi/MultiToolBarUI.java b/javax/swing/plaf/multi/MultiToolBarUI.java
index afe63bf35..5f308d991 100644
--- a/javax/swing/plaf/multi/MultiToolBarUI.java
+++ b/javax/swing/plaf/multi/MultiToolBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ToolBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ToolBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ToolBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiToolBarUI extends ToolBarUI
+public class MultiToolBarUI extends ToolBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiToolBarUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiToolBarUI()
+ public MultiToolBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiToolBarUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiToolBarUI extends ToolBarUI
MultiToolBarUI mui = new MultiToolBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiToolBarUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiToolBarUI extends ToolBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiToolBarUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiToolBarUI extends ToolBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiToolBarUI</code>. The first item in the array is always
+ * <code>MultiToolBarUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiToolBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiToolBarUI extends ToolBarUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiToolBarUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiToolBarUI extends ToolBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiToolBarUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiToolBarUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiToolTipUI.java b/javax/swing/plaf/multi/MultiToolTipUI.java
index fcd622dd8..9db9efb69 100644
--- a/javax/swing/plaf/multi/MultiToolTipUI.java
+++ b/javax/swing/plaf/multi/MultiToolTipUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ToolTipUI;
/**
- * A UI delegate that that coordinates multiple {@link ToolTipUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ToolTipUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiToolTipUI extends ToolTipUI
+public class MultiToolTipUI extends ToolTipUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiToolTipUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiToolTipUI()
+ public MultiToolTipUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiToolTipUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiToolTipUI extends ToolTipUI
MultiToolTipUI mui = new MultiToolTipUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiToolTipUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiToolTipUI extends ToolTipUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiToolTipUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiToolTipUI extends ToolTipUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiToolTipUI</code>. The first item in the array is always
+ * <code>MultiToolTipUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiToolTipUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiToolTipUI extends ToolTipUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiToolTipUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiToolTipUI extends ToolTipUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,21 +230,21 @@ public class MultiToolTipUI extends ToolTipUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiToolTipUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiToolTipUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/multi/MultiTreeUI.java b/javax/swing/plaf/multi/MultiTreeUI.java
index de1dc6cc7..f70decc69 100644
--- a/javax/swing/plaf/multi/MultiTreeUI.java
+++ b/javax/swing/plaf/multi/MultiTreeUI.java
@@ -53,35 +53,35 @@ import javax.swing.plaf.TreeUI;
import javax.swing.tree.TreePath;
/**
- * A UI delegate that that coordinates multiple {@link TreeUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TreeUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTreeUI extends TreeUI
+public class MultiTreeUI extends TreeUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiTreeUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTreeUI()
+ public MultiTreeUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiTreeUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -89,11 +89,11 @@ public class MultiTreeUI extends TreeUI
MultiTreeUI mui = new MultiTreeUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -107,9 +107,9 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -121,39 +121,39 @@ public class MultiTreeUI extends TreeUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiTreeUI</code>. The first item in the array is always
+ * <code>MultiTreeUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -166,11 +166,11 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -185,9 +185,9 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -200,24 +200,24 @@ public class MultiTreeUI extends TreeUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,24 +230,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -260,24 +260,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -290,24 +290,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -320,25 +320,25 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -351,24 +351,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link TreeUI#getPathBounds(JTree, TreePath)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getPathBounds(JTree tree, TreePath path)
+ public Rectangle getPathBounds(JTree tree, TreePath path)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getPathBounds(tree, path);
@@ -384,21 +384,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getPathForRow(JTree, int)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getPathForRow(JTree tree, int row)
+ public TreePath getPathForRow(JTree tree, int row)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getPathForRow(tree, row);
@@ -414,21 +414,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getRowForPath(JTree, TreePath)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the row index for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the row index for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The row index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The row index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getRowForPath(JTree tree, TreePath path)
+ public int getRowForPath(JTree tree, TreePath path)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getRowForPath(tree, path);
@@ -439,26 +439,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* int ignored = */ ui.getRowForPath(tree, path);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#getRowCount(JTree)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getRowCount(JTree tree)
+ public int getRowCount(JTree tree)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getRowCount(tree);
@@ -469,26 +469,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* int ignored = */ ui.getRowCount(tree);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#getClosestPathForLocation(JTree, int, int)} method
- * for all the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getClosestPathForLocation(JTree tree, int x, int y)
+ public TreePath getClosestPathForLocation(JTree tree, int x, int y)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getClosestPathForLocation(tree, x, y);
@@ -499,26 +499,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* TreePath ignored = */ ui.getClosestPathForLocation(tree, x, y);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#isEditing(JTree)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The result returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The result returned by the UI delegate from the primary
+ * look and feel.
*/
- public boolean isEditing(JTree tree)
+ public boolean isEditing(JTree tree)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.isEditing(tree);
@@ -534,21 +534,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#stopEditing(JTree)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The result returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The result returned by the UI delegate from the primary
+ * look and feel.
*/
- public boolean stopEditing(JTree tree)
+ public boolean stopEditing(JTree tree)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.stopEditing(tree);
@@ -563,12 +563,12 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link TreeUI#cancelEditing(JTree)} method for
+ * Calls the {@link TreeUI#cancelEditing(JTree)} method for
* all the UI delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param tree the tree component.
*/
- public void cancelEditing(JTree tree)
+ public void cancelEditing(JTree tree)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -579,13 +579,13 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for
+ * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for
* all the UI delegates managed by this <code>MultiTreeUI</code>.
- *
+ *
* @param tree the tree component.
* @param path the path.
*/
- public void startEditingAtPath(JTree tree, TreePath path)
+ public void startEditingAtPath(JTree tree, TreePath path)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -597,21 +597,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getEditingPath(JTree)} method for all
- * the UI delegates managed by this <code>MultiTreeUI</code>,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiTreeUI</code>,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getEditingPath(JTree tree)
+ public TreePath getEditingPath(JTree tree)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getEditingPath(tree);
@@ -622,7 +622,7 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* TreePath ignored = */ ui.getEditingPath(tree);
}
- return result;
+ return result;
}
}
diff --git a/javax/swing/plaf/multi/MultiViewportUI.java b/javax/swing/plaf/multi/MultiViewportUI.java
index 33bbc3b7f..55f9cba70 100644
--- a/javax/swing/plaf/multi/MultiViewportUI.java
+++ b/javax/swing/plaf/multi/MultiViewportUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ViewportUI;
/**
- * A UI delegate that that coordinates multiple {@link ViewportUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ViewportUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiViewportUI extends ViewportUI
+public class MultiViewportUI extends ViewportUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new <code>MultiViewPortUI</code> instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiViewportUI()
+ public MultiViewportUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a <code>MultiViewportUI</code> is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiViewportUI extends ViewportUI
MultiViewportUI mui = new MultiViewportUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiViewportUI</code>.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiViewportUI extends ViewportUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this <code>MultiViewportUI</code>.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiViewportUI extends ViewportUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * <code>MultiViewportUI</code>. The first item in the array is always
+ * <code>MultiViewportUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return <code>true</code> if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and <code>false</code> otherwise.
+ * primary look and feel, and <code>false</code> otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this <code>MultiViewportUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiViewportUI extends ViewportUI
}
/**
- * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
+ * Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiViewportUI</code>.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiViewportUI extends ViewportUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this <code>MultiViewportUI</code>,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this <code>MultiViewportUI</code>,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
}
diff --git a/javax/swing/plaf/synth/SynthGraphicsUtils.java b/javax/swing/plaf/synth/SynthGraphicsUtils.java
index 1907d754f..76a46cb21 100644
--- a/javax/swing/plaf/synth/SynthGraphicsUtils.java
+++ b/javax/swing/plaf/synth/SynthGraphicsUtils.java
@@ -91,10 +91,10 @@ public class SynthGraphicsUtils
* Lays out a label and (if non-null) an icon. The calculated coordinates are
* then stored in <code>viewR</code>, <code>iconR</code> and
* <code>textR</code>.
- *
+ *
* The alignment and position parameters may be one of the alignment or
* position constants defined in {@link javax.swing.SwingConstants}.
- *
+ *
* @param ctx the synth context, identifies the current region
* @param fm the font metrics to use to fetch the text measures
* @param text the text to lay out, may be <code>null</code>
@@ -123,7 +123,7 @@ public class SynthGraphicsUtils
/**
* Returns the width of the string <code>text</code> for the specified font
* and font metrics.
- *
+ *
* @param ctx identifies the current region
* @param font the font
* @param fm the font metrics to use
diff --git a/javax/swing/plaf/synth/SynthLookAndFeel.java b/javax/swing/plaf/synth/SynthLookAndFeel.java
index 46a95f098..ac24dd48d 100644
--- a/javax/swing/plaf/synth/SynthLookAndFeel.java
+++ b/javax/swing/plaf/synth/SynthLookAndFeel.java
@@ -73,7 +73,7 @@ public class SynthLookAndFeel
* Creates a new instance of <code>SynthLookAndFeel</code>. In order to use
* the Synth look and feel you either need to call {@link #load} to load a
* set of styles from an XML file, or you need to call
- * {@link #setStyleFactory} to provide your own style factory.
+ * {@link #setStyleFactory} to provide your own style factory.
*/
public SynthLookAndFeel()
{
diff --git a/javax/swing/plaf/synth/SynthPainter.java b/javax/swing/plaf/synth/SynthPainter.java
index fa1f6f572..6a57dadca 100644
--- a/javax/swing/plaf/synth/SynthPainter.java
+++ b/javax/swing/plaf/synth/SynthPainter.java
@@ -68,7 +68,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the arrow
@@ -86,7 +86,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the progress bar
@@ -105,7 +105,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the separator
@@ -124,7 +124,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the divider
@@ -143,7 +143,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the divider
@@ -162,7 +162,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -179,7 +179,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -196,7 +196,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -213,7 +213,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -230,7 +230,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -247,7 +247,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -264,7 +264,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -281,7 +281,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -298,7 +298,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -315,7 +315,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -332,7 +332,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -349,7 +349,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -366,7 +366,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -383,7 +383,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -400,7 +400,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -417,7 +417,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -434,7 +434,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -451,7 +451,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -468,7 +468,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -485,7 +485,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -502,7 +502,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -519,7 +519,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -536,7 +536,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -553,7 +553,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -570,7 +570,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -587,7 +587,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -604,7 +604,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -621,7 +621,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -638,7 +638,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -655,7 +655,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -672,7 +672,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -689,7 +689,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -706,7 +706,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -723,7 +723,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -740,7 +740,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -757,7 +757,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -774,7 +774,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -791,7 +791,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -808,7 +808,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -825,7 +825,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -842,7 +842,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -859,7 +859,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -876,7 +876,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -893,7 +893,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -910,7 +910,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -927,7 +927,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -944,7 +944,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -961,7 +961,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -978,7 +978,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -995,7 +995,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1012,7 +1012,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1029,7 +1029,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1046,7 +1046,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1063,7 +1063,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1080,7 +1080,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1097,7 +1097,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the scrollbar
@@ -1115,7 +1115,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the scrollbar
@@ -1133,7 +1133,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1150,7 +1150,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1167,7 +1167,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1184,7 +1184,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1201,7 +1201,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1218,7 +1218,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1235,7 +1235,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1252,7 +1252,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1269,7 +1269,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the slider
@@ -1287,7 +1287,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the slider
@@ -1305,7 +1305,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1322,7 +1322,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1339,7 +1339,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1356,7 +1356,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1373,7 +1373,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1390,7 +1390,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1407,7 +1407,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1424,7 +1424,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1441,7 +1441,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1458,7 +1458,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1475,7 +1475,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1492,7 +1492,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1509,7 +1509,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1526,7 +1526,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param index the index of the tab to paint
@@ -1544,7 +1544,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param index the index of the tab to paint
@@ -1562,7 +1562,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1579,7 +1579,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1596,7 +1596,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1613,7 +1613,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1630,7 +1630,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1647,7 +1647,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1664,7 +1664,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1681,7 +1681,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1698,7 +1698,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1715,7 +1715,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1732,7 +1732,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1749,7 +1749,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1766,7 +1766,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1783,7 +1783,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1800,7 +1800,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1817,7 +1817,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1834,7 +1834,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1851,7 +1851,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1868,7 +1868,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1885,7 +1885,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1902,7 +1902,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1919,7 +1919,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1936,7 +1936,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1953,7 +1953,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1970,7 +1970,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1987,7 +1987,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
diff --git a/javax/swing/table/AbstractTableModel.java b/javax/swing/table/AbstractTableModel.java
index 743e5d4dc..7e9886d30 100644
--- a/javax/swing/table/AbstractTableModel.java
+++ b/javax/swing/table/AbstractTableModel.java
@@ -48,9 +48,9 @@ import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
/**
- * A base class that can be used to create implementations of the
+ * A base class that can be used to create implementations of the
* {@link TableModel} interface.
- *
+ *
* @author Andrew Selkirk
*/
public abstract class AbstractTableModel implements TableModel, Serializable
@@ -71,10 +71,10 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Returns the name of the specified column. This method generates default
- * names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB,
+ * Returns the name of the specified column. This method generates default
+ * names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB,
* AC, ..., AZ, BA, BB, BC, and so on. Subclasses may override this method
- * to allow column names to be specified on some other basis.
+ * to allow column names to be specified on some other basis.
*
* @param columnIndex the column index.
*
@@ -98,19 +98,19 @@ public abstract class AbstractTableModel implements TableModel, Serializable
* @param columnName the name of the column (<code>null</code> not permitted).
*
* @return The index of the column, -1 if not found.
- *
+ *
* @see #getColumnName(int)
- * @throws NullPointerException if <code>columnName</code> is
+ * @throws NullPointerException if <code>columnName</code> is
* <code>null</code>.
*/
public int findColumn(String columnName)
{
int count = getColumnCount();
-
+
for (int index = 0; index < count; index++)
{
String name = getColumnName(index);
-
+
if (columnName.equals(name))
return index;
}
@@ -121,10 +121,10 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Returns the <code>Class</code> for all <code>Object</code> instances
- * in the specified column.
- *
+ * in the specified column.
+ *
* @param columnIndex the column index.
- *
+ *
* @return The class.
*/
public Class<?> getColumnClass(int columnIndex)
@@ -133,9 +133,9 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Returns <code>true</code> if the specified cell is editable, and
- * <code>false</code> if it is not. This implementation returns
- * <code>false</code> for all arguments, subclasses should override the
+ * Returns <code>true</code> if the specified cell is editable, and
+ * <code>false</code> if it is not. This implementation returns
+ * <code>false</code> for all arguments, subclasses should override the
* method if necessary.
*
* @param rowIndex the row index of the cell.
@@ -149,8 +149,8 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Sets the value of the given cell. This implementation ignores all
- * arguments and does nothing, subclasses should override the
+ * Sets the value of the given cell. This implementation ignores all
+ * arguments and does nothing, subclasses should override the
* method if necessary.
*
* @param value the new value (<code>null</code> permitted).
@@ -219,7 +219,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been inserted into the model.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -233,7 +233,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been updated.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -247,7 +247,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been deleted from the model.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -261,7 +261,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that a single cell has been updated.
- *
+ *
* @param row the row index.
* @param column the column index.
*/
@@ -272,15 +272,15 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends the specified event to all registered listeners.
- *
+ *
* @param event the event to send.
*/
public void fireTableChanged(TableModelEvent event)
{
- int index;
+ int index;
TableModelListener listener;
Object[] list = listenerList.getListenerList();
-
+
for (index = 0; index < list.length; index += 2)
{
listener = (TableModelListener) list [index + 1];
@@ -291,9 +291,9 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Returns an array of listeners of the given type that are registered with
* this model.
- *
+ *
* @param listenerType the listener class.
- *
+ *
* @return An array of listeners (possibly empty).
*/
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
diff --git a/javax/swing/table/DefaultTableCellRenderer.java b/javax/swing/table/DefaultTableCellRenderer.java
index 7fecefe0b..5d4a16024 100644
--- a/javax/swing/table/DefaultTableCellRenderer.java
+++ b/javax/swing/table/DefaultTableCellRenderer.java
@@ -131,7 +131,7 @@ public class DefaultTableCellRenderer extends JLabel
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -180,8 +180,8 @@ public class DefaultTableCellRenderer extends JLabel
// can avoid filling the background by setting the renderer opaque.
Color back = getBackground();
setOpaque(back != null && back.equals(table.getBackground()));
-
- return this;
+
+ return this;
}
/**
@@ -254,14 +254,14 @@ public class DefaultTableCellRenderer extends JLabel
* do something.</p>
*/
public void firePropertyChange(String propertyName, boolean oldValue,
- boolean newValue)
+ boolean newValue)
{
// Does nothing.
}
/**
* Sets the String for this cell.
- *
+ *
* @param value the string value for this cell; if value is null it
* sets the text value to an empty string
*/
diff --git a/javax/swing/table/DefaultTableColumnModel.java b/javax/swing/table/DefaultTableColumnModel.java
index 717ea9868..532b513a9 100644
--- a/javax/swing/table/DefaultTableColumnModel.java
+++ b/javax/swing/table/DefaultTableColumnModel.java
@@ -57,10 +57,10 @@ import javax.swing.event.TableColumnModelListener;
/**
* A model that stores information about the columns used in a {@link JTable}.
- *
+ *
* @see JTable#setColumnModel(TableColumnModel)
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class DefaultTableColumnModel
implements TableColumnModel, PropertyChangeListener, ListSelectionListener,
@@ -89,15 +89,15 @@ public class DefaultTableColumnModel
protected EventListenerList listenerList = new EventListenerList();
/**
- * A change event used when notifying listeners of a change to the
+ * A change event used when notifying listeners of a change to the
* <code>columnMargin</code> field. This single event is reused for all
- * notifications (it is lazily instantiated within the
+ * notifications (it is lazily instantiated within the
* {@link #fireColumnMarginChanged()} method).
*/
protected transient ChangeEvent changeEvent;
/**
- * A flag that indicates whether or not columns can be selected.
+ * A flag that indicates whether or not columns can be selected.
*/
protected boolean columnSelectionAllowed;
@@ -107,10 +107,10 @@ public class DefaultTableColumnModel
protected int totalColumnWidth;
/**
- * Creates a new table column model with zero columns. A default column
+ * Creates a new table column model with zero columns. A default column
* selection model is created by calling {@link #createSelectionModel()}.
* The default value for <code>columnMargin</code> is <code>1</code> and
- * the default value for <code>columnSelectionAllowed</code> is
+ * the default value for <code>columnSelectionAllowed</code> is
* <code>false</code>.
*/
public DefaultTableColumnModel()
@@ -123,17 +123,17 @@ public class DefaultTableColumnModel
}
/**
- * Adds a column to the model then calls
+ * Adds a column to the model then calls
* {@link #fireColumnAdded(TableColumnModelEvent)} to notify the registered
* listeners. The model registers itself with the column as a
* {@link PropertyChangeListener} so that changes to the column width will
* invalidate the cached {@link #totalColumnWidth} value.
*
* @param column the column (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>column</code> is
+ *
+ * @throws IllegalArgumentException if <code>column</code> is
* <code>null</code>.
- *
+ *
* @see #removeColumn(TableColumn)
*/
public void addColumn(TableColumn column)
@@ -143,18 +143,18 @@ public class DefaultTableColumnModel
tableColumns.add(column);
column.addPropertyChangeListener(this);
invalidateWidthCache();
- fireColumnAdded(new TableColumnModelEvent(this, 0,
+ fireColumnAdded(new TableColumnModelEvent(this, 0,
tableColumns.size() - 1));
}
/**
* Removes a column from the model then calls
* {@link #fireColumnRemoved(TableColumnModelEvent)} to notify the registered
- * listeners. If the specified column does not belong to the model, or is
+ * listeners. If the specified column does not belong to the model, or is
* <code>null</code>, this method does nothing.
*
* @param column the column to be removed (<code>null</code> permitted).
- *
+ *
* @see #addColumn(TableColumn)
*/
public void removeColumn(TableColumn column)
@@ -163,21 +163,21 @@ public class DefaultTableColumnModel
if (index < 0)
return;
tableColumns.remove(column);
- fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
+ fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
column.removePropertyChangeListener(this);
invalidateWidthCache();
}
/**
- * Moves the column at index i to the position specified by index j, then
+ * Moves the column at index i to the position specified by index j, then
* calls {@link #fireColumnMoved(TableColumnModelEvent)} to notify registered
* listeners.
*
* @param i index of the column that will be moved.
* @param j index of the column's new location.
- *
+ *
* @throws IllegalArgumentException if <code>i</code> or <code>j</code> are
- * outside the range <code>0</code> to <code>N-1</code>, where
+ * outside the range <code>0</code> to <code>N-1</code>, where
* <code>N</code> is the column count.
*/
public void moveColumn(int i, int j)
@@ -195,9 +195,9 @@ public class DefaultTableColumnModel
/**
* Sets the column margin then calls {@link #fireColumnMarginChanged()} to
* notify the registered listeners.
- *
+ *
* @param margin the column margin.
- *
+ *
* @see #getColumnMargin()
*/
public void setColumnMargin(int margin)
@@ -208,7 +208,7 @@ public class DefaultTableColumnModel
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
public int getColumnCount()
@@ -218,7 +218,7 @@ public class DefaultTableColumnModel
/**
* Returns an enumeration of the columns in the model.
- *
+ *
* @return An enumeration of the columns in the model.
*/
public Enumeration<TableColumn> getColumns()
@@ -230,10 +230,10 @@ public class DefaultTableColumnModel
* Returns the index of the {@link TableColumn} with the given identifier.
*
* @param identifier the identifier (<code>null</code> not permitted).
- *
+ *
* @return The index of the {@link TableColumn} with the given identifier.
- *
- * @throws IllegalArgumentException if <code>identifier</code> is
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
* <code>null</code> or there is no column with that identifier.
*/
public int getColumnIndex(Object identifier)
@@ -241,7 +241,7 @@ public class DefaultTableColumnModel
if (identifier == null)
throw new IllegalArgumentException("Null identifier.");
int columnCount = tableColumns.size();
- for (int i = 0; i < columnCount; i++)
+ for (int i = 0; i < columnCount; i++)
{
TableColumn tc = tableColumns.get(i);
if (identifier.equals(tc.getIdentifier()))
@@ -252,13 +252,13 @@ public class DefaultTableColumnModel
/**
* Returns the column at the specified index.
- *
- * @param columnIndex the column index (in the range from <code>0</code> to
- * <code>N-1</code>, where <code>N</code> is the number of columns in
+ *
+ * @param columnIndex the column index (in the range from <code>0</code> to
+ * <code>N-1</code>, where <code>N</code> is the number of columns in
* the model).
- *
+ *
* @return The column at the specified index.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if <code>i</code> is not within
* the specified range.
*/
@@ -269,9 +269,9 @@ public class DefaultTableColumnModel
/**
* Returns the column margin.
- *
+ *
* @return The column margin.
- *
+ *
* @see #setColumnMargin(int)
*/
public int getColumnMargin()
@@ -288,15 +288,15 @@ public class DefaultTableColumnModel
* <li>individual column widths are taken into account, but the column margin
* is ignored.</li>
* </ul>
- * If no column contains the specified position, this method returns
+ * If no column contains the specified position, this method returns
* <code>-1</code>.
- *
+ *
* @param x the x-position.
- *
+ *
* @return The column index, or <code>-1</code>.
*/
public int getColumnIndexAtX(int x)
- {
+ {
for (int i = 0; i < tableColumns.size(); ++i)
{
int w = (tableColumns.get(i)).getWidth();
@@ -322,21 +322,21 @@ public class DefaultTableColumnModel
}
/**
- * Sets the selection model that will be used to keep track of the selected
+ * Sets the selection model that will be used to keep track of the selected
* columns.
*
* @param model the selection model (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>model</code> is
+ *
+ * @throws IllegalArgumentException if <code>model</code> is
* <code>null</code>.
- *
+ *
* @see #getSelectionModel()
*/
public void setSelectionModel(ListSelectionModel model)
{
if (model == null)
throw new IllegalArgumentException();
-
+
selectionModel.removeListSelectionListener(this);
selectionModel = model;
selectionModel.addListSelectionListener(this);
@@ -344,9 +344,9 @@ public class DefaultTableColumnModel
/**
* Returns the selection model used to track table column selections.
- *
+ *
* @return The selection model.
- *
+ *
* @see #setSelectionModel(ListSelectionModel)
*/
public ListSelectionModel getSelectionModel()
@@ -358,7 +358,7 @@ public class DefaultTableColumnModel
* Sets the flag that indicates whether or not column selection is allowed.
*
* @param flag the new flag value.
- *
+ *
* @see #getColumnSelectionAllowed()
*/
public void setColumnSelectionAllowed(boolean flag)
@@ -367,11 +367,11 @@ public class DefaultTableColumnModel
}
/**
- * Returns <code>true</code> if column selection is allowed, and
+ * Returns <code>true</code> if column selection is allowed, and
* <code>false</code> if column selection is not allowed.
*
* @return A boolean.
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
public boolean getColumnSelectionAllowed()
@@ -386,12 +386,12 @@ public class DefaultTableColumnModel
*/
public int[] getSelectedColumns()
{
- // FIXME: Implementation of this method was taken from private method
+ // FIXME: Implementation of this method was taken from private method
// JTable.getSelections(), which is used in various places in JTable
// including selected row calculations and cannot be simply removed.
// This design should be improved to illuminate duplication of code.
-
- ListSelectionModel lsm = this.selectionModel;
+
+ ListSelectionModel lsm = this.selectionModel;
int sz = getSelectedColumnCount();
int [] ret = new int[sz];
@@ -405,16 +405,16 @@ public class DefaultTableColumnModel
{
case ListSelectionModel.SINGLE_SELECTION:
ret[0] = lo;
- break;
-
- case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
+ break;
+
+ case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
ret[j++] = i;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
ret[j++] = i;
break;
}
@@ -424,23 +424,23 @@ public class DefaultTableColumnModel
/**
* Returns the number of selected columns in the model.
- *
+ *
* @return The selected column count.
- *
+ *
* @see #getSelectionModel()
*/
public int getSelectedColumnCount()
{
- // FIXME: Implementation of this method was taken from private method
+ // FIXME: Implementation of this method was taken from private method
// JTable.countSelections(), which is used in various places in JTable
// including selected row calculations and cannot be simply removed.
// This design should be improved to illuminate duplication of code.
-
+
ListSelectionModel lsm = this.selectionModel;
int lo = lsm.getMinSelectionIndex();
int hi = lsm.getMaxSelectionIndex();
int sum = 0;
-
+
if (lo != -1 && hi != -1)
{
switch (lsm.getSelectionMode())
@@ -448,19 +448,19 @@ public class DefaultTableColumnModel
case ListSelectionModel.SINGLE_SELECTION:
sum = 1;
break;
-
+
case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
sum = hi - lo + 1;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
++sum;
break;
}
}
-
+
return sum;
}
@@ -476,7 +476,7 @@ public class DefaultTableColumnModel
}
/**
- * Deregisters a listener so that it no longer receives notification of
+ * Deregisters a listener so that it no longer receives notification of
* changes to this model.
*
* @param listener the listener to remove
@@ -489,10 +489,10 @@ public class DefaultTableColumnModel
/**
* Returns an array containing the listeners that are registered with the
* model. If there are no listeners, an empty array is returned.
- *
+ *
* @return An array containing the listeners that are registered with the
* model.
- *
+ *
* @see #addColumnModelListener(TableColumnModelListener)
* @since 1.4
*/
@@ -500,34 +500,34 @@ public class DefaultTableColumnModel
{
return (TableColumnModelListener[])
listenerList.getListeners(TableColumnModelListener.class);
- }
+ }
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column has been added to the model. The
* event's <code>toIndex</code> attribute should contain the index of the
- * added column.
- *
+ * added column.
+ *
* @param e the event.
- *
+ *
* @see #addColumn(TableColumn)
*/
protected void fireColumnAdded(TableColumnModelEvent e)
- {
+ {
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnAdded(e);
+ listeners[i].columnAdded(e);
}
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column has been removed from the model. The
* event's <code>fromIndex</code> attribute should contain the index of the
- * removed column.
- *
+ * removed column.
+ *
* @param e the event.
- *
+ *
* @see #removeColumn(TableColumn)
*/
protected void fireColumnRemoved(TableColumnModelEvent e)
@@ -535,18 +535,18 @@ public class DefaultTableColumnModel
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnRemoved(e);
+ listeners[i].columnRemoved(e);
}
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column in the model has been moved. The
* event's <code>fromIndex</code> attribute should contain the old column
* index, and the <code>toIndex</code> attribute should contain the new
- * column index.
- *
+ * column index.
+ *
* @param e the event.
- *
+ *
* @see #moveColumn(int, int)
*/
protected void fireColumnMoved(TableColumnModelEvent e)
@@ -554,7 +554,7 @@ public class DefaultTableColumnModel
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnMoved(e);
+ listeners[i].columnMoved(e);
}
/**
@@ -562,7 +562,7 @@ public class DefaultTableColumnModel
* to indicate that the column selections have changed.
*
* @param e the event.
- *
+ *
* @see #valueChanged(ListSelectionEvent)
*/
protected void fireColumnSelectionChanged(ListSelectionEvent e)
@@ -573,9 +573,9 @@ public class DefaultTableColumnModel
}
/**
- * Sends a {@link ChangeEvent} to the model's registered listeners to
- * indicate that the column margin was changed.
- *
+ * Sends a {@link ChangeEvent} to the model's registered listeners to
+ * indicate that the column margin was changed.
+ *
* @see #setColumnMargin(int)
*/
protected void fireColumnMarginChanged()
@@ -588,13 +588,13 @@ public class DefaultTableColumnModel
}
/**
- * Returns an array containing the listeners (of the specified type) that
+ * Returns an array containing the listeners (of the specified type) that
* are registered with this model.
- *
- * @param listenerType the listener type (must indicate a subclass of
+ *
+ * @param listenerType the listener type (must indicate a subclass of
* {@link EventListener}, <code>null</code> not permitted).
*
- * @return An array containing the listeners (of the specified type) that
+ * @return An array containing the listeners (of the specified type) that
* are registered with this model.
*/
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
@@ -605,23 +605,23 @@ public class DefaultTableColumnModel
/**
* Receives notification of property changes for the columns in the model.
* If the <code>width</code> property for any column changes, we invalidate
- * the {@link #totalColumnWidth} value here.
+ * the {@link #totalColumnWidth} value here.
*
* @param event the event.
*/
public void propertyChange(PropertyChangeEvent event)
{
if (event.getPropertyName().equals("width"))
- invalidateWidthCache();
+ invalidateWidthCache();
}
/**
- * Receives notification of the change to the list selection model, and
- * responds by calling
+ * Receives notification of the change to the list selection model, and
+ * responds by calling
* {@link #fireColumnSelectionChanged(ListSelectionEvent)}.
- *
+ *
* @param e the list selection event.
- *
+ *
* @see #getSelectionModel()
*/
public void valueChanged(ListSelectionEvent e)
@@ -630,21 +630,21 @@ public class DefaultTableColumnModel
}
/**
- * Creates a default selection model to track the currently selected
+ * Creates a default selection model to track the currently selected
* column(s). This method is called by the constructor and returns a new
* instance of {@link DefaultListSelectionModel}.
*
* @return A new default column selection model.
*/
protected ListSelectionModel createSelectionModel()
- {
+ {
return new DefaultListSelectionModel();
}
/**
* Recalculates the total width of the columns, if the cached value is
* <code>-1</code>. Otherwise this method does nothing.
- *
+ *
* @see #getTotalColumnWidth()
*/
protected void recalcWidthCache()
@@ -661,7 +661,7 @@ public class DefaultTableColumnModel
/**
* Sets the {@link #totalColumnWidth} field to <code>-1</code>.
- *
+ *
* @see #recalcWidthCache()
*/
private void invalidateWidthCache()
diff --git a/javax/swing/table/DefaultTableModel.java b/javax/swing/table/DefaultTableModel.java
index 1b68ce2be..e1d5e6888 100644
--- a/javax/swing/table/DefaultTableModel.java
+++ b/javax/swing/table/DefaultTableModel.java
@@ -44,10 +44,10 @@ import java.util.Vector;
import javax.swing.event.TableModelEvent;
/**
- * A two dimensional data structure used to store <code>Object</code>
+ * A two dimensional data structure used to store <code>Object</code>
* instances, usually for display in a <code>JTable</code> component.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class DefaultTableModel extends AbstractTableModel
implements Serializable
@@ -55,7 +55,7 @@ public class DefaultTableModel extends AbstractTableModel
static final long serialVersionUID = 6680042567037222321L;
/**
- * Storage for the rows in the table (each row is itself
+ * Storage for the rows in the table (each row is itself
* a <code>Vector</code>).
*/
protected Vector dataVector;
@@ -68,27 +68,27 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Creates an empty table with zero rows and zero columns.
*/
- public DefaultTableModel()
+ public DefaultTableModel()
{
this(0, 0);
}
-
+
/**
* Creates a new table with the specified number of rows and columns.
* All cells in the table are initially empty (set to <code>null</code>).
- *
+ *
* @param numRows the number of rows.
* @param numColumns the number of columns.
*/
- public DefaultTableModel(int numRows, int numColumns)
+ public DefaultTableModel(int numRows, int numColumns)
{
Vector defaultNames = new Vector(numColumns);
Vector data = new Vector(numRows);
- for (int i = 0; i < numColumns; i++)
+ for (int i = 0; i < numColumns; i++)
{
defaultNames.add(super.getColumnName(i));
- }
- for (int r = 0; r < numRows; r++)
+ }
+ for (int r = 0; r < numRows; r++)
{
Vector tmp = new Vector(numColumns);
tmp.setSize(numColumns);
@@ -96,16 +96,16 @@ public class DefaultTableModel extends AbstractTableModel
}
setDataVector(data, defaultNames);
}
-
+
/**
* Creates a new table with the specified column names and number of
* rows. The number of columns is determined by the number of column
* names supplied.
- *
+ *
* @param columnNames the column names.
* @param numRows the number of rows.
*/
- public DefaultTableModel(Vector columnNames, int numRows)
+ public DefaultTableModel(Vector columnNames, int numRows)
{
if (numRows < 0)
throw new IllegalArgumentException("numRows < 0");
@@ -114,8 +114,8 @@ public class DefaultTableModel extends AbstractTableModel
if (columnNames != null)
numColumns = columnNames.size();
-
- while (0 < numRows--)
+
+ while (0 < numRows--)
{
Vector rowData = new Vector();
rowData.setSize(numColumns);
@@ -126,43 +126,43 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Creates a new table with the specified column names and row count.
- *
+ *
* @param columnNames the column names.
* @param numRows the number of rows.
*/
- public DefaultTableModel(Object[] columnNames, int numRows)
+ public DefaultTableModel(Object[] columnNames, int numRows)
{
this(convertToVector(columnNames), numRows);
}
-
+
/**
* Creates a new table with the specified data values and column names.
- *
+ *
* @param data the data values.
* @param columnNames the column names.
*/
- public DefaultTableModel(Vector data, Vector columnNames)
+ public DefaultTableModel(Vector data, Vector columnNames)
{
setDataVector(data, columnNames);
}
/**
* Creates a new table with the specified data values and column names.
- *
+ *
* @param data the data values.
* @param columnNames the column names.
*/
- public DefaultTableModel(Object[][] data, Object[] columnNames)
+ public DefaultTableModel(Object[][] data, Object[] columnNames)
{
this(convertToVector(data), convertToVector(columnNames));
}
/**
* Returns the vector containing the row data for the table.
- *
+ *
* @return The data vector.
*/
- public Vector getDataVector()
+ public Vector getDataVector()
{
return dataVector;
}
@@ -173,13 +173,13 @@ public class DefaultTableModel extends AbstractTableModel
* number of objects in each row does not match the number of column
* names specified, the row data is truncated or expanded (by adding
* <code>null</code> values) as required.
- *
+ *
* @param data the data for the table (a vector of row vectors).
* @param columnNames the column names.
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
*/
- public void setDataVector(Vector data, Vector columnNames)
+ public void setDataVector(Vector data, Vector columnNames)
{
if (data == null)
dataVector = new Vector();
@@ -190,87 +190,87 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Sets the data and column identifiers for the table.
- *
+ *
* @param data the data for the table.
* @param columnNames the column names.
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
*/
- public void setDataVector(Object[][] data, Object[] columnNames)
+ public void setDataVector(Object[][] data, Object[] columnNames)
{
- setDataVector(convertToVector(data),
+ setDataVector(convertToVector(data),
convertToVector(columnNames));
}
-
+
/**
* Sends the specified <code>event</code> to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void newDataAvailable(TableModelEvent event)
+ public void newDataAvailable(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sends the specified <code>event</code> to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void newRowsAdded(TableModelEvent event)
+ public void newRowsAdded(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sends the specified <code>event</code> to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void rowsRemoved(TableModelEvent event)
+ public void rowsRemoved(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sets the column identifiers, updates the data rows (truncating
- * or padding each row with <code>null</code> values) to match the
+ * or padding each row with <code>null</code> values) to match the
* number of columns, and sends a {@link TableModelEvent} to all
* registered listeners.
- *
+ *
* @param columnIdentifiers the column identifiers.
*/
- public void setColumnIdentifiers(Vector columnIdentifiers)
+ public void setColumnIdentifiers(Vector columnIdentifiers)
{
this.columnIdentifiers = columnIdentifiers;
setColumnCount(columnIdentifiers == null ? 0 : columnIdentifiers.size());
}
-
+
/**
* Sets the column identifiers, updates the data rows (truncating
- * or padding each row with <code>null</code> values) to match the
+ * or padding each row with <code>null</code> values) to match the
* number of columns, and sends a {@link TableModelEvent} to all
* registered listeners.
- *
+ *
* @param columnIdentifiers the column identifiers.
*/
- public void setColumnIdentifiers(Object[] columnIdentifiers)
+ public void setColumnIdentifiers(Object[] columnIdentifiers)
{
setColumnIdentifiers(convertToVector(columnIdentifiers));
}
/**
* This method is obsolete, use {@link #setRowCount(int)} instead.
- *
+ *
* @param numRows the number of rows.
*/
- public void setNumRows(int numRows)
+ public void setNumRows(int numRows)
{
setRowCount(numRows);
}
@@ -280,18 +280,18 @@ public class DefaultTableModel extends AbstractTableModel
* than the current number of rows in the table, rows are discarded.
* If <code>rowCount</code> is greater than the current number of rows in
* the table, new (empty) rows are added.
- *
+ *
* @param rowCount the row count.
*/
- public void setRowCount(int rowCount)
+ public void setRowCount(int rowCount)
{
int existingRowCount = dataVector.size();
- if (rowCount < existingRowCount)
+ if (rowCount < existingRowCount)
{
dataVector.setSize(rowCount);
- fireTableRowsDeleted(rowCount, existingRowCount - 1);
+ fireTableRowsDeleted(rowCount, existingRowCount - 1);
}
- else
+ else
{
int rowsToAdd = rowCount - existingRowCount;
addExtraRows(rowsToAdd, columnIdentifiers.size());
@@ -303,16 +303,16 @@ public class DefaultTableModel extends AbstractTableModel
* Sets the number of columns in the table. Existing rows are truncated
* or padded with <code>null</code> values to match the new column count.
* A {@link TableModelEvent} is sent to all registered listeners.
- *
+ *
* @param columnCount the column count.
*/
- public void setColumnCount(int columnCount)
+ public void setColumnCount(int columnCount)
{
for (int i = 0; i < dataVector.size(); ++i)
{
((Vector) dataVector.get(i)).setSize(columnCount);
}
- if (columnIdentifiers != null)
+ if (columnIdentifiers != null)
columnIdentifiers.setSize(columnCount);
fireTableStructureChanged();
}
@@ -320,24 +320,24 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a column with the specified name to the table. All cell values
* for the column are initially set to <code>null</code>.
- *
+ *
* @param columnName the column name (<code>null</code> permitted).
*/
- public void addColumn(Object columnName)
+ public void addColumn(Object columnName)
{
addColumn(columnName, (Object[]) null);
}
/**
- * Adds a column with the specified name and data values to the table.
- *
+ * Adds a column with the specified name and data values to the table.
+ *
* @param columnName the column name (<code>null</code> permitted).
* @param columnData the column data.
*/
- public void addColumn(Object columnName, Vector columnData)
+ public void addColumn(Object columnName, Vector columnData)
{
Object[] dataArray = null;
- if (columnData != null)
+ if (columnData != null)
{
int rowCount = dataVector.size();
if (columnData.size() < rowCount)
@@ -349,17 +349,17 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a column with the specified name and data values to the table.
- *
+ *
* @param columnName the column name (<code>null</code> permitted).
* @param columnData the column data.
*/
- public void addColumn(Object columnName, Object[] columnData)
+ public void addColumn(Object columnName, Object[] columnData)
{
if (columnData != null)
{
// check columnData array for cases where the number of items
// doesn't match the number of rows in the existing table
- if (columnData.length > dataVector.size())
+ if (columnData.length > dataVector.size())
{
int rowsToAdd = columnData.length - dataVector.size();
addExtraRows(rowsToAdd, columnIdentifiers.size());
@@ -382,10 +382,10 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a new row containing the specified data to the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param rowData the row data (<code>null</code> permitted).
*/
- public void addRow(Vector rowData)
+ public void addRow(Vector rowData)
{
int rowIndex = dataVector.size();
dataVector.add(rowData);
@@ -397,21 +397,21 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a new row containing the specified data to the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param rowData the row data (<code>null</code> permitted).
*/
- public void addRow(Object[] rowData)
+ public void addRow(Object[] rowData)
{
addRow(convertToVector(rowData));
}
/**
* Inserts a new row into the table.
- *
+ *
* @param row the row index.
* @param rowData the row data.
*/
- public void insertRow(int row, Vector rowData)
+ public void insertRow(int row, Vector rowData)
{
dataVector.add(row, rowData);
fireTableRowsInserted(row, row);
@@ -419,11 +419,11 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Inserts a new row into the table.
- *
+ *
* @param row the row index.
* @param rowData the row data.
*/
- public void insertRow(int row, Object[] rowData)
+ public void insertRow(int row, Object[] rowData)
{
insertRow(row, convertToVector(rowData));
}
@@ -431,21 +431,21 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Moves the rows from <code>startIndex</code> to <code>endIndex</code>
* (inclusive) to the specified row.
- *
+ *
* @param startIndex the start row.
* @param endIndex the end row.
* @param toIndex the row to move to.
*/
- public void moveRow(int startIndex, int endIndex, int toIndex)
+ public void moveRow(int startIndex, int endIndex, int toIndex)
{
Vector removed = new Vector();
for (int i = endIndex; i >= startIndex; i--)
{
removed.add(this.dataVector.remove(i));
}
- for (int i = 0; i <= endIndex - startIndex; i++)
+ for (int i = 0; i <= endIndex - startIndex; i++)
{
- dataVector.insertElementAt(removed.get(i), toIndex);
+ dataVector.insertElementAt(removed.get(i), toIndex);
}
int firstRow = Math.min(startIndex, toIndex);
int lastRow = Math.max(endIndex, toIndex + (endIndex - startIndex));
@@ -455,10 +455,10 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Removes a row from the table and sends a {@link TableModelEvent} to
* all registered listeners.
- *
+ *
* @param row the row index.
*/
- public void removeRow(int row)
+ public void removeRow(int row)
{
dataVector.remove(row);
fireTableRowsDeleted(row, row);
@@ -466,20 +466,20 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Returns the number of rows in the model.
- *
+ *
* @return The row count.
*/
- public int getRowCount()
+ public int getRowCount()
{
return dataVector.size();
}
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
- public int getColumnCount()
+ public int getColumnCount()
{
return columnIdentifiers == null ? 0 : columnIdentifiers.size();
}
@@ -489,23 +489,23 @@ public class DefaultTableModel extends AbstractTableModel
* the return value is the result of the .toString() method call on that
* identifier. If the identifier is not explicitly set, the returned value
* is calculated by {@link AbstractTableModel#getColumnName(int)}.
- *
+ *
* @param column the column index.
- *
+ *
* @return The column name.
*/
public String getColumnName(int column)
{
String result = "";
- if (columnIdentifiers == null)
+ if (columnIdentifiers == null)
result = super.getColumnName(column);
- else
+ else
{
if (column < getColumnCount())
{
checkSize();
Object id = columnIdentifiers.get(column);
- if (id != null)
+ if (id != null)
result = id.toString();
else
result = super.getColumnName(column);
@@ -520,40 +520,40 @@ public class DefaultTableModel extends AbstractTableModel
* Returns <code>true</code> if the specified cell can be modified, and
* <code>false</code> otherwise. For this implementation, the method
* always returns <code>true</code>.
- *
+ *
* @param row the row index.
* @param column the column index.
- *
+ *
* @return <code>true</code> in all cases.
*/
- public boolean isCellEditable(int row, int column)
+ public boolean isCellEditable(int row, int column)
{
return true;
}
/**
* Returns the value at the specified cell in the table.
- *
+ *
* @param row the row index.
* @param column the column index.
- *
- * @return The value (<code>Object</code>, possibly <code>null</code>) at
+ *
+ * @return The value (<code>Object</code>, possibly <code>null</code>) at
* the specified cell in the table.
*/
- public Object getValueAt(int row, int column)
+ public Object getValueAt(int row, int column)
{
return ((Vector) dataVector.get(row)).get(column);
}
/**
- * Sets the value for the specified cell in the table and sends a
+ * Sets the value for the specified cell in the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param value the value (<code>Object</code>, <code>null</code> permitted).
* @param row the row index.
* @param column the column index.
*/
- public void setValueAt(Object value, int row, int column)
+ public void setValueAt(Object value, int row, int column)
{
((Vector) dataVector.get(row)).set(column, value);
fireTableCellUpdated(row, column);
@@ -561,31 +561,31 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Converts the data array to a <code>Vector</code>.
- *
+ *
* @param data the data array (<code>null</code> permitted).
- *
- * @return A vector (or <code>null</code> if the data array
+ *
+ * @return A vector (or <code>null</code> if the data array
* is <code>null</code>).
*/
- protected static Vector convertToVector(Object[] data)
+ protected static Vector convertToVector(Object[] data)
{
if (data == null)
return null;
Vector vector = new Vector(data.length);
- for (int i = 0; i < data.length; i++)
+ for (int i = 0; i < data.length; i++)
vector.add(data[i]);
- return vector;
+ return vector;
}
-
+
/**
* Converts the data array to a <code>Vector</code> of rows.
- *
+ *
* @param data the data array (<code>null</code> permitted).
- *
- * @return A vector (or <code>null</code> if the data array
+ *
+ * @return A vector (or <code>null</code> if the data array
* is <code>null</code>.
*/
- protected static Vector convertToVector(Object[][] data)
+ protected static Vector convertToVector(Object[][] data)
{
if (data == null)
return null;
@@ -603,12 +603,12 @@ public class DefaultTableModel extends AbstractTableModel
*/
private void addExtraRows(int rowsToAdd, int nbColumns)
{
- for (int i = 0; i < rowsToAdd; i++)
+ for (int i = 0; i < rowsToAdd; i++)
{
Vector tmp = new Vector();
tmp.setSize(columnIdentifiers.size());
dataVector.add(tmp);
- }
+ }
}
/**
@@ -621,10 +621,10 @@ public class DefaultTableModel extends AbstractTableModel
{
int columnCount = getColumnCount();
int rowCount = getRowCount();
-
+
if (columnCount > columnIdentifiers.size())
columnIdentifiers.setSize(columnCount);
-
+
if (dataVector != null && rowCount > dataVector.size())
{
int rowsToAdd = rowCount - dataVector.size();
diff --git a/javax/swing/table/JTableHeader.java b/javax/swing/table/JTableHeader.java
index 4661748d0..4eb91156b 100644
--- a/javax/swing/table/JTableHeader.java
+++ b/javax/swing/table/JTableHeader.java
@@ -81,23 +81,23 @@ public class JTableHeader extends JComponent
protected class AccessibleJTableHeaderEntry extends AccessibleContext
implements Accessible, AccessibleComponent
{
-
+
private int columnIndex;
-
+
private JTableHeader parent;
-
+
private JTable table;
-
+
public AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
{
columnIndex = c;
parent = p;
table = t;
}
-
+
/**
* Returns the column header renderer.
- *
+ *
* @return The column header renderer.
*/
Component getColumnHeaderRenderer()
@@ -106,14 +106,14 @@ public class JTableHeader extends JComponent
TableCellRenderer r = tc.getHeaderRenderer();
if (r == null)
r = parent.getDefaultRenderer();
- return r.getTableCellRendererComponent(table, tc.headerValue,
+ return r.getTableCellRendererComponent(table, tc.headerValue,
false, false, -1, columnIndex);
}
-
+
/**
- * Returns the accessible context for the column header renderer, or
+ * Returns the accessible context for the column header renderer, or
* <code>null</code>.
- *
+ *
* @return The accessible context.
*/
AccessibleContext getAccessibleColumnHeaderRenderer()
@@ -123,7 +123,7 @@ public class JTableHeader extends JComponent
return c.getAccessibleContext();
return null;
}
-
+
/**
* @see #removeFocusListener(FocusListener)
*/
@@ -134,7 +134,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.addFocusListener(l);
}
-
+
/**
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
@@ -146,26 +146,26 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.addPropertyChangeListener(l);
}
-
+
public boolean contains(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
AccessibleComponent c = ac.getAccessibleComponent();
if (c != null)
return c.contains(p);
- else
+ else
return false;
}
-
+
public AccessibleAction getAccessibleAction()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleAction)
return (AccessibleAction) ac;
- else
+ else
return null;
}
-
+
public Accessible getAccessibleAt(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -175,53 +175,53 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
/**
* Returns <code>null</code> as the header entry has no accessible
* children.
- *
+ *
* @return <code>null</code>.
*/
public Accessible getAccessibleChild(int i)
{
return null;
}
-
+
/**
* Returns the number of accessible children, zero in this case.
- *
+ *
* @return 0
*/
public int getAccessibleChildrenCount()
{
return 0;
}
-
+
/**
* Returns the accessible component for this header entry.
- *
+ *
* @return <code>this</code>.
*/
public AccessibleComponent getAccessibleComponent()
{
return this;
}
-
+
/**
* Returns the accessible context for this header entry.
- *
+ *
* @return <code>this</code>.
*/
public AccessibleContext getAccessibleContext()
{
return this;
}
-
+
/**
* Returns the accessible description.
- *
+ *
* @return The accessible description.
- *
+ *
* @see #setAccessibleDescription(String)
*/
public String getAccessibleDescription()
@@ -231,22 +231,22 @@ public class JTableHeader extends JComponent
return ac.getAccessibleDescription();
return accessibleDescription;
}
-
+
/**
* Returns the index of this header entry.
- *
+ *
* @return The index of this header entry.
*/
public int getAccessibleIndexInParent()
{
return columnIndex;
}
-
+
/**
* Returns the accessible name.
- *
+ *
* @return The accessible name.
- *
+ *
* @see #setAccessibleName(String)
*/
public String getAccessibleName()
@@ -256,10 +256,10 @@ public class JTableHeader extends JComponent
return ac.getAccessibleName();
return accessibleName;
}
-
+
/**
* Returns the accessible role for the header entry.
- *
+ *
* @return The accessible role.
*/
public AccessibleRole getAccessibleRole()
@@ -270,43 +270,43 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public AccessibleSelection getAccessibleSelection()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleValue)
return (AccessibleSelection) ac;
- else
+ else
return null;
}
-
+
public AccessibleStateSet getAccessibleStateSet()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac != null)
return ac.getAccessibleStateSet();
- else
+ else
return null;
}
-
+
public AccessibleText getAccessibleText()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac != null)
return ac.getAccessibleText();
- else
+ else
return null;
}
-
+
public AccessibleValue getAccessibleValue()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleValue)
return (AccessibleValue) ac;
- else
+ else
return null;
}
-
+
public Color getBackground()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -316,7 +316,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Rectangle getBounds()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -326,7 +326,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Cursor getCursor()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -336,7 +336,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Font getFont()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -346,7 +346,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public FontMetrics getFontMetrics(Font f)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -356,7 +356,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Color getForeground()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -366,7 +366,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Locale getLocale()
{
Component c = getColumnHeaderRenderer();
@@ -374,7 +374,7 @@ public class JTableHeader extends JComponent
return c.getLocale();
return null;
}
-
+
public Point getLocation()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -384,7 +384,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Point getLocationOnScreen()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -394,7 +394,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Dimension getSize()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -404,7 +404,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public boolean isEnabled()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -414,7 +414,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isFocusTraversable()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -424,7 +424,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isShowing()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -434,7 +434,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isVisible()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -444,7 +444,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
/**
* @see #addFocusListener(FocusListener)
*/
@@ -455,7 +455,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.removeFocusListener(l);
}
-
+
/**
* @see #addPropertyChangeListener(PropertyChangeListener)
*/
@@ -465,7 +465,7 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.removePropertyChangeListener(l);
}
-
+
/**
* @see #addFocusListener(FocusListener)
*/
@@ -476,7 +476,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.requestFocus();
}
-
+
/**
* @see #getAccessibleDescription()
*/
@@ -488,7 +488,7 @@ public class JTableHeader extends JComponent
else
accessibleDescription = s;
}
-
+
/**
* @see #getAccessibleName()
*/
@@ -498,7 +498,7 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.setAccessibleName(s);
}
-
+
public void setBackground(Color c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -506,7 +506,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setBackground(c);
}
-
+
public void setBounds(Rectangle r)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -514,7 +514,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setBounds(r);
}
-
+
public void setCursor(Cursor c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -522,7 +522,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setCursor(c);
}
-
+
public void setEnabled(boolean b)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -530,7 +530,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setEnabled(b);
}
-
+
public void setFont(Font f)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -538,7 +538,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setFont(f);
}
-
+
public void setForeground(Color c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -546,7 +546,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setForeground(c);
}
-
+
public void setLocation(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -554,7 +554,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setLocation(p);
}
-
+
public void setSize(Dimension d)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -562,7 +562,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setSize(d);
}
-
+
public void setVisible(boolean b)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -571,28 +571,28 @@ public class JTableHeader extends JComponent
comp.setVisible(b);
}
}
-
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.PANEL;
}
-
+
public int getAccessibleChildrenCount()
{
return table.getColumnCount();
}
-
+
public Accessible getAccessibleChild(int i)
{
return new AccessibleJTableHeaderEntry(i, JTableHeader.this, table);
}
-
+
public Accessible getAccessibleAt(Point p)
{
return getAccessibleChild(columnAtPoint(p));
}
}
-
+
/**
* Use serialVersionUid for interoperability.
*/
@@ -643,7 +643,7 @@ public class JTableHeader extends JComponent
*/
protected boolean updateTableInRealTime;
- TableCellRenderer cellRenderer;
+ TableCellRenderer cellRenderer;
/**
* Creates a new default instance.
@@ -655,21 +655,21 @@ public class JTableHeader extends JComponent
/**
* Creates a new header. If <code>cm</code> is <code>null</code>, a new
- * table column model is created by calling
+ * table column model is created by calling
* {@link #createDefaultColumnModel()}.
- *
+ *
* @param cm the table column model (<code>null</code> permitted).
*/
public JTableHeader(TableColumnModel cm)
{
- columnModel = cm == null ? createDefaultColumnModel() : cm;
+ columnModel = cm == null ? createDefaultColumnModel() : cm;
initializeLocalVars();
updateUI();
}
/**
* Creates a default table column model.
- *
+ *
* @return A default table column model.
*/
protected TableColumnModel createDefaultColumnModel()
@@ -724,7 +724,7 @@ public class JTableHeader extends JComponent
* disabled with {@link #setReorderingAllowed(boolean)}.
*
* @return true if reordering is allowed, false otherwise.
- */
+ */
public boolean getReorderingAllowed()
{
return reorderingAllowed;
@@ -736,7 +736,7 @@ public class JTableHeader extends JComponent
* by default, but can be disabled with {@link #setResizingAllowed(boolean)}.
*
* @return true if resizing is allowed, false otherwise.
- */
+ */
public boolean getResizingAllowed()
{
return resizingAllowed;
@@ -787,7 +787,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #columnModel} property.
*
* @param c The new value of the property
- */
+ */
public void setColumnModel(TableColumnModel c)
{
columnModel.removeColumnModelListener(this);
@@ -797,11 +797,11 @@ public class JTableHeader extends JComponent
/**
* Set the column that is currently being dragged. This is used when
- * dragging the column with mouse. Setting to null will stop the
+ * dragging the column with mouse. Setting to null will stop the
* dragging session immediately.
*
* @param draggingIt the column being currently dragged, null if none.
- */
+ */
public void setDraggedColumn(TableColumn draggingIt)
{
draggedColumn = draggingIt;
@@ -811,7 +811,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #draggedDistance} property.
*
* @param d The new value of the property
- */
+ */
public void setDraggedDistance(int d)
{
draggedDistance = d;
@@ -821,7 +821,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #opaque} property.
*
* @param o The new value of the property
- */
+ */
public void setOpaque(boolean o)
{
opaque = o;
@@ -833,7 +833,7 @@ public class JTableHeader extends JComponent
* disabled with this method.
*
* @param allowed true if reordering is allowed, false otherwise.
- */
+ */
public void setReorderingAllowed(boolean allowed)
{
reorderingAllowed = allowed;
@@ -845,7 +845,7 @@ public class JTableHeader extends JComponent
* by default, but can be disabled using this method.
*
* @param allowed true if resizing is allowed, false otherwise.
- */
+ */
public void setResizingAllowed(boolean allowed)
{
resizingAllowed = allowed;
@@ -857,7 +857,7 @@ public class JTableHeader extends JComponent
* the resizing session immediately.
*
* @param resizingIt the column being currently resized
- */
+ */
public void setResizingColumn(TableColumn resizingIt)
{
resizingColumn = resizingIt;
@@ -867,7 +867,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #table} property.
*
* @param t The new value of the property
- */
+ */
public void setTable(JTable t)
{
table = t;
@@ -877,7 +877,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #updateTableInRealTime} property.
*
* @param u The new value of the property
- */
+ */
public void setUpdateTableInRealTime(boolean u)
{
updateTableInRealTime = u;
@@ -885,17 +885,17 @@ public class JTableHeader extends JComponent
/**
* Creates a default renderer.
- *
+ *
* @return A default renderer.
*/
protected TableCellRenderer createDefaultRenderer()
{
return new DefaultTableCellRenderer();
}
-
+
/**
* Returns the default table cell renderer.
- *
+ *
* @return The default table cell renderer.
*/
public TableCellRenderer getDefaultRenderer()
@@ -905,19 +905,19 @@ public class JTableHeader extends JComponent
/**
* Sets the default table cell renderer.
- *
+ *
* @param cellRenderer the renderer.
*/
public void setDefaultRenderer(TableCellRenderer cellRenderer)
{
this.cellRenderer = cellRenderer;
}
-
+
/**
* Get the rectangle, occupied by the header of the given column.
- *
+ *
* @param column the column, for that the header area is requested.
- *
+ *
* @return the column header area.
*/
public Rectangle getHeaderRect(int column)
@@ -956,16 +956,16 @@ public class JTableHeader extends JComponent
/**
* Returns the index of the column at the specified point.
- *
+ *
* @param point the point.
- *
+ *
* @return The column index, or -1.
*/
public int columnAtPoint(Point point)
{
if (getBounds().contains(point))
return columnModel.getColumnIndexAtX(point.x);
-
+
return -1;
}
diff --git a/javax/swing/table/TableCellEditor.java b/javax/swing/table/TableCellEditor.java
index 15070a755..933eb9ed7 100644
--- a/javax/swing/table/TableCellEditor.java
+++ b/javax/swing/table/TableCellEditor.java
@@ -47,7 +47,7 @@ import javax.swing.JTable;
* TableCellEditor public interface
* @author Andrew Selkirk
*/
-public interface TableCellEditor extends CellEditor
+public interface TableCellEditor extends CellEditor
{
/**
@@ -59,7 +59,7 @@ public interface TableCellEditor extends CellEditor
* @param column Column of cell
* @return Component
*/
- Component getTableCellEditorComponent(JTable table, Object value,
+ Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column);
}
diff --git a/javax/swing/table/TableCellRenderer.java b/javax/swing/table/TableCellRenderer.java
index 6c1fecf56..da7296de8 100644
--- a/javax/swing/table/TableCellRenderer.java
+++ b/javax/swing/table/TableCellRenderer.java
@@ -46,7 +46,7 @@ import javax.swing.JTable;
* TableCellRenderer public interface
* @author Andrew Selkirk
*/
-public interface TableCellRenderer
+public interface TableCellRenderer
{
/**
@@ -59,7 +59,7 @@ public interface TableCellRenderer
* @param column Column of cell
* @return Component
*/
- Component getTableCellRendererComponent(JTable table, Object value,
+ Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column);
diff --git a/javax/swing/table/TableColumn.java b/javax/swing/table/TableColumn.java
index fbb877d97..8db4bf6d0 100644
--- a/javax/swing/table/TableColumn.java
+++ b/javax/swing/table/TableColumn.java
@@ -49,8 +49,8 @@ import javax.swing.event.SwingPropertyChangeSupport;
/**
* Represents the attributes of a column in a table, including the column index,
* width, minimum width, preferred width and maximum width.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class TableColumn
implements Serializable
@@ -59,7 +59,7 @@ public class TableColumn
/**
* The name for the <code>columnWidth</code> property (this field is
- * obsolete and no longer used). Note also that the typo in the value
+ * obsolete and no longer used). Note also that the typo in the value
* string is deliberate, to match the specification.
*/
public static final String COLUMN_WIDTH_PROPERTY = "columWidth";
@@ -158,9 +158,9 @@ public class TableColumn
}
/**
- * Creates a new <code>TableColumn</code> that maps to the specified column
+ * Creates a new <code>TableColumn</code> that maps to the specified column
* in the related table model. The default width is <code>75</code> units.
- *
+ *
* @param modelIndex the index of the column in the model
*/
public TableColumn(int modelIndex)
@@ -169,9 +169,9 @@ public class TableColumn
}
/**
- * Creates a new <code>TableColumn</code> that maps to the specified column
+ * Creates a new <code>TableColumn</code> that maps to the specified column
* in the related table model, and has the specified <code>width</code>.
- *
+ *
* @param modelIndex the index of the column in the model
* @param width the width
*/
@@ -181,10 +181,10 @@ public class TableColumn
}
/**
- * Creates a new <code>TableColumn</code> that maps to the specified column
+ * Creates a new <code>TableColumn</code> that maps to the specified column
* in the related table model, and has the specified <code>width</code>,
* <code>cellRenderer</code> and <code>cellEditor</code>.
- *
+ *
* @param modelIndex the index of the column in the model
* @param width the width
* @param cellRenderer the cell renderer (<code>null</code> permitted).
@@ -206,9 +206,9 @@ public class TableColumn
* Sets the index of the column in the related {@link TableModel} that this
* <code>TableColumn</code> maps to, and sends a {@link PropertyChangeEvent}
* (with the property name 'modelIndex') to all registered listeners.
- *
+ *
* @param modelIndex the column index in the model.
- *
+ *
* @see #getModelIndex()
*/
public void setModelIndex(int modelIndex)
@@ -224,9 +224,9 @@ public class TableColumn
/**
* Returns the index of the column in the related {@link TableModel} that
* this <code>TableColumn</code> maps to.
- *
+ *
* @return the model index.
- *
+ *
* @see #setModelIndex(int)
*/
public int getModelIndex()
@@ -237,15 +237,15 @@ public class TableColumn
/**
* Sets the identifier for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'identifier') to all registered listeners.
- *
+ *
* @param identifier the identifier (<code>null</code> permitted).
- *
+ *
* @see #getIdentifier()
*/
public void setIdentifier(Object identifier)
{
if (this.identifier != identifier)
- {
+ {
Object oldValue = this.identifier;
this.identifier = identifier;
changeSupport.firePropertyChange("identifier", oldValue, identifier);
@@ -253,10 +253,10 @@ public class TableColumn
}
/**
- * Returns the identifier for the column, or {@link #getHeaderValue()} if the
+ * Returns the identifier for the column, or {@link #getHeaderValue()} if the
* identifier is <code>null</code>.
- *
- * @return The identifier (or {@link #getHeaderValue()} if the identifier is
+ *
+ * @return The identifier (or {@link #getHeaderValue()} if the identifier is
* <code>null</code>).
*/
public Object getIdentifier()
@@ -267,29 +267,29 @@ public class TableColumn
}
/**
- * Sets the header value and sends a {@link PropertyChangeEvent} (with the
+ * Sets the header value and sends a {@link PropertyChangeEvent} (with the
* property name {@link #HEADER_VALUE_PROPERTY}) to all registered listeners.
- *
+ *
* @param headerValue the value of the header (<code>null</code> permitted).
- *
+ *
* @see #getHeaderValue()
*/
public void setHeaderValue(Object headerValue)
{
if (this.headerValue == headerValue)
return;
-
+
Object oldValue = this.headerValue;
this.headerValue = headerValue;
- changeSupport.firePropertyChange(HEADER_VALUE_PROPERTY, oldValue,
+ changeSupport.firePropertyChange(HEADER_VALUE_PROPERTY, oldValue,
headerValue);
}
/**
* Returns the header value.
- *
+ *
* @return the value of the header.
- *
+ *
* @see #getHeaderValue()
*/
public Object getHeaderValue()
@@ -298,30 +298,30 @@ public class TableColumn
}
/**
- * Sets the renderer for the column header and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the renderer for the column header and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #HEADER_RENDERER_PROPERTY}) to all registered listeners.
- *
+ *
* @param renderer the header renderer (<code>null</code> permitted).
- *
+ *
* @see #getHeaderRenderer()
*/
public void setHeaderRenderer(TableCellRenderer renderer)
{
if (headerRenderer == renderer)
return;
-
+
TableCellRenderer oldRenderer = headerRenderer;
headerRenderer = renderer;
- changeSupport.firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer,
+ changeSupport.firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer,
headerRenderer);
}
/**
* Returns the renderer for the column header.
- *
+ *
* @return The renderer for the column header (possibly <code>null</code>).
- *
+ *
* @see #setHeaderRenderer(TableCellRenderer)
*/
public TableCellRenderer getHeaderRenderer()
@@ -330,30 +330,30 @@ public class TableColumn
}
/**
- * Sets the renderer for cells in this column and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the renderer for cells in this column and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #CELL_RENDERER_PROPERTY}) to all registered listeners.
- *
+ *
* @param renderer the cell renderer (<code>null</code> permitted).
- *
+ *
* @see #getCellRenderer()
*/
public void setCellRenderer(TableCellRenderer renderer)
{
if (cellRenderer == renderer)
return;
-
+
TableCellRenderer oldRenderer = cellRenderer;
cellRenderer = renderer;
- changeSupport.firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer,
+ changeSupport.firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer,
cellRenderer);
}
/**
* Returns the renderer for the table cells in this column.
- *
+ *
* @return The cell renderer (possibly <code>null</code>).
- *
+ *
* @see #setCellRenderer(TableCellRenderer)
*/
public TableCellRenderer getCellRenderer()
@@ -364,9 +364,9 @@ public class TableColumn
/**
* Sets the cell editor for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'cellEditor') to all registered listeners.
- *
+ *
* @param cellEditor the cell editor (<code>null</code> permitted).
- *
+ *
* @see #getCellEditor()
*/
public void setCellEditor(TableCellEditor cellEditor)
@@ -380,11 +380,11 @@ public class TableColumn
}
/**
- * Returns the cell editor for the column (the default value is
+ * Returns the cell editor for the column (the default value is
* <code>null</code>).
- *
+ *
* @return The cell editor (possibly <code>null</code>).
- *
+ *
* @see #setCellEditor(TableCellEditor)
*/
public TableCellEditor getCellEditor()
@@ -393,18 +393,18 @@ public class TableColumn
}
/**
- * Sets the width for the column and sends a {@link PropertyChangeEvent}
+ * Sets the width for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'width') to all registered listeners. If the new
- * width falls outside the range getMinWidth() to getMaxWidth() it is
+ * width falls outside the range getMinWidth() to getMaxWidth() it is
* adjusted to the appropriate boundary value.
- *
+ *
* @param newWidth the width.
- *
+ *
* @see #getWidth()
*/
public void setWidth(int newWidth)
{
- int oldWidth = width;
+ int oldWidth = width;
if (newWidth < minWidth)
width = minWidth;
@@ -425,7 +425,7 @@ public class TableColumn
/**
* Returns the width for the column (the default value is <code>75</code>).
- *
+ *
* @return The width.
*
* @see #setWidth(int)
@@ -436,14 +436,14 @@ public class TableColumn
}
/**
- * Sets the preferred width for the column and sends a
- * {@link PropertyChangeEvent} (with the property name 'preferredWidth') to
- * all registered listeners. If necessary, the supplied value will be
- * adjusted to fit in the range {@link #getMinWidth()} to
+ * Sets the preferred width for the column and sends a
+ * {@link PropertyChangeEvent} (with the property name 'preferredWidth') to
+ * all registered listeners. If necessary, the supplied value will be
+ * adjusted to fit in the range {@link #getMinWidth()} to
* {@link #getMaxWidth()}.
- *
+ *
* @param preferredWidth the preferred width.
- *
+ *
* @see #getPreferredWidth()
*/
public void setPreferredWidth(int preferredWidth)
@@ -457,16 +457,16 @@ public class TableColumn
else
this.preferredWidth = preferredWidth;
- changeSupport.firePropertyChange("preferredWidth", oldPrefWidth,
+ changeSupport.firePropertyChange("preferredWidth", oldPrefWidth,
this.preferredWidth);
}
/**
- * Returns the preferred width for the column (the default value is
+ * Returns the preferred width for the column (the default value is
* <code>75</code>).
- *
+ *
* @return The preferred width.
- *
+ *
* @see #setPreferredWidth(int)
*/
public int getPreferredWidth()
@@ -475,14 +475,14 @@ public class TableColumn
}
/**
- * Sets the minimum width for the column and sends a
+ * Sets the minimum width for the column and sends a
* {@link PropertyChangeEvent} (with the property name 'minWidth') to all
- * registered listeners. If the current <code>width</code> and/or
+ * registered listeners. If the current <code>width</code> and/or
* <code>preferredWidth</code> are less than the new minimum width, they are
* adjusted accordingly.
- *
+ *
* @param minWidth the minimum width (negative values are treated as 0).
- *
+ *
* @see #getMinWidth()
*/
public void setMinWidth(int minWidth)
@@ -504,9 +504,9 @@ public class TableColumn
/**
* Returns the <code>TableColumn</code>'s minimum width (the default value
* is <code>15</code>).
- *
+ *
* @return The minimum width.
- *
+ *
* @see #setMinWidth(int)
*/
public int getMinWidth()
@@ -515,14 +515,14 @@ public class TableColumn
}
/**
- * Sets the maximum width for the column and sends a
+ * Sets the maximum width for the column and sends a
* {@link PropertyChangeEvent} (with the property name 'maxWidth') to all
- * registered listeners. If the current <code>width</code> and/or
- * <code>preferredWidth</code> are greater than the new maximum width, they
+ * registered listeners. If the current <code>width</code> and/or
+ * <code>preferredWidth</code> are greater than the new maximum width, they
* are adjusted accordingly.
- *
+ *
* @param maxWidth the maximum width.
- *
+ *
* @see #getMaxWidth()
*/
public void setMaxWidth(int maxWidth)
@@ -542,9 +542,9 @@ public class TableColumn
/**
* Returns the maximum width for the column (the default value is
* {@link Integer#MAX_VALUE}).
- *
+ *
* @return The maximum width for the column.
- *
+ *
* @see #setMaxWidth(int)
*/
public int getMaxWidth()
@@ -556,10 +556,10 @@ public class TableColumn
* Sets the flag that controls whether or not the column is resizable, and
* sends a {@link PropertyChangeEvent} (with the property name 'isResizable')
* to all registered listeners.
- *
+ *
* @param isResizable <code>true</code> if this column is resizable,
* <code>false</code> otherwise.
- *
+ *
* @see #getResizable()
*/
public void setResizable(boolean isResizable)
@@ -567,17 +567,17 @@ public class TableColumn
if (this.isResizable != isResizable)
{
this.isResizable = isResizable;
- changeSupport.firePropertyChange("isResizable", !this.isResizable,
+ changeSupport.firePropertyChange("isResizable", !this.isResizable,
isResizable);
}
}
/**
* Returns the flag that controls whether or not the column is resizable.
- *
+ *
* @return <code>true</code> if this column is resizable,
* <code>false</code> otherwise.
- *
+ *
* @see #setResizable(boolean)
*/
public boolean getResizable()
@@ -594,7 +594,7 @@ public class TableColumn
{
if (headerRenderer == null)
return;
- Component c = headerRenderer.getTableCellRendererComponent(null,
+ Component c = headerRenderer.getTableCellRendererComponent(null,
getHeaderValue(), false, false, 0, 0);
Dimension min = c.getMinimumSize();
Dimension max = c.getMaximumSize();
@@ -624,27 +624,27 @@ public class TableColumn
}
/**
- * Adds a listener so that it receives {@link PropertyChangeEvent}
+ * Adds a listener so that it receives {@link PropertyChangeEvent}
* notifications from this column. The properties defined by the column are:
* <ul>
* <li><code>width</code> - see {@link #setWidth(int)};</li>
* <li><code>preferredWidth</code> - see {@link #setPreferredWidth(int)};</li>
- * <li><code>minWidth</code> - see {@link #setMinWidth(int)};</li>
+ * <li><code>minWidth</code> - see {@link #setMinWidth(int)};</li>
* <li><code>maxWidth</code> - see {@link #setMaxWidth(int)};</li>
* <li><code>modelIndex</code> - see {@link #setModelIndex(int)};</li>
* <li><code>isResizable</code> - see {@link #setResizable(boolean)};</li>
- * <li><code>cellRenderer</code> - see
+ * <li><code>cellRenderer</code> - see
* {@link #setCellRenderer(TableCellRenderer)};</li>
- * <li><code>cellEditor</code> - see
+ * <li><code>cellEditor</code> - see
* {@link #setCellEditor(TableCellEditor)};</li>
- * <li><code>headerRenderer</code> - see
+ * <li><code>headerRenderer</code> - see
* {@link #setHeaderRenderer(TableCellRenderer)};</li>
* <li><code>headerValue</code> - see {@link #setHeaderValue(Object)};</li>
* <li><code>identifier</code> - see {@link #setIdentifier(Object)}.</li>
* </ul>
- *
+ *
* @param listener the listener to add (<code>null</code> is ignored).
- *
+ *
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
public synchronized void addPropertyChangeListener(
@@ -654,11 +654,11 @@ public class TableColumn
}
/**
- * Removes a listener so that it no longer receives
- * {@link PropertyChangeEvent} notifications from this column. If
- * <code>listener</code> is not registered with the column, or is
+ * Removes a listener so that it no longer receives
+ * {@link PropertyChangeEvent} notifications from this column. If
+ * <code>listener</code> is not registered with the column, or is
* <code>null</code>, this method does nothing.
- *
+ *
* @param listener the listener to remove (<code>null</code> is ignored).
*/
public synchronized void removePropertyChangeListener(
@@ -670,9 +670,9 @@ public class TableColumn
/**
* Returns the property change listeners for this <code>TableColumn</code>.
* An empty array is returned if there are currently no listeners registered.
- *
+ *
* @return The property change listeners registered with this column.
- *
+ *
* @since 1.4
*/
public PropertyChangeListener[] getPropertyChangeListeners()
@@ -683,7 +683,7 @@ public class TableColumn
/**
* Creates and returns a default renderer for the column header (in this case,
* a new instance of {@link DefaultTableCellRenderer}).
- *
+ *
* @return A default renderer for the column header.
*/
protected TableCellRenderer createDefaultHeaderRenderer()
diff --git a/javax/swing/table/TableColumnModel.java b/javax/swing/table/TableColumnModel.java
index 7e8a70c3a..9a95f92cc 100644
--- a/javax/swing/table/TableColumnModel.java
+++ b/javax/swing/table/TableColumnModel.java
@@ -49,17 +49,17 @@ import javax.swing.event.TableColumnModelListener;
/**
* The interface used by {@link JTable} to access the columns in the table
* view.
- *
+ *
* @author Andrew Selkirk
*/
public interface TableColumnModel
{
/**
* Adds a column to the model.
- *
+ *
* @param column the new column (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>column</code> is
+ *
+ * @throws IllegalArgumentException if <code>column</code> is
* <code>null</code>.
*/
void addColumn(TableColumn column);
@@ -67,14 +67,14 @@ public interface TableColumnModel
/**
* Removes a column from the model. If <code>column</code> is not defined
* in the model, this method does nothing.
- *
+ *
* @param column TableColumn
*/
void removeColumn(TableColumn column);
/**
* Moves a column.
- *
+ *
* @param columnIndex Index of column to move
* @param newIndex New index of column
*/
@@ -83,23 +83,23 @@ public interface TableColumnModel
/**
* Sets the column margin and sends a {@link ChangeEvent} to all registered
* {@link TableColumnModelListener}s registered with the model.
- *
+ *
* @param margin the column margin.
- *
+ *
* @see #getColumnMargin()
*/
void setColumnMargin(int margin);
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
int getColumnCount();
/**
* Returns an enumeration of the columns in the model.
- *
+ *
* @return An enumeration of the columns in the model.
*/
Enumeration<TableColumn> getColumns();
@@ -108,28 +108,28 @@ public interface TableColumnModel
* Returns the index of the {@link TableColumn} with the given identifier.
*
* @param identifier the identifier (<code>null</code> not permitted).
- *
+ *
* @return The index of the {@link TableColumn} with the given identifier.
- *
- * @throws IllegalArgumentException if <code>identifier</code> is
+ *
+ * @throws IllegalArgumentException if <code>identifier</code> is
* <code>null</code> or there is no column with that identifier.
*/
int getColumnIndex(Object identifier);
/**
* Returns the <code>TableColumn</code> at the specified index.
- *
+ *
* @param columnIndex the column index.
- *
+ *
* @return The table column.
*/
TableColumn getColumn(int columnIndex);
/**
* Returns the column margin.
- *
+ *
* @return The column margin.
- *
+ *
* @see #setColumnMargin(int)
*/
int getColumnMargin();
@@ -143,11 +143,11 @@ public interface TableColumnModel
* <li>individual column widths are taken into account, but the column margin
* is ignored.</li>
* </ul>
- * If no column contains the specified position, this method returns
+ * If no column contains the specified position, this method returns
* <code>-1</code>.
- *
+ *
* @param xPosition the x-position.
- *
+ *
* @return The column index, or <code>-1</code>.
*/
int getColumnIndexAtX(int xPosition);
@@ -164,17 +164,17 @@ public interface TableColumnModel
* Sets the flag that indicates whether or not column selection is allowed.
*
* @param allowed the new flag value.
- *
+ *
* @see #getColumnSelectionAllowed()
*/
void setColumnSelectionAllowed(boolean allowed);
/**
- * Returns <code>true</code> if column selection is allowed, and
+ * Returns <code>true</code> if column selection is allowed, and
* <code>false</code> if column selection is not allowed.
*
* @return A boolean.
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
boolean getColumnSelectionAllowed();
@@ -187,29 +187,29 @@ public interface TableColumnModel
/**
* Returns the number of selected columns in the model.
- *
+ *
* @return The selected column count.
- *
+ *
* @see #getSelectionModel()
*/
int getSelectedColumnCount();
/**
- * Sets the selection model that will be used to keep track of the selected
+ * Sets the selection model that will be used to keep track of the selected
* columns.
*
* @param model the selection model (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>model</code> is
+ *
+ * @throws IllegalArgumentException if <code>model</code> is
* <code>null</code>.
*/
void setSelectionModel(ListSelectionModel model);
/**
* Returns the selection model used to track table column selections.
- *
+ *
* @return The selection model.
- *
+ *
* @see #setSelectionModel(ListSelectionModel)
*/
ListSelectionModel getSelectionModel();
@@ -223,9 +223,9 @@ public interface TableColumnModel
void addColumnModelListener(TableColumnModelListener listener);
/**
- * Deregisters a listener, so that it will no longer receive
+ * Deregisters a listener, so that it will no longer receive
* {@link TableColumnModelEvent} notifications.
- *
+ *
* @param listener the listener.
*/
void removeColumnModelListener(TableColumnModelListener listener);
diff --git a/javax/swing/table/TableModel.java b/javax/swing/table/TableModel.java
index 7629fa4e4..d8fb7131f 100644
--- a/javax/swing/table/TableModel.java
+++ b/javax/swing/table/TableModel.java
@@ -40,48 +40,48 @@ package javax.swing.table;
import javax.swing.event.TableModelListener;
/**
- * A <code>TableModel</code> is a two dimensional data structure that
+ * A <code>TableModel</code> is a two dimensional data structure that
* can store arbitrary <code>Object</code> instances, usually for the
- * purpose of display in a {@link javax.swing.JTable} component. Individual
- * objects can be accessed by specifying the row index and column index for
+ * purpose of display in a {@link javax.swing.JTable} component. Individual
+ * objects can be accessed by specifying the row index and column index for
* the object. Each column in the model has a name associated with it.
* <p>
* The {@link DefaultTableModel} class provides one implementation of
* this interface.
- *
+ *
* @author Andrew Selkirk
*/
public interface TableModel
{
/**
* Returns the number of rows in the model.
- *
+ *
* @return The row count.
*/
int getRowCount();
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count
*/
int getColumnCount();
/**
* Returns the name of a column in the model.
- *
+ *
* @param columnIndex the column index.
- *
+ *
* @return The column name.
*/
String getColumnName(int columnIndex);
/**
* Returns the <code>Class</code> for all <code>Object</code> instances
- * in the specified column.
- *
+ * in the specified column.
+ *
* @param columnIndex the column index.
- *
+ *
* @return The class.
*/
Class<?> getColumnClass(int columnIndex);
@@ -89,10 +89,10 @@ public interface TableModel
/**
* Returns <code>true</code> if the cell is editable, and <code>false</code>
* otherwise.
- *
+ *
* @param rowIndex the row index.
* @param columnIndex the column index.
- *
+ *
* @return <code>true</code> if editable, <code>false</code> otherwise.
*/
boolean isCellEditable(int rowIndex, int columnIndex);
@@ -100,17 +100,17 @@ public interface TableModel
/**
* Returns the value (<code>Object</code>) at a particular cell in the
* table.
- *
+ *
* @param rowIndex the row index.
* @param columnIndex the column index.
- *
+ *
* @return The value at the specified cell.
*/
Object getValueAt(int rowIndex, int columnIndex);
/**
- * Sets the value at a particular cell in the table.
- *
+ * Sets the value at a particular cell in the table.
+ *
* @param aValue the value (<code>null</code> permitted).
* @param rowIndex the row index.
* @param columnIndex the column index.
@@ -120,14 +120,14 @@ public interface TableModel
/**
* Adds a listener to the model. The listener will receive notification
* of updates to the model.
- *
+ *
* @param listener the listener.
*/
void addTableModelListener(TableModelListener listener);
/**
* Removes a listener from the model.
- *
+ *
* @param listener the listener.
*/
void removeTableModelListener(TableModelListener listener);
diff --git a/javax/swing/text/AbstractDocument.java b/javax/swing/text/AbstractDocument.java
index 29b20b321..25915bb5a 100644
--- a/javax/swing/text/AbstractDocument.java
+++ b/javax/swing/text/AbstractDocument.java
@@ -149,22 +149,22 @@ public abstract class AbstractDocument implements Document, Serializable
* Manages event listeners for this <code>Document</code>.
*/
protected EventListenerList listenerList = new EventListenerList();
-
+
/**
* Stores the current writer thread. Used for locking.
- */
+ */
private Thread currentWriter = null;
-
+
/**
* The number of readers. Used for locking.
*/
private int numReaders = 0;
-
+
/**
* The number of current writers. If this is > 1 then the same thread entered
* the write lock more than once.
*/
- private int numWriters = 0;
+ private int numWriters = 0;
/** An instance of a DocumentFilter.FilterBypass which allows calling
* the insert, remove and replace method without checking for an installed
@@ -234,17 +234,17 @@ public abstract class AbstractDocument implements Document, Serializable
writeUnlock();
}
}
-
+
/** Returns the DocumentFilter.FilterBypass instance for this
* document and create it if it does not exist yet.
- *
+ *
* @return This document's DocumentFilter.FilterBypass instance.
*/
private DocumentFilter.FilterBypass getBypass()
{
if (bypass == null)
bypass = new Bypass();
-
+
return bypass;
}
@@ -283,7 +283,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @see BranchElement
*/
protected Element createBranchElement(Element parent,
- AttributeSet attributes)
+ AttributeSet attributes)
{
return new BranchElement(parent, attributes);
}
@@ -303,7 +303,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @see LeafElement
*/
protected Element createLeafElement(Element parent, AttributeSet attributes,
- int start, int end)
+ int start, int end)
{
return new LeafElement(parent, attributes, start, end);
}
@@ -413,7 +413,7 @@ public abstract class AbstractDocument implements Document, Serializable
Object val = getProperty(AsyncLoadPriority);
int prio = -1;
if (val != null)
- prio = ((Integer) val).intValue();
+ prio = ((Integer) val).intValue();
return prio;
}
@@ -621,13 +621,13 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Inserts a String into this <code>Document</code> at the specified
* position and assigning the specified attributes to it.
- *
+ *
* <p>If a {@link DocumentFilter} is installed in this document, the
* corresponding method of the filter object is called.</p>
- *
+ *
* <p>The method has no effect when <code>text</code> is <code>null</code>
* or has a length of zero.</p>
- *
+ *
*
* @param offset the location at which the string should be inserted
* @param text the content to be inserted
@@ -665,7 +665,7 @@ public abstract class AbstractDocument implements Document, Serializable
return;
DefaultDocumentEvent event =
new DefaultDocumentEvent(offset, text.length(),
- DocumentEvent.EventType.INSERT);
+ DocumentEvent.EventType.INSERT);
UndoableEdit undo = content.insertString(offset, text);
if (undo != null)
@@ -1078,14 +1078,14 @@ public abstract class AbstractDocument implements Document, Serializable
// balance by using a finally block:
// readLock()
// try
- // {
- // doSomethingHere
+ // {
+ // doSomethingHere
// }
// finally
// {
// readUnlock();
// }
-
+
// All that the JDK seems to check for is that you don't call unlock
// more times than you've previously called lock, but it doesn't make
// sure that the threads calling unlock were the same ones that called lock
@@ -1096,13 +1096,13 @@ public abstract class AbstractDocument implements Document, Serializable
if (currentWriter == Thread.currentThread())
return;
- // FIXME: the reference implementation throws a
+ // FIXME: the reference implementation throws a
// javax.swing.text.StateInvariantError here
if (numReaders <= 0)
throw new IllegalStateException("document lock failure");
-
- // If currentWriter is not null, the application code probably had a
- // writeLock and then tried to obtain a readLock, in which case
+
+ // If currentWriter is not null, the application code probably had a
+ // writeLock and then tried to obtain a readLock, in which case
// numReaders wasn't incremented
numReaders--;
notify();
@@ -1110,16 +1110,16 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Removes a piece of content from this <code>Document</code>.
- *
+ *
* <p>If a {@link DocumentFilter} is installed in this document, the
* corresponding method of the filter object is called. The
* <code>DocumentFilter</code> is called even if <code>length</code>
* is zero. This is different from {@link #replace}.</p>
- *
+ *
* <p>Note: When <code>length</code> is zero or below the call is not
* forwarded to the underlying {@link AbstractDocument.Content} instance
* of this document and no exception is thrown.</p>
- *
+ *
* @param offset the start offset of the fragment to be removed
* @param length the length of the fragment to be removed
*
@@ -1159,8 +1159,8 @@ public abstract class AbstractDocument implements Document, Serializable
DefaultDocumentEvent event =
new DefaultDocumentEvent(offset, length,
DocumentEvent.EventType.REMOVE);
-
- // The order of the operations below is critical!
+
+ // The order of the operations below is critical!
removeUpdate(event);
UndoableEdit temp = content.remove(offset, length);
@@ -1172,10 +1172,10 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Replaces a piece of content in this <code>Document</code> with
* another piece of content.
- *
+ *
* <p>If a {@link DocumentFilter} is installed in this document, the
* corresponding method of the filter object is called.</p>
- *
+ *
* <p>The method has no effect if <code>length</code> is zero (and
* only zero) and, at the same time, <code>text</code> is
* <code>null</code> or has zero length.</p>
@@ -1196,7 +1196,7 @@ public abstract class AbstractDocument implements Document, Serializable
throws BadLocationException
{
// Bail out if we have a bogus replacement (Behavior observed in RI).
- if (length == 0
+ if (length == 0
&& (text == null || text.length() == 0))
return;
@@ -1222,9 +1222,9 @@ public abstract class AbstractDocument implements Document, Serializable
writeUnlock();
}
}
-
+
void replaceImpl(int offset, int length, String text,
- AttributeSet attributes)
+ AttributeSet attributes)
throws BadLocationException
{
removeImpl(offset, length);
@@ -1356,7 +1356,7 @@ public abstract class AbstractDocument implements Document, Serializable
}
/**
- * Blocks until a write lock can be obtained. Must wait if there are
+ * Blocks until a write lock can be obtained. Must wait if there are
* readers currently reading or another thread is currently writing.
*/
protected synchronized final void writeLock()
@@ -1882,7 +1882,7 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Returns the resolve parent of this element.
* This is taken from the AttributeSet, but if this is null,
- * this method instead returns the Element's parent's
+ * this method instead returns the Element's parent's
* AttributeSet
*
* @return the resolve parent of this element
@@ -1919,7 +1919,7 @@ public abstract class AbstractDocument implements Document, Serializable
* is equal to this element's <code>AttributeSet</code>,
* <code>false</code> otherwise
*/
- public boolean isEqual(AttributeSet attrs)
+ public boolean isEqual(AttributeSet attrs)
{
return attributes.isEqual(attrs);
}
@@ -2066,7 +2066,7 @@ public abstract class AbstractDocument implements Document, Serializable
+ "must not be thrown "
+ "here.");
err.initCause(ex);
- throw err;
+ throw err;
}
b.append("]\n");
}
@@ -2137,7 +2137,7 @@ public abstract class AbstractDocument implements Document, Serializable
for (int index = 0; index < numChildren; ++index)
tmp.add(children[index]);
-
+
return tmp.elements();
}
@@ -2337,11 +2337,11 @@ public abstract class AbstractDocument implements Document, Serializable
// as beginning from first element each time.
for (int index = 0; index < numChildren; ++index)
{
- Element elem = children[index];
+ Element elem = children[index];
- if ((elem.getStartOffset() <= position)
- && (position < elem.getEndOffset()))
- return elem;
+ if ((elem.getStartOffset() <= position)
+ && (position < elem.getEndOffset()))
+ return elem;
}
return null;
@@ -2359,7 +2359,7 @@ public abstract class AbstractDocument implements Document, Serializable
int delta = elements.length - length;
int copyFrom = offset + length; // From where to copy.
int copyTo = copyFrom + delta; // Where to copy to.
- int numMove = numChildren - copyFrom; // How many elements are moved.
+ int numMove = numChildren - copyFrom; // How many elements are moved.
if (numChildren + delta > children.length)
{
// Gotta grow the array.
@@ -2386,7 +2386,7 @@ public abstract class AbstractDocument implements Document, Serializable
public String toString()
{
return ("BranchElement(" + getName() + ") "
- + getStartOffset() + "," + getEndOffset() + "\n");
+ + getStartOffset() + "," + getEndOffset() + "\n");
}
}
@@ -2403,7 +2403,7 @@ public abstract class AbstractDocument implements Document, Serializable
* The threshold that indicates when we switch to using a Hashtable.
*/
private static final int THRESHOLD = 10;
-
+
/** The starting offset of the change. */
private int offset;
@@ -2417,7 +2417,7 @@ public abstract class AbstractDocument implements Document, Serializable
* Maps <code>Element</code> to their change records. This is only
* used when the changes array gets too big. We can use an
* (unsync'ed) HashMap here, since changes to this are (should) always
- * be performed inside a write lock.
+ * be performed inside a write lock.
*/
private HashMap changes;
@@ -2435,7 +2435,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @param type the type of change
*/
public DefaultDocumentEvent(int offset, int length,
- DocumentEvent.EventType type)
+ DocumentEvent.EventType type)
{
this.offset = offset;
this.length = length;
@@ -2548,7 +2548,7 @@ public abstract class AbstractDocument implements Document, Serializable
}
return change;
}
-
+
/**
* Returns a String description of the change event. This returns the
* toString method of the Vector of edits.
@@ -2558,7 +2558,7 @@ public abstract class AbstractDocument implements Document, Serializable
return edits.toString();
}
}
-
+
/**
* An implementation of {@link DocumentEvent.ElementChange} to be added
* to {@link DefaultDocumentEvent}s.
@@ -2588,7 +2588,7 @@ public abstract class AbstractDocument implements Document, Serializable
* The added elements.
*/
private Element[] added;
-
+
/**
* Creates a new <code>ElementEdit</code>.
*
@@ -2598,7 +2598,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @param added the added elements
*/
public ElementEdit(Element elem, int index,
- Element[] removed, Element[] added)
+ Element[] removed, Element[] added)
{
this.elem = elem;
this.index = index;
@@ -2811,7 +2811,7 @@ public abstract class AbstractDocument implements Document, Serializable
public String toString()
{
return ("LeafElement(" + getName() + ") "
- + getStartOffset() + "," + getEndOffset() + "\n");
+ + getStartOffset() + "," + getEndOffset() + "\n");
}
}
@@ -2900,7 +2900,7 @@ public abstract class AbstractDocument implements Document, Serializable
{
AbstractDocument.this.replaceImpl(offset, length, string, attrs);
}
-
+
}
-
+
}
diff --git a/javax/swing/text/AbstractWriter.java b/javax/swing/text/AbstractWriter.java
index 8d5a6075d..e7df26e9e 100644
--- a/javax/swing/text/AbstractWriter.java
+++ b/javax/swing/text/AbstractWriter.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -66,7 +66,7 @@ public abstract class AbstractWriter
// Number of characters we have currently written.
private int lineLength;
// True if we can apply line wrapping.
- private boolean canWrapLines; // FIXME default?
+ private boolean canWrapLines; // FIXME default?
// The number of spaces per indentation level.
private int indentSpace = 2;
// The current indentation level.
@@ -167,7 +167,7 @@ public abstract class AbstractWriter
/**
* This method must be overridden by a concrete subclass. It is
* responsible for iterating over the Elements of the Document and
- * writing them out.
+ * writing them out.
*/
protected abstract void write() throws IOException, BadLocationException;
@@ -182,9 +182,9 @@ public abstract class AbstractWriter
{
if (! elt.isLeaf())
throw new BadLocationException("Element is not a leaf",
- elt.getStartOffset());
- return document.getText(elt.getStartOffset(),
- elt.getEndOffset() - elt.getStartOffset());
+ elt.getStartOffset());
+ return document.getText(elt.getStartOffset(),
+ elt.getEndOffset() - elt.getStartOffset());
}
/**
@@ -239,37 +239,37 @@ public abstract class AbstractWriter
{
if (getCanWrapLines())
{
- // FIXME: should we be handling newlines specially here?
- for (int i = 0; i < len; )
- {
- int start_i = i;
- // Find next space.
- while (i < len && data[start + i] != ' ')
- ++i;
- if (i < len && lineLength + i - start_i >= maxLineLength)
- writeLineSeparator();
- else if (i < len)
- {
- // Write the trailing space.
- ++i;
- }
- // Write out the text.
- output(data, start + start_i, start + i - start_i);
- }
+ // FIXME: should we be handling newlines specially here?
+ for (int i = 0; i < len; )
+ {
+ int start_i = i;
+ // Find next space.
+ while (i < len && data[start + i] != ' ')
+ ++i;
+ if (i < len && lineLength + i - start_i >= maxLineLength)
+ writeLineSeparator();
+ else if (i < len)
+ {
+ // Write the trailing space.
+ ++i;
+ }
+ // Write out the text.
+ output(data, start + start_i, start + i - start_i);
+ }
}
else
{
- int saved_i = start;
- for (int i = start; i < start + len; ++i)
- {
- if (data[i] == NEWLINE)
- {
- output(data, saved_i, i - saved_i);
- writeLineSeparator();
- }
- }
- if (saved_i < start + len - 1)
- output(data, saved_i, start + len - saved_i);
+ int saved_i = start;
+ for (int i = start; i < start + len; ++i)
+ {
+ if (data[i] == NEWLINE)
+ {
+ output(data, saved_i, i - saved_i);
+ writeLineSeparator();
+ }
+ }
+ if (saved_i < start + len - 1)
+ output(data, saved_i, start + len - saved_i);
}
}
@@ -284,9 +284,9 @@ public abstract class AbstractWriter
int spaces = indentLevel * indentSpace;
if (spaces > 0)
{
- char[] v = new char[spaces];
- Arrays.fill(v, ' ');
- write(v, 0, v.length);
+ char[] v = new char[spaces];
+ Arrays.fill(v, ' ');
+ write(v, 0, v.length);
}
indented = true;
}
@@ -318,7 +318,7 @@ public abstract class AbstractWriter
int eltStart = elt.getStartOffset();
int eltEnd = elt.getEndOffset();
return ((eltStart >= startOffset && eltStart < endOffset)
- || (eltEnd >= startOffset && eltEnd < endOffset));
+ || (eltEnd >= startOffset && eltEnd < endOffset));
}
/**
@@ -472,10 +472,10 @@ public abstract class AbstractWriter
Enumeration e = attrs.getAttributeNames();
while (e.hasMoreElements())
{
- Object name = e.nextElement();
- Object val = attrs.getAttribute(name);
- write(name + "=" + val);
- writeLineSeparator();
+ Object name = e.nextElement();
+ Object val = attrs.getAttribute(name);
+ write(name + "=" + val);
+ writeLineSeparator();
}
}
}
diff --git a/javax/swing/text/AsyncBoxView.java b/javax/swing/text/AsyncBoxView.java
index 327c2b895..aca77aa3b 100644
--- a/javax/swing/text/AsyncBoxView.java
+++ b/javax/swing/text/AsyncBoxView.java
@@ -160,7 +160,7 @@ public class AsyncBoxView
*
* @param index the index of the child view
* @param a the current allocation of this view
- *
+ *
* @return the current allocation for a child view
*/
public synchronized Shape getChildAllocation(int index, Shape a)
@@ -216,7 +216,7 @@ public class AsyncBoxView
/**
* Returns the current allocation of the child view with the specified
* index. Note that this will <em>not</em> update any location information.
- *
+ *
* @param index the index of the requested child view
*
* @return the current allocation of the child view with the specified
@@ -428,7 +428,7 @@ public class AsyncBoxView
* Returns the child view for which this <code>ChildState</code> represents
* the layout state.
*
- * @return the child view for this child state object
+ * @return the child view for this child state object
*/
public View getChildView()
{
@@ -1002,7 +1002,7 @@ public class AsyncBoxView
replace(0, 0, added);
}
}
-
+
/**
* Returns the span along an axis that is taken up by the insets.
*
@@ -1355,14 +1355,14 @@ public class AsyncBoxView
return;
}
}
- int index = getViewIndexAtPosition(view.getStartOffset(),
+ int index = getViewIndexAtPosition(view.getStartOffset(),
Position.Bias.Forward);
ChildState cs = getChildState(index);
cs.preferenceChanged(width, height);
LayoutQueue q = getLayoutQueue();
q.addTask(cs);
q.addTask(flushTask);
- }
+ }
}
/**
@@ -1375,7 +1375,7 @@ public class AsyncBoxView
* @param e the document event
* @param a the current allocation of this view
*/
- protected void updateLayout(DocumentEvent.ElementChange ec,
+ protected void updateLayout(DocumentEvent.ElementChange ec,
DocumentEvent e, Shape a)
{
if (ec != null)
@@ -1385,8 +1385,8 @@ public class AsyncBoxView
locator.childChanged(cs);
}
}
-
-
+
+
/**
* Returns the <code>ChildState</code> object associated with the child view
* at the specified <code>index</code>.
@@ -1416,7 +1416,7 @@ public class AsyncBoxView
/**
* Returns the child view index of the view that represents the specified
* position in the document model.
- *
+ *
* @param pos the position in the model
* @param b the bias
*
diff --git a/javax/swing/text/AttributeSet.java b/javax/swing/text/AttributeSet.java
index 2d39881c2..a596cd4c3 100644
--- a/javax/swing/text/AttributeSet.java
+++ b/javax/swing/text/AttributeSet.java
@@ -1,4 +1,4 @@
-/* AttributeSet.java --
+/* AttributeSet.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import java.util.Enumeration;
* @author Roman Kennke (roman@kennke.org)
*/
public interface AttributeSet
-{
+{
/**
* Used as keys to identify character-run attributes.
*/
@@ -191,5 +191,5 @@ public interface AttributeSet
* are equal to the attributes in this <code>AttributeSet</code>,
* <code>false</code> otherwise
*/
- boolean isEqual(AttributeSet attr);
+ boolean isEqual(AttributeSet attr);
}
diff --git a/javax/swing/text/BoxView.java b/javax/swing/text/BoxView.java
index 0754d9b9b..325364d2b 100644
--- a/javax/swing/text/BoxView.java
+++ b/javax/swing/text/BoxView.java
@@ -155,8 +155,8 @@ public class BoxView
* automatically when any of the child view changes its preferences
* via {@link #preferenceChanged(View, boolean, boolean)}.
*
- * The layout will be updated the next time when
- * {@link #setSize(float, float)} is called, typically from within the
+ * The layout will be updated the next time when
+ * {@link #setSize(float, float)} is called, typically from within the
* {@link #paint(Graphics, Shape)} method.
*
* Valid values for the axis are {@link View#X_AXIS} and
@@ -387,7 +387,7 @@ public class BoxView
int totalDescentMin = 0;
int totalDescentPref = 0;
int totalDescentMax = 0;
-
+
int count = getViewCount();
for (int i = 0; i < count; i++)
{
@@ -578,7 +578,7 @@ public class BoxView
return res;
}
-
+
/**
* Returns <code>true</code> if the specified point lies before the
@@ -699,7 +699,7 @@ public class BoxView
* Computes the allocation for a child <code>View</code>. The parameter
* <code>a</code> stores the allocation of this <code>CompositeView</code>
* and is then adjusted to hold the allocation of the child view.
- *
+ *
* @param index
* the index of the child <code>View</code>
* @param a
@@ -957,13 +957,13 @@ public class BoxView
updateRequirements(axis);
return requirements[axis].alignment;
}
-
+
/**
* Called by a child View when its preferred span has changed.
- *
+ *
* @param width indicates that the preferred width of the child changed.
* @param height indicates that the preferred height of the child changed.
- * @param child the child View.
+ * @param child the child View.
*/
public void preferenceChanged(View child, boolean width, boolean height)
{
@@ -979,7 +979,7 @@ public class BoxView
}
super.preferenceChanged(child, width, height);
}
-
+
/**
* Maps the document model position <code>pos</code> to a Shape
* in the view coordinate space. This method overrides CompositeView's
diff --git a/javax/swing/text/Caret.java b/javax/swing/text/Caret.java
index d6411905d..06972f904 100644
--- a/javax/swing/text/Caret.java
+++ b/javax/swing/text/Caret.java
@@ -1,4 +1,4 @@
-/* Caret.java --
+/* Caret.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,7 @@ public interface Caret
* @param c the text component to install this caret to
*/
void install(JTextComponent c);
-
+
/**
* Deinstalls this <code>Caret</code> from the specified text component.
* This usually involves removing listeners from the text component.
@@ -105,7 +105,7 @@ public interface Caret
* @param rate the new blink rate to set
*/
void setBlinkRate(int rate);
-
+
/**
* Returns the current position of this <code>Caret</code> within the
* <code>Document</code>.
@@ -125,7 +125,7 @@ public interface Caret
* @see #moveDot(int)
*/
void setDot(int dot);
-
+
/**
* Moves the <code>dot</code> location without touching the
* <code>mark</code>. This is used when making a selection.
@@ -135,7 +135,7 @@ public interface Caret
* @see #setDot(int)
*/
void moveDot(int dot);
-
+
/**
* Returns the current position of the <code>mark</code>. The
* <code>mark</code> marks the location in the <code>Document</code> that
@@ -145,7 +145,7 @@ public interface Caret
* @return the current position of the mark
*/
int getMark();
-
+
/**
* Returns the current visual position of this <code>Caret</code>.
*
@@ -194,7 +194,7 @@ public interface Caret
* <code>Caret</code>, <code>false</code> hides it.
*
* @param v the visibility to set
- */
+ */
void setVisible(boolean v);
/**
@@ -203,5 +203,5 @@ public interface Caret
*
* @param g the graphics context to render to
*/
- void paint(Graphics g);
+ void paint(Graphics g);
}
diff --git a/javax/swing/text/ComponentView.java b/javax/swing/text/ComponentView.java
index 8de4de60f..3680b4245 100644
--- a/javax/swing/text/ComponentView.java
+++ b/javax/swing/text/ComponentView.java
@@ -1,4 +1,4 @@
-/* ComponentView.java --
+/* ComponentView.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -459,7 +459,7 @@ public class ComponentView extends View
}
}
}
-
+
/**
* Maps coordinates from the <code>View</code>'s space into a position
* in the document model.
diff --git a/javax/swing/text/CompositeView.java b/javax/swing/text/CompositeView.java
index 570fc955c..ae3c79d2f 100644
--- a/javax/swing/text/CompositeView.java
+++ b/javax/swing/text/CompositeView.java
@@ -309,7 +309,7 @@ public abstract class CompositeView
* listed valid values
*/
public Shape modelToView(int p1, Position.Bias b1,
- int p2, Position.Bias b2, Shape a)
+ int p2, Position.Bias b2, Shape a)
throws BadLocationException
{
// TODO: This is most likely not 100% ok, figure out what else is to
@@ -346,7 +346,7 @@ public abstract class CompositeView
* of the caret when navigating around the document with the arrow keys. This
* is a convenience method for {@link #getNextNorthSouthVisualPositionFrom}
* and {@link #getNextEastWestVisualPositionFrom}.
- *
+ *
* @param pos
* the model position to start search from
* @param b
@@ -662,7 +662,7 @@ public abstract class CompositeView
// This limitation is described as PR 27345.
int index = getViewIndex(pos, b);
View v = null;
-
+
if (index == -1)
return pos;
@@ -673,7 +673,7 @@ public abstract class CompositeView
// provided.
if (index <= 0)
return pos;
-
+
v = getView(index - 1);
break;
case SOUTH:
@@ -681,13 +681,13 @@ public abstract class CompositeView
// provided.
if (index >= getViewCount() - 1)
return pos;
-
+
v = getView(index + 1);
break;
default:
throw new IllegalArgumentException();
}
-
+
return v.getNextVisualPositionFrom(pos, b, a, direction, biasRet);
}
@@ -738,9 +738,9 @@ public abstract class CompositeView
//
// This limitation is described as PR 27346.
int index;
-
+
View v = null;
-
+
switch (direction)
{
case EAST:
@@ -749,7 +749,7 @@ public abstract class CompositeView
// provided.
if (index == -1)
return pos;
-
+
v = getView(index);
break;
case WEST:
@@ -758,13 +758,13 @@ public abstract class CompositeView
// provided.
if (index == -1)
return pos;
-
+
v = getView(index);
break;
default:
throw new IllegalArgumentException();
}
-
+
return v.getNextVisualPositionFrom(pos,
b,
a,
diff --git a/javax/swing/text/DefaultCaret.java b/javax/swing/text/DefaultCaret.java
index c4c2580c3..acfcdb368 100644
--- a/javax/swing/text/DefaultCaret.java
+++ b/javax/swing/text/DefaultCaret.java
@@ -70,15 +70,15 @@ import javax.swing.text.Position.Bias;
public class DefaultCaret extends Rectangle
implements Caret, FocusListener, MouseListener, MouseMotionListener
{
-
+
/** A text component in the current VM which currently has a
* text selection or <code>null</code>.
- */
+ */
static JTextComponent componentWithSelection;
/** An implementation of NavigationFilter.FilterBypass which delegates
- * to the corresponding methods of the <code>DefaultCaret</code>.
- *
+ * to the corresponding methods of the <code>DefaultCaret</code>.
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
class Bypass extends NavigationFilter.FilterBypass
@@ -98,9 +98,9 @@ public class DefaultCaret extends Rectangle
{
DefaultCaret.this.setDotImpl(dot);
}
-
+
}
-
+
/**
* Controls the blinking of the caret.
*
@@ -116,11 +116,11 @@ public class DefaultCaret extends Rectangle
* the caret visible one iteration longer.
*/
boolean ignoreNextEvent;
-
+
/**
* Receives notification when the blink timer fires and updates the visible
* state of the caret.
- *
+ *
* @param event the action event
*/
public void actionPerformed(ActionEvent event)
@@ -138,7 +138,7 @@ public class DefaultCaret extends Rectangle
/**
* Listens for changes in the text component's document and updates the
* caret accordingly.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class DocumentHandler implements DocumentListener
@@ -162,10 +162,10 @@ public class DefaultCaret extends Rectangle
*/
public void insertUpdate(DocumentEvent event)
{
- if (policy == ALWAYS_UPDATE ||
- (SwingUtilities.isEventDispatchThread() &&
+ if (policy == ALWAYS_UPDATE ||
+ (SwingUtilities.isEventDispatchThread() &&
policy == UPDATE_WHEN_ON_EDT))
- {
+ {
int dot = getDot();
setDot(dot + event.getLength());
}
@@ -216,14 +216,14 @@ public class DefaultCaret extends Rectangle
*/
public void propertyChange(PropertyChangeEvent e)
{
- String name = e.getPropertyName();
-
+ String name = e.getPropertyName();
+
if (name.equals("document"))
{
Document oldDoc = (Document) e.getOldValue();
if (oldDoc != null)
oldDoc.removeDocumentListener(documentListener);
-
+
Document newDoc = (Document) e.getNewValue();
if (newDoc != null)
newDoc.addDocumentListener(documentListener);
@@ -238,19 +238,19 @@ public class DefaultCaret extends Rectangle
active = (((Boolean) e.getNewValue()).booleanValue()
&& textComponent.isEditable());
}
-
+
}
-
+
}
/** The serialization UID (compatible with JDK1.5). */
private static final long serialVersionUID = 4325555698756477346L;
-
+
/**
* Indicates the Caret position should always be updated after Document
* changes even if the updates are not performed on the Event Dispatching
* thread.
- *
+ *
* @since 1.5
*/
public static final int ALWAYS_UPDATE = 2;
@@ -259,22 +259,22 @@ public class DefaultCaret extends Rectangle
* Indicates the Caret position should not be changed unless the Document
* length becomes less than the Caret position, in which case the Caret
* is moved to the end of the Document.
- *
+ *
* @since 1.5
*/
public static final int NEVER_UPDATE = 1;
-
- /**
+
+ /**
* Indicates the Caret position should be updated only if Document changes
* are made on the Event Dispatcher thread.
- *
+ *
* @since 1.5
*/
public static final int UPDATE_WHEN_ON_EDT = 0;
-
+
/** Keeps track of the current update policy **/
int policy = UPDATE_WHEN_ON_EDT;
-
+
/**
* The <code>ChangeEvent</code> that is fired by {@link #fireStateChanged()}.
*/
@@ -297,7 +297,7 @@ public class DefaultCaret extends Rectangle
/**
* The text component in which this caret is installed.
- *
+ *
* (Package private to avoid synthetic accessor method.)
*/
JTextComponent textComponent;
@@ -332,11 +332,11 @@ public class DefaultCaret extends Rectangle
* package private to avoid an accessor method.
*/
boolean visible = false;
-
+
/** Indicates whether the text component where the caret is installed is
* editable and enabled. If either of these properties is <code>false</code>
* the caret is not drawn.
- */
+ */
boolean active = true;
/**
@@ -345,7 +345,7 @@ public class DefaultCaret extends Rectangle
private Object highlightEntry;
private Timer blinkTimer;
-
+
private BlinkTimerListener blinkListener;
/**
@@ -362,10 +362,10 @@ public class DefaultCaret extends Rectangle
{
// Nothing to do here.
}
-
+
/** Returns the caret's <code>NavigationFilter.FilterBypass</code> instance
* and creates it if it does not yet exist.
- *
+ *
* @return The caret's <code>NavigationFilter.FilterBypass</code> instance.
*/
private NavigationFilter.FilterBypass getBypass()
@@ -375,17 +375,17 @@ public class DefaultCaret extends Rectangle
/**
* Sets the Caret update policy.
- *
+ *
* @param policy the new policy. Valid values are:
* ALWAYS_UPDATE: always update the Caret position, even when Document
* updates don't occur on the Event Dispatcher thread.
* NEVER_UPDATE: don't update the Caret position unless the Document
* length becomes less than the Caret position (then update the
* Caret to the end of the Document).
- * UPDATE_WHEN_ON_EDT: update the Caret position when the
- * Document updates occur on the Event Dispatcher thread. This is the
+ * UPDATE_WHEN_ON_EDT: update the Caret position when the
+ * Document updates occur on the Event Dispatcher thread. This is the
* default.
- *
+ *
* @since 1.5
* @throws IllegalArgumentException if policy is not one of the above.
*/
@@ -393,15 +393,15 @@ public class DefaultCaret extends Rectangle
{
if (policy != ALWAYS_UPDATE && policy != NEVER_UPDATE
&& policy != UPDATE_WHEN_ON_EDT)
- throw new
+ throw new
IllegalArgumentException
("policy must be ALWAYS_UPDATE, NEVER__UPDATE, or UPDATE_WHEN_ON_EDT");
this.policy = policy;
}
-
+
/**
* Gets the caret update policy.
- *
+ *
* @return the caret update policy.
* @since 1.5
*/
@@ -409,11 +409,11 @@ public class DefaultCaret extends Rectangle
{
return policy;
}
-
+
/**
* Moves the caret position when the mouse is dragged over the text
* component, modifying the selectiony.
- *
+ *
* <p>When the text component where the caret is installed is disabled,
* the selection is not change but you can still scroll the text and
* update the caret's location.</p>
@@ -462,9 +462,9 @@ public class DefaultCaret extends Rectangle
// Do not modify selection if component is disabled.
if (!textComponent.isEnabled())
return;
-
+
int count = event.getClickCount();
-
+
if (event.getButton() == MouseEvent.BUTTON1 && count >= 2)
{
int newDot = getComponent().viewToModel(event.getPoint());
@@ -480,7 +480,7 @@ public class DefaultCaret extends Rectangle
else
{
int wordStart = Utilities.getWordStart(t, newDot);
-
+
// When the mouse points at the offset of the first character
// in a word Utilities().getPreviousWord will not return that
// word but we want to select that. We have to use
@@ -495,7 +495,7 @@ public class DefaultCaret extends Rectangle
int nextWord = Utilities.getNextWord(t, newDot);
int previousWord = Utilities.getPreviousWord(t, newDot);
int previousWordEnd = Utilities.getWordEnd(t, previousWord);
-
+
// If the user clicked in the space between two words,
// then select the space.
if (newDot >= previousWordEnd && newDot <= nextWord)
@@ -517,7 +517,7 @@ public class DefaultCaret extends Rectangle
// TODO: Swallowing ok here?
}
}
-
+
}
/**
@@ -552,7 +552,7 @@ public class DefaultCaret extends Rectangle
*/
public void mousePressed(MouseEvent event)
{
-
+
// The implementation assumes that consuming the event makes the AWT event
// mechanism forget about this event instance and not transfer focus.
// By observing how the RI reacts the following behavior has been
@@ -617,14 +617,14 @@ public class DefaultCaret extends Rectangle
{
if (textComponent.isEditable())
{
- setVisible(true);
+ setVisible(true);
updateTimerStatus();
}
}
/**
* Sets the caret to <code>invisible</code>.
- *
+ *
* @param event the <code>FocusEvent</code>
*/
public void focusLost(FocusEvent event)
@@ -632,13 +632,13 @@ public class DefaultCaret extends Rectangle
if (textComponent.isEditable() && event.isTemporary() == false)
{
setVisible(false);
-
+
// Stop the blinker, if running.
if (blinkTimer != null && blinkTimer.isRunning())
blinkTimer.stop();
}
}
-
+
/**
* Install (if not present) and start the timer, if the caret must blink. The
* caret does not blink if it is invisible, or the component is disabled or
@@ -724,11 +724,11 @@ public class DefaultCaret extends Rectangle
propertyChangeListener = new PropertyChangeHandler();
textComponent.addPropertyChangeListener(propertyChangeListener);
documentListener = new DocumentHandler();
-
+
Document doc = textComponent.getDocument();
if (doc != null)
doc.addDocumentListener(documentListener);
-
+
active = textComponent.isEditable() && textComponent.isEnabled();
repaint();
@@ -769,21 +769,21 @@ public class DefaultCaret extends Rectangle
{
return mark;
}
-
+
private void clearHighlight()
{
Highlighter highlighter = textComponent.getHighlighter();
-
+
if (highlighter == null)
return;
-
+
if (selectionVisible)
{
try
{
if (highlightEntry != null)
highlighter.changeHighlight(highlightEntry, 0, 0);
-
+
// Free the global variable which stores the text component with an active
// selection.
if (componentWithSelection == textComponent)
@@ -808,22 +808,22 @@ public class DefaultCaret extends Rectangle
private void handleHighlight()
{
Highlighter highlighter = textComponent.getHighlighter();
-
+
if (highlighter == null)
return;
-
+
int p0 = Math.min(dot, mark);
int p1 = Math.max(dot, mark);
-
+
if (selectionVisible)
{
- try
- {
- if (highlightEntry == null)
- highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter());
- else
- highlighter.changeHighlight(highlightEntry, p0, p1);
-
+ try
+ {
+ if (highlightEntry == null)
+ highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter());
+ else
+ highlighter.changeHighlight(highlightEntry, p0, p1);
+
// If another component currently has a text selection clear that selection
// first.
if (componentWithSelection != null)
@@ -833,21 +833,21 @@ public class DefaultCaret extends Rectangle
c.setDot(c.getDot());
}
componentWithSelection = textComponent;
-
- }
- catch (BadLocationException e)
- {
- // This should never happen.
- throw new InternalError();
- }
+
+ }
+ catch (BadLocationException e)
+ {
+ // This should never happen.
+ throw new InternalError();
+ }
}
else
{
- if (highlightEntry != null)
- {
- highlighter.removeHighlight(highlightEntry);
- highlightEntry = null;
- }
+ if (highlightEntry != null)
+ {
+ highlighter.removeHighlight(highlightEntry);
+ highlightEntry = null;
+ }
}
}
@@ -861,7 +861,7 @@ public class DefaultCaret extends Rectangle
{
if (selectionVisible == v)
return;
-
+
selectionVisible = v;
handleHighlight();
repaint();
@@ -1049,7 +1049,7 @@ public class DefaultCaret extends Rectangle
*
* <p>If the underlying text component has a {@link NavigationFilter}
* installed the caret will call the corresponding method of that object.</p>
- *
+ *
* @param dot the location where to move the dot
*
* @see #setDot(int)
@@ -1062,7 +1062,7 @@ public class DefaultCaret extends Rectangle
else
moveDotImpl(dot);
}
-
+
void moveDotImpl(int dot)
{
if (dot >= 0)
@@ -1071,7 +1071,7 @@ public class DefaultCaret extends Rectangle
if (doc != null)
this.dot = Math.min(dot, doc.getLength());
this.dot = Math.max(this.dot, 0);
-
+
handleHighlight();
appear();
@@ -1082,10 +1082,10 @@ public class DefaultCaret extends Rectangle
* Sets the current position of this <code>Caret</code> within the
* <code>Document</code>. This also sets the <code>mark</code> to the new
* location.
- *
+ *
* <p>If the underlying text component has a {@link NavigationFilter}
* installed the caret will call the corresponding method of that object.</p>
- *
+ *
* @param dot
* the new position to be set
* @see #moveDot(int)
@@ -1098,27 +1098,27 @@ public class DefaultCaret extends Rectangle
else
setDotImpl(dot);
}
-
+
void setDotImpl(int dot)
{
if (dot >= 0)
- {
+ {
Document doc = textComponent.getDocument();
if (doc != null)
this.dot = Math.min(dot, doc.getLength());
this.dot = Math.max(this.dot, 0);
this.mark = this.dot;
-
+
clearHighlight();
-
+
appear();
}
}
-
+
/**
* Show the caret (may be hidden due blinking) and adjust the timer not to
* hide it (possibly immediately).
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
void appear()
@@ -1137,7 +1137,7 @@ public class DefaultCaret extends Rectangle
visible = true;
Rectangle area = null;
- int dot = getDot();
+ int dot = getDot();
try
{
area = getComponent().modelToView(dot);
@@ -1158,7 +1158,7 @@ public class DefaultCaret extends Rectangle
}
}
repaint();
- }
+ }
/**
* Returns <code>true</code> if this <code>Caret</code> is blinking,
@@ -1195,7 +1195,7 @@ public class DefaultCaret extends Rectangle
* <code>Caret</code>, <code>false</code> hides it.
*
* @param v the visibility to set
- */
+ */
public void setVisible(boolean v)
{
if (v != visible)
@@ -1203,17 +1203,17 @@ public class DefaultCaret extends Rectangle
visible = v;
updateTimerStatus();
Rectangle area = null;
- int dot = getDot();
+ int dot = getDot();
try
- {
+ {
area = getComponent().modelToView(dot);
}
catch (BadLocationException e)
{
- AssertionError ae;
- ae = new AssertionError("Unexpected bad caret location: " + dot);
- ae.initCause(e);
- throw ae;
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);
@@ -1258,7 +1258,7 @@ public class DefaultCaret extends Rectangle
// Should not happen.
throw new InternalError("Caret location not within document range.");
}
-
+
repaint();
}
@@ -1283,5 +1283,5 @@ public class DefaultCaret extends Rectangle
blinkTimer = new Timer(getBlinkRate(), blinkListener);
blinkTimer.setRepeats(true);
}
-
+
}
diff --git a/javax/swing/text/DefaultEditorKit.java b/javax/swing/text/DefaultEditorKit.java
index 0d999a380..b3b7e6077 100644
--- a/javax/swing/text/DefaultEditorKit.java
+++ b/javax/swing/text/DefaultEditorKit.java
@@ -79,11 +79,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getPreviousWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -109,11 +109,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getNextWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -132,17 +132,17 @@ public class DefaultEditorKit extends EditorKit
{
super(selectionBeginWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordStart(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -154,24 +154,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectionEndWordAction extends TextAction
{
SelectionEndWordAction()
{
super(selectionEndWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordEnd(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -183,24 +183,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class BeginWordAction extends TextAction
{
BeginWordAction()
{
super(beginWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordStart(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -212,24 +212,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class EndWordAction extends TextAction
{
EndWordAction()
{
super(endWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordEnd(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -255,11 +255,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getPreviousWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -285,11 +285,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getNextWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -320,7 +320,7 @@ public class DefaultEditorKit extends EditorKit
c.setDot(0);
c.moveDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -347,7 +347,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.moveDot(0);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(0).getLocation());
}
catch(BadLocationException ble)
@@ -375,7 +375,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.moveDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -385,11 +385,11 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectionBeginLineAction
extends TextAction
{
-
+
SelectionBeginLineAction()
{
super(selectionBeginLineAction);
@@ -440,14 +440,14 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectLineAction extends TextAction
{
SelectLineAction()
{
super(selectLineAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -469,14 +469,14 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectWordAction extends TextAction
{
SelectWordAction()
{
super(selectWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -497,11 +497,11 @@ public class DefaultEditorKit extends EditorKit
else
{
// Current cursor position is not on the first character
- // in a word.
+ // in a word.
int nextWord = Utilities.getNextWord(t, dot);
int previousWord = Utilities.getPreviousWord(t, dot);
int previousWordEnd = Utilities.getWordEnd(t, previousWord);
-
+
// Cursor position is in the space between two words. In such a
// situation just select the space.
if (dot >= previousWordEnd && dot <= nextWord)
@@ -542,7 +542,7 @@ public class DefaultEditorKit extends EditorKit
{
c.moveDot(offs);
}
-
+
}
static class SelectionUpAction
@@ -614,7 +614,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class ForwardAction
@@ -629,7 +629,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class BackwardAction
@@ -644,7 +644,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class DeletePrevCharAction
@@ -664,7 +664,7 @@ public class DefaultEditorKit extends EditorKit
{
int pos = t.getSelectionStart();
int len = t.getSelectionEnd() - pos;
-
+
if (len > 0)
t.getDocument().remove(pos, len);
else if (pos > 0)
@@ -701,12 +701,12 @@ public class DefaultEditorKit extends EditorKit
{
int pos = t.getSelectionStart();
int len = t.getSelectionEnd() - pos;
-
+
if (len > 0)
t.getDocument().remove(pos, len);
else if (pos < t.getDocument().getLength())
t.getDocument().remove(pos, 1);
-
+
Caret c = t.getCaret();
c.setDot(pos);
c.setMagicCaretPosition(t.modelToView(pos).getLocation());
@@ -783,7 +783,7 @@ public class DefaultEditorKit extends EditorKit
static class BeginAction extends TextAction
{
-
+
BeginAction()
{
super(beginAction);
@@ -810,7 +810,7 @@ public class DefaultEditorKit extends EditorKit
static class EndAction extends TextAction
{
-
+
EndAction()
{
super(endAction);
@@ -825,7 +825,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.setDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -835,7 +835,7 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
/**
* Creates a beep on the PC speaker.
*
@@ -962,12 +962,12 @@ public class DefaultEditorKit extends EditorKit
* event is received and no keymap entry exists for that. The purpose
* of this action is to filter out a couple of characters. This includes
* the control characters and characters with the ALT-modifier.
- *
+ *
* If an event does not get filtered, it is inserted into the document
* of the text component. If there is some text selected in the text
* component, this text will be replaced.
*/
- public static class DefaultKeyTypedAction
+ public static class DefaultKeyTypedAction
extends TextAction
{
@@ -1008,7 +1008,7 @@ public class DefaultEditorKit extends EditorKit
}
}
}
- }
+ }
}
/**
@@ -1481,9 +1481,9 @@ public class DefaultEditorKit extends EditorKit
* The <code>Action</code>s that are supported by the
* <code>DefaultEditorKit</code>.
*/
- private static Action[] defaultActions =
+ private static Action[] defaultActions =
new Action[] {
- // These classes are public because they are so in the RI.
+ // These classes are public because they are so in the RI.
new BeepAction(),
new CopyAction(),
new CutAction(),
@@ -1492,29 +1492,29 @@ public class DefaultEditorKit extends EditorKit
new InsertContentAction(),
new InsertTabAction(),
new PasteAction(),
-
+
// These are (package-)private inner classes.
new DeleteNextCharAction(),
new DeletePrevCharAction(),
new BeginLineAction(),
new SelectionBeginLineAction(),
-
+
new EndLineAction(),
new SelectionEndLineAction(),
-
+
new BackwardAction(),
new SelectionBackwardAction(),
new ForwardAction(),
new SelectionForwardAction(),
-
+
new UpAction(),
new SelectionUpAction(),
new DownAction(),
new SelectionDownAction(),
-
+
new NextWordAction(),
new SelectionNextWordAction(),
@@ -1523,16 +1523,16 @@ public class DefaultEditorKit extends EditorKit
new BeginAction(),
new SelectionBeginAction(),
-
+
new EndAction(),
new SelectionEndAction(),
-
+
new BeginWordAction(),
new SelectionBeginWordAction(),
-
+
new EndWordAction(),
new SelectionEndWordAction(),
-
+
new SelectAllAction(),
new SelectLineAction(),
new SelectWordAction()
@@ -1640,12 +1640,12 @@ public class DefaultEditorKit extends EditorKit
while ((line = reader.readLine()) != null)
{
- content.append(line);
- content.append("\n");
+ content.append(line);
+ content.append("\n");
}
-
+
document.insertString(offset, content.substring(0, content.length() - 1),
- SimpleAttributeSet.EMPTY);
+ SimpleAttributeSet.EMPTY);
}
/**
@@ -1680,7 +1680,7 @@ public class DefaultEditorKit extends EditorKit
* @param offset the beginning offset from where to write
* @param len the length of the fragment to write
*
- * @throws BadLocationException if <code>offset</code> is an
+ * @throws BadLocationException if <code>offset</code> is an
* invalid location inside <code>document</code>.
* @throws IOException if something goes wrong while writing to
* <code>out</code>
diff --git a/javax/swing/text/DefaultFormatter.java b/javax/swing/text/DefaultFormatter.java
index bf7c02a00..cd9829d11 100644
--- a/javax/swing/text/DefaultFormatter.java
+++ b/javax/swing/text/DefaultFormatter.java
@@ -54,7 +54,7 @@ import javax.swing.JFormattedTextField;
* a value, the value class must provide a single argument constructor that
* takes a String object as argument value. If no such constructor is found,
* the String itself is passed back by #stringToValue.
- *
+ *
* @author Roman Kennke (roman@kennke.org)
*/
public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
@@ -89,7 +89,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
checkValidInput();
commitIfAllowed();
}
-
+
/**
* Invoked when text is inserted into a text component.
*
@@ -115,7 +115,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
/**
* Invoked when text is replaced in a text component.
- *
+ *
* @param bypass the FilterBypass to use to mutate the document
* @param offset the start position of the modification
* @param length the length of the removed text
@@ -176,9 +176,9 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
{
// if that happens, something serious must be wrong
AssertionError ae;
- ae = new AssertionError("values must be parseable");
- ae.initCause(pe);
- throw ae;
+ ae = new AssertionError("values must be parseable");
+ ae.initCause(pe);
+ throw ae;
}
}
}
@@ -238,7 +238,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
* one of the mentioned methods in order to customize behaviour.
*
* @param ftf the {@link JFormattedTextField} in which this formatter
- * is installed
+ * is installed
*/
public void install(JFormattedTextField ftf)
{
@@ -287,7 +287,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
/**
* Sets the value of the <code>overwriteMode</code> property.
- *
+ *
* If that is set to <code>true</code> then newly inserted characters
* overwrite existing values, otherwise the characters are inserted like
* normal. The default is <code>true</code>.
diff --git a/javax/swing/text/DefaultFormatterFactory.java b/javax/swing/text/DefaultFormatterFactory.java
index 84a1676d2..a6a9defaf 100644
--- a/javax/swing/text/DefaultFormatterFactory.java
+++ b/javax/swing/text/DefaultFormatterFactory.java
@@ -45,19 +45,19 @@ import javax.swing.JFormattedTextField.AbstractFormatter;
import javax.swing.JFormattedTextField.AbstractFormatterFactory;
/**
- * This class is Swing's only concrete implementation of
+ * This class is Swing's only concrete implementation of
* JFormattedTextField.AbstractFormatterFactory. It holds several
- * formatters and determines the best one to be used based on the
+ * formatters and determines the best one to be used based on the
* passed-in value from the text field.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
* @since 1.4
*/
public class DefaultFormatterFactory extends AbstractFormatterFactory implements
Serializable
{
- /**
- * The default formatter.
+ /**
+ * The default formatter.
**/
AbstractFormatter defaultFormatter;
@@ -69,14 +69,14 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
AbstractFormatter editFormatter;
/**
- * The formatter to use when the JFormattedTextField doesn't havefocus and
- * either the value isn't null or the value is null but no
+ * The formatter to use when the JFormattedTextField doesn't havefocus and
+ * either the value isn't null or the value is null but no
* <code>nullFormatter</code> has been specified.
*/
AbstractFormatter displayFormatter;
/**
- * The formatter to use when the value of the JFormattedTextField is null.
+ * The formatter to use when the value of the JFormattedTextField is null.
*/
AbstractFormatter nullFormatter;
@@ -102,7 +102,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no <code>nullFormatter</code> has been specified.
*/
@@ -117,7 +117,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no <code>nullFormatter</code> has been specified.
* @param editFormat the formatter to use if the JFormattedTextField has
@@ -137,13 +137,13 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no <code>nullFormatter</code> has been specified.
* @param editFormat the formatter to use if the JFormattedTextField has
* focus and either the value is not null or the value is null but not
* <code>nullFormatter</code> has been specified.
- * @param nullFormat the formatter to use when the value of the
+ * @param nullFormat the formatter to use when the value of the
* JFormattedTextField is null.
*/
public DefaultFormatterFactory(AbstractFormatter defaultFormat,
@@ -158,9 +158,9 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Returns the formatted to be used if no other appropriate non-null
+ * Returns the formatted to be used if no other appropriate non-null
* formatter can be found.
- * @return the formatted to be used if no other appropriate non-null
+ * @return the formatted to be used if no other appropriate non-null
* formatter can be found.
*/
public AbstractFormatter getDefaultFormatter()
@@ -169,7 +169,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Sets the formatted to be used if no other appropriate non-null formatter
+ * Sets the formatted to be used if no other appropriate non-null formatter
* can be found.
* @param defaultFormatter the formatted to be used if no other appropriate
* non-null formatter can be found.
@@ -180,13 +180,13 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Gets the <code>displayFormatter</code>. This is the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no <code>nullFormatter<code> has been
+ * Gets the <code>displayFormatter</code>. This is the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no <code>nullFormatter<code> has been
* specified.
- * @return the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no <code>nullFormatter<code> has been
+ * @return the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no <code>nullFormatter<code> has been
* specified.
*/
public AbstractFormatter getDisplayFormatter()
@@ -195,9 +195,9 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Sets the <code>displayFormatter</code>. This is the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no <code>nullFormatter<code> has been
+ * Sets the <code>displayFormatter</code>. This is the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no <code>nullFormatter<code> has been
* specified.
* @param displayFormatter the formatter to use.
*/
@@ -208,10 +208,10 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
/**
* Gets the <code>editFormatter</code>. This is the formatter to use if the
- * JFormattedTextField is being edited and either the value is not null or
+ * JFormattedTextField is being edited and either the value is not null or
* the value is null and no <code>nullFormatter<code> has been specified.
* @return the formatter to use if the JFormattedTextField is being edited
- * and the value is not null or the value is null but no nullFormatted has
+ * and the value is not null or the value is null but no nullFormatted has
* been specified.
*/
public AbstractFormatter getEditFormatter()
@@ -221,7 +221,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
/**
* Sets the <code>editFormatter</code>. This is the formatter to use if the
- * JFormattedTextField is being edited and either the value is not null or
+ * JFormattedTextField is being edited and either the value is not null or
* the value is null and no <code>nullFormatter<code> has been specified.
* @param editFormatter the formatter to use.
*/
@@ -250,11 +250,11 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Returns the appropriate formatter based on the state of
+ * Returns the appropriate formatter based on the state of
* <code>tf</code>. If <code>tf<code> is null we return null, otherwise
* we return one of the following:
- * 1. Returns <code>nullFormatter</code> if <code>tf.getValue()</code> is
- * null and <code>nullFormatter</code> is not.
+ * 1. Returns <code>nullFormatter</code> if <code>tf.getValue()</code> is
+ * null and <code>nullFormatter</code> is not.
* 2. Returns <code>editFormatter</code> if <code>tf.hasFocus()</code> is
* true and <code>editFormatter</code> is not null.
* 3. Returns <code>displayFormatter</code> if <code>tf.hasFocus()</code> is
@@ -265,7 +265,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
{
if (tf == null)
return null;
-
+
if (tf.getValue() == null && nullFormatter != null)
return nullFormatter;
diff --git a/javax/swing/text/DefaultHighlighter.java b/javax/swing/text/DefaultHighlighter.java
index 69563e473..a4264d31a 100644
--- a/javax/swing/text/DefaultHighlighter.java
+++ b/javax/swing/text/DefaultHighlighter.java
@@ -51,7 +51,7 @@ import javax.swing.plaf.TextUI;
/**
* The default highlight for Swing text components. It highlights text
- * by filling the background with a rectangle.
+ * by filling the background with a rectangle.
*/
public class DefaultHighlighter extends LayeredHighlighter
{
@@ -59,7 +59,7 @@ public class DefaultHighlighter extends LayeredHighlighter
extends LayerPainter
{
private Color color;
-
+
public DefaultHighlightPainter(Color c)
{
super();
@@ -72,11 +72,11 @@ public class DefaultHighlighter extends LayeredHighlighter
}
public void paint(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent t)
+ JTextComponent t)
{
if (p0 == p1)
return;
-
+
Rectangle rect = bounds.getBounds();
Color col = getColor();
@@ -85,13 +85,13 @@ public class DefaultHighlighter extends LayeredHighlighter
g.setColor(col);
TextUI ui = t.getUI();
-
+
try
{
Rectangle l0 = ui.modelToView(t, p0, null);
Rectangle l1 = ui.modelToView(t, p1, null);
-
+
// Note: The computed locations may lie outside of the allocation
// area if the text is scrolled.
@@ -101,8 +101,8 @@ public class DefaultHighlighter extends LayeredHighlighter
// Paint only inside the allocation area.
SwingUtilities.computeIntersection(rect.x, rect.y, rect.width,
- rect.height, l1);
-
+ rect.height, l1);
+
g.fillRect(l1.x, l1.y, l1.width, l1.height);
}
else
@@ -115,62 +115,62 @@ public class DefaultHighlighter extends LayeredHighlighter
// 3. The final line is painted from the left border to the
// position of p1.
- int firstLineWidth = rect.x + rect.width - l0.x;
- g.fillRect(l0.x, l0.y, firstLineWidth, l0.height);
- if (l0.y + l0.height != l1.y)
- {
- g.fillRect(rect.x, l0.y + l0.height, rect.width,
- l1.y - l0.y - l0.height);
- }
- g.fillRect(rect.x, l1.y, l1.x - rect.x, l1.height);
- }
+ int firstLineWidth = rect.x + rect.width - l0.x;
+ g.fillRect(l0.x, l0.y, firstLineWidth, l0.height);
+ if (l0.y + l0.height != l1.y)
+ {
+ g.fillRect(rect.x, l0.y + l0.height, rect.width,
+ l1.y - l0.y - l0.height);
+ }
+ g.fillRect(rect.x, l1.y, l1.x - rect.x, l1.height);
+ }
}
catch (BadLocationException ex)
{
- // Can't render. Comment out for debugging.
- // ex.printStackTrace();
+ // Can't render. Comment out for debugging.
+ // ex.printStackTrace();
}
}
public Shape paintLayer(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent c, View view)
+ JTextComponent c, View view)
{
Color col = getColor();
if (col == null)
- col = c.getSelectionColor();
+ col = c.getSelectionColor();
g.setColor(col);
Rectangle rect = null;
if (p0 == view.getStartOffset() && p1 == view.getEndOffset())
- {
- // Paint complete bounds region.
+ {
+ // Paint complete bounds region.
rect = bounds instanceof Rectangle ? (Rectangle) bounds
- : bounds.getBounds();
- }
+ : bounds.getBounds();
+ }
else
- {
- // Only partly inside the view.
+ {
+ // Only partly inside the view.
try
- {
+ {
Shape s = view.modelToView(p0, Position.Bias.Forward,
- p1, Position.Bias.Backward,
- bounds);
- rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds();
- }
- catch (BadLocationException ex)
- {
- // Can't render the highlight.
- }
- }
+ p1, Position.Bias.Backward,
+ bounds);
+ rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds();
+ }
+ catch (BadLocationException ex)
+ {
+ // Can't render the highlight.
+ }
+ }
if (rect != null)
- {
+ {
g.fillRect(rect.x, rect.y, rect.width, rect.height);
- }
+ }
return rect;
}
}
-
+
private class HighlightEntry implements Highlighter.Highlight
{
Position p0;
@@ -228,28 +228,28 @@ public class DefaultHighlighter extends LayeredHighlighter
* and manages the paint rectangle.
*/
void paintLayeredHighlight(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent tc, View view)
+ JTextComponent tc, View view)
{
p0 = Math.max(getStartOffset(), p0);
p1 = Math.min(getEndOffset(), p1);
Highlighter.HighlightPainter painter = getPainter();
if (painter instanceof LayerPainter)
- {
- LayerPainter layerPainter = (LayerPainter) painter;
- Shape area = layerPainter.paintLayer(g, p0, p1, bounds, tc, view);
- Rectangle rect;
- if (area instanceof Rectangle && paintRect != null)
- rect = (Rectangle) area;
- else
- rect = area.getBounds();
-
- if (paintRect.width == 0 || paintRect.height == 0)
- paintRect = rect.getBounds();
- else
- paintRect = SwingUtilities.computeUnion(rect.x, rect.y, rect.width,
- rect.height, paintRect);
- }
+ {
+ LayerPainter layerPainter = (LayerPainter) painter;
+ Shape area = layerPainter.paintLayer(g, p0, p1, bounds, tc, view);
+ Rectangle rect;
+ if (area instanceof Rectangle && paintRect != null)
+ rect = (Rectangle) area;
+ else
+ rect = area.getBounds();
+
+ if (paintRect.width == 0 || paintRect.height == 0)
+ paintRect = rect.getBounds();
+ else
+ paintRect = SwingUtilities.computeUnion(rect.x, rect.y, rect.width,
+ rect.height, paintRect);
+ }
}
}
@@ -258,11 +258,11 @@ public class DefaultHighlighter extends LayeredHighlighter
*/
public static final LayeredHighlighter.LayerPainter DefaultPainter =
new DefaultHighlightPainter(null);
-
+
private JTextComponent textComponent;
private ArrayList highlights = new ArrayList();
private boolean drawsLayeredHighlights = true;
-
+
public DefaultHighlighter()
{
// Nothing to do here.
@@ -277,13 +277,13 @@ public class DefaultHighlighter extends LayeredHighlighter
{
drawsLayeredHighlights = newValue;
}
-
+
private void checkPositions(int p0, int p1)
throws BadLocationException
{
if (p0 < 0)
throw new BadLocationException("DefaultHighlighter", p0);
-
+
if (p1 < p0)
throw new BadLocationException("DefaultHighlighter", p1);
}
@@ -313,9 +313,9 @@ public class DefaultHighlighter extends LayeredHighlighter
else
entry = new HighlightEntry(pos0, pos1, painter);
highlights.add(entry);
-
+
textComponent.getUI().damageRange(textComponent, p0, p1);
-
+
return entry;
}
@@ -324,16 +324,16 @@ public class DefaultHighlighter extends LayeredHighlighter
HighlightEntry entry = (HighlightEntry) tag;
if (entry instanceof LayerHighlightEntry)
{
- LayerHighlightEntry lEntry = (LayerHighlightEntry) entry;
- Rectangle paintRect = lEntry.paintRect;
- textComponent.repaint(paintRect.x, paintRect.y, paintRect.width,
- paintRect.height);
+ LayerHighlightEntry lEntry = (LayerHighlightEntry) entry;
+ Rectangle paintRect = lEntry.paintRect;
+ textComponent.repaint(paintRect.x, paintRect.y, paintRect.width,
+ paintRect.height);
}
else
{
- textComponent.getUI().damageRange(textComponent,
- entry.getStartOffset(),
- entry.getEndOffset());
+ textComponent.getUI().damageRange(textComponent,
+ entry.getStartOffset(),
+ entry.getEndOffset());
}
highlights.remove(tag);
@@ -380,14 +380,14 @@ public class DefaultHighlighter extends LayeredHighlighter
TextUI ui = textComponent.getUI();
ui.damageRange(textComponent, p0, p1);
}
-
+
}
highlights.clear();
}
public Highlighter.Highlight[] getHighlights()
{
- return (Highlighter.Highlight[])
+ return (Highlighter.Highlight[])
highlights.toArray(new Highlighter.Highlight[highlights.size()]);
}
@@ -439,22 +439,22 @@ public class DefaultHighlighter extends LayeredHighlighter
{
for (Iterator i = highlights.iterator(); i.hasNext();)
{
- Object o = i.next();
- if (o instanceof LayerHighlightEntry)
- {
- LayerHighlightEntry entry = (LayerHighlightEntry) o;
- int start = entry.getStartOffset();
- int end = entry.getEndOffset();
- if ((p0 < start && p1 > start) || (p0 >= start && p0 < end))
- entry.paintLayeredHighlight(g, p0, p1, viewBounds, editor, view);
- }
+ Object o = i.next();
+ if (o instanceof LayerHighlightEntry)
+ {
+ LayerHighlightEntry entry = (LayerHighlightEntry) o;
+ int start = entry.getStartOffset();
+ int end = entry.getEndOffset();
+ if ((p0 < start && p1 > start) || (p0 >= start && p0 < end))
+ entry.paintLayeredHighlight(g, p0, p1, viewBounds, editor, view);
+ }
}
}
public void paint(Graphics g)
{
int size = highlights.size();
-
+
// Check if there are any highlights.
if (size == 0)
return;
@@ -466,11 +466,11 @@ public class DefaultHighlighter extends LayeredHighlighter
insets.top,
textComponent.getWidth() - insets.left - insets.right,
textComponent.getHeight() - insets.top - insets.bottom);
-
+
for (int index = 0; index < size; ++index)
{
- HighlightEntry entry = (HighlightEntry) highlights.get(index);
- if (! (entry instanceof LayerHighlightEntry))
+ HighlightEntry entry = (HighlightEntry) highlights.get(index);
+ if (! (entry instanceof LayerHighlightEntry))
entry.painter.paint(g, entry.getStartOffset(), entry.getEndOffset(),
bounds, textComponent);
}
diff --git a/javax/swing/text/DefaultStyledDocument.java b/javax/swing/text/DefaultStyledDocument.java
index 8c70a8a3b..9021a1990 100644
--- a/javax/swing/text/DefaultStyledDocument.java
+++ b/javax/swing/text/DefaultStyledDocument.java
@@ -62,7 +62,7 @@ import javax.swing.undo.UndoableEdit;
* single root, which has one or more {@link AbstractDocument.BranchElement}s
* as paragraph nodes and each paragraph node having one or more
* {@link AbstractDocument.LeafElement}s as content nodes.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Roman Kennke (roman@kennke.org)
*/
@@ -72,7 +72,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* An {@link UndoableEdit} that can undo attribute changes to an element.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public static class AttributeUndoableEdit extends AbstractUndoableEdit
@@ -100,7 +100,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>AttributeUndoableEdit</code>.
- *
+ *
* @param el
* the element that changes attributes
* @param newAtts
@@ -233,7 +233,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>ElementSpec</code> with no content, length or
* offset. This is most useful for start and end tags.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -248,7 +248,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Creates a new <code>ElementSpec</code> that specifies the length but
* not the offset of an element. Such <code>ElementSpec</code>s are
* processed sequentially from a known starting point.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -263,7 +263,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>ElementSpec</code> with document content.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -287,7 +287,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the type of the element.
- *
+ *
* @param type
* the type of the element to be set
*/
@@ -298,7 +298,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the type of the element.
- *
+ *
* @return the type of the element
*/
public short getType()
@@ -308,7 +308,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the direction of the element.
- *
+ *
* @param dir
* the direction of the element to be set
*/
@@ -319,7 +319,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the direction of the element.
- *
+ *
* @return the direction of the element
*/
public short getDirection()
@@ -329,7 +329,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the attributes of the element.
- *
+ *
* @return the attributes of the element
*/
public AttributeSet getAttributes()
@@ -339,7 +339,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the actual content of the element.
- *
+ *
* @return the actual content of the element
*/
public char[] getArray()
@@ -349,7 +349,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the offset of the content.
- *
+ *
* @return the offset of the content
*/
public int getOffset()
@@ -359,7 +359,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the length of the content.
- *
+ *
* @return the length of the content
*/
public int getLength()
@@ -371,7 +371,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Returns a String representation of this <code>ElementSpec</code>
* describing the type, direction and length of this
* <code>ElementSpec</code>.
- *
+ *
* @return a String representation of this <code>ElementSpec</code>
*/
public String toString()
@@ -534,7 +534,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>ElementBuffer</code> for the specified
* <code>root</code> element.
- *
+ *
* @param root
* the root element for this <code>ElementBuffer</code>
*/
@@ -545,7 +545,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the root element of this <code>ElementBuffer</code>.
- *
+ *
* @return the root element of this <code>ElementBuffer</code>
*/
public Element getRootElement()
@@ -556,7 +556,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Removes the content. This method sets some internal parameters and
* delegates the work to {@link #removeUpdate}.
- *
+ *
* @param offs
* the offset from which content is remove
* @param len
@@ -583,7 +583,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
private boolean removeElements(Element elem, int rmOffs0, int rmOffs1)
{
- boolean ret = false;
+ boolean ret = false;
if (! elem.isLeaf())
{
// Update stack for changes.
@@ -874,7 +874,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* created as necessary. This also updates the
* <code>DefaultDocumentEvent</code> to reflect the structural changes.
* The bulk work is delegated to {@link #changeUpdate()}.
- *
+ *
* @param offset
* the start index of the interval to be changed
* @param length
@@ -967,7 +967,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Inserts new <code>Element</code> in the document at the specified
* position. Most of the work is done by {@link #insertUpdate}, after some
* fields have been prepared for it.
- *
+ *
* @param offset
* the location in the document at which the content is inserted
* @param length
@@ -982,11 +982,11 @@ public class DefaultStyledDocument extends AbstractDocument implements
DefaultDocumentEvent ev)
{
if (length > 0)
- {
- prepareEdit(offset, length);
- insertUpdate(data);
- finishEdit(ev);
- }
+ {
+ prepareEdit(offset, length);
+ insertUpdate(data);
+ finishEdit(ev);
+ }
}
/**
@@ -1003,14 +1003,14 @@ public class DefaultStyledDocument extends AbstractDocument implements
this.length = length;
if (edits == null)
- edits = new ArrayList();
+ edits = new ArrayList();
else
- edits.clear();
+ edits.clear();
if (elementStack == null)
- elementStack = new Stack();
+ elementStack = new Stack();
else
- elementStack.clear();
+ elementStack.clear();
fracturedParent = null;
fracturedChild = null;
@@ -1029,7 +1029,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
// This for loop applies all the changes that were made and updates the
// DocumentEvent.
for (Iterator i = edits.iterator(); i.hasNext();)
- {
+ {
Edit edits = (Edit) i.next();
Element[] removed = new Element[edits.removed.size()];
removed = (Element[]) edits.removed.toArray(removed);
@@ -1040,14 +1040,14 @@ public class DefaultStyledDocument extends AbstractDocument implements
parent.replace(index, removed.length, added);
ElementEdit ee = new ElementEdit(parent, index, removed, added);
ev.addEdit(ee);
- }
+ }
edits.clear();
elementStack.clear();
}
/**
* Inserts new content.
- *
+ *
* @param data the element specifications for the elements to be inserted
*/
protected void insertUpdate(ElementSpec[] data)
@@ -1130,7 +1130,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
p < data.length && data[p].getType() == ElementSpec.EndTagType;
p++)
;
-
+
Edit edit = insertPath[insertPath.length - p - 1];
edit.index--;
edit.removed.add(0, edit.e.getElement(edit.index));
@@ -1162,7 +1162,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
{
if (elementStack.isEmpty())
return;
-
+
Edit edit = (Edit) elementStack.peek();
switch (spec.getType())
{
@@ -1223,7 +1223,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts the first tag into the document.
- *
+ *
* @param data -
* the data to be inserted.
*/
@@ -1301,7 +1301,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts a content element into the document structure.
- *
+ *
* @param tag -
* the element spec
*/
@@ -1342,7 +1342,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
edit.removed.add(first);
}
}
- else
+ else
{
Element leaf = createLeafElement(edit.e, tag.getAttributes(), pos,
pos + len);
@@ -1350,13 +1350,13 @@ public class DefaultStyledDocument extends AbstractDocument implements
}
pos += len;
-
+
}
/**
* This method fractures bottomost leaf in the elementStack. This
* happens when the first inserted tag is not content.
- *
+ *
* @param data
* the ElementSpecs used for the entire insertion
*/
@@ -1644,12 +1644,12 @@ public class DefaultStyledDocument extends AbstractDocument implements
ec.added.add(e);
e = createLeafElement(ec.e, child.getAttributes(),
pos, child.getEndOffset());
-
+
ec.added.add(e);
}
}
return splitEnd;
-
+
}
}
@@ -1672,7 +1672,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the name of the element. This method always returns
* &quot;section&quot;.
- *
+ *
* @return the name of the element
*/
public String getName()
@@ -1684,7 +1684,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Receives notification when any of the document's style changes and calls
* {@link DefaultStyledDocument#styleChanged(Style)}.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class StyleChangeListener implements ChangeListener
@@ -1693,7 +1693,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Receives notification when any of the document's style changes and calls
* {@link DefaultStyledDocument#styleChanged(Style)}.
- *
+ *
* @param event
* the change event
*/
@@ -1734,7 +1734,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>DefaultStyledDocument</code> that uses the specified
* {@link StyleContext}.
- *
+ *
* @param context
* the <code>StyleContext</code> to use
*/
@@ -1746,7 +1746,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new <code>DefaultStyledDocument</code> that uses the specified
* {@link StyleContext} and {@link Content} buffer.
- *
+ *
* @param content
* the <code>Content</code> buffer to use
* @param context
@@ -1790,7 +1790,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Create the default root element for this kind of <code>Document</code>.
- *
+ *
* @return the default root element for this kind of <code>Document</code>
*/
protected AbstractDocument.AbstractElement createDefaultRoot()
@@ -1814,7 +1814,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the <code>Element</code> that corresponds to the character at the
* specified position.
- *
+ *
* @param position
* the position of which we query the corresponding
* <code>Element</code>
@@ -1836,7 +1836,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a background color from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a background color
* @return the background color that correspond to the attributes
@@ -1849,7 +1849,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the default root element.
- *
+ *
* @return the default root element
*/
public Element getDefaultRootElement()
@@ -1859,7 +1859,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a font from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a font
* @return the font that correspond to the attributes
@@ -1872,7 +1872,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a foreground color from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a foreground color
* @return the foreground color that correspond to the attributes
@@ -1885,7 +1885,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the logical <code>Style</code> for the specified position.
- *
+ *
* @param position
* the position from which to query to logical style
* @return the logical <code>Style</code> for the specified position
@@ -1907,7 +1907,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* element is returned. That is the last paragraph if
* <code>position >= endIndex</code> or the first paragraph if
* <code>position < startIndex</code>.
- *
+ *
* @param position
* the position for which to query the paragraph element
* @return the paragraph element for the specified position
@@ -1925,7 +1925,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Looks up and returns a named <code>Style</code>.
- *
+ *
* @param nm
* the name of the <code>Style</code>
* @return the found <code>Style</code> of <code>null</code> if no such
@@ -1939,7 +1939,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Removes a named <code>Style</code> from the style hierarchy.
- *
+ *
* @param nm
* the name of the <code>Style</code> to be removed
*/
@@ -1952,7 +1952,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets text attributes for the fragment specified by <code>offset</code>
* and <code>length</code>.
- *
+ *
* @param offset
* the start offset of the fragment
* @param length
@@ -2015,7 +2015,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the logical style for the paragraph at the specified position.
- *
+ *
* @param position
* the position at which the logical style is added
* @param style
@@ -2056,7 +2056,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets text attributes for the paragraph at the specified fragment.
- *
+ *
* @param offset
* the beginning of the fragment
* @param length
@@ -2115,7 +2115,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Called in response to content insert actions. This is used to update the
* element structure.
- *
+ *
* @param ev
* the <code>DocumentEvent</code> describing the change
* @param attr
@@ -2310,7 +2310,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
}
if (e != null)
-
+
{
// e is now the common parent.
// Insert the end tags.
@@ -2342,7 +2342,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* A helper method to set up the ElementSpec buffer for the special case of an
* insertion occurring immediately after a newline.
- *
+ *
* @param specs
* the ElementSpec buffer to initialize.
*/
@@ -2369,7 +2369,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* forwarded to the {@link ElementBuffer} of this document. Any changes to the
* document structure are added to the specified document event and sent to
* registered listeners.
- *
+ *
* @param ev
* the document event that records the changes to the document
*/
@@ -2381,7 +2381,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns an enumeration of all style names.
- *
+ *
* @return an enumeration of all style names
*/
public Enumeration<?> getStyleNames()
@@ -2392,7 +2392,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Called when any of this document's styles changes.
- *
+ *
* @param style
* the style that changed
*/
@@ -2403,7 +2403,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts a bulk of structured content at once.
- *
+ *
* @param offset
* the offset at which the content should be inserted
* @param data
@@ -2469,7 +2469,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Initializes the <code>DefaultStyledDocument</code> with the specified
* data.
- *
+ *
* @param data
* the specification of the content with which the document is
* initialized
diff --git a/javax/swing/text/DocumentFilter.java b/javax/swing/text/DocumentFilter.java
index f86f41ca6..1f7e8a689 100644
--- a/javax/swing/text/DocumentFilter.java
+++ b/javax/swing/text/DocumentFilter.java
@@ -48,21 +48,21 @@ public class DocumentFilter
}
public abstract Document getDocument();
-
+
public abstract void insertString(int offset, String string,
- AttributeSet attr)
+ AttributeSet attr)
throws BadLocationException;
-
+
public abstract void remove(int offset, int length)
throws BadLocationException;
-
+
public abstract void replace(int offset, int length, String string,
- AttributeSet attrs)
+ AttributeSet attrs)
throws BadLocationException;
}
-
+
public void insertString(DocumentFilter.FilterBypass fb, int offset,
- String string, AttributeSet attr)
+ String string, AttributeSet attr)
throws BadLocationException
{
fb.insertString(offset, string, attr);
@@ -75,7 +75,7 @@ public class DocumentFilter
}
public void replace(DocumentFilter.FilterBypass fb, int offset, int length,
- String text, AttributeSet attr)
+ String text, AttributeSet attr)
throws BadLocationException
{
fb.replace(offset, length, text, attr);
diff --git a/javax/swing/text/EditorKit.java b/javax/swing/text/EditorKit.java
index 8719aee59..62b4a6486 100644
--- a/javax/swing/text/EditorKit.java
+++ b/javax/swing/text/EditorKit.java
@@ -51,7 +51,7 @@ import javax.swing.JEditorPane;
public abstract class EditorKit implements Cloneable, Serializable
{
private static final long serialVersionUID = -5044124649345887822L;
-
+
public EditorKit()
{
// Nothing to do here.
diff --git a/javax/swing/text/Element.java b/javax/swing/text/Element.java
index eb53ee9d3..83d883565 100644
--- a/javax/swing/text/Element.java
+++ b/javax/swing/text/Element.java
@@ -1,4 +1,4 @@
-/* Element.java --
+/* Element.java --
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/text/ElementIterator.java b/javax/swing/text/ElementIterator.java
index 112d55e96..141137e2c 100644
--- a/javax/swing/text/ElementIterator.java
+++ b/javax/swing/text/ElementIterator.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -49,7 +49,7 @@ import java.util.Stack;
public class ElementIterator implements Cloneable
{
/**
- * Uses to track the iteration on the stack.
+ * Uses to track the iteration on the stack.
*/
private class ElementRef
{
@@ -110,12 +110,12 @@ public class ElementIterator implements Cloneable
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException _)
{
- // Can't happen.
- return null;
+ // Can't happen.
+ return null;
}
}
diff --git a/javax/swing/text/EmptyAttributeSet.java b/javax/swing/text/EmptyAttributeSet.java
index 98fb8828c..92263bc1a 100644
--- a/javax/swing/text/EmptyAttributeSet.java
+++ b/javax/swing/text/EmptyAttributeSet.java
@@ -108,7 +108,7 @@ final class EmptyAttributeSet
{
throw new NoSuchElementException("No more elements");
}
-
+
};
}
diff --git a/javax/swing/text/FieldView.java b/javax/swing/text/FieldView.java
index e357a1e05..c47bef9f7 100644
--- a/javax/swing/text/FieldView.java
+++ b/javax/swing/text/FieldView.java
@@ -1,4 +1,4 @@
-/* FieldView.java --
+/* FieldView.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,36 +56,36 @@ import javax.swing.event.DocumentEvent;
public class FieldView extends PlainView
{
BoundedRangeModel horizontalVisibility;
-
+
/** Caches the preferred span of the X axis. It is invalidated by
* setting it to -1f. This is done when text in the document
* is inserted, removed or changed. The value is corrected as
- * soon as calculateHorizontalSpan() is called.
+ * soon as calculateHorizontalSpan() is called.
*/
float cachedSpan = -1f;
public FieldView(Element elem)
{
super(elem);
-
+
}
-
+
/** Checks whether the given container is a JTextField. If so
* it retrieves the textfield's horizontalVisibility instance.
- *
+ *
* <p>This method should be only called when the view's container
* is valid. Naturally that would be the setParent() method however
* that method is not overridden in the RI and that is why we chose
* paint() instead.</p>
- */
+ */
private void checkContainer()
{
Container c = getContainer();
-
+
if (c instanceof JTextField)
{
horizontalVisibility = ((JTextField) c).getHorizontalVisibility();
-
+
// Provokes a repaint when the BoundedRangeModel's values change
// (which is what the RI does).
horizontalVisibility.addChangeListener(new ChangeListener(){
@@ -98,25 +98,25 @@ public class FieldView extends PlainView
// and needs to be recalculated (e.g. a different font setting is
// not taken into account).
calculateHorizontalSpan();
-
+
// Initializes the BoundedRangeModel properly.
updateVisibility();
}
-
+
}
-
+
private void updateVisibility()
{
JTextField tf = (JTextField) getContainer();
Insets insets = tf.getInsets();
int width = tf.getWidth() - insets.left - insets.right;
-
+
horizontalVisibility.setMaximum(Math.max((int) ((cachedSpan != -1f)
? cachedSpan
: calculateHorizontalSpan()),
width));
-
+
horizontalVisibility.setExtent(width - 1);
}
@@ -140,7 +140,7 @@ public class FieldView extends PlainView
// Return null when the original allocation is null (like the RI).
if (shape == null)
return null;
-
+
Rectangle rectIn = shape.getBounds();
// vertical adjustment
int height = (int) getPreferredSpan(Y_AXIS);
@@ -177,7 +177,7 @@ public class FieldView extends PlainView
x = rectIn.x;
break;
}
-
+
return new Rectangle(x, y, width, height);
}
@@ -192,13 +192,13 @@ public class FieldView extends PlainView
if (cachedSpan != -1f)
return cachedSpan;
-
+
return calculateHorizontalSpan();
}
-
+
/** Calculates and sets the horizontal span and stores the value
* in cachedSpan.
- */
+ */
private float calculateHorizontalSpan()
{
Segment s = getLineBuffer();
@@ -209,15 +209,15 @@ public class FieldView extends PlainView
elem.getDocument().getText(elem.getStartOffset(),
elem.getEndOffset() - 1,
s);
-
+
return cachedSpan = Utilities.getTabbedTextWidth(s, getFontMetrics(), 0, this, s.offset);
}
catch (BadLocationException e)
{
- // Should never happen
- AssertionError ae = new AssertionError();
- ae.initCause(e);
- throw ae;
+ // Should never happen
+ AssertionError ae = new AssertionError();
+ ae.initCause(e);
+ throw ae;
}
}
@@ -225,21 +225,21 @@ public class FieldView extends PlainView
{
return axis == X_AXIS ? 1 : 0;
}
-
+
public Shape modelToView(int pos, Shape a, Position.Bias bias)
throws BadLocationException
{
Shape newAlloc = adjustAllocation(a);
return super.modelToView(pos, newAlloc, bias);
}
-
+
public void paint(Graphics g, Shape s)
{
if (horizontalVisibility == null)
checkContainer();
Shape newAlloc = adjustAllocation(s);
-
+
Shape clip = g.getClip();
if (clip != null)
{
@@ -262,18 +262,18 @@ public class FieldView extends PlainView
super.paint(g, newAlloc);
g.setClip(clip);
-
+
}
public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
-
+
Shape newAlloc = adjustAllocation(shape);
-
+
super.insertUpdate(ev, newAlloc, vf);
getContainer().repaint();
}
@@ -281,7 +281,7 @@ public class FieldView extends PlainView
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
@@ -293,7 +293,7 @@ public class FieldView extends PlainView
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
@@ -306,5 +306,5 @@ public class FieldView extends PlainView
{
return super.viewToModel(fx, fy, adjustAllocation(a), bias);
}
-
+
}
diff --git a/javax/swing/text/FlowView.java b/javax/swing/text/FlowView.java
index c2bed399f..a9a80833a 100644
--- a/javax/swing/text/FlowView.java
+++ b/javax/swing/text/FlowView.java
@@ -216,7 +216,7 @@ public abstract class FlowView extends BoxView
* the logical view. If the available space is exhausted,
* {@link #adjustRow(FlowView, int, int, int)} is called to fit the row into
* the available span.
- *
+ *
* @param fv the flow view for which we perform the layout
* @param rowIndex the index of the row
* @param pos the model position for the beginning of the row
@@ -616,7 +616,7 @@ public abstract class FlowView extends BoxView
{
int axis = getAxis();
int flowAxis;
-
+
if (axis == X_AXIS)
flowAxis = Y_AXIS;
else
@@ -697,7 +697,7 @@ public abstract class FlowView extends BoxView
protected void layout(int width, int height)
{
int flowAxis = getFlowAxis();
- int span;
+ int span;
if (flowAxis == X_AXIS)
span = (int) width;
else
diff --git a/javax/swing/text/GapContent.java b/javax/swing/text/GapContent.java
index 08a318d8b..2e68fb5fe 100644
--- a/javax/swing/text/GapContent.java
+++ b/javax/swing/text/GapContent.java
@@ -64,7 +64,7 @@ import javax.swing.undo.UndoableEdit;
public class GapContent
implements AbstractDocument.Content, Serializable
{
-
+
/**
* A {@link Position} implementation for <code>GapContent</code>.
*/
@@ -80,7 +80,7 @@ public class GapContent
/**
* Returns the current offset of this Position within the content.
- *
+ *
* @return the current offset of this Position within the content.
*/
public int getOffset()
@@ -94,7 +94,7 @@ public class GapContent
* the actual offset of the position. This is pulled out of the
* GapContentPosition object so that the mark and position can be handled
* independently, and most important, so that the GapContentPosition can
- * be garbage collected while we still hold a reference to the Mark object.
+ * be garbage collected while we still hold a reference to the Mark object.
*/
private class Mark
extends WeakReference
@@ -149,7 +149,7 @@ public class GapContent
/**
* Stores a reference to a mark that can be resetted to the original value
- * after a mark has been moved. This is used for undoing actions.
+ * after a mark has been moved. This is used for undoing actions.
*/
private class UndoPosRef
{
@@ -213,7 +213,7 @@ public class GapContent
throw new CannotUndoException();
}
}
-
+
public void redo () throws CannotUndoException
{
super.redo();
@@ -231,9 +231,9 @@ public class GapContent
throw new CannotRedoException();
}
}
-
+
}
-
+
private class UndoRemove extends AbstractUndoableEdit
{
public int where;
@@ -265,7 +265,7 @@ public class GapContent
throw new CannotUndoException();
}
}
-
+
public void redo () throws CannotUndoException
{
super.redo();
@@ -280,7 +280,7 @@ public class GapContent
throw new CannotRedoException();
}
}
-
+
}
/** The serialization UID (compatible with JDK1.5). */
@@ -348,7 +348,7 @@ public class GapContent
/**
* Creates a new GapContent object with a specified initial size.
- *
+ *
* @param size the initial size of the buffer
*/
public GapContent(int size)
@@ -365,9 +365,9 @@ public class GapContent
/**
* Allocates an array of the specified length that can then be used as
* buffer.
- *
+ *
* @param size the size of the array to be allocated
- *
+ *
* @return the allocated array
*/
protected Object allocateArray(int size)
@@ -377,7 +377,7 @@ public class GapContent
/**
* Returns the length of the allocated buffer array.
- *
+ *
* @return the length of the allocated buffer array
*/
protected int getArrayLength()
@@ -387,7 +387,7 @@ public class GapContent
/**
* Returns the length of the content.
- *
+ *
* @return the length of the content
*/
public int length()
@@ -397,12 +397,12 @@ public class GapContent
/**
* Inserts a string at the specified position.
- *
+ *
* @param where the position where the string is inserted
* @param str the string that is to be inserted
- *
+ *
* @return an UndoableEdit object
- *
+ *
* @throws BadLocationException if <code>where</code> is not a valid
* location in the buffer
*/
@@ -429,12 +429,12 @@ public class GapContent
/**
* Removes a piece of content at th specified position.
- *
+ *
* @param where the position where the content is to be removed
* @param nitems number of characters to be removed
- *
+ *
* @return an UndoableEdit object
- *
+ *
* @throws BadLocationException if <code>where</code> is not a valid
* location in the buffer
*/
@@ -442,11 +442,11 @@ public class GapContent
{
// check arguments
int length = length();
-
+
if ((where + nitems) >= length)
throw new BadLocationException("where + nitems cannot be greater"
+ " than the content length", where + nitems);
-
+
String removedText = getString(where, nitems);
UndoRemove undoRemove = new UndoRemove(where, removedText);
replace(where, nitems, null, 0);
@@ -456,10 +456,10 @@ public class GapContent
/**
* Returns a piece of content as String.
- *
+ *
* @param where the start location of the fragment
* @param len the length of the fragment
- *
+ *
* @throws BadLocationException if <code>where</code> or
* <code>where + len</code> are no valid locations in the buffer
*/
@@ -487,15 +487,15 @@ public class GapContent
/**
* Fetches a piece of content and stores it in a {@link Segment} object.
- *
+ *
* If the requested piece of text spans the gap, the content is copied into a
* new array. If it doesn't then it is contiguous and the actual content
* store is returned.
- *
+ *
* @param where the start location of the fragment
* @param len the length of the fragment
* @param txt the Segment object to store the fragment in
- *
+ *
* @throws BadLocationException if <code>where</code> or
* <code>where + len</code> are no valid locations in the buffer
*/
@@ -515,7 +515,7 @@ public class GapContent
if (len < 0)
throw new BadLocationException("negative length not allowed: ", len);
- // Optimized to copy only when really needed.
+ // Optimized to copy only when really needed.
if (where + len <= gapStart)
{
// Simple case: completely before gap.
@@ -556,11 +556,11 @@ public class GapContent
/**
* Creates and returns a mark at the specified position.
- *
+ *
* @param offset the position at which to create the mark
- *
+ *
* @return the create Position object for the mark
- *
+ *
* @throws BadLocationException if the offset is not a valid position in the
* buffer
*/
@@ -597,7 +597,7 @@ public class GapContent
marks.add(insertIndex, m);
}
// Otherwise use the found position.
-
+
return pos;
}
@@ -606,7 +606,7 @@ public class GapContent
* segment before the gap as it is and the segment after the gap at the end
* of the new buffer array. This does change the gapEnd mark but not the
* gapStart mark.
- *
+ *
* @param newSize the new size of the gap
*/
protected void shiftEnd(int newSize)
@@ -641,7 +641,7 @@ public class GapContent
/**
* Shifts the gap to the specified position.
- *
+ *
* @param newGapStart the new start position of the gap
*/
protected void shiftGap(int newGapStart)
@@ -746,14 +746,14 @@ public class GapContent
m.mark = newGapEnd;
}
-
+
gapEnd = newGapEnd;
resetMarksAtZero();
}
/**
* Returns the allocated buffer array.
- *
+ *
* @return the allocated buffer array
*/
protected final Object getArray()
@@ -763,7 +763,7 @@ public class GapContent
/**
* Replaces a portion of the storage with the specified items.
- *
+ *
* @param position the position at which to remove items
* @param rmSize the number of items to remove
* @param addItems the items to add at location
@@ -915,7 +915,7 @@ public class GapContent
}
return v;
}
-
+
/**
* Resets all <code>Position</code> that have an offset of <code>0</code>,
* to also have an array index of <code>0</code>. This might be necessary
diff --git a/javax/swing/text/GlyphView.java b/javax/swing/text/GlyphView.java
index 6bc2a382c..3f4ccf9c2 100644
--- a/javax/swing/text/GlyphView.java
+++ b/javax/swing/text/GlyphView.java
@@ -110,7 +110,7 @@ public class GlyphView extends View implements TabableView, Cloneable
/**
* Determines the model offset, so that the text between <code>p0</code>
* and this offset fits within the span starting at <code>x</code> with
- * the length of <code>len</code>.
+ * the length of <code>len</code>.
*
* @param v the glyph view
* @param p0 the starting offset in the model
@@ -403,7 +403,7 @@ public class GlyphView extends View implements TabableView, Cloneable
: Position.Bias.Backward;
return pos + v.getStartOffset();
}
-
+
}
/**
@@ -424,7 +424,7 @@ public class GlyphView extends View implements TabableView, Cloneable
float height = fontMetrics.getHeight();
return height;
}
-
+
/**
* Paints the glyphs.
*
@@ -562,7 +562,7 @@ public class GlyphView extends View implements TabableView, Cloneable
/**
* Determines the model offset, so that the text between <code>p0</code>
* and this offset fits within the span starting at <code>x</code> with
- * the length of <code>len</code>.
+ * the length of <code>len</code>.
*
* @param v the glyph view
* @param p0 the starting offset in the model
@@ -739,7 +739,7 @@ public class GlyphView extends View implements TabableView, Cloneable
g.fillRect(r.x, r.y, r.width, r.height);
}
-
+
// Paint layered highlights if there are any.
if (tc != null)
{
@@ -972,11 +972,11 @@ public class GlyphView extends View implements TabableView, Cloneable
}
catch (BadLocationException ex)
{
- AssertionError ae;
+ AssertionError ae;
ae = new AssertionError("BadLocationException should not be "
- + "thrown here. p0 = " + p0 + ", p1 = " + p1);
- ae.initCause(ex);
- throw ae;
+ + "thrown here. p0 = " + p0 + ", p1 = " + p1);
+ ae.initCause(ex);
+ throw ae;
}
return cached;
diff --git a/javax/swing/text/Highlighter.java b/javax/swing/text/Highlighter.java
index 91f3b7903..b4b671ac4 100644
--- a/javax/swing/text/Highlighter.java
+++ b/javax/swing/text/Highlighter.java
@@ -57,7 +57,7 @@ public interface Highlighter
{
void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c);
}
-
+
void install(JTextComponent c);
void deinstall(JTextComponent c);
@@ -76,4 +76,3 @@ public interface Highlighter
void paint(Graphics g);
}
-
diff --git a/javax/swing/text/InternationalFormatter.java b/javax/swing/text/InternationalFormatter.java
index 1de5ca271..8dcd03a3f 100644
--- a/javax/swing/text/InternationalFormatter.java
+++ b/javax/swing/text/InternationalFormatter.java
@@ -206,7 +206,7 @@ public class InternationalFormatter
* one of the mentioned methods in order to customize behaviour.
*
* @param ftf the {@link JFormattedTextField} in which this formatter
- * is installed
+ * is installed
*/
public void install(JFormattedTextField ftf)
{
diff --git a/javax/swing/text/JTextComponent.java b/javax/swing/text/JTextComponent.java
index 24035e35a..a118cf86d 100644
--- a/javax/swing/text/JTextComponent.java
+++ b/javax/swing/text/JTextComponent.java
@@ -246,7 +246,7 @@ public abstract class JTextComponent extends JComponent
{
return this;
}
-
+
/**
* Handle a text insertion event and fire an
* AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
@@ -313,7 +313,7 @@ public abstract class JTextComponent extends JComponent
public Rectangle getCharacterBounds(int index)
{
// This is basically the same as BasicTextUI.modelToView().
-
+
Rectangle bounds = null;
if (index >= 0 && index < doc.getLength() - 1)
{
@@ -368,12 +368,12 @@ public abstract class JTextComponent extends JComponent
return JTextComponent.this.getText().length();
}
- /**
+ /**
* Gets the character attributes of the character at index. If
* the index is out of bounds, null is returned.
*
* @param index - index of the character
- *
+ *
* @return the character's attributes
*/
public AttributeSet getCharacterAttribute(int index)
@@ -402,24 +402,24 @@ public abstract class JTextComponent extends JComponent
/**
* Gets the text located at index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index of the part
- *
+ *
* @return the part of text at that index, or null
*/
public String getAtIndex(int part, int index)
{
return getAtIndexImpl(part, index, 0);
}
-
+
/**
* Gets the text located after index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index after the part
- *
+ *
* @return the part of text after that index, or null
*/
public String getAfterIndex(int part, int index)
@@ -430,10 +430,10 @@ public abstract class JTextComponent extends JComponent
/**
* Gets the text located before index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index before the part
- *
+ *
* @return the part of text before that index, or null
*/
public String getBeforeIndex(int part, int index)
@@ -518,20 +518,20 @@ public abstract class JTextComponent extends JComponent
/**
* Returns the number of actions for this object. The zero-th
* object represents the default action.
- *
+ *
* @return the number of actions (0-based).
*/
public int getAccessibleActionCount()
{
return getActions().length;
}
-
+
/**
* Returns the description of the i-th action. Null is returned if
* i is out of bounds.
- *
+ *
* @param i - the action to get the description for
- *
+ *
* @return description of the i-th action
*/
public String getAccessibleActionDescription(int i)
@@ -542,13 +542,13 @@ public abstract class JTextComponent extends JComponent
desc = (String) actions[i].getValue(Action.NAME);
return desc;
}
-
+
/**
- * Performs the i-th action. Nothing happens if i is
+ * Performs the i-th action. Nothing happens if i is
* out of bounds.
*
* @param i - the action to perform
- *
+ *
* @return true if the action was performed successfully
*/
public boolean doAccessibleAction(int i)
@@ -564,7 +564,7 @@ public abstract class JTextComponent extends JComponent
}
return ret;
}
-
+
/**
* Sets the text contents.
*
@@ -727,7 +727,7 @@ public abstract class JTextComponent extends JComponent
* objects, by delegation to the underlying {@link Keymap}.</li>
*
* <li>KeymapActionMap extends {@link ActionMap} also holds a reference to
- * the underlying {@link Keymap} but only appears to use it for listing
+ * the underlying {@link Keymap} but only appears to use it for listing
* its keys. </li>
*
* <li>KeymapActionMap maps all {@link Action} objects to
@@ -774,7 +774,7 @@ public abstract class JTextComponent extends JComponent
public KeyStroke[] keys()
{
KeyStroke[] superKeys = super.keys();
- KeyStroke[] mapKeys = map.getBoundKeyStrokes();
+ KeyStroke[] mapKeys = map.getBoundKeyStrokes();
KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
@@ -824,22 +824,22 @@ public abstract class JTextComponent extends JComponent
return map.getBoundKeyStrokes().length + super.size();
}
- public Object[] keys()
+ public Object[] keys()
{
Object[] superKeys = super.keys();
- Object[] mapKeys = map.getBoundKeyStrokes();
+ Object[] mapKeys = map.getBoundKeyStrokes();
Object[] bothKeys = new Object[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
for (int i = 0; i < mapKeys.length; ++i)
bothKeys[i + superKeys.length] = mapKeys[i];
- return bothKeys;
+ return bothKeys;
}
public Object[] allKeys()
{
Object[] superKeys = super.allKeys();
- Object[] mapKeys = map.getBoundKeyStrokes();
+ Object[] mapKeys = map.getBoundKeyStrokes();
Object[] bothKeys = new Object[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
@@ -929,10 +929,10 @@ public abstract class JTextComponent extends JComponent
i = 0;
e = map.keys();
while (e.hasMoreElements())
- {
+ {
KeyStroke k = (KeyStroke) e.nextElement();
if (map.get(k).equals(a))
- ret[i++] = k;
+ ret[i++] = k;
}
return ret;
}
@@ -978,21 +978,21 @@ public abstract class JTextComponent extends JComponent
public boolean canImport(JComponent component, DataFlavor[] flavors)
{
JTextComponent textComponent = (JTextComponent) component;
-
+
if (! (textComponent.isEnabled()
- && textComponent.isEditable()
- && flavors != null))
+ && textComponent.isEditable()
+ && flavors != null))
return false;
for (int i = 0; i < flavors.length; ++i)
- if (flavors[i].equals(DataFlavor.stringFlavor))
- return true;
+ if (flavors[i].equals(DataFlavor.stringFlavor))
+ return true;
return false;
}
-
+
public void exportToClipboard(JComponent component, Clipboard clipboard,
- int action)
+ int action)
{
JTextComponent textComponent = (JTextComponent) component;
int start = textComponent.getSelectionStart();
@@ -1017,7 +1017,7 @@ public abstract class JTextComponent extends JComponent
// Ignore this and do nothing.
}
}
-
+
public int getSourceActions()
{
return NONE;
@@ -1034,7 +1034,7 @@ public abstract class JTextComponent extends JComponent
for (int i = 0; i < flavors.length; ++i)
if (flavors[i].equals(DataFlavor.stringFlavor))
flavor = flavors[i];
-
+
if (flavor == null)
return false;
@@ -1059,10 +1059,10 @@ public abstract class JTextComponent extends JComponent
}
private static final long serialVersionUID = -8796518220218978795L;
-
+
public static final String DEFAULT_KEYMAP = "default";
public static final String FOCUS_ACCELERATOR_KEY = "focusAcceleratorKey";
-
+
private static DefaultTransferHandler defaultTransferHandler;
private static Hashtable keymaps = new Hashtable();
private Keymap keymap;
@@ -1096,7 +1096,7 @@ public abstract class JTextComponent extends JComponent
* @see #addKeymap
* @see #getKeymap()
* @see #keymaps
- */
+ */
public static Keymap removeKeymap(String n)
{
Keymap km = (Keymap) keymaps.get(n);
@@ -1110,7 +1110,7 @@ public abstract class JTextComponent extends JComponent
* in which case the new Keymap will <em>not</em> be added to the global
* Keymap table. The parent may also be <code>null</code>, which is
* harmless.
- *
+ *
* @param n The name of the new Keymap, or <code>null</code>
* @param parent The parent of the new Keymap, or <code>null</code>
*
@@ -1137,7 +1137,7 @@ public abstract class JTextComponent extends JComponent
* @see #setKeymap
* @see #keymap
*/
- public Keymap getKeymap()
+ public Keymap getKeymap()
{
return keymap;
}
@@ -1151,26 +1151,26 @@ public abstract class JTextComponent extends JComponent
* @see #getKeymap()
* @see #keymap
*/
- public void setKeymap(Keymap k)
+ public void setKeymap(Keymap k)
{
// phase 1: replace the KeymapWrapper entry in the InputMap chain.
// the goal here is to always maintain the following ordering:
//
// [InputMap]? -> [KeymapWrapper]? -> [InputMapUIResource]*
- //
+ //
// that is to say, component-specific InputMaps need to remain children
// of Keymaps, and Keymaps need to remain children of UI-installed
// InputMaps (and the order of each group needs to be preserved, of
// course).
-
+
KeymapWrapper kw = (k == null ? null : new KeymapWrapper(k));
InputMap childInputMap = getInputMap(JComponent.WHEN_FOCUSED);
if (childInputMap == null)
setInputMap(JComponent.WHEN_FOCUSED, kw);
else
{
- while (childInputMap.getParent() != null
+ while (childInputMap.getParent() != null
&& !(childInputMap.getParent() instanceof KeymapWrapper)
&& !(childInputMap.getParent() instanceof InputMapUIResource))
childInputMap = childInputMap.getParent();
@@ -1178,7 +1178,7 @@ public abstract class JTextComponent extends JComponent
// option 1: there is nobody to replace at the end of the chain
if (childInputMap.getParent() == null)
childInputMap.setParent(kw);
-
+
// option 2: there is already a KeymapWrapper in the chain which
// needs replacing (possibly with its own parents, possibly without)
else if (childInputMap.getParent() instanceof KeymapWrapper)
@@ -1212,7 +1212,7 @@ public abstract class JTextComponent extends JComponent
setActionMap(kam);
else
{
- while (childActionMap.getParent() != null
+ while (childActionMap.getParent() != null
&& !(childActionMap.getParent() instanceof KeymapActionMap)
&& !(childActionMap.getParent() instanceof ActionMapUIResource))
childActionMap = childActionMap.getParent();
@@ -1220,7 +1220,7 @@ public abstract class JTextComponent extends JComponent
// option 1: there is nobody to replace at the end of the chain
if (childActionMap.getParent() == null)
childActionMap.setParent(kam);
-
+
// option 2: there is already a KeymapActionMap in the chain which
// needs replacing (possibly with its own parents, possibly without)
else if (childActionMap.getParent() instanceof KeymapActionMap)
@@ -1269,8 +1269,8 @@ public abstract class JTextComponent extends JComponent
* @see Action#getValue
* @see KeyBinding#actionName
*/
- public static void loadKeymap(Keymap map,
- JTextComponent.KeyBinding[] bindings,
+ public static void loadKeymap(Keymap map,
+ JTextComponent.KeyBinding[] bindings,
Action[] actions)
{
Hashtable acts = new Hashtable(actions.length);
@@ -1298,12 +1298,12 @@ public abstract class JTextComponent extends JComponent
{
return getUI().getEditorKit(this).getActions();
}
-
+
// These are package-private to avoid an accessor method.
Document doc;
Caret caret;
boolean editable;
-
+
private Highlighter highlighter;
private Color caretColor;
private Color disabledTextColor;
@@ -1445,10 +1445,10 @@ public abstract class JTextComponent extends JComponent
{
int start = getSelectionStart();
int offset = getSelectionEnd() - start;
-
+
if (offset <= 0)
return null;
-
+
try
{
return doc.getText(start, offset);
@@ -1565,7 +1565,7 @@ public abstract class JTextComponent extends JComponent
{
if (editable == newValue)
return;
-
+
boolean oldValue = editable;
editable = newValue;
firePropertyChange("editable", oldValue, newValue);
@@ -1590,13 +1590,13 @@ public abstract class JTextComponent extends JComponent
{
if (caret != null)
caret.deinstall(this);
-
+
Caret oldCaret = caret;
caret = newCaret;
if (caret != null)
caret.install(this);
-
+
firePropertyChange("caret", oldCaret, newCaret);
}
@@ -1698,13 +1698,13 @@ public abstract class JTextComponent extends JComponent
{
if (highlighter != null)
highlighter.deinstall(this);
-
+
Highlighter oldHighlighter = highlighter;
highlighter = newHighlighter;
if (highlighter != null)
highlighter.install(this);
-
+
firePropertyChange("highlighter", oldHighlighter, newHighlighter);
}
@@ -1757,7 +1757,7 @@ public abstract class JTextComponent extends JComponent
public void select(int start, int end)
{
int length = doc.getLength();
-
+
start = Math.max(start, 0);
start = Math.min(start, length);
@@ -1803,7 +1803,7 @@ public abstract class JTextComponent extends JComponent
// Set dot to new position,
dot = start + content.length();
setCaretPosition(dot);
-
+
// and update it's magic position.
caret.setMagicCaretPosition(modelToView(dot).getLocation());
}
@@ -1969,7 +1969,7 @@ public abstract class JTextComponent extends JComponent
focusAccelerator = newKey;
firePropertyChange(FOCUS_ACCELERATOR_KEY, oldKey, newKey);
}
-
+
public char getFocusAccelerator()
{
return focusAccelerator;
@@ -1990,7 +1990,7 @@ public abstract class JTextComponent extends JComponent
{
navigationFilter = filter;
}
-
+
/**
* Read and set the content this component. If not overridden, the
* method reads the component content as a plain text.
diff --git a/javax/swing/text/Keymap.java b/javax/swing/text/Keymap.java
index c3f61d88e..e1b305f5f 100644
--- a/javax/swing/text/Keymap.java
+++ b/javax/swing/text/Keymap.java
@@ -1,4 +1,4 @@
-/* Keymap.java --
+/* Keymap.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,17 @@ import javax.swing.KeyStroke;
public interface Keymap
{
- void addActionForKeyStroke(KeyStroke key, Action a);
- Action getAction(KeyStroke key);
- Action[] getBoundActions();
- KeyStroke[] getBoundKeyStrokes();
- Action getDefaultAction();
- KeyStroke[] getKeyStrokesForAction(Action a);
- String getName();
- Keymap getResolveParent();
- boolean isLocallyDefined(KeyStroke key);
- void removeBindings();
- void removeKeyStrokeBinding(KeyStroke keys);
- void setDefaultAction(Action a);
+ void addActionForKeyStroke(KeyStroke key, Action a);
+ Action getAction(KeyStroke key);
+ Action[] getBoundActions();
+ KeyStroke[] getBoundKeyStrokes();
+ Action getDefaultAction();
+ KeyStroke[] getKeyStrokesForAction(Action a);
+ String getName();
+ Keymap getResolveParent();
+ boolean isLocallyDefined(KeyStroke key);
+ void removeBindings();
+ void removeKeyStrokeBinding(KeyStroke keys);
+ void setDefaultAction(Action a);
void setResolveParent(Keymap parent);
}
-
-
diff --git a/javax/swing/text/LayeredHighlighter.java b/javax/swing/text/LayeredHighlighter.java
index dcaf1c504..3eac26b38 100644
--- a/javax/swing/text/LayeredHighlighter.java
+++ b/javax/swing/text/LayeredHighlighter.java
@@ -47,10 +47,10 @@ public abstract class LayeredHighlighter
implements Highlighter.HighlightPainter
{
public abstract Shape paintLayer(Graphics g, int p0, int p1,
- Shape viewBounds, JTextComponent editor,
- View view);
+ Shape viewBounds, JTextComponent editor,
+ View view);
}
-
+
public abstract void paintLayeredHighlights(Graphics g, int p0, int p1,
Shape viewBounds,
JTextComponent editor, View view);
diff --git a/javax/swing/text/LayoutQueue.java b/javax/swing/text/LayoutQueue.java
index b0c84b972..10fadd55e 100644
--- a/javax/swing/text/LayoutQueue.java
+++ b/javax/swing/text/LayoutQueue.java
@@ -67,8 +67,8 @@ public class LayoutQueue
{
synchronized (list)
{
- list.addLast(task);
- list.notify();
+ list.addLast(task);
+ list.notify();
}
}
@@ -81,20 +81,20 @@ public class LayoutQueue
{
synchronized (list)
{
- while (list.size() == 0)
- {
- try
- {
- list.wait();
- }
- catch (InterruptedException _)
- {
- // This seemed like a good idea, but it has not been
- // tested on the JDK.
- return null;
- }
- }
- return (Runnable) list.removeFirst();
+ while (list.size() == 0)
+ {
+ try
+ {
+ list.wait();
+ }
+ catch (InterruptedException _)
+ {
+ // This seemed like a good idea, but it has not been
+ // tested on the JDK.
+ return null;
+ }
+ }
+ return (Runnable) list.removeFirst();
}
}
diff --git a/javax/swing/text/MaskFormatter.java b/javax/swing/text/MaskFormatter.java
index 4ebf65b93..c8f631ae3 100644
--- a/javax/swing/text/MaskFormatter.java
+++ b/javax/swing/text/MaskFormatter.java
@@ -1,4 +1,4 @@
-/* MaskFormatter.java --
+/* MaskFormatter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,53 +59,53 @@ public class MaskFormatter extends DefaultFormatter
private static final char LETTER_CHAR = '?';
private static final char ANYTHING_CHAR = '*';
private static final char HEX_CHAR = 'H';
-
+
/** The mask for this MaskFormatter **/
private String mask;
-
- /**
- * A String made up of the characters that are not valid for input for
- * this MaskFormatter.
+
+ /**
+ * A String made up of the characters that are not valid for input for
+ * this MaskFormatter.
*/
private String invalidChars;
-
- /**
- * A String made up of the characters that are valid for input for
- * this MaskFormatter.
+
+ /**
+ * A String made up of the characters that are valid for input for
+ * this MaskFormatter.
*/
private String validChars;
-
- /** A String used in place of missing chracters if the value does not
+
+ /** A String used in place of missing chracters if the value does not
* completely fill in the spaces in the mask.
*/
private String placeHolder;
-
- /** A character used in place of missing characters if the value does
+
+ /** A character used in place of missing characters if the value does
* not completely fill in the spaces in the mask.
*/
private char placeHolderChar = ' ';
-
+
/**
* Whether or not stringToValue should return literal characters in the mask.
*/
private boolean valueContainsLiteralCharacters = true;
-
+
/** A String used for easy access to valid HEX characters **/
private static String hexString = "0123456789abcdefABCDEF";
-
+
/** An int to hold the length of the mask, accounting for escaped characters **/
int maskLength = 0;
-
+
public MaskFormatter ()
{
// Override super's default behaviour, in MaskFormatter the default
// is not to allow invalid values
setAllowsInvalid(false);
}
-
+
/**
* Creates a MaskFormatter with the specified mask.
- * @specnote doesn't actually throw a ParseException although it
+ * @specnote doesn't actually throw a ParseException although it
* is declared to do so
* @param mask
* @throws java.text.ParseException
@@ -115,7 +115,7 @@ public class MaskFormatter extends DefaultFormatter
this();
setMask (mask);
}
-
+
/**
* Returns the mask used in this MaskFormatter.
* @return the mask used in this MaskFormatter.
@@ -124,7 +124,7 @@ public class MaskFormatter extends DefaultFormatter
{
return mask;
}
-
+
/**
* Returns a String containing the characters that are not valid for input
* for this MaskFormatter.
@@ -134,19 +134,19 @@ public class MaskFormatter extends DefaultFormatter
{
return invalidChars;
}
-
+
/**
* Sets characters that are not valid for input. If
* <code>invalidCharacters</code> is non-null then no characters contained
* in it will be allowed to be input.
- *
+ *
* @param invalidCharacters the String specifying invalid characters.
*/
public void setInvalidCharacters (String invalidCharacters)
{
this.invalidChars = invalidCharacters;
}
-
+
/**
* Returns a String containing the characters that are valid for input
* for this MaskFormatter.
@@ -156,12 +156,12 @@ public class MaskFormatter extends DefaultFormatter
{
return validChars;
}
-
+
/**
* Sets characters that are valid for input. If
* <code>validCharacters</code> is non-null then no characters that are
* not contained in it will be allowed to be input.
- *
+ *
* @param validCharacters the String specifying valid characters.
*/
public void setValidCharacters (String validCharacters)
@@ -170,7 +170,7 @@ public class MaskFormatter extends DefaultFormatter
}
/**
- * Returns the place holder String that is used in place of missing
+ * Returns the place holder String that is used in place of missing
* characters when the value doesn't completely fill in the spaces
* in the mask.
* @return the place holder String.
@@ -179,18 +179,18 @@ public class MaskFormatter extends DefaultFormatter
{
return placeHolder;
}
-
+
/**
* Sets the string to use if the value does not completely fill in the mask.
* If this is null, the place holder character will be used instead.
- * @param placeholder the String to use if the value doesn't completely
+ * @param placeholder the String to use if the value doesn't completely
* fill in the mask.
*/
public void setPlaceholder (String placeholder)
{
this.placeHolder = placeholder;
}
-
+
/**
* Returns the character used in place of missing characters when the
* value doesn't completely fill the mask.
@@ -200,42 +200,42 @@ public class MaskFormatter extends DefaultFormatter
{
return placeHolderChar;
}
-
+
/**
* Sets the char to use if the value does not completely fill in the mask.
- * This is only used if the place holder String has not been set or does
+ * This is only used if the place holder String has not been set or does
* not completely fill in the mask.
- * @param placeholder the char to use if the value doesn't completely
+ * @param placeholder the char to use if the value doesn't completely
* fill in the mask.
*/
public void setPlaceholderCharacter (char placeholder)
{
this.placeHolderChar = placeholder;
}
-
+
/**
- * Returns true if stringToValue should return the literal
+ * Returns true if stringToValue should return the literal
* characters in the mask.
- * @return true if stringToValue should return the literal
+ * @return true if stringToValue should return the literal
* characters in the mask
*/
public boolean getValueContainsLiteralCharacters()
{
return valueContainsLiteralCharacters;
}
-
+
/**
* Determines whether stringToValue will return literal characters or not.
- * @param containsLiteralChars if true, stringToValue will return the
+ * @param containsLiteralChars if true, stringToValue will return the
* literal characters in the mask, otherwise it will not.
*/
public void setValueContainsLiteralCharacters (boolean containsLiteralChars)
{
this.valueContainsLiteralCharacters = containsLiteralChars;
}
-
+
/**
- * Sets the mask for this MaskFormatter.
+ * Sets the mask for this MaskFormatter.
* @specnote doesn't actually throw a ParseException even though it is
* declared to do so
* @param mask the new mask for this MaskFormatter
@@ -247,14 +247,14 @@ public class MaskFormatter extends DefaultFormatter
// Update the cached maskLength.
int end = mask.length() - 1;
- maskLength = 0;
+ maskLength = 0;
for (int i = 0; i <= end; i++)
{
// Handle escape characters properly - they don't add to the maskLength
// but 2 escape characters in a row is really one escape character and
// one literal single quote, so that does add 1 to the maskLength.
if (mask.charAt(i) == '\'')
- {
+ {
// Escape characters at the end of the mask don't do anything.
if (i != end)
maskLength++;
@@ -264,14 +264,14 @@ public class MaskFormatter extends DefaultFormatter
maskLength++;
}
}
-
+
/**
* Installs this MaskFormatter on the JFormattedTextField.
- * Invokes valueToString to convert the current value from the
+ * Invokes valueToString to convert the current value from the
* JFormattedTextField to a String, then installs the Actions from
- * getActions, the DocumentFilter from getDocumentFilter, and the
+ * getActions, the DocumentFilter from getDocumentFilter, and the
* NavigationFilter from getNavigationFilter.
- *
+ *
* If valueToString throws a ParseException, this method sets the text
* to an empty String and marks the JFormattedTextField as invalid.
*/
@@ -293,14 +293,14 @@ public class MaskFormatter extends DefaultFormatter
}
}
}
-
+
/**
* Parses the text using the mask, valid characters, and invalid characters
* to determine the appropriate Object to return. This strips the literal
* characters if necessary and invokes super.stringToValue. If the paramter
- * is invalid for the current mask and valid/invalid character sets this
+ * is invalid for the current mask and valid/invalid character sets this
* method will throw a ParseException.
- *
+ *
* @param value the String to parse
* @throws ParseException if value doesn't match the mask and valid/invalid
* character sets
@@ -309,7 +309,7 @@ public class MaskFormatter extends DefaultFormatter
{
return super.stringToValue(convertStringToValue(value));
}
-
+
private String convertStringToValue(String value)
throws ParseException
{
@@ -347,7 +347,7 @@ public class MaskFormatter extends DefaultFormatter
valueChar = placeHolderChar;
}
- // This switch block on the mask character checks that the character
+ // This switch block on the mask character checks that the character
// within <code>value</code> at that point is valid according to the
// mask and also converts to upper/lowercase as needed.
switch (maskChar)
@@ -393,7 +393,7 @@ public class MaskFormatter extends DefaultFormatter
i++;
break;
case ESCAPE_CHAR:
- // Escape character, check the next character to make sure that
+ // Escape character, check the next character to make sure that
// the literals match
j++;
if (j < length)
@@ -427,7 +427,7 @@ public class MaskFormatter extends DefaultFormatter
/**
* Returns a String representation of the Object value based on the mask.
- *
+ *
* @param value the value to convert
* @throws ParseException if value is invalid for this mask and valid/invalid
* character sets
@@ -437,7 +437,7 @@ public class MaskFormatter extends DefaultFormatter
String string = value != null ? value.toString() : "";
return convertValueToString(string);
}
-
+
/**
* This method takes in a String and runs it through the mask to make
* sure that it is valid. If <code>convert</code> is true, it also
@@ -483,7 +483,7 @@ public class MaskFormatter extends DefaultFormatter
valueChar = placeHolderChar;
}
- // This switch block on the mask character checks that the character
+ // This switch block on the mask character checks that the character
// within <code>value</code> at that point is valid according to the
// mask and also converts to upper/lowercase as needed.
switch (maskChar)
@@ -529,7 +529,7 @@ public class MaskFormatter extends DefaultFormatter
i++;
break;
case ESCAPE_CHAR:
- // Escape character, check the next character to make sure that
+ // Escape character, check the next character to make sure that
// the literals match
j++;
if (j < length)
diff --git a/javax/swing/text/MutableAttributeSet.java b/javax/swing/text/MutableAttributeSet.java
index 5dd2406a3..eb52be5c8 100644
--- a/javax/swing/text/MutableAttributeSet.java
+++ b/javax/swing/text/MutableAttributeSet.java
@@ -40,10 +40,10 @@ package javax.swing.text;
import java.util.Enumeration;
/**
- * An {@link AttributeSet} that supports modification of the stored
+ * An {@link AttributeSet} that supports modification of the stored
* attributes.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
* @since 1.2
*/
public interface MutableAttributeSet extends AttributeSet
@@ -52,54 +52,54 @@ public interface MutableAttributeSet extends AttributeSet
* Adds an attribute with the given <code>name</code> and <code>value</code>
* to the set. If the set already contains an attribute with the given
* <code>name</code>, the attribute value is updated.
- *
+ *
* @param name the attribute name (<code>null</code> not permitted).
* @param value the value (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
*/
void addAttribute(Object name, Object value);
/**
* Adds all the attributes from <code>attributes</code> to this set.
- *
+ *
* @param attributes the set of attributes to add (<code>null</code> not
* permitted).
- *
- * @throws NullPointerException if <code>attributes</code> is
+ *
+ * @throws NullPointerException if <code>attributes</code> is
* <code>null</code>.
*/
void addAttributes(AttributeSet attributes);
/**
- * Removes the attribute with the specified <code>name</code>, if this
+ * Removes the attribute with the specified <code>name</code>, if this
* attribute is defined. This method will only remove an attribute from
* this set, not from the resolving parent.
- *
+ *
* @param name the attribute name (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>name</code> is <code>null</code>.
*/
void removeAttribute(Object name);
/**
* Removes the attributes listed in <code>names</code>.
- *
+ *
* @param names the attribute names (<code>null</code> not permitted).
- *
- * @throws NullPointerException if <code>names</code> is <code>null</code>
+ *
+ * @throws NullPointerException if <code>names</code> is <code>null</code>
* or contains any <code>null</code> values.
*/
void removeAttributes(Enumeration<?> names);
/**
- * Removes attributes from this set if they are found in the
+ * Removes attributes from this set if they are found in the
* given set. Only attributes whose key AND value are removed.
- * Removes attributes only from this set, not from the resolving parent.
- * Since the resolving parent is stored as an attribute, if
+ * Removes attributes only from this set, not from the resolving parent.
+ * Since the resolving parent is stored as an attribute, if
* <code>attributes</code> has the same resolving parent as this set, the
* parent will be removed from this set.
- *
+ *
* @param attributes the attributes (<code>null</code> not permitted).
*/
void removeAttributes(AttributeSet attributes);
@@ -107,10 +107,10 @@ public interface MutableAttributeSet extends AttributeSet
/**
* Sets the reolving parent for this set. When looking up an attribute, if
* it is not found in this set, then the resolving parent is also used for
- * the lookup.
- *
+ * the lookup.
+ *
* @param parent the parent attribute set (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>parent</code> is <code>null</code>.
*/
void setResolveParent(AttributeSet parent);
diff --git a/javax/swing/text/NavigationFilter.java b/javax/swing/text/NavigationFilter.java
index ea9b29db8..647ac70bf 100644
--- a/javax/swing/text/NavigationFilter.java
+++ b/javax/swing/text/NavigationFilter.java
@@ -51,20 +51,20 @@ public class NavigationFilter
public abstract void moveDot(int dot, Position.Bias bias);
public abstract void setDot(int dot, Position.Bias bias);
}
-
+
public NavigationFilter()
{
// Do nothing here.
}
public void moveDot(NavigationFilter.FilterBypass fb, int dot,
- Position.Bias bias)
+ Position.Bias bias)
{
fb.moveDot(dot, bias);
}
public void setDot(NavigationFilter.FilterBypass fb, int dot,
- Position.Bias bias)
+ Position.Bias bias)
{
fb.setDot(dot, bias);
}
diff --git a/javax/swing/text/NumberFormatter.java b/javax/swing/text/NumberFormatter.java
index a858ff496..ce5eef990 100644
--- a/javax/swing/text/NumberFormatter.java
+++ b/javax/swing/text/NumberFormatter.java
@@ -1,4 +1,4 @@
-/* NumberFormatter.java --
+/* NumberFormatter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,22 +45,22 @@ import java.text.NumberFormat;
* <code>NumberFormatter</code> is an {@link InternationalFormatter}
* that implements value to string and string to value conversion via
* an instance of {@link NumberFormat}.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
* @since 1.4
*/
public class NumberFormatter extends InternationalFormatter
{
-
+
/**
- * Creates a NumberFormatter with the default NumberFormat from
- * NumberFormat.getNumberInstance().
+ * Creates a NumberFormatter with the default NumberFormat from
+ * NumberFormat.getNumberInstance().
*/
public NumberFormatter ()
{
this (NumberFormat.getNumberInstance());
}
-
+
/**
* Creates a NumberFormatter with the specified NumberFormat.
* @param format the NumberFormat to use for this NumberFormatter.
@@ -70,11 +70,11 @@ public class NumberFormatter extends InternationalFormatter
super(format);
setFormat(format);
}
-
+
/**
* Sets the NumberFormat that this NumberFormatter will use to determine
* legal values for editing and displaying.
- *
+ *
* @param format the Format to use to determine legal values.
*/
public void setFormat (Format format)
diff --git a/javax/swing/text/ParagraphView.java b/javax/swing/text/ParagraphView.java
index f2795e2c3..4d4c7a044 100644
--- a/javax/swing/text/ParagraphView.java
+++ b/javax/swing/text/ParagraphView.java
@@ -297,7 +297,7 @@ public class ParagraphView extends FlowView implements TabExpander
/**
* Sets the justification of the paragraph.
*
- * @param j the justification to set
+ * @param j the justification to set
*/
protected void setJustification(int j)
{
diff --git a/javax/swing/text/PasswordView.java b/javax/swing/text/PasswordView.java
index 9d4c86a83..62b141932 100644
--- a/javax/swing/text/PasswordView.java
+++ b/javax/swing/text/PasswordView.java
@@ -1,4 +1,4 @@
-/* PasswordView.java --
+/* PasswordView.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -155,7 +155,7 @@ public class PasswordView
/**
* Determines the preferred span for this view along an axis.
- *
+ *
* @param axis to get the preferred span of
* @return the preferred span of the axis
*/
@@ -196,7 +196,7 @@ public class PasswordView
* @param a - the allocated region to render into
* @param b - typesafe enumeration to indicate bias to a position in the model.
* @return the bounding box of the given position
- * @throws BadLocationException if the given position does not
+ * @throws BadLocationException if the given position does not
* represent a valid location in the associated document
*/
public Shape modelToView(int pos, Shape a, Position.Bias b)
@@ -206,7 +206,7 @@ public class PasswordView
// Ensure metrics are up-to-date.
updateMetrics();
-
+
// Get rectangle of the line containing position.
int lineIndex = getElement().getElementIndex(pos);
Rectangle rect = lineToRect(newAlloc, lineIndex);
@@ -234,16 +234,16 @@ public class PasswordView
}
/**
- * Provides a mapping from the view coordinate space to the logical
+ * Provides a mapping from the view coordinate space to the logical
* coordinate space of the model.
- *
+ *
* @param fx - the X coordinate >= 0.0f
* @param fy - the Y coordinate >= 0.0f
- * @param a - the allocated region to render into
+ * @param a - the allocated region to render into
* @param bias - typesafe enumeration to indicate bias to a position in the model.
- * @return the location within the model that best represents
+ * @return the location within the model that best represents
* the given point in the view
- *
+ *
*/
public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
{
diff --git a/javax/swing/text/PlainDocument.java b/javax/swing/text/PlainDocument.java
index 730a619da..070c760c0 100644
--- a/javax/swing/text/PlainDocument.java
+++ b/javax/swing/text/PlainDocument.java
@@ -52,7 +52,7 @@ import java.util.ArrayList;
public class PlainDocument extends AbstractDocument
{
private static final long serialVersionUID = 4758290289196893664L;
-
+
public static final String lineLimitAttribute = "lineLimit";
public static final String tabSizeAttribute = "tabSize";
@@ -62,7 +62,7 @@ public class PlainDocument extends AbstractDocument
* createDefaultRoot() (when overridden by a subclass).
*/
private Element rootElement;
-
+
public PlainDocument()
{
this(new GapContent());
@@ -80,7 +80,7 @@ public class PlainDocument extends AbstractDocument
private void reindex()
{
Element[] lines;
- try
+ try
{
String str = content.getString(0, content.length());
@@ -91,10 +91,10 @@ public class PlainDocument extends AbstractDocument
elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1));
j = i + 1;
}
-
+
if (j < content.length())
elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, content.length()));
-
+
lines = new Element[elts.size()];
for (int i = 0; i < elts.size(); ++i)
lines[i] = (Element) elts.get(i);
@@ -116,7 +116,7 @@ public class PlainDocument extends AbstractDocument
Element[] array = new Element[1];
array[0] = createLeafElement(root, null, 0, 1);
root.replace(0, 0, array);
-
+
return root;
}
@@ -239,9 +239,9 @@ public class PlainDocument extends AbstractDocument
removed = new Element [i2 - i1 + 1];
for (int i = i1; i <= i2; i++)
removed[i-i1] = rootElement.getElement(i);
-
+
int start = rootElement.getElement(i1).getStartOffset();
- int end = rootElement.getElement(i2).getEndOffset();
+ int end = rootElement.getElement(i2).getEndOffset();
added[0] = createLeafElement(rootElement,
SimpleAttributeSet.EMPTY,
start, end);
diff --git a/javax/swing/text/PlainView.java b/javax/swing/text/PlainView.java
index e048d5f71..16112fdb1 100644
--- a/javax/swing/text/PlainView.java
+++ b/javax/swing/text/PlainView.java
@@ -1,4 +1,4 @@
-/* PlainView.java --
+/* PlainView.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ public class PlainView extends View implements TabExpander
* The color that is used to draw disabled text fields.
*/
Color disabledColor;
-
+
/**
* While painting this is the textcomponent's current start index
* of the selection.
@@ -73,13 +73,13 @@ public class PlainView extends View implements TabExpander
int selectionEnd;
Font font;
-
+
/** The length of the longest line in the Document **/
float maxLineLength = -1;
-
+
/** The longest line in the Document **/
Element longestLine = null;
-
+
protected FontMetrics metrics;
/**
@@ -112,12 +112,12 @@ public class PlainView extends View implements TabExpander
if (this.font != font)
{
- this.font = font;
- metrics = component.getFontMetrics(font);
+ this.font = font;
+ metrics = component.getFontMetrics(font);
tabSize = getTabSize() * metrics.charWidth('m');
}
}
-
+
/**
* @since 1.4
*/
@@ -125,11 +125,11 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
Rectangle rect = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
int fontHeight = metrics.getHeight();
return new Rectangle(rect.x, rect.y + (line * fontHeight),
- rect.width, fontHeight);
+ rect.width, fontHeight);
}
public Shape modelToView(int position, Shape a, Position.Bias b)
@@ -137,7 +137,7 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
Document document = getDocument();
// Get rectangle of the line containing position.
@@ -151,7 +151,7 @@ public class PlainView extends View implements TabExpander
Segment segment = getLineBuffer();
document.getText(lineStart, position - lineStart, segment);
int xoffset = Utilities.getTabbedTextWidth(segment, metrics, tabBase,
- this, lineStart);
+ this, lineStart);
// Calc the real rectangle.
rect.x += xoffset;
@@ -160,7 +160,7 @@ public class PlainView extends View implements TabExpander
return rect;
}
-
+
/**
* Draws a line of text. The X and Y coordinates specify the start of
* the <em>baseline</em> of the line.
@@ -177,7 +177,7 @@ public class PlainView extends View implements TabExpander
Element line = getElement().getElement(lineIndex);
int startOffset = line.getStartOffset();
int endOffset = line.getEndOffset() - 1;
-
+
if (selectionStart <= startOffset)
// Selection starts before the line ...
if (selectionEnd <= startOffset)
@@ -265,7 +265,7 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
JTextComponent textComponent = (JTextComponent) getContainer();
selectedColor = textComponent.getSelectedTextColor();
@@ -324,7 +324,7 @@ public class PlainView extends View implements TabExpander
* Returns the tab size of a tab. Checks the Document's
* properties for PlainDocument.tabSizeAttribute and returns it if it is
* defined, otherwise returns 8.
- *
+ *
* @return the tab size.
*/
protected int getTabSize()
@@ -339,7 +339,7 @@ public class PlainView extends View implements TabExpander
* Returns the next tab stop position after a given reference position.
*
* This implementation ignores the <code>tabStop</code> argument.
- *
+ *
* @param x the current x position in pixels
* @param tabStop the position within the text stream that the tab occured at
*/
@@ -351,7 +351,7 @@ public class PlainView extends View implements TabExpander
int numTabs = (((int) x) - tabBase) / tabSize;
next = tabBase + (numTabs + 1) * tabSize;
}
- return next;
+ return next;
}
/**
@@ -363,7 +363,7 @@ public class PlainView extends View implements TabExpander
// if the longest line is cached, return the cached value
if (maxLineLength != -1)
return maxLineLength;
-
+
// otherwise we have to go through all the lines and find it
Element el = getElement();
Segment seg = getLineBuffer();
@@ -380,13 +380,13 @@ public class PlainView extends View implements TabExpander
catch (BadLocationException ex)
{
AssertionError ae = new AssertionError("Unexpected bad location");
- ae.initCause(ex);
- throw ae;
+ ae.initCause(ex);
+ throw ae;
}
-
+
if (seg == null || seg.array == null || seg.count == 0)
continue;
-
+
int width = metrics.charsWidth(seg.array, seg.offset, seg.count);
if (width > span)
{
@@ -397,7 +397,7 @@ public class PlainView extends View implements TabExpander
maxLineLength = span;
return maxLineLength;
}
-
+
public float getPreferredSpan(int axis)
{
if (axis != X_AXIS && axis != Y_AXIS)
@@ -419,7 +419,7 @@ public class PlainView extends View implements TabExpander
span = metrics.getHeight() * el.getElementCount();
break;
}
-
+
return span;
}
@@ -483,14 +483,14 @@ public class PlainView extends View implements TabExpander
pos = -1;
}
}
-
+
}
}
// Bias is always forward.
b[0] = Position.Bias.Forward;
return pos;
- }
-
+ }
+
/**
* Since insertUpdate and removeUpdate each deal with children
* Elements being both added and removed, they both have to perform
@@ -592,7 +592,7 @@ public class PlainView extends View implements TabExpander
/**
* This method is called when something is inserted into the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -605,7 +605,7 @@ public class PlainView extends View implements TabExpander
/**
* This method is called when something is removed from the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -614,28 +614,28 @@ public class PlainView extends View implements TabExpander
{
updateDamage(changes, a, f);
}
-
+
/**
- * This method is called when attributes were changed in the
+ * This method is called when attributes were changed in the
* Document in a location that this view is responsible for.
*/
public void changedUpdate (DocumentEvent changes, Shape a, ViewFactory f)
{
updateDamage(changes, a, f);
}
-
+
/**
* Repaint the given line range. This is called from insertUpdate,
- * changedUpdate, and removeUpdate when no new lines were added
- * and no lines were removed, to repaint the line that was
+ * changedUpdate, and removeUpdate when no new lines were added
+ * and no lines were removed, to repaint the line that was
* modified.
- *
+ *
* @param line0 the start of the range
* @param line1 the end of the range
* @param a the rendering region of the host
* @param host the Component that uses this View (used to call repaint
* on that Component)
- *
+ *
* @since 1.4
*/
protected void damageLineRange (int line0, int line1, Shape a, Component host)
@@ -656,7 +656,7 @@ public class PlainView extends View implements TabExpander
rec0.height, rec1);
host.repaint(repaintRec.x, repaintRec.y, repaintRec.width,
repaintRec.height);
- }
+ }
}
/**
@@ -722,4 +722,3 @@ public class PlainView extends View implements TabExpander
lineEl.getStartOffset());
}
}
-
diff --git a/javax/swing/text/Position.java b/javax/swing/text/Position.java
index d02eb834d..56c8b6e68 100644
--- a/javax/swing/text/Position.java
+++ b/javax/swing/text/Position.java
@@ -1,4 +1,4 @@
-/* Position.java --
+/* Position.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ public interface Position
public static final Bias Forward = new Bias("Forward");
private String name;
-
+
private Bias(String n)
{
name = n;
@@ -57,6 +57,6 @@ public interface Position
return name;
}
}
-
+
int getOffset();
}
diff --git a/javax/swing/text/Segment.java b/javax/swing/text/Segment.java
index 63c5fa09d..7486ab338 100644
--- a/javax/swing/text/Segment.java
+++ b/javax/swing/text/Segment.java
@@ -45,16 +45,16 @@ import java.text.CharacterIterator;
public class Segment implements Cloneable, CharacterIterator
{
private boolean partialReturn;
-
+
/** The current index. */
private int current;
-
+
/** Storage for the characters (may contain additional characters). */
public char[] array;
-
+
/** The number of characters in the segment. */
public int count;
-
+
/** The offset of the first character in the segment. */
public int offset;
@@ -68,7 +68,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Creates a new <code>Segment</code>.
- *
+ *
* @param array the underlying character data.
* @param offset the offset of the first character in the segment.
* @param count the number of characters in the segment.
@@ -79,38 +79,38 @@ public class Segment implements Cloneable, CharacterIterator
this.offset = offset;
this.count = count;
}
-
+
/**
* Clones the segment (note that the underlying character array is not cloned,
* just the reference to it).
- *
+ *
* @return A clone of the segment.
*/
public Object clone()
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- return null;
+ return null;
}
}
/**
* Returns the character at the current index. If the segment consists of
- * zero characters, or the current index has passed the end of the
+ * zero characters, or the current index has passed the end of the
* characters in the segment, this method returns {@link #DONE}.
- *
+ *
* @return The character at the current index.
*/
public char current()
{
if (count == 0
- || current >= getEndIndex())
+ || current >= getEndIndex())
return DONE;
-
+
return array[current];
}
@@ -118,8 +118,8 @@ public class Segment implements Cloneable, CharacterIterator
* Sets the current index to the first character in the segment and returns
* that character. If the segment contains zero characters, this method
* returns {@link #DONE}.
- *
- * @return The first character in the segment, or {@link #DONE} if the
+ *
+ * @return The first character in the segment, or {@link #DONE} if the
* segment contains zero characters.
*/
public char first()
@@ -133,7 +133,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Returns the index of the first character in the segment.
- *
+ *
* @return The index of the first character.
*/
public int getBeginIndex()
@@ -142,10 +142,10 @@ public class Segment implements Cloneable, CharacterIterator
}
/**
- * Returns the end index for the segment (one position beyond the last
- * character in the segment - note that this can be outside the range of the
+ * Returns the end index for the segment (one position beyond the last
+ * character in the segment - note that this can be outside the range of the
* underlying character array).
- *
+ *
* @return The end index for the segment.
*/
public int getEndIndex()
@@ -155,7 +155,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Returns the index of the current character in the segment.
- *
+ *
* @return The index of the current character.
*/
public int getIndex()
@@ -164,12 +164,12 @@ public class Segment implements Cloneable, CharacterIterator
}
/**
- * Sets the current index to point to the last character in the segment and
- * returns that character. If the segment contains zero characters, the
- * current index is set to {@link #getEndIndex()} and this method returns
+ * Sets the current index to point to the last character in the segment and
+ * returns that character. If the segment contains zero characters, the
+ * current index is set to {@link #getEndIndex()} and this method returns
* {@link #DONE}.
- *
- * @return The last character in the segment, or {@link #DONE} if the
+ *
+ * @return The last character in the segment, or {@link #DONE} if the
* segment contains zero characters.
*/
public char last()
@@ -179,20 +179,20 @@ public class Segment implements Cloneable, CharacterIterator
current = getEndIndex();
return DONE;
}
-
+
current = getEndIndex() - 1;
return array[current];
}
/**
- * Sets the current index to point to the next character in the segment and
+ * Sets the current index to point to the next character in the segment and
* returns that character. If the next character position is past the end of
* the segment, the index is set to {@link #getEndIndex()} and the method
- * returns {@link #DONE}. If the segment contains zero characters, this
+ * returns {@link #DONE}. If the segment contains zero characters, this
* method returns {@link #DONE}.
- *
+ *
* @return The next character in the segment or {@link #DONE} (if the next
- * character position is past the end of the segment or if the
+ * character position is past the end of the segment or if the
* segment contains zero characters).
*/
public char next()
@@ -202,30 +202,30 @@ public class Segment implements Cloneable, CharacterIterator
if ((current + 1) >= getEndIndex())
{
- current = getEndIndex();
- return DONE;
+ current = getEndIndex();
+ return DONE;
}
-
+
current++;
return array[current];
}
/**
- * Sets the current index to point to the previous character in the segment
- * and returns that character. If the current index is equal to
- * {@link #getBeginIndex()}, or if the segment contains zero characters, this
+ * Sets the current index to point to the previous character in the segment
+ * and returns that character. If the current index is equal to
+ * {@link #getBeginIndex()}, or if the segment contains zero characters, this
* method returns {@link #DONE}.
- *
- * @return The previous character in the segment or {@link #DONE} (if the
- * current character position is at the beginning of the segment or
+ *
+ * @return The previous character in the segment or {@link #DONE} (if the
+ * current character position is at the beginning of the segment or
* if the segment contains zero characters).
*/
public char previous()
{
if (count == 0
- || current == getBeginIndex())
+ || current == getBeginIndex())
return DONE;
-
+
current--;
return array[current];
}
@@ -233,20 +233,20 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Sets the current index and returns the character at that position (or
* {@link #DONE} if the index is equal to {@link #getEndIndex()}.
- *
+ *
* @param position the current position.
- *
+ *
* @return The character at the specified <code>position</code>, or
- * {@link #DONE} if <code>position</code> is equal to
+ * {@link #DONE} if <code>position</code> is equal to
* {@link #getEndIndex()}.
- *
+ *
* @throws IllegalArgumentException if <code>position</code> is not in the
* range {@link #getBeginIndex()} to {@link #getEndIndex()}.
*/
public char setIndex(int position)
{
if (position < getBeginIndex()
- || position > getEndIndex())
+ || position > getEndIndex())
throw new IllegalArgumentException("position: " + position
+ ", beginIndex: " + getBeginIndex()
+ ", endIndex: " + getEndIndex()
@@ -256,15 +256,15 @@ public class Segment implements Cloneable, CharacterIterator
if (position == getEndIndex())
return DONE;
-
+
return array[current];
}
/**
- * Returns a <code>String</code> containing the same characters as this
+ * Returns a <code>String</code> containing the same characters as this
* <code>Segment</code>.
- *
- * @return A <code>String</code> containing the same characters as this
+ *
+ * @return A <code>String</code> containing the same characters as this
* <code>Segment</code>.
*/
public String toString()
@@ -274,19 +274,19 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Sets the partial return flag.
- *
+ *
* @param p the new value of the flag.
- *
+ *
* @since 1.4
*/
public void setPartialReturn(boolean p)
{
partialReturn = p;
}
-
+
/**
* Returns the partial return flag.
- *
+ *
* @return The partial return flag.
* @since 1.4
*/
diff --git a/javax/swing/text/SimpleAttributeSet.java b/javax/swing/text/SimpleAttributeSet.java
index 701fa8a7c..02299019b 100644
--- a/javax/swing/text/SimpleAttributeSet.java
+++ b/javax/swing/text/SimpleAttributeSet.java
@@ -66,13 +66,13 @@ public class SimpleAttributeSet
{
tab = new Hashtable();
}
-
+
/**
* Creates a new <code>SimpleAttributeSet</code> with the same attributes
* and resolve parent as the specified set.
- *
+ *
* @param a the attributes (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
*/
public SimpleAttributeSet(AttributeSet a)
@@ -85,10 +85,10 @@ public class SimpleAttributeSet
* Adds an attribute with the given <code>name</code> and <code>value</code>
* to the set. If the set already contains an attribute with the given
* <code>name</code>, the attribute value is updated.
- *
+ *
* @param name the attribute name (<code>null</code> not permitted).
* @param value the value (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
*/
public void addAttribute(Object name, Object value)
@@ -98,11 +98,11 @@ public class SimpleAttributeSet
/**
* Adds all the attributes from <code>attributes</code> to this set.
- *
+ *
* @param attributes the set of attributes to add (<code>null</code> not
* permitted).
- *
- * @throws NullPointerException if <code>attributes</code> is
+ *
+ * @throws NullPointerException if <code>attributes</code> is
* <code>null</code>.
*/
public void addAttributes(AttributeSet attributes)
@@ -118,7 +118,7 @@ public class SimpleAttributeSet
/**
* Returns a clone of the attribute set.
- *
+ *
* @return A clone of the attribute set.
*/
public Object clone()
@@ -159,7 +159,7 @@ public class SimpleAttributeSet
return false;
}
}
-
+
/**
* Returns true if the given name and value are found in this AttributeSet.
* Does not check the resolve parent.
@@ -169,7 +169,7 @@ public class SimpleAttributeSet
*/
boolean containsAttributeLocally(Object name, Object value)
{
- return tab.containsKey(name)
+ return tab.containsKey(name)
&& tab.get(name).equals(value);
}
@@ -190,7 +190,7 @@ public class SimpleAttributeSet
Object name = e.nextElement();
Object val = attributes.getAttribute(name);
if (! containsAttribute(name, val))
- return false;
+ return false;
}
return true;
}
@@ -207,33 +207,33 @@ public class SimpleAttributeSet
/**
* Checks this set for equality with an arbitrary object.
- *
+ *
* @param obj the object (<code>null</code> permitted).
- *
+ *
* @return <code>true</code> if this set is equal to <code>obj</code>, and
- * <code>false</code> otherwise.
+ * <code>false</code> otherwise.
*/
public boolean equals(Object obj)
{
- return
+ return
(obj instanceof AttributeSet)
&& this.isEqual((AttributeSet) obj);
}
/**
- * Returns the value of the specified attribute, or <code>null</code> if
+ * Returns the value of the specified attribute, or <code>null</code> if
* there is no attribute with that name. If the attribute is not defined
* directly in this set, the parent hierarchy (if there is one) will be
* used.
- *
+ *
* @param name the attribute (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>name</code> is <code>null</code>.
*/
public Object getAttribute(Object name)
{
Object val = tab.get(name);
- if (val != null)
+ if (val != null)
return val;
AttributeSet p = getResolveParent();
@@ -245,10 +245,10 @@ public class SimpleAttributeSet
/**
* Returns the number of attributes stored in this set, plus 1 if a parent
- * has been specified (the reference to the parent is stored as a special
+ * has been specified (the reference to the parent is stored as a special
* attribute). The attributes stored in the parent do NOT contribute
* to the count.
- *
+ *
* @return The attribute count.
*/
public int getAttributeCount()
@@ -258,7 +258,7 @@ public class SimpleAttributeSet
/**
* Returns an enumeration of the attribute names.
- *
+ *
* @return An enumeration of the attribute names.
*/
public Enumeration<?> getAttributeNames()
@@ -268,9 +268,9 @@ public class SimpleAttributeSet
/**
* Returns the resolving parent.
- *
+ *
* @return The resolving parent (possibly <code>null</code>).
- *
+ *
* @see #setResolveParent(AttributeSet)
*/
public AttributeSet getResolveParent()
@@ -280,7 +280,7 @@ public class SimpleAttributeSet
/**
* Returns a hash code for this instance.
- *
+ *
* @return A hash code.
*/
public int hashCode()
@@ -292,7 +292,7 @@ public class SimpleAttributeSet
* Returns <code>true</code> if the given attribute is defined in this set,
* and <code>false</code> otherwise. The parent attribute set is not
* checked.
- *
+ *
* @param attrName the attribute name (<code>null</code> not permitted).
*/
public boolean isDefined(Object attrName)
@@ -301,28 +301,28 @@ public class SimpleAttributeSet
}
/**
- * Returns <code>true</code> if the set contains no attributes, and
- * <code>false</code> otherwise. Note that the resolving parent is
- * stored as an attribute, so this method will return <code>false</code> if
+ * Returns <code>true</code> if the set contains no attributes, and
+ * <code>false</code> otherwise. Note that the resolving parent is
+ * stored as an attribute, so this method will return <code>false</code> if
* a resolving parent is set.
- *
- * @return <code>true</code> if the set contains no attributes, and
+ *
+ * @return <code>true</code> if the set contains no attributes, and
* <code>false</code> otherwise.
*/
public boolean isEmpty()
{
- return tab.isEmpty();
+ return tab.isEmpty();
}
/**
* Returns true if the given set has the same number of attributes
* as this set and <code>containsAttributes(attr)</code> returns
* <code>true</code>.
- *
+ *
* @param attr the attribute set (<code>null</code> not permitted).
- *
+ *
* @return A boolean.
- *
+ *
* @throws NullPointerException if <code>attr</code> is <code>null</code>.
*/
public boolean isEqual(AttributeSet attr)
@@ -330,14 +330,14 @@ public class SimpleAttributeSet
return getAttributeCount() == attr.getAttributeCount()
&& this.containsAttributes(attr);
}
-
+
/**
- * Removes the attribute with the specified <code>name</code>, if this
+ * Removes the attribute with the specified <code>name</code>, if this
* attribute is defined. This method will only remove an attribute from
* this set, not from the resolving parent.
- *
+ *
* @param name the attribute name (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>name</code> is <code>null</code>.
*/
public void removeAttribute(Object name)
@@ -346,13 +346,13 @@ public class SimpleAttributeSet
}
/**
- * Removes attributes from this set if they are found in the
+ * Removes attributes from this set if they are found in the
* given set. Only attributes whose key AND value are removed.
- * Removes attributes only from this set, not from the resolving parent.
- * Since the resolving parent is stored as an attribute, if
+ * Removes attributes only from this set, not from the resolving parent.
+ * Since the resolving parent is stored as an attribute, if
* <code>attributes</code> has the same resolving parent as this set, the
* parent will be removed from this set.
- *
+ *
* @param attributes the attributes (<code>null</code> not permitted).
*/
public void removeAttributes(AttributeSet attributes)
@@ -363,16 +363,16 @@ public class SimpleAttributeSet
Object name = e.nextElement();
Object val = attributes.getAttribute(name);
if (containsAttributeLocally(name, val))
- removeAttribute(name);
+ removeAttribute(name);
}
}
/**
* Removes the attributes listed in <code>names</code>.
- *
+ *
* @param names the attribute names (<code>null</code> not permitted).
- *
- * @throws NullPointerException if <code>names</code> is <code>null</code>
+ *
+ * @throws NullPointerException if <code>names</code> is <code>null</code>
* or contains any <code>null</code> values.
*/
public void removeAttributes(Enumeration<?> names)
@@ -380,7 +380,7 @@ public class SimpleAttributeSet
while (names.hasMoreElements())
{
removeAttribute(names.nextElement());
- }
+ }
}
/**
@@ -388,28 +388,28 @@ public class SimpleAttributeSet
* it is not found in this set, then the resolving parent is also used for
* the lookup.
* <p>
- * Note that the parent is stored as an attribute, and will contribute 1 to
- * the count returned by {@link #getAttributeCount()}.
- *
+ * Note that the parent is stored as an attribute, and will contribute 1 to
+ * the count returned by {@link #getAttributeCount()}.
+ *
* @param parent the parent attribute set (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if <code>parent</code> is <code>null</code>.
- *
+ *
* @see #setResolveParent(AttributeSet)
*/
public void setResolveParent(AttributeSet parent)
{
addAttribute(ResolveAttribute, parent);
}
-
+
/**
* Returns a string representation of this instance, typically used for
* debugging purposes.
- *
+ *
* @return A string representation of this instance.
*/
public String toString()
{
return tab.toString();
- }
+ }
}
diff --git a/javax/swing/text/StringContent.java b/javax/swing/text/StringContent.java
index 4a3f9d752..a017de1c9 100644
--- a/javax/swing/text/StringContent.java
+++ b/javax/swing/text/StringContent.java
@@ -54,15 +54,15 @@ import javax.swing.undo.UndoableEdit;
* An implementation of the <code>AbstractDocument.Content</code>
* interface useful for small documents or debugging. The character
* content is a simple character array. It's not really efficient.
- *
+ *
* <p>Do not use this class for large size.</p>
*/
-public final class StringContent
+public final class StringContent
implements AbstractDocument.Content, Serializable
{
/**
* Stores a reference to a mark that can be resetted to the original value
- * after a mark has been moved. This is used for undoing actions.
+ * after a mark has been moved. This is used for undoing actions.
*/
private class UndoPosRef
{
@@ -102,7 +102,7 @@ public final class StringContent
* the actual offset of the position. This is pulled out of the
* GapContentPosition object so that the mark and position can be handled
* independently, and most important, so that the StickyPosition can
- * be garbage collected while we still hold a reference to the Mark object.
+ * be garbage collected while we still hold a reference to the Mark object.
*/
private class Mark
{
@@ -148,7 +148,7 @@ public final class StringContent
private class InsertUndo extends AbstractUndoableEdit
{
private int start;
-
+
private int length;
private String redoContent;
@@ -177,7 +177,7 @@ public final class StringContent
throw new CannotUndoException();
}
}
-
+
public void redo()
{
super.redo();
@@ -303,8 +303,8 @@ public final class StringContent
/**
* Creates a new instance containing the string "\n".
- *
- * @param initialLength the initial length of the underlying character
+ *
+ * @param initialLength the initial length of the underlying character
* array used to store the content.
*/
public StringContent(int initialLength)
@@ -337,10 +337,10 @@ public final class StringContent
* Creates a position reference for the character at the given offset. The
* position offset will be automatically updated when new characters are
* inserted into or removed from the content.
- *
+ *
* @param offset the character offset.
- *
- * @throws BadLocationException if offset is outside the bounds of the
+ *
+ * @throws BadLocationException if offset is outside the bounds of the
* content.
*/
public Position createPosition(int offset) throws BadLocationException
@@ -351,26 +351,26 @@ public final class StringContent
StickyPosition sp = new StickyPosition(offset);
return sp;
}
-
+
/**
* Returns the length of the string content, including the '\n' character at
* the end.
- *
+ *
* @return The length of the string content.
*/
public int length()
{
return count;
}
-
+
/**
- * Inserts <code>str</code> at the given position and returns an
+ * Inserts <code>str</code> at the given position and returns an
* {@link UndoableEdit} that enables undo/redo support.
- *
- * @param where the insertion point (must be less than
+ *
+ * @param where the insertion point (must be less than
* <code>length()</code>).
* @param str the string to insert (<code>null</code> not permitted).
- *
+ *
* @return An object that can undo the insertion.
*/
public UndoableEdit insertString(int where, String str)
@@ -402,23 +402,23 @@ public final class StringContent
InsertUndo iundo = new InsertUndo(where, insert.length);
return iundo;
}
-
+
/**
- * Removes the specified range of characters and returns an
+ * Removes the specified range of characters and returns an
* {@link UndoableEdit} that enables undo/redo support.
- *
+ *
* @param where the starting index.
* @param nitems the number of characters.
- *
+ *
* @return An object that can undo the removal.
- *
+ *
* @throws BadLocationException if the character range extends outside the
* bounds of the content OR includes the last character.
*/
public UndoableEdit remove(int where, int nitems) throws BadLocationException
{
checkLocation(where, nitems + 1);
- RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where,
+ RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where,
nitems));
replace(where, nitems, EMPTY);
@@ -464,15 +464,15 @@ public final class StringContent
}
/**
- * Returns a new <code>String</code> containing the characters in the
+ * Returns a new <code>String</code> containing the characters in the
* specified range.
- *
+ *
* @param where the start index.
* @param len the number of characters.
- *
+ *
* @return A string.
- *
- * @throws BadLocationException if the requested range of characters extends
+ *
+ * @throws BadLocationException if the requested range of characters extends
* outside the bounds of the content.
*/
public String getString(int where, int len) throws BadLocationException
@@ -482,21 +482,21 @@ public final class StringContent
checkLocation(where, len);
return new String(this.content, where, len);
}
-
+
/**
- * Updates <code>txt</code> to contain a direct reference to the underlying
+ * Updates <code>txt</code> to contain a direct reference to the underlying
* character array.
- *
+ *
* @param where the index of the first character.
* @param len the number of characters.
- * @param txt a carrier for the return result (<code>null</code> not
+ * @param txt a carrier for the return result (<code>null</code> not
* permitted).
- *
- * @throws BadLocationException if the requested character range is not
+ *
+ * @throws BadLocationException if the requested character range is not
* within the bounds of the content.
* @throws NullPointerException if <code>txt</code> is <code>null</code>.
*/
- public void getChars(int where, int len, Segment txt)
+ public void getChars(int where, int len, Segment txt)
throws BadLocationException
{
if (where + len > count)
@@ -523,13 +523,13 @@ public final class StringContent
}
}
- /**
+ /**
* A utility method that checks the validity of the specified character
* range.
- *
+ *
* @param where the first character in the range.
* @param len the number of characters in the range.
- *
+ *
* @throws BadLocationException if the specified range is not within the
* bounds of the content.
*/
@@ -567,4 +567,3 @@ public final class StringContent
}
}
}
-
diff --git a/javax/swing/text/Style.java b/javax/swing/text/Style.java
index 851ac0219..801082874 100644
--- a/javax/swing/text/Style.java
+++ b/javax/swing/text/Style.java
@@ -1,4 +1,4 @@
-/* Style.java --
+/* Style.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/text/StyleConstants.java b/javax/swing/text/StyleConstants.java
index 4e5005c6b..bdc63719d 100644
--- a/javax/swing/text/StyleConstants.java
+++ b/javax/swing/text/StyleConstants.java
@@ -45,35 +45,35 @@ import java.util.ArrayList;
import javax.swing.Icon;
/**
- * Represents standard attribute keys. This class also contains a set of
- * useful static utility methods for querying and populating an
+ * Represents standard attribute keys. This class also contains a set of
+ * useful static utility methods for querying and populating an
* {@link AttributeSet}.
- *
+ *
* @since 1.2
*/
public class StyleConstants
{
- /**
- * A value representing left alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing left alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_LEFT = 0;
- /**
- * A value representing center alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing center alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_CENTER = 1;
- /**
- * A value representing right alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing right alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_RIGHT = 2;
- /**
- * A value representing ful justification for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing ful justification for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_JUSTIFIED = 3;
@@ -82,72 +82,72 @@ public class StyleConstants
/** An alias for {@link CharacterConstants#BidiLevel}. */
public static final Object BidiLevel = CharacterConstants.BidiLevel;
-
+
/** An alias for {@link CharacterConstants#Bold}. */
public static final Object Bold = CharacterConstants.Bold;
-
+
/** An alias for {@link CharacterConstants#ComponentAttribute}. */
- public static final Object ComponentAttribute
+ public static final Object ComponentAttribute
= CharacterConstants.ComponentAttribute;
-
+
/** An alias for {@link CharacterConstants#Family}. */
public static final Object Family = CharacterConstants.Family;
-
+
/** An alias for {@link CharacterConstants#Family}. */
- public static final Object FontFamily = CharacterConstants.Family;
-
+ public static final Object FontFamily = CharacterConstants.Family;
+
/** An alias for {@link CharacterConstants#Size}. */
public static final Object FontSize = CharacterConstants.Size;
-
+
/** An alias for {@link CharacterConstants#Foreground}. */
public static final Object Foreground = CharacterConstants.Foreground;
-
+
/** An alias for {@link CharacterConstants#IconAttribute}. */
public static final Object IconAttribute = CharacterConstants.IconAttribute;
-
+
/** An alias for {@link CharacterConstants#Italic}. */
public static final Object Italic = CharacterConstants.Italic;
-
+
/** An alias for {@link CharacterConstants#Size}. */
public static final Object Size = CharacterConstants.Size;
-
+
/** An alias for {@link CharacterConstants#StrikeThrough}. */
public static final Object StrikeThrough = CharacterConstants.StrikeThrough;
-
+
/** An alias for {@link CharacterConstants#Subscript}. */
public static final Object Subscript = CharacterConstants.Subscript;
-
+
/** An alias for {@link CharacterConstants#Superscript}. */
public static final Object Superscript = CharacterConstants.Superscript;
-
+
/** An alias for {@link CharacterConstants#Underline}. */
public static final Object Underline = CharacterConstants.Underline;
/** An alias for {@link ParagraphConstants#Alignment}. */
public static final Object Alignment = ParagraphConstants.Alignment;
-
+
/** An alias for {@link ParagraphConstants#FirstLineIndent}. */
- public static final Object FirstLineIndent
+ public static final Object FirstLineIndent
= ParagraphConstants.FirstLineIndent;
-
+
/** An alias for {@link ParagraphConstants#LeftIndent}. */
public static final Object LeftIndent = ParagraphConstants.LeftIndent;
-
+
/** An alias for {@link ParagraphConstants#LineSpacing}. */
public static final Object LineSpacing = ParagraphConstants.LineSpacing;
-
+
/** An alias for {@link ParagraphConstants#Orientation}. */
public static final Object Orientation = ParagraphConstants.Orientation;
-
+
/** An alias for {@link ParagraphConstants#RightIndent}. */
public static final Object RightIndent = ParagraphConstants.RightIndent;
-
+
/** An alias for {@link ParagraphConstants#SpaceAbove}. */
public static final Object SpaceAbove = ParagraphConstants.SpaceAbove;
-
+
/** An alias for {@link ParagraphConstants#SpaceBelow}. */
public static final Object SpaceBelow = ParagraphConstants.SpaceBelow;
-
+
/** An alias for {@link ParagraphConstants#TabSet}. */
public static final Object TabSet = ParagraphConstants.TabSet;
@@ -155,13 +155,13 @@ public class StyleConstants
public static final String IconElementName = "icon";
- public static final Object ComposedTextAttribute
+ public static final Object ComposedTextAttribute
= new StyleConstants("composed text");
-
+
public static final Object ModelAttribute = new StyleConstants("model");
-
+
public static final Object NameAttribute = new StyleConstants("name");
-
+
public static final Object ResolveAttribute = new StyleConstants("resolver");
/**
@@ -174,7 +174,7 @@ public class StyleConstants
// Package-private to avoid accessor constructor for use by
// subclasses.
- StyleConstants(String k)
+ StyleConstants(String k)
{
keyname = k;
if (keys == null)
@@ -184,7 +184,7 @@ public class StyleConstants
/**
* Returns a string representation of the attribute key.
- *
+ *
* @return A string representation of the attribute key.
*/
public String toString()
@@ -193,15 +193,15 @@ public class StyleConstants
}
/**
- * Returns the alignment specified in the given attributes, or
+ * Returns the alignment specified in the given attributes, or
* {@link #ALIGN_LEFT} if no alignment is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
- * @return The alignment (typically one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_RIGHT}, {@link #ALIGN_CENTER} or
+ *
+ * @return The alignment (typically one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_RIGHT}, {@link #ALIGN_CENTER} or
* {@link #ALIGN_JUSTIFIED}).
- *
+ *
* @see #setAlignment(MutableAttributeSet, int)
*/
public static int getAlignment(AttributeSet a)
@@ -210,38 +210,38 @@ public class StyleConstants
if (i != null)
return i.intValue();
else
- return ALIGN_LEFT;
- }
+ return ALIGN_LEFT;
+ }
/**
* Returns the background color specified in the given attributes, or
* {@link Color#BLACK} if no background color is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The background color.
- *
+ *
* @see #setBackground(MutableAttributeSet, Color)
*/
public static Color getBackground(AttributeSet a)
{
Color c = (Color) a.getAttribute(Background);
- if (c != null)
+ if (c != null)
return c;
else
return Color.BLACK;
- }
+ }
/**
- * Returns the bidi level specified in the given attributes, or
+ * Returns the bidi level specified in the given attributes, or
* <code>0</code> if no bidi level is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The bidi level.
- *
+ *
* @see #setBidiLevel(MutableAttributeSet, int)
- */
+ */
public static int getBidiLevel(AttributeSet a)
{
Integer i = (Integer) a.getAttribute(BidiLevel);
@@ -249,18 +249,18 @@ public class StyleConstants
return i.intValue();
else
return 0;
- }
+ }
/**
- * Returns the component specified in the given attributes, or
+ * Returns the component specified in the given attributes, or
* <code>null</code> if no component is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The component (possibly <code>null</code>).
- *
+ *
* @see #setComponent(MutableAttributeSet, Component)
- */
+ */
public static Component getComponent(AttributeSet a)
{
Component c = (Component) a.getAttribute(ComponentAttribute);
@@ -268,18 +268,18 @@ public class StyleConstants
return c;
else
return null;
- }
+ }
/**
- * Returns the indentation specified in the given attributes, or
+ * Returns the indentation specified in the given attributes, or
* <code>0.0f</code> if no indentation is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The indentation.
- *
+ *
* @see #setFirstLineIndent(MutableAttributeSet, float)
- */
+ */
public static float getFirstLineIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(FirstLineIndent);
@@ -287,18 +287,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the font family specified in the given attributes, or
+ * Returns the font family specified in the given attributes, or
* <code>Monospaced</code> if no font family is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The font family.
- *
+ *
* @see #setFontFamily(MutableAttributeSet, String)
- */
+ */
public static String getFontFamily(AttributeSet a)
{
String ff = (String) a.getAttribute(FontFamily);
@@ -306,18 +306,18 @@ public class StyleConstants
return ff;
else
return "Monospaced";
- }
+ }
/**
- * Returns the font size specified in the given attributes, or
+ * Returns the font size specified in the given attributes, or
* <code>12</code> if no font size is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The font size.
- *
+ *
* @see #setFontSize(MutableAttributeSet, int)
- */
+ */
public static int getFontSize(AttributeSet a)
{
Integer i = (Integer) a.getAttribute(FontSize);
@@ -325,16 +325,16 @@ public class StyleConstants
return i.intValue();
else
return 12;
- }
+ }
/**
* Returns the foreground color specified in the given attributes, or
* {@link Color#BLACK} if no foreground color is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The foreground color.
- *
+ *
* @see #setForeground(MutableAttributeSet, Color)
*/
public static Color getForeground(AttributeSet a)
@@ -344,33 +344,33 @@ public class StyleConstants
return c;
else
return Color.BLACK;
- }
+ }
/**
- * Returns the icon specified in the given attributes, or
+ * Returns the icon specified in the given attributes, or
* <code>null</code> if no icon is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The icon (possibly <code>null</code>).
- *
+ *
* @see #setIcon(MutableAttributeSet, Icon)
- */
+ */
public static Icon getIcon(AttributeSet a)
{
return (Icon) a.getAttribute(IconAttribute);
- }
+ }
/**
- * Returns the left indentation specified in the given attributes, or
+ * Returns the left indentation specified in the given attributes, or
* <code>0.0f</code> if no left indentation is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The left indentation.
- *
+ *
* @see #setLeftIndent(MutableAttributeSet, float)
- */
+ */
public static float getLeftIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(LeftIndent);
@@ -378,18 +378,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the line spacing specified in the given attributes, or
+ * Returns the line spacing specified in the given attributes, or
* <code>0.0f</code> if no line spacing is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The line spacing.
- *
+ *
* @see #setLineSpacing(MutableAttributeSet, float)
- */
+ */
public static float getLineSpacing(AttributeSet a)
{
Float f = (Float) a.getAttribute(LineSpacing);
@@ -397,18 +397,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the right indentation specified in the given attributes, or
+ * Returns the right indentation specified in the given attributes, or
* <code>0.0f</code> if no right indentation is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The right indentation.
- *
+ *
* @see #setRightIndent(MutableAttributeSet, float)
- */
+ */
public static float getRightIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(RightIndent);
@@ -416,37 +416,37 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the 'space above' specified in the given attributes, or
+ * Returns the 'space above' specified in the given attributes, or
* <code>0.0f</code> if no 'space above' is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The 'space above'.
- *
+ *
* @see #setSpaceAbove(MutableAttributeSet, float)
- */
+ */
public static float getSpaceAbove(AttributeSet a)
{
Float f = (Float) a.getAttribute(SpaceAbove);
if (f != null)
return f.floatValue();
- else
+ else
return 0.0f;
- }
+ }
/**
- * Returns the 'space below' specified in the given attributes, or
+ * Returns the 'space below' specified in the given attributes, or
* <code>0.0f</code> if no 'space below' is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The 'space below'.
- *
+ *
* @see #setSpaceBelow(MutableAttributeSet, float)
- */
+ */
public static float getSpaceBelow(AttributeSet a)
{
Float f = (Float) a.getAttribute(SpaceBelow);
@@ -454,34 +454,34 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the tab set specified in the given attributes, or
+ * Returns the tab set specified in the given attributes, or
* <code>null</code> if no tab set is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The tab set.
- *
+ *
* @see #setTabSet(MutableAttributeSet, javax.swing.text.TabSet)
- */
+ */
public static javax.swing.text.TabSet getTabSet(AttributeSet a)
{
// I'm guessing that the fully qualified class name is to differentiate
// between the TabSet class and the TabSet (attribute) instance on some
// compiler...
return (javax.swing.text.TabSet) a.getAttribute(StyleConstants.TabSet);
- }
+ }
/**
- * Returns the value of the bold flag in the given attributes, or
+ * Returns the value of the bold flag in the given attributes, or
* <code>false</code> if no bold flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The bold flag.
- *
+ *
* @see #setBold(MutableAttributeSet, boolean)
*/
public static boolean isBold(AttributeSet a)
@@ -491,16 +491,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the italic flag in the given attributes, or
+ * Returns the value of the italic flag in the given attributes, or
* <code>false</code> if no italic flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The italic flag.
- *
+ *
* @see #setItalic(MutableAttributeSet, boolean)
*/
public static boolean isItalic(AttributeSet a)
@@ -510,16 +510,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the strike-through flag in the given attributes, or
+ * Returns the value of the strike-through flag in the given attributes, or
* <code>false</code> if no strike-through flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The strike-through flag.
- *
+ *
* @see #setStrikeThrough(MutableAttributeSet, boolean)
*/
public static boolean isStrikeThrough(AttributeSet a)
@@ -529,16 +529,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the subscript flag in the given attributes, or
+ * Returns the value of the subscript flag in the given attributes, or
* <code>false</code> if no subscript flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The subscript flag.
- *
+ *
* @see #setSubscript(MutableAttributeSet, boolean)
*/
public static boolean isSubscript(AttributeSet a)
@@ -548,16 +548,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the superscript flag in the given attributes, or
+ * Returns the value of the superscript flag in the given attributes, or
* <code>false</code> if no superscript flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The superscript flag.
- *
+ *
* @see #setSuperscript(MutableAttributeSet, boolean)
*/
public static boolean isSuperscript(AttributeSet a)
@@ -565,18 +565,18 @@ public class StyleConstants
Boolean b = (Boolean) a.getAttribute(Superscript);
if (b != null)
return b.booleanValue();
- else
+ else
return false;
- }
+ }
/**
- * Returns the value of the underline flag in the given attributes, or
+ * Returns the value of the underline flag in the given attributes, or
* <code>false</code> if no underline flag is specified.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- *
+ *
* @return The underline flag.
- *
+ *
* @see #setUnderline(MutableAttributeSet, boolean)
*/
public static boolean isUnderline(AttributeSet a)
@@ -586,140 +586,140 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
* Adds an alignment attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
- * @param align the alignment (typically one of
- * {@link StyleConstants#ALIGN_LEFT},
- * {@link StyleConstants#ALIGN_RIGHT},
- * {@link StyleConstants#ALIGN_CENTER} or
+ * @param align the alignment (typically one of
+ * {@link StyleConstants#ALIGN_LEFT},
+ * {@link StyleConstants#ALIGN_RIGHT},
+ * {@link StyleConstants#ALIGN_CENTER} or
* {@link StyleConstants#ALIGN_JUSTIFIED}).
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getAlignment(AttributeSet)
*/
public static void setAlignment(MutableAttributeSet a, int align)
{
a.addAttribute(Alignment, new Integer(align));
- }
+ }
/**
* Adds a background attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param bg the background (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getBackground(AttributeSet)
*/
public static void setBackground(MutableAttributeSet a, Color bg)
{
a.addAttribute(Background, bg);
- }
+ }
/**
* Adds a bidi-level attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param lev the level.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getBidiLevel(AttributeSet)
*/
public static void setBidiLevel(MutableAttributeSet a, int lev)
{
a.addAttribute(BidiLevel, new Integer(lev));
- }
+ }
/**
* Adds a bold attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the new value of the bold attribute.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isBold(AttributeSet)
*/
public static void setBold(MutableAttributeSet a, boolean b)
{
a.addAttribute(Bold, Boolean.valueOf(b));
- }
-
+ }
+
/**
* Adds a component attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param c the component (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getComponent(AttributeSet)
*/
public static void setComponent(MutableAttributeSet a, Component c)
{
a.addAttribute(ComponentAttribute, c);
- }
+ }
/**
* Adds a first line indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the indentation.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getFirstLineIndent(AttributeSet)
*/
public static void setFirstLineIndent(MutableAttributeSet a, float i)
{
a.addAttribute(FirstLineIndent, new Float(i));
- }
+ }
/**
* Adds a font family attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param fam the font family name (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getFontFamily(AttributeSet)
*/
public static void setFontFamily(MutableAttributeSet a, String fam)
{
a.addAttribute(FontFamily, fam);
- }
+ }
/**
* Adds a font size attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param s the font size (in points).
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getFontSize(AttributeSet)
*/
public static void setFontSize(MutableAttributeSet a, int s)
{
a.addAttribute(FontSize, new Integer(s));
- }
+ }
/**
* Adds a foreground color attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param fg the foreground color (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getForeground(AttributeSet)
*/
public static void setForeground(MutableAttributeSet a, Color fg)
@@ -729,12 +729,12 @@ public class StyleConstants
/**
* Adds an icon attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param c the icon (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getIcon(AttributeSet)
*/
public static void setIcon(MutableAttributeSet a, Icon c)
@@ -742,174 +742,174 @@ public class StyleConstants
a.addAttribute(AbstractDocument.ElementNameAttribute, IconElementName);
a.addAttribute(IconAttribute, c);
}
-
+
/**
* Adds an italic attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the new value of the italic attribute.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isItalic(AttributeSet)
*/
public static void setItalic(MutableAttributeSet a, boolean b)
{
a.addAttribute(Italic, Boolean.valueOf(b));
}
-
+
/**
* Adds a left indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the indentation.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getLeftIndent(AttributeSet)
*/
public static void setLeftIndent(MutableAttributeSet a, float i)
{
a.addAttribute(LeftIndent, new Float(i));
- }
+ }
/**
* Adds a line spacing attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the line spacing.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getLineSpacing(AttributeSet)
*/
public static void setLineSpacing(MutableAttributeSet a, float i)
{
a.addAttribute(LineSpacing, new Float(i));
- }
+ }
/**
* Adds a right indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the right indentation.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getRightIndent(AttributeSet)
*/
public static void setRightIndent(MutableAttributeSet a, float i)
{
a.addAttribute(RightIndent, new Float(i));
- }
+ }
/**
* Adds a 'space above' attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the space above attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getSpaceAbove(AttributeSet)
*/
public static void setSpaceAbove(MutableAttributeSet a, float i)
{
a.addAttribute(SpaceAbove, new Float(i));
- }
+ }
/**
* Adds a 'space below' attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param i the space below attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #getSpaceBelow(AttributeSet)
*/
public static void setSpaceBelow(MutableAttributeSet a, float i)
{
a.addAttribute(SpaceBelow, new Float(i));
- }
+ }
/**
* Adds a strike-through attribue to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the strike-through attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isStrikeThrough(AttributeSet)
*/
public static void setStrikeThrough(MutableAttributeSet a, boolean b)
{
a.addAttribute(StrikeThrough, Boolean.valueOf(b));
- }
+ }
/**
* Adds a subscript attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the subscript attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isSubscript(AttributeSet)
*/
public static void setSubscript(MutableAttributeSet a, boolean b)
{
a.addAttribute(Subscript, Boolean.valueOf(b));
- }
+ }
/**
* Adds a superscript attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the superscript attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isSuperscript(AttributeSet)
*/
public static void setSuperscript(MutableAttributeSet a, boolean b)
{
a.addAttribute(Superscript, Boolean.valueOf(b));
- }
+ }
/**
* Adds a {@link TabSet} attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param tabs the tab set (<code>null</code> not permitted).
- *
+ *
* @throws NullPointerException if either argument is <code>null</code>.
- *
+ *
* @see #getTabSet(AttributeSet)
*/
- public static void setTabSet(MutableAttributeSet a,
+ public static void setTabSet(MutableAttributeSet a,
javax.swing.text.TabSet tabs)
{
a.addAttribute(StyleConstants.TabSet, tabs);
- }
+ }
/**
* Adds an underline attribute to the specified set.
- *
+ *
* @param a the attribute set (<code>null</code> not permitted).
* @param b the underline attribute value.
- *
+ *
* @throws NullPointerException if <code>a</code> is <code>null</code>.
- *
+ *
* @see #isUnderline(AttributeSet)
*/
public static void setUnderline(MutableAttributeSet a, boolean b)
{
a.addAttribute(Underline, Boolean.valueOf(b));
- }
+ }
- // The remainder are so-called "typesafe enumerations" which
+ // The remainder are so-called "typesafe enumerations" which
// alias subsets of the above constants.
/**
@@ -921,56 +921,56 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private CharacterConstants(String k)
+ private CharacterConstants(String k)
{
super(k);
}
-
+
/** An alias for {@link ColorConstants#Background}. */
public static final Object Background = ColorConstants.Background;
-
+
/** A key for the bidi level character attribute. */
public static final Object BidiLevel = new CharacterConstants("bidiLevel");
-
+
/** An alias for {@link FontConstants#Bold}. */
public static final Object Bold = FontConstants.Bold;
-
+
/** A key for the component character attribute. */
- public static final Object ComponentAttribute
+ public static final Object ComponentAttribute
= new CharacterConstants("component");
-
+
/** An alias for {@link FontConstants#Family}. */
public static final Object Family = FontConstants.Family;
-
+
/** An alias for {@link FontConstants#Size}. */
public static final Object Size = FontConstants.Size;
-
+
/** An alias for {@link ColorConstants#Foreground}. */
public static final Object Foreground = ColorConstants.Foreground;
-
+
/** A key for the icon character attribute. */
public static final Object IconAttribute = new CharacterConstants("icon");
-
+
/** A key for the italic character attribute. */
public static final Object Italic = FontConstants.Italic;
-
+
/** A key for the strike through character attribute. */
- public static final Object StrikeThrough
+ public static final Object StrikeThrough
= new CharacterConstants("strikethrough");
-
+
/** A key for the subscript character attribute. */
public static final Object Subscript = new CharacterConstants("subscript");
-
+
/** A key for the superscript character attribute. */
- public static final Object Superscript
+ public static final Object Superscript
= new CharacterConstants("superscript");
-
+
/** A key for the underline character attribute. */
public static final Object Underline = new CharacterConstants("underline");
-
+
}
/**
@@ -982,14 +982,14 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private ColorConstants(String k)
+ private ColorConstants(String k)
{
super(k);
}
-
+
/** A key for the foreground color attribute. */
public static final Object Foreground = new ColorConstants("foreground");
@@ -1006,23 +1006,23 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private FontConstants(String k)
+ private FontConstants(String k)
{
super(k);
}
-
+
/** A key for the bold font attribute. */
public static final Object Bold = new FontConstants("bold");
/** A key for the family font attribute. */
public static final Object Family = new FontConstants("family");
-
+
/** A key for the italic font attribute. */
public static final Object Italic = new FontConstants("italic");
-
+
/** A key for the size font attribute. */
public static final Object Size = new FontConstants("size");
}
@@ -1036,48 +1036,48 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private ParagraphConstants(String k)
+ private ParagraphConstants(String k)
{
super(k);
}
-
+
/** A key for the alignment paragraph attribute. */
public static final Object Alignment = new ParagraphConstants("Alignment");
/** A key for the first line indentation paragraph attribute. */
- public static final Object FirstLineIndent
+ public static final Object FirstLineIndent
= new ParagraphConstants("FirstLineIndent");
-
+
/** A key for the left indentation paragraph attribute. */
- public static final Object LeftIndent
+ public static final Object LeftIndent
= new ParagraphConstants("LeftIndent");
-
+
/** A key for the line spacing paragraph attribute. */
- public static final Object LineSpacing
+ public static final Object LineSpacing
= new ParagraphConstants("LineSpacing");
-
+
/** A key for the orientation paragraph attribute. */
- public static final Object Orientation
+ public static final Object Orientation
= new ParagraphConstants("Orientation");
-
+
/** A key for the right indentation paragraph attribute. */
- public static final Object RightIndent
+ public static final Object RightIndent
= new ParagraphConstants("RightIndent");
-
+
/** A key for the 'space above' paragraph attribute. */
- public static final Object SpaceAbove
+ public static final Object SpaceAbove
= new ParagraphConstants("SpaceAbove");
-
+
/** A key for the 'space below' paragraph attribute. */
- public static final Object SpaceBelow
+ public static final Object SpaceBelow
= new ParagraphConstants("SpaceBelow");
-
+
/** A key for the tabset paragraph attribute. */
public static final Object TabSet = new ParagraphConstants("TabSet");
-
+
}
}
diff --git a/javax/swing/text/StyleContext.java b/javax/swing/text/StyleContext.java
index 4dded0d04..295398835 100644
--- a/javax/swing/text/StyleContext.java
+++ b/javax/swing/text/StyleContext.java
@@ -60,7 +60,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
-public class StyleContext
+public class StyleContext
implements Serializable, AbstractDocument.AttributeContext
{
/** The serialization UID (compatible with JDK1.5). */
@@ -74,7 +74,7 @@ public class StyleContext
protected transient ChangeEvent changeEvent;
protected EventListenerList listenerList;
-
+
private transient AttributeSet attributes;
public NamedStyle()
@@ -115,12 +115,12 @@ public class StyleContext
{
listenerList.add(ChangeListener.class, l);
}
-
+
public void removeChangeListener(ChangeListener l)
{
listenerList.remove(ChangeListener.class, l);
}
-
+
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
{
return listenerList.getListeners(listenerType);
@@ -159,7 +159,7 @@ public class StyleContext
{
return attributes.containsAttribute(name, value);
}
-
+
public boolean containsAttributes(AttributeSet attrs)
{
return attributes.containsAttributes(attrs);
@@ -172,7 +172,7 @@ public class StyleContext
copy.attributes = attributes.copyAttributes();
return copy;
}
-
+
public Object getAttribute(Object attrName)
{
return attributes.getAttribute(attrName);
@@ -187,10 +187,10 @@ public class StyleContext
{
return attributes.getAttributeNames();
}
-
+
public boolean isDefined(Object attrName)
{
- return attributes.isDefined(attrName);
+ return attributes.isDefined(attrName);
}
public boolean isEqual(AttributeSet attr)
@@ -219,7 +219,7 @@ public class StyleContext
public AttributeSet getResolveParent()
{
- return attributes.getResolveParent();
+ return attributes.getResolveParent();
}
public void setResolveParent(AttributeSet parent)
@@ -229,7 +229,7 @@ public class StyleContext
else
removeAttribute(StyleConstants.ResolveAttribute);
}
-
+
public String toString()
{
return "NamedStyle:" + getName() + " " + attributes;
@@ -250,7 +250,7 @@ public class StyleContext
readAttributeSet(s, this);
}
}
-
+
public class SmallAttributeSet
implements AttributeSet
{
@@ -321,7 +321,7 @@ public class StyleContext
}
return eq;
}
-
+
public Object getAttribute(Object key)
{
Object att = null;
@@ -334,7 +334,7 @@ public class StyleContext
att = attrs[i + 1];
}
- // Check the resolve parent, unless we're looking for the
+ // Check the resolve parent, unless we're looking for the
// ResolveAttribute, which must not be looked up
if (att == null)
{
@@ -342,7 +342,7 @@ public class StyleContext
if (parent != null)
att = parent.getAttribute(key);
}
-
+
return att;
}
@@ -352,18 +352,18 @@ public class StyleContext
}
public Enumeration<?> getAttributeNames()
- {
- return new Enumeration()
+ {
+ return new Enumeration()
{
int i = 0;
- public boolean hasMoreElements()
- {
- return i < attrs.length;
+ public boolean hasMoreElements()
+ {
+ return i < attrs.length;
}
- public Object nextElement()
- {
- i += 2;
- return attrs[i-2];
+ public Object nextElement()
+ {
+ i += 2;
+ return attrs[i-2];
}
};
}
@@ -387,7 +387,7 @@ public class StyleContext
}
return false;
}
-
+
public boolean isEqual(AttributeSet attr)
{
boolean eq;
@@ -400,7 +400,7 @@ public class StyleContext
&& this.containsAttributes(attr);
return eq;
}
-
+
public String toString()
{
StringBuilder sb = new StringBuilder();
@@ -446,7 +446,7 @@ public class StyleContext
* The name of the default style.
*/
public static final String DEFAULT_STYLE = "default";
-
+
static Hashtable sharedAttributeSets = new Hashtable();
static Hashtable sharedFonts = new Hashtable();
@@ -486,7 +486,7 @@ public class StyleContext
{
return new SmallAttributeSet(a);
}
-
+
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a)
{
return new SimpleAttributeSet(a);
@@ -506,7 +506,7 @@ public class StyleContext
{
return styles.getChangeListeners();
}
-
+
public Style addStyle(String name, Style parent)
{
Style newStyle = new NamedStyle(name, parent);
@@ -534,7 +534,7 @@ public class StyleContext
{
return (Style) styles.getAttribute(name);
}
-
+
/**
* Get the names of the style. The returned enumeration always
* contains at least one member, the default style.
@@ -572,7 +572,7 @@ public class StyleContext
//
// We keep a static cache mapping SimpleFontSpecs to java.awt.Fonts, so
// that we reuse Fonts between styles and style contexts.
- //
+ //
private static class SimpleFontSpec
{
@@ -600,7 +600,7 @@ public class StyleContext
return family.hashCode() + style + size;
}
}
-
+
public Font getFont(AttributeSet attr)
{
String family = StyleConstants.getFontFamily(attr);
@@ -608,7 +608,7 @@ public class StyleContext
if (StyleConstants.isBold(attr))
style += Font.BOLD;
if (StyleConstants.isItalic(attr))
- style += Font.ITALIC;
+ style += Font.ITALIC;
int size = StyleConstants.getFontSize(attr);
return getFont(family, style, size);
}
@@ -625,7 +625,7 @@ public class StyleContext
return tmp;
}
}
-
+
public FontMetrics getFontMetrics(Font f)
{
return Toolkit.getDefaultToolkit().getFontMetrics(f);
@@ -641,7 +641,7 @@ public class StyleContext
return StyleConstants.getBackground(a);
}
- protected int getCompressionThreshold()
+ protected int getCompressionThreshold()
{
return compressionThreshold;
}
@@ -749,7 +749,7 @@ public class StyleContext
}
public synchronized AttributeSet removeAttributes(AttributeSet old,
- Enumeration<?> names)
+ Enumeration<?> names)
{
AttributeSet ret;
if (old.getAttributeCount() <= getCompressionThreshold())
@@ -771,7 +771,7 @@ public class StyleContext
/**
* Gets the object previously registered with registerStaticAttributeKey.
- *
+ *
* @param key - the key that was registered.
* @return the object previously registered with registerStaticAttributeKey.
*/
@@ -781,11 +781,11 @@ public class StyleContext
return null;
return readAttributeKeys.get(key);
}
-
+
/**
* Returns the String that key will be registered with
* registerStaticAttributeKey.
- *
+ *
* @param key - the key that will be registered.
* @return the string the key will be registered with.
*/
@@ -799,7 +799,7 @@ public class StyleContext
* attempt to restore keys that were static objects by considering only the
* keys that have were registered with registerStaticAttributeKey. The
* attributes retrieved will be placed into the given set.
- *
+ *
* @param in - the stream to read from
* @param a - the set of attributes
* @throws ClassNotFoundException - may be encountered when reading from
@@ -827,12 +827,12 @@ public class StyleContext
a.addAttribute(key, val);
}
}
-
+
/**
* Serialize an attribute set in a way that is compatible with it
* being read in again by {@link #readAttributeSet(ObjectInputStream, MutableAttributeSet)}.
* In particular registered static keys are transformed properly.
- *
+ *
* @param out - stream to write to
* @param a - the attribute set
* @throws IOException - any I/O error
@@ -872,9 +872,9 @@ public class StyleContext
}
/**
- * Handles reading in the attributes.
+ * Handles reading in the attributes.
* @see #readAttributeSet(ObjectInputStream, MutableAttributeSet)
- *
+ *
* @param in - the stream to read from
* @param a - the set of attributes
* @throws ClassNotFoundException - may be encountered when reading from stream
@@ -889,7 +889,7 @@ public class StyleContext
/**
* Handles writing of the given attributes.
* @see #writeAttributeSet(ObjectOutputStream, AttributeSet)
- *
+ *
* @param out - stream to write to
* @param a - the attribute set
* @throws IOException - any I/O error
diff --git a/javax/swing/text/StyledDocument.java b/javax/swing/text/StyledDocument.java
index 168e1b116..49e471c9c 100644
--- a/javax/swing/text/StyledDocument.java
+++ b/javax/swing/text/StyledDocument.java
@@ -42,8 +42,8 @@ import java.awt.Font;
/**
* StyledDocument
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
+ * @version 1.0
*/
public interface StyledDocument extends Document
{
diff --git a/javax/swing/text/StyledEditorKit.java b/javax/swing/text/StyledEditorKit.java
index 568694387..744585f08 100644
--- a/javax/swing/text/StyledEditorKit.java
+++ b/javax/swing/text/StyledEditorKit.java
@@ -364,8 +364,8 @@ public class StyledEditorKit extends DefaultEditorKit
{
Document doc = editor.getDocument();
if (!(doc instanceof StyledDocument))
- throw new AssertionError("The Document for StyledEditorKits is "
- + "expected to be a StyledDocument.");
+ throw new AssertionError("The Document for StyledEditorKits is "
+ + "expected to be a StyledDocument.");
return (StyledDocument) doc;
}
@@ -382,8 +382,8 @@ public class StyledEditorKit extends DefaultEditorKit
{
EditorKit kit = editor.getEditorKit();
if (!(kit instanceof StyledEditorKit))
- throw new AssertionError("The EditorKit for StyledDocuments is "
- + "expected to be a StyledEditorKit.");
+ throw new AssertionError("The EditorKit for StyledDocuments is "
+ + "expected to be a StyledEditorKit.");
return (StyledEditorKit) kit;
}
@@ -406,33 +406,33 @@ public class StyledEditorKit extends DefaultEditorKit
{
Document doc = editor.getDocument();
if (doc instanceof StyledDocument)
- {
- StyledDocument styleDoc = (StyledDocument) editor.getDocument();
- EditorKit kit = editor.getEditorKit();
- if (!(kit instanceof StyledEditorKit))
- {
- StyledEditorKit styleKit = (StyledEditorKit) kit;
- int start = editor.getSelectionStart();
- int end = editor.getSelectionEnd();
- int dot = editor.getCaret().getDot();
- if (start == dot && end == dot)
- {
- // If there is no selection, then we only update the
- // input attributes.
- MutableAttributeSet inputAttributes =
- styleKit.getInputAttributes();
- inputAttributes.addAttributes(atts);
- }
- else
- styleDoc.setParagraphAttributes(start, end, atts, replace);
- }
- else
- throw new AssertionError("The EditorKit for StyledTextActions "
- + "is expected to be a StyledEditorKit");
- }
+ {
+ StyledDocument styleDoc = (StyledDocument) editor.getDocument();
+ EditorKit kit = editor.getEditorKit();
+ if (!(kit instanceof StyledEditorKit))
+ {
+ StyledEditorKit styleKit = (StyledEditorKit) kit;
+ int start = editor.getSelectionStart();
+ int end = editor.getSelectionEnd();
+ int dot = editor.getCaret().getDot();
+ if (start == dot && end == dot)
+ {
+ // If there is no selection, then we only update the
+ // input attributes.
+ MutableAttributeSet inputAttributes =
+ styleKit.getInputAttributes();
+ inputAttributes.addAttributes(atts);
+ }
+ else
+ styleDoc.setParagraphAttributes(start, end, atts, replace);
+ }
+ else
+ throw new AssertionError("The EditorKit for StyledTextActions "
+ + "is expected to be a StyledEditorKit");
+ }
else
- throw new AssertionError("The Document for StyledTextActions is "
- + "expected to be a StyledDocument.");
+ throw new AssertionError("The Document for StyledTextActions is "
+ + "expected to be a StyledDocument.");
}
}
@@ -466,15 +466,15 @@ public class StyledEditorKit extends DefaultEditorKit
String name = element.getName();
View view = null;
if (name.equals(AbstractDocument.ContentElementName))
- view = new LabelView(element);
+ view = new LabelView(element);
else if (name.equals(AbstractDocument.ParagraphElementName))
- view = new ParagraphView(element);
+ view = new ParagraphView(element);
else if (name.equals(AbstractDocument.SectionElementName))
- view = new BoxView(element, View.Y_AXIS);
+ view = new BoxView(element, View.Y_AXIS);
else if (name.equals(StyleConstants.ComponentElementName))
- view = new ComponentView(element);
+ view = new ComponentView(element);
else if (name.equals(StyleConstants.IconElementName))
- view = new IconView(element);
+ view = new IconView(element);
else
throw new AssertionError("Unknown Element type: "
+ element.getClass().getName() + " : "
@@ -499,14 +499,14 @@ public class StyledEditorKit extends DefaultEditorKit
{
Object source = ev.getSource();
if (!(source instanceof JTextComponent))
- throw new AssertionError("CaretEvents are expected to come from a"
- + "JTextComponent.");
+ throw new AssertionError("CaretEvents are expected to come from a"
+ + "JTextComponent.");
JTextComponent text = (JTextComponent) source;
Document doc = text.getDocument();
if (!(doc instanceof StyledDocument))
- throw new AssertionError("The Document used by StyledEditorKits is"
- + "expected to be a StyledDocument");
+ throw new AssertionError("The Document used by StyledEditorKits is"
+ + "expected to be a StyledDocument");
StyledDocument styleDoc = (StyledDocument) doc;
currentRun = styleDoc.getCharacterElement(ev.getDot());
@@ -571,7 +571,7 @@ public class StyledEditorKit extends DefaultEditorKit
public Action[] getActions()
{
Action[] actions1 = super.getActions();
- Action[] myActions = new Action[] {
+ Action[] myActions = new Action[] {
new FontSizeAction("font-size-8", 8),
new FontSizeAction("font-size-10", 10),
new FontSizeAction("font-size-12", 12),
@@ -698,7 +698,7 @@ public class StyledEditorKit extends DefaultEditorKit
* @param set the inputAttributes to copy the attributes to
*/
protected void createInputAttributes(Element element,
- MutableAttributeSet set)
+ MutableAttributeSet set)
{
// FIXME: Filter out component, icon and element name attributes.
set.removeAttributes(set);
diff --git a/javax/swing/text/TabExpander.java b/javax/swing/text/TabExpander.java
index d70dd4604..a1e4571cf 100644
--- a/javax/swing/text/TabExpander.java
+++ b/javax/swing/text/TabExpander.java
@@ -40,4 +40,4 @@ package javax.swing.text;
public interface TabExpander
{
float nextTabStop(float x, int tabOffset);
-} \ No newline at end of file
+}
diff --git a/javax/swing/text/TabSet.java b/javax/swing/text/TabSet.java
index c08a650fb..c32596536 100644
--- a/javax/swing/text/TabSet.java
+++ b/javax/swing/text/TabSet.java
@@ -54,28 +54,28 @@ public class TabSet implements Serializable
/**
* Creates a new <code>TabSet</code> containing the specified tab stops.
- *
+ *
* @param t the tab stops (<code>null</code> permitted).
*/
- public TabSet(TabStop[] t)
+ public TabSet(TabStop[] t)
{
if (t != null)
tabs = (TabStop[]) t.clone();
- else
+ else
tabs = new TabStop[0];
}
-
+
/**
* Returns the tab stop with the specified index.
- *
+ *
* @param i the index.
- *
+ *
* @return The tab stop.
- *
- * @throws IllegalArgumentException if <code>i</code> is not in the range
+ *
+ * @throws IllegalArgumentException if <code>i</code> is not in the range
* <code>0</code> to <code>getTabCount() - 1</code>.
*/
- public TabStop getTab(int i)
+ public TabStop getTab(int i)
{
if (i < 0 || i >= tabs.length)
throw new IllegalArgumentException("Index out of bounds.");
@@ -84,38 +84,38 @@ public class TabSet implements Serializable
/**
* Returns the tab following the specified location.
- *
+ *
* @param location the location.
- *
+ *
* @return The tab following the specified location (or <code>null</code>).
*/
- public TabStop getTabAfter(float location)
+ public TabStop getTabAfter(float location)
{
int idx = getTabIndexAfter(location);
if (idx == -1)
return null;
else
- return tabs[idx];
+ return tabs[idx];
}
/**
* Returns the number of tab stops in this tab set.
- *
+ *
* @return The number of tab stops in this tab set.
*/
- public int getTabCount()
+ public int getTabCount()
{
return tabs.length;
}
/**
* Returns the index of the specified tab, or -1 if the tab is not found.
- *
+ *
* @param tab the tab (<code>null</code> permitted).
- *
+ *
* @return The index of the specified tab, or -1.
*/
- public int getTabIndex(TabStop tab)
+ public int getTabIndex(TabStop tab)
{
for (int i = 0; i < tabs.length; ++i)
if (tabs[i] == tab)
@@ -125,12 +125,12 @@ public class TabSet implements Serializable
/**
* Returns the index of the tab at or after the specified location.
- *
+ *
* @param location the tab location.
- *
+ *
* @return The index of the tab stop, or -1.
*/
- public int getTabIndexAfter(float location)
+ public int getTabIndexAfter(float location)
{
for (int i = 0; i < tabs.length; i++)
{
@@ -139,15 +139,15 @@ public class TabSet implements Serializable
}
return -1;
}
-
+
/**
* Tests this <code>TabSet</code> for equality with an arbitrary object.
- *
+ *
* @param obj the object (<code>null</code> permitted).
- *
+ *
* @return <code>true</code> if this <code>TabSet</code> is equal to
* <code>obj</code>, and <code>false</code> otherwise.
- *
+ *
* @since 1.5
*/
public boolean equals(Object obj)
@@ -167,15 +167,15 @@ public class TabSet implements Serializable
}
return true;
}
-
+
/**
* Returns a hash code for this <code>TabSet</code>.
- *
+ *
* @return A hash code.
- *
+ *
* @since 1.5
*/
- public int hashCode()
+ public int hashCode()
{
// this hash code won't match Sun's, but that shouldn't matter...
int result = 193;
@@ -191,7 +191,7 @@ public class TabSet implements Serializable
/**
* Returns a string representation of this <code>TabSet</code>.
- *
+ *
* @return A string representation of this <code>TabSet</code>.
*/
public String toString()
diff --git a/javax/swing/text/TabStop.java b/javax/swing/text/TabStop.java
index f4c3f8514..03a56116f 100644
--- a/javax/swing/text/TabStop.java
+++ b/javax/swing/text/TabStop.java
@@ -66,23 +66,23 @@ public class TabStop implements Serializable
/**
* Creates a new <code>TabStop</code> for the specified tab position.
- *
+ *
* @param pos the tab position.
*/
- public TabStop(float pos)
+ public TabStop(float pos)
{
this(pos, ALIGN_LEFT, LEAD_NONE);
}
-
+
/**
* Creates a new <code>TabStop</code> with the specified attributes.
- *
+ *
* @param pos the tab position.
- * @param align the alignment (one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL}
+ * @param align the alignment (one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL}
* or {@link #ALIGN_BAR}).
- * @param leader the leader (one of {@link #LEAD_NONE}, {@link #LEAD_DOTS},
- * {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE}
+ * @param leader the leader (one of {@link #LEAD_NONE}, {@link #LEAD_DOTS},
+ * {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE}
* or {@link #LEAD_UNDERLINE}).
*/
public TabStop(float pos, int align, int leader)
@@ -91,16 +91,16 @@ public class TabStop implements Serializable
this.align = align;
this.leader = leader;
}
-
+
/**
* Tests this <code>TabStop</code> for equality with an arbitrary object.
- *
+ *
* @param other the other object (<code>null</code> permitted).
- *
- * @return <code>true</code> if this <code>TabStop</code> is equal to
+ *
+ * @return <code>true</code> if this <code>TabStop</code> is equal to
* the specified object, and <code>false</code> otherwise.
*/
- public boolean equals(Object other)
+ public boolean equals(Object other)
{
return (other != null)
&& (other instanceof TabStop)
@@ -110,55 +110,55 @@ public class TabStop implements Serializable
}
/**
- * Returns the tab alignment. This should be one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL} or
+ * Returns the tab alignment. This should be one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL} or
* {@link #ALIGN_BAR}.
- *
+ *
* @return The tab alignment.
*/
- public int getAlignment()
+ public int getAlignment()
{
return align;
}
/**
- * Returns the leader type. This should be one of {@link #LEAD_NONE},
- * {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS},
+ * Returns the leader type. This should be one of {@link #LEAD_NONE},
+ * {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS},
* {@link #LEAD_THICKLINE} or {@link #LEAD_UNDERLINE}.
- *
+ *
* @return The leader type.
*/
- public int getLeader()
+ public int getLeader()
{
return leader;
}
/**
* Returns the tab position.
- *
+ *
* @return The tab position.
*/
- public float getPosition()
+ public float getPosition()
{
return pos;
}
/**
* Returns a hash code for this <code>TabStop</code>.
- *
+ *
* @return A hash code.
*/
- public int hashCode()
+ public int hashCode()
{
return (int) pos + (int) leader + (int) align;
}
/**
* Returns a string describing this <code>TabStop</code>.
- *
+ *
* @return A string describing this <code>TabStop</code>.
*/
- public String toString()
+ public String toString()
{
String prefix = "";
switch (align)
@@ -174,7 +174,7 @@ public class TabStop implements Serializable
case ALIGN_DECIMAL:
prefix = "decimal ";
break;
-
+
case ALIGN_BAR:
prefix = "bar ";
break;
@@ -182,8 +182,8 @@ public class TabStop implements Serializable
default:
break;
}
-
- return prefix + "tab @" + pos
+
+ return prefix + "tab @" + pos
+ ((leader == LEAD_NONE) ? "" : " (w/leaders)");
}
diff --git a/javax/swing/text/TabableView.java b/javax/swing/text/TabableView.java
index 2a96ea94d..e50270bb6 100644
--- a/javax/swing/text/TabableView.java
+++ b/javax/swing/text/TabableView.java
@@ -1,4 +1,4 @@
-/* TabableView.java --
+/* TabableView.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/text/TableView.java b/javax/swing/text/TableView.java
index 2dcb9ebf7..bdf5004a9 100644
--- a/javax/swing/text/TableView.java
+++ b/javax/swing/text/TableView.java
@@ -51,7 +51,7 @@ import javax.swing.event.DocumentEvent;
* horizontal boxes containing the actuall cells of the table. These cells
* can be arbitrary view implementations and are fetched via the
* {@link ViewFactory} returned by {@link View#getViewFactory}.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public abstract class TableView
@@ -416,7 +416,7 @@ public abstract class TableView
/**
* Calculates the requirements of this view for the minor (== horizontal)
* axis.
- *
+ *
* This is reimplemented to calculate the requirements as the sum of the
* size requirements of the columns.
*
diff --git a/javax/swing/text/TextAction.java b/javax/swing/text/TextAction.java
index 49c49cb9d..70e19ef1d 100644
--- a/javax/swing/text/TextAction.java
+++ b/javax/swing/text/TextAction.java
@@ -67,9 +67,9 @@ public abstract class TextAction extends AbstractAction
* Returns the <code>JTextComponent</code> object associated with the given
* <code>ActionEvent</code>. If the source of the event is not a
* <code>JTextComponent</code> the currently focused text component is returned.
- *
+ *
* @param event the action event
- *
+ *
* @return the <code>JTextComponent</code>
*/
protected final JTextComponent getTextComponent(ActionEvent event)
@@ -88,7 +88,7 @@ public abstract class TextAction extends AbstractAction
/**
* Creates a new array of <code>Action</code> containing both given arrays.
- *
+ *
* @param list1 the first action array
* @param list2 the second action array
*
@@ -112,7 +112,7 @@ public abstract class TextAction extends AbstractAction
actions.put(name != null ? name : "", a);
}
Action[] augmented = new Action[actions.size()];
-
+
int i = 0;
for (Iterator<Action> it = actions.values().iterator(); it.hasNext(); i++)
augmented[i] = it.next();
@@ -122,7 +122,7 @@ public abstract class TextAction extends AbstractAction
/**
* Returns the current focused <code>JTextComponent</code> object.
- *
+ *
* @return the <code>JTextComponent</code>
*/
protected final JTextComponent getFocusedComponent()
@@ -135,21 +135,21 @@ public abstract class TextAction extends AbstractAction
textComp = (JTextComponent) focused;
return textComp;
}
-
+
/** Abstract helper class which implements everything needed for an
* Action implementation in <code>DefaultEditorKit</code> which
- * does horizontal movement (and selection).
+ * does horizontal movement (and selection).
*/
abstract static class HorizontalMovementAction extends TextAction
{
int dir;
-
+
HorizontalMovementAction(String name, int direction)
{
super(name);
dir = direction;
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -161,34 +161,34 @@ public abstract class TextAction extends AbstractAction
= Utilities.getNextVisualPositionFrom(t,
t.getCaretPosition(),
dir);
-
+
Caret c = t.getCaret();
-
+
actionPerformedImpl(c, offs);
-
+
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
}
catch(BadLocationException ble)
{
- throw
+ throw
(InternalError) new InternalError("Illegal offset").initCause(ble);
}
-
+
}
-
+
protected abstract void actionPerformedImpl(Caret c, int offs)
throws BadLocationException;
}
-
+
/** Abstract helper class which implements everything needed for an
* Action implementation in <code>DefaultEditorKit</code> which
* does vertical movement (and selection).
- */
+ */
abstract static class VerticalMovementAction extends TextAction
{
int dir;
-
+
VerticalMovementAction(String name, int direction)
{
super(name);
@@ -215,26 +215,26 @@ public abstract class TextAction extends AbstractAction
}
else
pos = c.getDot();
-
+
pos = Utilities.getNextVisualPositionFrom(t,
t.getCaretPosition(),
dir);
-
+
if (pos > -1)
actionPerformedImpl(c, pos);
}
}
- catch(BadLocationException ble)
+ catch(BadLocationException ble)
{
- throw
+ throw
(InternalError) new InternalError("Illegal offset").initCause(ble);
}
}
-
+
protected abstract void actionPerformedImpl(Caret c, int offs)
throws BadLocationException;
-
+
}
-
-
+
+
}
diff --git a/javax/swing/text/Utilities.java b/javax/swing/text/Utilities.java
index d49d806cf..622139232 100644
--- a/javax/swing/text/Utilities.java
+++ b/javax/swing/text/Utilities.java
@@ -97,7 +97,7 @@ public class Utilities
int pos = s.offset;
int len = 0;
-
+
int end = s.offset + s.count;
for (int offset = s.offset; offset < end; ++offset)
@@ -138,7 +138,7 @@ public class Utilities
g.drawChars(buffer, pos, len, pixelX, y);
pixelX += metrics.charsWidth(buffer, pos, len);
}
-
+
return pixelX;
}
@@ -171,21 +171,21 @@ public class Utilities
int count = 0;
for (int offset = s.offset; offset < end; offset++)
{
- switch (buffer[offset])
- {
- case '\t':
- // In case we have a tab, we just 'jump' over the tab.
- // When we have no tab expander we just use the width of 'm'.
- if (e != null)
- pixelX = (int) e.nextTabStop(pixelX,
- startOffset + offset - s.offset);
- else
- pixelX += metrics.charWidth(' ');
- break;
- case '\n':
- // In case we have a newline, we must 'draw'
- // the buffer and jump on the next line.
- pixelX += metrics.charsWidth(buffer, offset - count, count);
+ switch (buffer[offset])
+ {
+ case '\t':
+ // In case we have a tab, we just 'jump' over the tab.
+ // When we have no tab expander we just use the width of 'm'.
+ if (e != null)
+ pixelX = (int) e.nextTabStop(pixelX,
+ startOffset + offset - s.offset);
+ else
+ pixelX += metrics.charWidth(' ');
+ break;
+ case '\n':
+ // In case we have a newline, we must 'draw'
+ // the buffer and jump on the next line.
+ pixelX += metrics.charsWidth(buffer, offset - count, count);
count = 0;
break;
default:
@@ -234,12 +234,12 @@ public class Utilities
int found = s.count;
int currentX = x0;
int nextX = currentX;
-
+
int end = s.offset + s.count;
for (int pos = s.offset; pos < end && found == s.count; pos++)
{
char nextChar = s.array[pos];
-
+
if (nextChar != '\t')
nextX += fm.charWidth(nextChar);
else
@@ -249,7 +249,7 @@ public class Utilities
else
nextX += ((int) te.nextTabStop(nextX, p0 + pos - s.offset));
}
-
+
if (x >= currentX && x < nextX)
{
// Found position.
@@ -295,10 +295,10 @@ public class Utilities
{
return getTabbedTextOffset(s, fm, x0, x, te, p0, true);
}
-
+
/**
* Finds the start of the next word for the given offset.
- *
+ *
* @param c
* the text component
* @param offs
@@ -315,7 +315,7 @@ public class Utilities
String text = c.getText();
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
-
+
int last = wb.following(offs);
int current = wb.next();
int cp;
@@ -325,7 +325,7 @@ public class Utilities
for (int i = last; i < current; i++)
{
cp = text.codePointAt(i);
-
+
// Return the last found bound if there is a letter at the current
// location or is not whitespace (meaning it is a number or
// punctuation). The first case means that 'last' denotes the
@@ -338,13 +338,13 @@ public class Utilities
last = current;
current = wb.next();
}
-
+
throw new BadLocationException("no more words", offs);
}
/**
* Finds the start of the previous word for the given offset.
- *
+ *
* @param c
* the text component
* @param offs
@@ -357,10 +357,10 @@ public class Utilities
throws BadLocationException
{
String text = c.getText();
-
+
if (offs <= 0 || offs > text.length())
throw new BadLocationException("invalid offset specified", offs);
-
+
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
int last = wb.preceding(offs);
@@ -372,7 +372,7 @@ public class Utilities
for (int i = last; i < offs; i++)
{
cp = text.codePointAt(i);
-
+
// Return the last found bound if there is a letter at the current
// location or is not whitespace (meaning it is a number or
// punctuation). The first case means that 'last' denotes the
@@ -385,10 +385,10 @@ public class Utilities
last = current;
current = wb.previous();
}
-
+
return 0;
}
-
+
/**
* Finds the start of a word for the given location.
* @param c the text component
@@ -400,10 +400,10 @@ public class Utilities
throws BadLocationException
{
String text = c.getText();
-
+
if (offs < 0 || offs > text.length())
throw new BadLocationException("invalid offset specified", offs);
-
+
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
@@ -412,7 +412,7 @@ public class Utilities
return wb.preceding(offs);
}
-
+
/**
* Finds the end of a word for the given location.
* @param c the text component
@@ -425,20 +425,20 @@ public class Utilities
{
if (offs < 0 || offs >= c.getText().length())
throw new BadLocationException("invalid offset specified", offs);
-
+
String text = c.getText();
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
return wb.following(offs);
}
-
+
/**
- * Get the model position of the end of the row that contains the
+ * Get the model position of the end of the row that contains the
* specified model position. Return null if the given JTextComponent
* does not have a size.
* @param c the JTextComponent
* @param offs the model position
- * @return the model position of the end of the row containing the given
+ * @return the model position of the end of the row containing the given
* offset
* @throws BadLocationException if the offset is invalid
*/
@@ -473,12 +473,12 @@ public class Utilities
}
}
}
-
+
/**
* Get the model position of the start of the row that contains the specified
* model position. Return null if the given JTextComponent does not have a
* size.
- *
+ *
* @param c the JTextComponent
* @param offs the model position
* @return the model position of the start of the row containing the given
@@ -516,7 +516,7 @@ public class Utilities
}
}
}
-
+
/**
* Determine where to break the text in the given Segment, attempting to find
* a word boundary.
@@ -612,23 +612,23 @@ public class Utilities
throws BadLocationException
{
int offs = getRowStart(c, offset);
-
+
if(offs == -1)
return -1;
// Effectively calculates the y value of the previous line.
Point pt = c.modelToView(offs-1).getLocation();
-
+
pt.x = x;
-
+
// Calculate a simple fitting offset.
offs = c.viewToModel(pt);
-
+
// Find out the real x positions of the calculated character and its
// neighbour.
int offsX = c.modelToView(offs).getLocation().x;
int offsXNext = c.modelToView(offs+1).getLocation().x;
-
+
// Chose the one which is nearer to us and return its offset.
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
return offs;
@@ -653,12 +653,12 @@ public class Utilities
throws BadLocationException
{
int offs = getRowEnd(c, offset);
-
+
if(offs == -1)
return -1;
Point pt = null;
-
+
// Note: Some views represent the position after the last
// typed character others do not. Converting offset 3 in "a\nb"
// in a PlainView will return a valid rectangle while in a
@@ -673,12 +673,12 @@ public class Utilities
{
return offset;
}
-
+
pt.x = x;
-
+
// Calculate a simple fitting offset.
offs = c.viewToModel(pt);
-
+
if (offs == c.getDocument().getLength())
return offs;
@@ -686,29 +686,29 @@ public class Utilities
// neighbour.
int offsX = c.modelToView(offs).getLocation().x;
int offsXNext = c.modelToView(offs+1).getLocation().x;
-
+
// Chose the one which is nearer to us and return its offset.
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
return offs;
else
return offs+1;
}
-
+
/** This is an internal helper method which is used by the
* <code>javax.swing.text</code> package. It simply delegates the
* call to a method with the same name on the <code>NavigationFilter</code>
* of the provided <code>JTextComponent</code> (if it has one) or its UI.
- *
+ *
* If the underlying method throws a <code>BadLocationException</code> it
* will be swallowed and the initial offset is returned.
*/
static int getNextVisualPositionFrom(JTextComponent t, int offset, int direction)
{
NavigationFilter nf = t.getNavigationFilter();
-
+
try
{
- return (nf != null)
+ return (nf != null)
? nf.getNextVisualPositionFrom(t,
offset,
Bias.Forward,
@@ -724,7 +724,7 @@ public class Utilities
{
return offset;
}
-
+
}
-
+
}
diff --git a/javax/swing/text/View.java b/javax/swing/text/View.java
index c63ddbce7..e3c795735 100644
--- a/javax/swing/text/View.java
+++ b/javax/swing/text/View.java
@@ -1,4 +1,4 @@
-/* View.java --
+/* View.java --
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public abstract class View implements SwingConstants
public static final int X_AXIS = 0;
public static final int Y_AXIS = 1;
-
+
private Element elt;
private View parent;
@@ -104,12 +104,12 @@ public abstract class View implements SwingConstants
this.parent = parent;
}
-
+
public View getParent()
{
return parent;
}
-
+
public Container getContainer()
{
View parent = getParent();
@@ -118,12 +118,12 @@ public abstract class View implements SwingConstants
else
return parent.getContainer();
}
-
+
public Document getDocument()
{
return getElement().getDocument();
}
-
+
public Element getElement()
{
return elt;
@@ -189,12 +189,12 @@ public abstract class View implements SwingConstants
min = getPreferredSpan(axis);
return min;
}
-
+
public void setSize(float width, float height)
{
// The default implementation does nothing.
}
-
+
/**
* Returns the alignment of this view along the baseline of the parent view.
* An alignment of <code>0.0</code> will align this view with the left edge
@@ -218,7 +218,7 @@ public abstract class View implements SwingConstants
{
return getElement().getAttributes();
}
-
+
public boolean isVisible()
{
return true;
@@ -228,7 +228,7 @@ public abstract class View implements SwingConstants
{
return 0;
}
-
+
public View getView(int index)
{
return null;
@@ -274,7 +274,7 @@ public abstract class View implements SwingConstants
public void remove(int index)
{
- replace(index, 1, null);
+ replace(index, 1, null);
}
public View createFragment(int p0, int p1)
@@ -297,7 +297,7 @@ public abstract class View implements SwingConstants
{
return null;
}
-
+
/**
* @since 1.4
*/
@@ -305,7 +305,7 @@ public abstract class View implements SwingConstants
{
return -1;
}
-
+
/**
* @since 1.4
*/
@@ -674,15 +674,15 @@ public abstract class View implements SwingConstants
* listed valid values
*/
public Shape modelToView(int p1, Position.Bias b1,
- int p2, Position.Bias b2, Shape a)
+ int p2, Position.Bias b2, Shape a)
throws BadLocationException
{
if (b1 != Position.Bias.Forward && b1 != Position.Bias.Backward)
throw new IllegalArgumentException
- ("b1 must be either Position.Bias.Forward or Position.Bias.Backward");
+ ("b1 must be either Position.Bias.Forward or Position.Bias.Backward");
if (b2 != Position.Bias.Forward && b2 != Position.Bias.Backward)
throw new IllegalArgumentException
- ("b2 must be either Position.Bias.Forward or Position.Bias.Backward");
+ ("b2 must be either Position.Bias.Forward or Position.Bias.Backward");
Shape s1 = modelToView(p1, a, b1);
// Special case for p2 == end index.
@@ -867,7 +867,7 @@ public abstract class View implements SwingConstants
ret = parent.viewToModel(r.x, r.y - 1, a, biasRet);
break;
case SOUTH:
- // Try to find a suitable offset by examining the area below.
+ // Try to find a suitable offset by examining the area below.
parent = getParent();
r = parent.modelToView(pos, a, b).getBounds();
ret = parent.viewToModel(r.x + r.width, r.y + r.height, a, biasRet);
@@ -875,7 +875,7 @@ public abstract class View implements SwingConstants
default:
throw new IllegalArgumentException("Illegal value for d");
}
-
+
return ret;
}
}
diff --git a/javax/swing/text/ViewFactory.java b/javax/swing/text/ViewFactory.java
index 079488017..cb57bd801 100644
--- a/javax/swing/text/ViewFactory.java
+++ b/javax/swing/text/ViewFactory.java
@@ -1,4 +1,4 @@
-/* ViewFactory.java --
+/* ViewFactory.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/text/WrappedPlainView.java b/javax/swing/text/WrappedPlainView.java
index 00e12b112..f2a6c92d8 100644
--- a/javax/swing/text/WrappedPlainView.java
+++ b/javax/swing/text/WrappedPlainView.java
@@ -1,4 +1,4 @@
-/* WrappedPlainView.java --
+/* WrappedPlainView.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,31 +56,31 @@ public class WrappedPlainView extends BoxView implements TabExpander
{
/** The color for selected text **/
Color selectedColor;
-
+
/** The color for unselected text **/
Color unselectedColor;
-
+
/** The color for disabled components **/
Color disabledColor;
-
+
/**
* Stores the font metrics. This is package private to avoid synthetic
* accessor method.
*/
FontMetrics metrics;
-
+
/** Whether or not to wrap on word boundaries **/
boolean wordWrap;
-
+
/** A ViewFactory that creates WrappedLines **/
ViewFactory viewFactory = new WrappedLineCreator();
-
+
/** The start of the selected text **/
int selectionStart;
-
+
/** The end of the selected text **/
int selectionEnd;
-
+
/** The height of the line (used while painting) **/
int lineHeight;
@@ -98,18 +98,18 @@ public class WrappedPlainView extends BoxView implements TabExpander
* The instance returned by {@link #getLineBuffer()}.
*/
private transient Segment lineBuffer;
-
+
public WrappedPlainView (Element elem)
{
this (elem, false);
}
-
+
public WrappedPlainView (Element elem, boolean wordWrap)
{
super (elem, Y_AXIS);
- this.wordWrap = wordWrap;
- }
-
+ this.wordWrap = wordWrap;
+ }
+
/**
* Provides access to the Segment used for retrievals from the Document.
* @return the Segment.
@@ -120,12 +120,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
lineBuffer = new Segment();
return lineBuffer;
}
-
+
/**
* Returns the next tab stop position after a given reference position.
*
* This implementation ignores the <code>tabStop</code> argument.
- *
+ *
* @param x the current x position in pixels
* @param tabStop the position within the text stream that the tab occured at
*/
@@ -139,12 +139,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
return next;
}
-
+
/**
- * Returns the tab size for the Document based on
+ * Returns the tab size for the Document based on
* PlainDocument.tabSizeAttribute, defaulting to 8 if this property is
* not defined
- *
+ *
* @return the tab size.
*/
protected int getTabSize()
@@ -154,7 +154,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
return 8;
return ((Integer)tabSize).intValue();
}
-
+
/**
* Draws a line of text, suppressing white space at the end and expanding
* tabs. Calls drawSelectedText and drawUnselectedText.
@@ -175,37 +175,37 @@ public class WrappedPlainView extends BoxView implements TabExpander
// - start of range is selected, end of range is unselected
// - start of range is unselected, end of range is selected
// - middle of range is selected, start and end of range is unselected
-
- // entire range unselected:
- if ((selectionStart == selectionEnd) ||
+
+ // entire range unselected:
+ if ((selectionStart == selectionEnd) ||
(p0 > selectionEnd || p1 < selectionStart))
drawUnselectedText(g, x, y, p0, p1);
-
+
// entire range selected
else if (p0 >= selectionStart && p1 <= selectionEnd)
drawSelectedText(g, x, y, p0, p1);
-
+
// start of range selected, end of range unselected
else if (p0 >= selectionStart)
{
x = drawSelectedText(g, x, y, p0, selectionEnd);
drawUnselectedText(g, x, y, selectionEnd, p1);
}
-
+
// start of range unselected, end of range selected
else if (selectionStart > p0 && selectionEnd > p1)
{
x = drawUnselectedText(g, x, y, p0, selectionStart);
drawSelectedText(g, x, y, selectionStart, p1);
}
-
+
// middle of range selected
else if (selectionStart > p0)
{
x = drawUnselectedText(g, x, y, p0, selectionStart);
x = drawSelectedText(g, x, y, selectionStart, selectionEnd);
drawUnselectedText(g, x, y, selectionEnd, p1);
- }
+ }
}
catch (BadLocationException ble)
{
@@ -214,14 +214,14 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
/**
- * Renders the range of text as selected text. Just paints the text
+ * Renders the range of text as selected text. Just paints the text
* in the color specified by the host component. Assumes the highlighter
* will render the selected background.
* @param g the graphics context
* @param x the starting X coordinate
* @param y the starting Y coordinate
* @param p0 the starting model location
- * @param p1 the ending model location
+ * @param p1 the ending model location
* @return the X coordinate of the end of the text
* @throws BadLocationException if the given range is invalid
*/
@@ -246,7 +246,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
*/
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
throws BadLocationException
- {
+ {
JTextComponent textComponent = (JTextComponent) getContainer();
if (textComponent.isEnabled())
g.setColor(unselectedColor);
@@ -256,8 +256,8 @@ public class WrappedPlainView extends BoxView implements TabExpander
Segment segment = getLineBuffer();
getDocument().getText(p0, p1 - p0, segment);
return Utilities.drawTabbedText(segment, x, y, g, this, p0);
- }
-
+ }
+
/**
* Loads the children to initiate the view. Called by setParent.
* Creates a WrappedLine for each child Element.
@@ -268,17 +268,17 @@ public class WrappedPlainView extends BoxView implements TabExpander
int numChildren = root.getElementCount();
if (numChildren == 0)
return;
-
+
View[] children = new View[numChildren];
for (int i = 0; i < numChildren; i++)
children[i] = new WrappedLine(root.getElement(i));
replace(0, 0, children);
}
-
+
/**
* Calculates the break position for the text between model positions
* p0 and p1. Will break on word boundaries or character boundaries
- * depending on the break argument given in construction of this
+ * depending on the break argument given in construction of this
* WrappedPlainView. Used by the nested WrappedLine class to determine
* when to start the next logical line.
* @param p0 the start model position
@@ -307,16 +307,16 @@ public class WrappedPlainView extends BoxView implements TabExpander
false);
return pos;
}
-
+
void updateMetrics()
{
Container component = getContainer();
metrics = component.getFontMetrics(component.getFont());
tabSize = getTabSize()* metrics.charWidth('m');
}
-
+
/**
- * Determines the preferred span along the given axis. Implemented to
+ * Determines the preferred span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getPreferredSpan (int axis)
@@ -324,9 +324,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getPreferredSpan(axis);
}
-
+
/**
- * Determines the minimum span along the given axis. Implemented to
+ * Determines the minimum span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getMinimumSpan (int axis)
@@ -334,9 +334,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getMinimumSpan(axis);
}
-
+
/**
- * Determines the maximum span along the given axis. Implemented to
+ * Determines the maximum span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getMaximumSpan (int axis)
@@ -344,7 +344,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getMaximumSpan(axis);
}
-
+
/**
* Called when something was inserted. Overridden so that
* the view factory creates WrappedLine views.
@@ -361,7 +361,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
if (v != null)
v.insertUpdate(e, r, f);
}
-
+
/**
* Called when something is removed. Overridden so that
* the view factory creates WrappedLine views.
@@ -378,7 +378,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
if (v != null)
v.removeUpdate(e, r, f);
}
-
+
/**
* Called when the portion of the Document that this View is responsible
* for changes. Overridden so that the view factory creates
@@ -425,9 +425,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
public View create(Element elem)
{
return new WrappedLine(elem);
- }
+ }
}
-
+
/**
* Renders the <code>Element</code> that is associated with this
* <code>View</code>. Caches the metrics and then calls
@@ -444,7 +444,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
JTextComponent comp = (JTextComponent)getContainer();
// Ensure metrics are up-to-date.
updateMetrics();
-
+
selectionStart = comp.getSelectionStart();
selectionEnd = comp.getSelectionEnd();
@@ -457,7 +457,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
super.paint(g, a);
}
-
+
/**
* Sets the size of the View. Implemented to update the metrics
* and then call super method.
@@ -469,12 +469,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
preferenceChanged(null, true, true);
super.setSize(width, height);
}
-
+
class WrappedLine extends View
- {
+ {
/** Used to cache the number of lines for this View **/
int numLines = 1;
-
+
public WrappedLine(Element elem)
{
super(elem);
@@ -518,26 +518,26 @@ public class WrappedPlainView extends BoxView implements TabExpander
this);
else
lh.paintLayeredHighlights(g, currStart, currEnd, s, tc, this);
-
+
}
drawLine(currStart, currEnd, g, rect.x, rect.y + metrics.getAscent());
-
- rect.y += lineHeight;
+
+ rect.y += lineHeight;
if (currEnd == currStart)
currStart ++;
else
currStart = currEnd;
-
+
count++;
-
+
}
-
+
if (count != numLines)
{
numLines = count;
preferenceChanged(this, false, true);
}
-
+
}
/**
@@ -546,7 +546,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
* accordingly.
*/
private int determineNumLines()
- {
+ {
int nLines = 0;
int end = getEndOffset();
for (int i = getStartOffset(); i < end;)
@@ -555,7 +555,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
// careful: check that there's no off-by-one problem here
// depending on which position calculateBreakPosition returns
int breakPoint = calculateBreakPosition(i, end);
-
+
if (breakPoint == i)
i = breakPoint + 1;
else
@@ -563,12 +563,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
return nLines;
}
-
+
/**
* Determines the preferred span for this view along the given axis.
- *
+ *
* @param axis the axis (either X_AXIS or Y_AXIS)
- *
+ *
* @return the preferred span along the given axis.
* @throws IllegalArgumentException if axis is not X_AXIS or Y_AXIS
*/
@@ -582,19 +582,19 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return numLines * metrics.getHeight();
}
-
+
throw new IllegalArgumentException("Invalid axis for getPreferredSpan: "
+ axis);
}
-
+
/**
* Provides a mapping from model space to view space.
- *
+ *
* @param pos the position in the model
* @param a the region into which the view is rendered
* @param b the position bias (forward or backward)
- *
- * @return a box in view space that represents the given position
+ *
+ * @return a box in view space that represents the given position
* in model space
* @throws BadLocationException if the given model position is invalid
*/
@@ -602,26 +602,26 @@ public class WrappedPlainView extends BoxView implements TabExpander
throws BadLocationException
{
Rectangle rect = a.getBounds();
-
+
// Throwing a BadLocationException is an observed behavior of the RI.
if (rect.isEmpty())
throw new BadLocationException("Unable to calculate view coordinates "
+ "when allocation area is empty.", pos);
-
+
Segment s = getLineBuffer();
int lineHeight = metrics.getHeight();
-
- // Return a rectangle with width 1 and height equal to the height
+
+ // Return a rectangle with width 1 and height equal to the height
// of the text
rect.height = lineHeight;
rect.width = 1;
int currLineStart = getStartOffset();
int end = getEndOffset();
-
+
if (pos < currLineStart || pos >= end)
throw new BadLocationException("invalid offset", pos);
-
+
while (true)
{
int currLineEnd = calculateBreakPosition(currLineStart, end);
@@ -629,7 +629,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
// the width of the text from currLineStart to pos and add that
// to rect.x
if (pos >= currLineStart && pos < currLineEnd)
- {
+ {
try
{
getDocument().getText(currLineStart, pos - currLineStart, s);
@@ -645,7 +645,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
// Increment rect.y so we're checking the next logical line
rect.y += lineHeight;
-
+
// Increment currLineStart to the model position of the start
// of the next logical line
if (currLineEnd == currLineStart)
@@ -658,12 +658,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
/**
* Provides a mapping from view space to model space.
- *
+ *
* @param x the x coordinate in view space
* @param y the y coordinate in view space
* @param a the region into which the view is rendered
* @param b the position bias (forward or backward)
- *
+ *
* @return the location in the model that best represents the
* given point in view space
*/
@@ -672,19 +672,19 @@ public class WrappedPlainView extends BoxView implements TabExpander
Segment s = getLineBuffer();
Rectangle rect = a.getBounds();
int currLineStart = getStartOffset();
-
+
// Although calling modelToView with the last possible offset will
// cause a BadLocationException in CompositeView it is allowed
// to return that offset in viewToModel.
int end = getEndOffset();
-
+
int lineHeight = metrics.getHeight();
if (y < rect.y)
return currLineStart;
if (y > rect.y + rect.height)
return end - 1;
-
+
// Note: rect.x and rect.width do not represent the width of painted
// text but the area where text *may* be painted. This means the width
// is most of the time identical to the component's width.
@@ -705,7 +705,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
{
// Shouldn't happen
}
-
+
int offset = Utilities.getTabbedTextOffset(s, metrics, rect.x,
(int) x,
WrappedPlainView.this,
@@ -719,27 +719,27 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
// Increment rect.y so we're checking the next logical line
rect.y += lineHeight;
-
+
// Increment currLineStart to the model position of the start
// of the next logical line.
currLineStart = currLineEnd;
}
-
+
return end;
- }
-
+ }
+
/**
* <p>This method is called from insertUpdate and removeUpdate.</p>
- *
+ *
* <p>If the number of lines in the document has changed, just repaint
- * the whole thing (note, could improve performance by not repainting
- * anything above the changes). If the number of lines hasn't changed,
+ * the whole thing (note, could improve performance by not repainting
+ * anything above the changes). If the number of lines hasn't changed,
* just repaint the given Rectangle.</p>
- *
+ *
* <p>Note that the <code>Rectangle</code> argument may be <code>null</code>
- * when the allocation area is empty.</code>
- *
+ * when the allocation area is empty.</code>
+ *
* @param a the Rectangle to repaint if the number of lines hasn't changed
*/
void updateDamage (Rectangle a)
@@ -754,11 +754,11 @@ public class WrappedPlainView extends BoxView implements TabExpander
else if (a != null)
getContainer().repaint(a.x, a.y, a.width, a.height);
}
-
+
/**
* This method is called when something is inserted into the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -766,13 +766,13 @@ public class WrappedPlainView extends BoxView implements TabExpander
public void insertUpdate (DocumentEvent changes, Shape a, ViewFactory f)
{
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
- updateDamage(r);
+ updateDamage(r);
}
-
+
/**
* This method is called when something is removed from the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -787,9 +787,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
// makes View.forwardUpdate() skip this method call.
// However this seems to cause no trouble and as it reduces the
// number of method calls it can stay this way.
-
+
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
- updateDamage(r);
+ updateDamage(r);
}
}
}
diff --git a/javax/swing/text/html/BRView.java b/javax/swing/text/html/BRView.java
index 7d0d5164d..6f465c9d1 100644
--- a/javax/swing/text/html/BRView.java
+++ b/javax/swing/text/html/BRView.java
@@ -48,14 +48,14 @@ class BRView
{
/**
* Creates the new BR view.
- *
+ *
* @param elem the HTML element, representing the view.
*/
public BRView(Element elem)
{
super(elem);
}
-
+
/**
* Always return ForcedBreakWeight for the X_AXIS, BadBreakWeight for the
* Y_AXIS.
diff --git a/javax/swing/text/html/BlockView.java b/javax/swing/text/html/BlockView.java
index b05c983e9..1c3397126 100644
--- a/javax/swing/text/html/BlockView.java
+++ b/javax/swing/text/html/BlockView.java
@@ -1,4 +1,4 @@
-/* BlockView.java --
+/* BlockView.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -159,9 +159,9 @@ public class BlockView extends BoxView
private HashMap positionInfo;
/**
- * Creates a new view that represents an html box.
+ * Creates a new view that represents an html box.
* This can be used for a number of elements.
- *
+ *
* @param elem - the element to create a view for
* @param axis - either View.X_AXIS or View.Y_AXIS
*/
@@ -176,26 +176,26 @@ public class BlockView extends BoxView
* Creates the parent view for this. It is called before
* any other methods, if the parent view is working properly.
* Implemented to forward to the superclass and call
- * setPropertiesFromAttributes to set the paragraph
+ * setPropertiesFromAttributes to set the paragraph
* properties.
- *
+ *
* @param parent - the new parent, or null if the view
- * is being removed from a parent it was added to.
+ * is being removed from a parent it was added to.
*/
public void setParent(View parent)
{
super.setParent(parent);
-
+
if (parent != null)
setPropertiesFromAttributes();
}
-
+
/**
* Calculates the requirements along the major axis.
* This is implemented to call the superclass and then
* adjust it if the CSS width or height attribute is specified
* and applicable.
- *
+ *
* @param axis - the axis to check the requirements for.
* @param r - the SizeRequirements. If null, one is created.
* @return the new SizeRequirements object.
@@ -205,7 +205,7 @@ public class BlockView extends BoxView
{
if (r == null)
r = new SizeRequirements();
-
+
if (setCSSSpan(r, axis))
{
// If we have set the span from CSS, then we need to adjust
@@ -229,7 +229,7 @@ public class BlockView extends BoxView
* This is implemented to call the superclass and then
* adjust it if the CSS width or height attribute is specified
* and applicable.
- *
+ *
* @param axis - the axis to check the requirements for.
* @param r - the SizeRequirements. If null, one is created.
* @return the new SizeRequirements object.
@@ -239,7 +239,7 @@ public class BlockView extends BoxView
{
if (r == null)
r = new SizeRequirements();
-
+
if (setCSSSpan(r, axis))
{
// If we have set the span from CSS, then we need to adjust
@@ -277,7 +277,7 @@ public class BlockView extends BoxView
/**
* Sets the span on the SizeRequirements object according to the
* according CSS span value, when it is set.
- *
+ *
* @param r the size requirements
* @param axis the axis
*
@@ -325,14 +325,14 @@ public class BlockView extends BoxView
* perpendicular to the axis that it represents). The results
* of the layout are placed in the given arrays which are
* the allocations to the children along the minor axis.
- *
- * @param targetSpan - the total span given to the view, also
+ *
+ * @param targetSpan - the total span given to the view, also
* used to layout the children.
* @param axis - the minor axis
* @param offsets - the offsets from the origin of the view for
* all the child views. This is a return value and is filled in by this
* function.
- * @param spans - the span of each child view. This is a return value and is
+ * @param spans - the span of each child view. This is a return value and is
* filled in by this function.
*/
protected void layoutMinorAxis(int targetSpan, int axis,
@@ -469,7 +469,7 @@ public class BlockView extends BoxView
* Paints using the given graphics configuration and shape.
* This delegates to the css box painter to paint the
* border and background prior to the interior.
- *
+ *
* @param g - Graphics configuration
* @param a - the Shape to render into.
*/
@@ -487,7 +487,7 @@ public class BlockView extends BoxView
/**
* Fetches the attributes to use when painting.
- *
+ *
* @return the attributes of this model.
*/
public AttributeSet getAttributes()
@@ -496,10 +496,10 @@ public class BlockView extends BoxView
attributes = getStyleSheet().getViewAttributes(this);
return attributes;
}
-
+
/**
* Gets the resize weight.
- *
+ *
* @param axis - the axis to get the resize weight for.
* @return the resize weight.
* @throws IllegalArgumentException - for an invalid axis
@@ -513,10 +513,10 @@ public class BlockView extends BoxView
return 1;
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Gets the alignment.
- *
+ *
* @param axis - the axis to get the alignment for.
* @return the alignment.
*/
@@ -537,11 +537,11 @@ public class BlockView extends BoxView
}
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Gives notification from the document that attributes were
* changed in a location that this view is responsible for.
- *
+ *
* @param ev - the change information
* @param a - the current shape of the view
* @param f - the factory to use to rebuild if the view has children.
@@ -550,7 +550,7 @@ public class BlockView extends BoxView
Shape a, ViewFactory f)
{
super.changedUpdate(ev, a, f);
-
+
// If more elements were added, then need to set the properties for them
int currPos = ev.getOffset();
if (currPos <= getStartOffset()
@@ -560,10 +560,10 @@ public class BlockView extends BoxView
/**
* Determines the preferred span along the axis.
- *
+ *
* @param axis - the view to get the preferred span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -573,13 +573,13 @@ public class BlockView extends BoxView
return super.getPreferredSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Determines the minimum span along the axis.
- *
+ *
* @param axis - the axis to get the minimum span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -589,13 +589,13 @@ public class BlockView extends BoxView
return super.getMinimumSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Determines the maximum span along the axis.
- *
+ *
* @param axis - the axis to get the maximum span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -605,7 +605,7 @@ public class BlockView extends BoxView
return super.getMaximumSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Updates any cached values that come from attributes.
*/
@@ -640,7 +640,7 @@ public class BlockView extends BoxView
/**
* Gets the default style sheet.
- *
+ *
* @return the style sheet
*/
protected StyleSheet getStyleSheet()
diff --git a/javax/swing/text/html/CSS.java b/javax/swing/text/html/CSS.java
index 77f94a608..0a77bdff9 100644
--- a/javax/swing/text/html/CSS.java
+++ b/javax/swing/text/html/CSS.java
@@ -455,7 +455,7 @@ public class CSS implements Serializable
*
* @param attr the attribute string
* @param inherited if the attribute should be inherited or not
- * @param def a default value; may be <code>null</code>
+ * @param def a default value; may be <code>null</code>
*/
Attribute(String attr, boolean inherited, String def)
{
@@ -463,7 +463,7 @@ public class CSS implements Serializable
isInherited = inherited;
defaultValue = def;
if( attributeMap == null)
- attributeMap = new HashMap();
+ attributeMap = new HashMap();
attributeMap.put( attr, this );
}
diff --git a/javax/swing/text/html/CSSBorder.java b/javax/swing/text/html/CSSBorder.java
index fff6b01a1..23fcdccc6 100644
--- a/javax/swing/text/html/CSSBorder.java
+++ b/javax/swing/text/html/CSSBorder.java
@@ -308,7 +308,7 @@ class CSSBorder
// Right border.
paintBorderLine(g, x + width - right / 2, y, x + width - right / 2,
y + height, topStyle, right, rightColor, true);
-
+
}
private void paintBorderLine(Graphics g, int x1, int y1, int x2, int y2,
diff --git a/javax/swing/text/html/CSSParser.java b/javax/swing/text/html/CSSParser.java
index d49ac3a6f..5024c7b59 100644
--- a/javax/swing/text/html/CSSParser.java
+++ b/javax/swing/text/html/CSSParser.java
@@ -43,18 +43,18 @@ import java.io.*;
/**
* Parses a CSS document. This works by way of a delegate that implements the
* CSSParserCallback interface. The delegate is notified of the following
- * events:
- * - Import statement: handleImport
- * - Selectors handleSelector. This is invoked for each string. For example if
- * the Reader contained p, bar , a {}, the delegate would be notified 4 times,
- * for 'p,' 'bar' ',' and 'a'.
- * - When a rule starts, startRule
+ * events:
+ * - Import statement: handleImport
+ * - Selectors handleSelector. This is invoked for each string. For example if
+ * the Reader contained p, bar , a {}, the delegate would be notified 4 times,
+ * for 'p,' 'bar' ',' and 'a'.
+ * - When a rule starts, startRule
* - Properties in the rule via the handleProperty. This
* is invoked one per property/value key, eg font size: foo;, would cause the
- * delegate to be notified once with a value of 'font size'.
- * - Values in the rule via the handleValue, this is notified for the total value.
+ * delegate to be notified once with a value of 'font size'.
+ * - Values in the rule via the handleValue, this is notified for the total value.
* - When a rule ends, endRule
- *
+ *
* @author Lillian Angel (langel@redhat.com)
*/
class CSSParser
@@ -68,7 +68,7 @@ class CSSParser
{
/**
* Handles the import statment in the document.
- *
+ *
* @param imp - the import string
*/
public abstract void handleImport(String imp);
@@ -85,21 +85,21 @@ class CSSParser
/**
* Handles the selector of a rule.
- *
+ *
* @param selector - the selector in the rule
*/
public abstract void handleSelector(String selector);
/**
* Handles the properties in the document.
- *
+ *
* @param property - the property in the document.
*/
public abstract void handleProperty(String property);
/**
* Handles the values in the document.
- *
+ *
* @param value - the value to handle.
*/
public abstract void handleValue(String value);
@@ -212,7 +212,7 @@ class CSSParser
/**
* Appends a character to the token buffer.
- *
+ *
* @param c - the character to append
*/
private void append(char c)
@@ -233,7 +233,7 @@ class CSSParser
/**
* Fetches the next token.
- *
+ *
* @param c - the character to fetch.
* @return the location
* @throws IOException - any i/o error encountered while reading
@@ -276,7 +276,7 @@ class CSSParser
/**
* Reads a character from the stream.
- *
+ *
* @return the number of characters read or -1 if end of stream is reached.
* @throws IOException - any i/o encountered while reading
*/
@@ -293,19 +293,19 @@ class CSSParser
/**
* Parses the the contents of the reader using the
* callback.
- *
+ *
* @param reader - the reader to read from
* @param callback - the callback instance
* @param parsingDeclaration - true if parsing a declaration
* @throws IOException - any i/o error from the reader
*/
- void parse(Reader reader, CSSParser.CSSParserCallback callback,
+ void parse(Reader reader, CSSParser.CSSParserCallback callback,
boolean parsingDeclaration)
throws IOException
{
this.reader = reader;
this.callback = callback;
-
+
try
{
if (!parsingDeclaration)
@@ -322,7 +322,7 @@ class CSSParser
/**
* Skips any white space, returning the character after the white space.
- *
+ *
* @return the character after the whitespace
* @throws IOException - any i/o error from the reader
*/
@@ -337,7 +337,7 @@ class CSSParser
return next;
next = tempNext;
}
-
+
// Its all whitespace
return END;
}
@@ -345,7 +345,7 @@ class CSSParser
/**
* Gets the next statement, returning false if the end is reached.
* A statement is either an At-rule, or a ruleset.
- *
+ *
* @return false if the end is reached
* @throws IOException - any i/o error from the reader
*/
@@ -368,7 +368,7 @@ class CSSParser
parseAtRule();
else
parseRuleSet();
- break;
+ break;
case END:
return false;
}
@@ -377,28 +377,28 @@ class CSSParser
/**
* Parses an @ rule, stopping at a matching brace pair, or ;.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseAtRule() throws IOException
- {
- // An At-Rule begins with the "@" character followed immediately by a keyword.
- // Following the keyword separated by a space is an At-rule statement appropriate
- // to the At-keyword used. If the At-Rule is a simple declarative statement
- // (charset, import, fontdef), it is terminated by a semi-colon (";".)
- // If the At-Rule is a conditional or informative statement (media, page, font-face),
- // it is followed by optional arguments and then a style declaration block inside matching
- // curly braces ("{", "}".) At-Rules are sometimes nestable, depending on the context.
+ {
+ // An At-Rule begins with the "@" character followed immediately by a keyword.
+ // Following the keyword separated by a space is an At-rule statement appropriate
+ // to the At-keyword used. If the At-Rule is a simple declarative statement
+ // (charset, import, fontdef), it is terminated by a semi-colon (";".)
+ // If the At-Rule is a conditional or informative statement (media, page, font-face),
+ // it is followed by optional arguments and then a style declaration block inside matching
+ // curly braces ("{", "}".) At-Rules are sometimes nestable, depending on the context.
// If any part of an At-Rule is not understood, it should be ignored.
-
+
// FIXME: Not Implemented
- // call handleimport
+ // call handleimport
}
/**
- * Parses the next rule set, which is a selector followed by a declaration
+ * Parses the next rule set, which is a selector followed by a declaration
* block.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseRuleSet() throws IOException
@@ -411,9 +411,9 @@ class CSSParser
}
/**
- * Parses a set of selectors, returning false if the end of the stream is
+ * Parses a set of selectors, returning false if the end of the stream is
* reached.
- *
+ *
* @return false if the end of stream is reached
* @throws IOException - any i/o error from the reader
*/
@@ -421,13 +421,13 @@ class CSSParser
{
// FIXME: Not Implemented
// call handleselector
- return false;
+ return false;
}
/**
* Parses a declaration block. Which a number of declarations followed by a
* })].
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseDeclarationBlock() throws IOException
@@ -439,7 +439,7 @@ class CSSParser
/**
* Parses a single declaration, which is an identifier a : and another identifier.
* This returns the last token seen.
- *
+ *
* @returns the last token
* @throws IOException - any i/o error from the reader
*/
@@ -447,13 +447,13 @@ class CSSParser
{
// call handleValue
// FIXME: Not Implemented
- return 0;
+ return 0;
}
/**
* Parses identifiers until c is encountered, returning the ending token,
* which will be IDENTIFIER if c is found.
- *
+ *
* @param c - the stop character
* @param wantsBlocks - true if blocks are wanted
* @return the ending token
@@ -469,7 +469,7 @@ class CSSParser
/**
* Parses till a matching block close is encountered. This is only appropriate
* to be called at the top level (no nesting).
- *
+ *
* @param i - FIXME
* @throws IOException - any i/o error from the reader
*/
@@ -481,7 +481,7 @@ class CSSParser
/**
* Gets an identifier, returning true if the length of the string is greater
* than 0, stopping when c, whitespace, or one of {}()[] is hit.
- *
+ *
* @param c - the stop character
* @return returns true if the length of the string > 0
* @throws IOException - any i/o error from the reader
@@ -494,7 +494,7 @@ class CSSParser
/**
* Reads till c is encountered, escaping characters as necessary.
- *
+ *
* @param c - the stop character
* @throws IOException - any i/o error from the reader
*/
@@ -505,7 +505,7 @@ class CSSParser
/**
* Parses a comment block.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void readComment() throws IOException
@@ -516,7 +516,7 @@ class CSSParser
/**
* Called when a block start is encountered ({[.
- *
+ *
* @param start of block
*/
private void startBlock(int start)
@@ -526,7 +526,7 @@ class CSSParser
/**
* Called when an end block is encountered )]}
- *
+ *
* @param end of block
*/
private void endBlock(int end)
@@ -536,18 +536,18 @@ class CSSParser
/**
* Checks if currently in a block.
- *
+ *
* @return true if currently in a block.
*/
private boolean inBlock()
{
// FIXME: Not Implemented
- return false;
+ return false;
}
/**
* Supports one character look ahead, this will throw if called twice in a row.
- *
+ *
* @param c - the character to push.
* @throws IOException - if called twice in a row
*/
@@ -559,5 +559,3 @@ class CSSParser
pushedChar = c;
}
}
-
-
diff --git a/javax/swing/text/html/FormView.java b/javax/swing/text/html/FormView.java
index ef362bd3d..61c568f02 100644
--- a/javax/swing/text/html/FormView.java
+++ b/javax/swing/text/html/FormView.java
@@ -96,7 +96,7 @@ import javax.swing.text.StyleConstants;
* <td>JList in JScrollPane</td></tr>
* <tr><td>select, size unspecified or == 1</td><td>JComboBox</td></tr>
* <tr><td>textarea, text</td><td>JTextArea in JScrollPane</td></tr>
- * <tr><td>input, file</td><td>JTextField</td></tr>
+ * <tr><td>input, file</td><td>JTextField</td></tr>
* </table>
*
* @author Roman Kennke (kennke@aicas.com)
@@ -352,7 +352,7 @@ public class FormView
/**
* If the value attribute of an <code>&lt;input type=&quot;submit&quot;&gt>
* tag is not specified, then this string is used.
- *
+ *
* @deprecated As of JDK1.3 the value is fetched from the UIManager property
* <code>FormView.submitButtonText</code>.
*/
@@ -362,7 +362,7 @@ public class FormView
/**
* If the value attribute of an <code>&lt;input type=&quot;reset&quot;&gt>
* tag is not specified, then this string is used.
- *
+ *
* @deprecated As of JDK1.3 the value is fetched from the UIManager property
* <code>FormView.resetButtonText</code>.
*/
@@ -638,7 +638,7 @@ public class FormView
}
else
{
- data = name + ".x=" + p.x + "&" + name + ".y=" + p.y;
+ data = name + ".x=" + p.x + "&" + name + ".y=" + p.y;
}
return data;
}
diff --git a/javax/swing/text/html/HRuleView.java b/javax/swing/text/html/HRuleView.java
index 3bae5eb8e..9be1efff3 100644
--- a/javax/swing/text/html/HRuleView.java
+++ b/javax/swing/text/html/HRuleView.java
@@ -55,15 +55,15 @@ class HRuleView extends InlineView
{
/**
* The null view, indicating, that nothing should be painted ahead the
- * breaking point.
+ * breaking point.
*/
View nullView;
-
+
/**
* The height of the horizontal dash area.
*/
static int HEIGHT = 4;
-
+
/**
* The imaginary invisible view that stays after end of line after the
* breaking procedure. It occupies on character.
@@ -74,7 +74,7 @@ class HRuleView extends InlineView
* The break offset that becomes the views start offset.
*/
int breakOffset;
-
+
/**
* Return the end offset that is always one char after the break offset.
*/
@@ -82,7 +82,7 @@ class HRuleView extends InlineView
{
return breakOffset + 1;
}
-
+
/**
* Return the start offset that has been passed in a constructor.
*/
@@ -90,10 +90,10 @@ class HRuleView extends InlineView
{
return breakOffset;
}
-
+
/**
* Create the new instance of this view.
- *
+ *
* @param element the element (inherited from the HR view)
* @param offset the position where the HR view has been broken
*/
@@ -103,7 +103,7 @@ class HRuleView extends InlineView
breakOffset = offset;
}
}
-
+
/**
* Creates the new HR view.
*/
@@ -120,11 +120,11 @@ class HRuleView extends InlineView
public int getBreakWeight(int axis, float pos, float len)
{
if (axis == X_AXIS && ((getEndOffset() - getStartOffset()) > 1))
- return ForcedBreakWeight;
+ return ForcedBreakWeight;
else
- return BadBreakWeight;
+ return BadBreakWeight;
}
-
+
/**
* Draws the double line, upped black and the lower light gray.
*/
@@ -143,7 +143,7 @@ class HRuleView extends InlineView
g.setColor(Color.black);
g.drawLine(x, y++, w, h++);
- g.setColor(Color.lightGray);
+ g.setColor(Color.lightGray);
g.drawLine(x, y, w, h);
}
@@ -160,7 +160,7 @@ class HRuleView extends InlineView
else
return this;
}
-
+
/**
* Returns the width of the container for the horizontal axis and the
* thickness of the dash area for the vertical axis.
@@ -176,7 +176,7 @@ class HRuleView extends InlineView
return 640;
}
else
- return HEIGHT;
+ return HEIGHT;
}
/**
diff --git a/javax/swing/text/html/HTMLDocument.java b/javax/swing/text/html/HTMLDocument.java
index f3d3ce3fa..9545be4e8 100644
--- a/javax/swing/text/html/HTMLDocument.java
+++ b/javax/swing/text/html/HTMLDocument.java
@@ -76,7 +76,7 @@ import javax.swing.text.html.HTML.Tag;
* data structure when it is needed to parse HTML and then obtain the content of
* the certain types of tags. This class also has methods for modifying the HTML
* content.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
* @author Anthony Balkissoon (abalkiss@redhat.com)
* @author Lillian Angel (langel@redhat.com)
@@ -85,7 +85,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
/** A key for document properies. The value for the key is
* a Vector of Strings of comments not found in the body.
- */
+ */
public static final String AdditionalComments = "AdditionalComments";
URL baseURL = null;
boolean preservesUnknownTags = true;
@@ -110,22 +110,22 @@ public class HTMLDocument extends DefaultStyledDocument
{
this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
-
+
/**
- * Constructs an HTML document with the default content storage
+ * Constructs an HTML document with the default content storage
* implementation and the specified style/attribute storage mechanism.
- *
+ *
* @param styles - the style sheet
*/
public HTMLDocument(StyleSheet styles)
{
this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
-
+
/**
- * Constructs an HTML document with the given content storage implementation
+ * Constructs an HTML document with the given content storage implementation
* and the given style/attribute storage mechanism.
- *
+ *
* @param c - the document's content
* @param styles - the style sheet
*/
@@ -133,21 +133,21 @@ public class HTMLDocument extends DefaultStyledDocument
{
super(c, styles);
}
-
+
/**
- * Gets the style sheet with the document display rules (CSS) that were specified
+ * Gets the style sheet with the document display rules (CSS) that were specified
* in the HTML document.
- *
+ *
* @return - the style sheet
*/
public StyleSheet getStyleSheet()
{
return (StyleSheet) getAttributeContext();
}
-
+
/**
* This method creates a root element for the new document.
- *
+ *
* @return the new default root
*/
protected AbstractElement createDefaultRoot()
@@ -180,12 +180,12 @@ public class HTMLDocument extends DefaultStyledDocument
return html;
}
-
+
/**
* This method returns an HTMLDocument.RunElement object attached to
- * parent representing a run of text from p0 to p1. The run has
+ * parent representing a run of text from p0 to p1. The run has
* attributes described by a.
- *
+ *
* @param parent - the parent element
* @param a - the attributes for the element
* @param p0 - the beginning of the range >= 0
@@ -202,7 +202,7 @@ public class HTMLDocument extends DefaultStyledDocument
/**
* This method returns an HTMLDocument.BlockElement object representing the
* attribute set a and attached to parent.
- *
+ *
* @param parent - the parent element
* @param a - the attributes for the element
*
@@ -212,20 +212,20 @@ public class HTMLDocument extends DefaultStyledDocument
{
return new BlockElement(parent, a);
}
-
+
/**
* Returns the parser used by this HTMLDocument to insert HTML.
- *
+ *
* @return the parser used by this HTMLDocument to insert HTML.
*/
public HTMLEditorKit.Parser getParser()
{
- return parser;
+ return parser;
}
-
+
/**
* Sets the parser used by this HTMLDocument to insert HTML.
- *
+ *
* @param p the parser to use
*/
public void setParser (HTMLEditorKit.Parser p)
@@ -235,25 +235,25 @@ public class HTMLDocument extends DefaultStyledDocument
/**
* Sets the number of tokens to buffer before trying to display the
* Document.
- *
+ *
* @param n the number of tokens to buffer
*/
public void setTokenThreshold (int n)
{
tokenThreshold = n;
}
-
+
/**
* Returns the number of tokens that are buffered before the document
* is rendered.
- *
+ *
* @return the number of tokens buffered
*/
public int getTokenThreshold ()
{
return tokenThreshold;
}
-
+
/**
* Returns the location against which to resolve relative URLs.
* This is the document's URL if the document was loaded from a URL.
@@ -264,7 +264,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
return baseURL;
}
-
+
/**
* Sets the location against which to resolve relative URLs.
* @param u the new base URL
@@ -274,7 +274,7 @@ public class HTMLDocument extends DefaultStyledDocument
baseURL = u;
getStyleSheet().setBase(u);
}
-
+
/**
* Returns whether or not the parser preserves unknown HTML tags.
* @return true if the parser preserves unknown tags
@@ -283,7 +283,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
return preservesUnknownTags;
}
-
+
/**
* Sets the behaviour of the parser when it encounters unknown HTML tags.
* @param preservesTags true if the parser should preserve unknown tags.
@@ -292,7 +292,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
preservesUnknownTags = preservesTags;
}
-
+
/**
* An iterator to iterate through LeafElements in the document.
*/
@@ -308,7 +308,7 @@ public class HTMLDocument extends DefaultStyledDocument
tag = t;
it = new ElementIterator(doc);
}
-
+
/**
* Return the attributes for the tag associated with this iteartor
* @return the AttributeSet
@@ -464,7 +464,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
int start = el.getStartOffset();
int end = el.getEndOffset();
-
+
StringBuilder html = new StringBuilder();
html.append("<frame");
if (url != null)
@@ -499,7 +499,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
return new HTMLDocument.LeafIterator(t, this);
}
-
+
/**
* An iterator over a particular type of tag.
*/
@@ -510,26 +510,26 @@ public class HTMLDocument extends DefaultStyledDocument
* @return the <code>AttributeSet</code> (null if none found).
*/
public abstract AttributeSet getAttributes();
-
+
/**
* Get the end of the range for the current occurrence of the tag
* being defined and having the same attributes.
* @return the end of the range
*/
public abstract int getEndOffset();
-
+
/**
* Get the start of the range for the current occurrence of the tag
* being defined and having the same attributes.
* @return the start of the range (-1 if it can't be found).
*/
public abstract int getStartOffset();
-
+
/**
* Move the iterator forward.
*/
public abstract void next();
-
+
/**
* Indicates whether or not the iterator currently represents an occurrence
* of the tag.
@@ -537,33 +537,33 @@ public class HTMLDocument extends DefaultStyledDocument
* tag.
*/
public abstract boolean isValid();
-
+
/**
* Type of tag this iterator represents.
* @return the tag.
*/
public abstract HTML.Tag getTag();
}
-
+
public class BlockElement extends AbstractDocument.BranchElement
{
public BlockElement (Element parent, AttributeSet a)
{
super(parent, a);
}
-
+
/**
- * Gets the resolving parent. Since HTML attributes are not
+ * Gets the resolving parent. Since HTML attributes are not
* inherited at the model level, this returns null.
*/
public AttributeSet getResolveParent()
{
return null;
}
-
+
/**
* Gets the name of the element.
- *
+ *
* @return the name of the element if it exists, null otherwise.
*/
public String getName()
@@ -579,29 +579,29 @@ public class HTMLDocument extends DefaultStyledDocument
}
/**
- * RunElement represents a section of text that has a set of
+ * RunElement represents a section of text that has a set of
* HTML character level attributes assigned to it.
*/
public class RunElement extends AbstractDocument.LeafElement
{
-
+
/**
* Constructs an element that has no children. It represents content
* within the document.
- *
+ *
* @param parent - parent of this
* @param a - elements attributes
* @param start - the start offset >= 0
- * @param end - the end offset
+ * @param end - the end offset
*/
public RunElement(Element parent, AttributeSet a, int start, int end)
{
super(parent, a, start, end);
}
-
+
/**
* Gets the name of the element.
- *
+ *
* @return the name of the element if it exists, null otherwise.
*/
public String getName()
@@ -614,11 +614,11 @@ public class HTMLDocument extends DefaultStyledDocument
name = super.getName();
return name;
}
-
+
/**
* Gets the resolving parent. HTML attributes do not inherit at the
* model level, so this method returns null.
- *
+ *
* @return null
*/
public AttributeSet getResolveParent()
@@ -626,10 +626,10 @@ public class HTMLDocument extends DefaultStyledDocument
return null;
}
}
-
+
/**
* A reader to load an HTMLDocument with HTML structure.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
*/
public class HTMLReader extends HTMLEditorKit.ParserCallback
@@ -648,51 +648,51 @@ public class HTMLDocument extends DefaultStyledDocument
* Holds the current character attribute set *
*/
protected MutableAttributeSet charAttr = new SimpleAttributeSet();
-
- protected Vector<ElementSpec> parseBuffer = new Vector<ElementSpec>();
+
+ protected Vector<ElementSpec> parseBuffer = new Vector<ElementSpec>();
/**
* The parse stack. It holds the current element tree path.
*/
private Stack<HTML.Tag> parseStack = new Stack<HTML.Tag>();
- /**
+ /**
* A stack for character attribute sets *
*/
Stack charAttrStack = new Stack();
-
+
/** A mapping between HTML.Tag objects and the actions that handle them **/
HashMap tagToAction;
-
+
/** Tells us whether we've received the '</html>' tag yet **/
boolean endHTMLEncountered = false;
-
- /**
- * Related to the constructor with explicit insertTag
+
+ /**
+ * Related to the constructor with explicit insertTag
*/
int popDepth;
-
+
/**
* Related to the constructor with explicit insertTag
- */
+ */
int pushDepth;
-
- /**
+
+ /**
* Related to the constructor with explicit insertTag
- */
+ */
int offset;
-
+
/**
* The tag (inclusve), after that the insertion should start.
*/
HTML.Tag insertTag;
-
+
/**
* This variable becomes true after the insert tag has been encountered.
*/
boolean insertTagEncountered;
-
+
/** A temporary variable that helps with the printing out of debug information **/
boolean debug = false;
@@ -767,7 +767,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
// Nothing to do here.
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action. By default does nothing.
@@ -779,7 +779,7 @@ public class HTMLDocument extends DefaultStyledDocument
}
public class BlockAction extends TagAction
- {
+ {
/**
* This method is called when a start tag is seen for one of the types
* of tags associated with this Action.
@@ -789,7 +789,7 @@ public class HTMLDocument extends DefaultStyledDocument
// Tell the parse buffer to open a new block for this tag.
blockOpen(t, a);
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -800,7 +800,7 @@ public class HTMLDocument extends DefaultStyledDocument
blockClose(t);
}
}
-
+
public class CharacterAction extends TagAction
{
/**
@@ -827,7 +827,7 @@ public class HTMLDocument extends DefaultStyledDocument
public void end(HTML.Tag t)
{
popCharacterStyle();
- }
+ }
}
/**
@@ -909,7 +909,7 @@ public class HTMLDocument extends DefaultStyledDocument
super.start(t, a);
}
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1012,7 +1012,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
super.end(t);
buttonGroups = null;
- }
+ }
}
/**
@@ -1035,7 +1035,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
blockOpen(t, a);
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1043,7 +1043,7 @@ public class HTMLDocument extends DefaultStyledDocument
public void end(HTML.Tag t)
{
blockClose(t);
- }
+ }
}
/**
@@ -1062,7 +1062,7 @@ public class HTMLDocument extends DefaultStyledDocument
blockClose(HTML.Tag.IMPLIED);
}
}
-
+
public class ParagraphAction extends BlockAction
{
/**
@@ -1073,7 +1073,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
super.start(t, a);
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1081,7 +1081,7 @@ public class HTMLDocument extends DefaultStyledDocument
public void end(HTML.Tag t)
{
super.end(t);
- }
+ }
}
/**
@@ -1100,7 +1100,7 @@ public class HTMLDocument extends DefaultStyledDocument
a.addAttribute(CSS.Attribute.WHITE_SPACE, "pre");
blockOpen(HTML.Tag.IMPLIED, a);
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1110,11 +1110,11 @@ public class HTMLDocument extends DefaultStyledDocument
blockClose(HTML.Tag.IMPLIED);
inPreTag = false;
blockClose(t);
- }
+ }
}
-
+
/**
- * Inserts the elements that are represented by ths single tag with
+ * Inserts the elements that are represented by ths single tag with
* attributes (only). The closing tag, even if present, mut follow
* immediately after the starting tag without providing any additional
* information. Hence the {@link TagAction#end} method need not be
@@ -1130,7 +1130,7 @@ public class HTMLDocument extends DefaultStyledDocument
addSpecialElement(t, a);
}
}
-
+
class AreaAction extends TagAction
{
/**
@@ -1142,7 +1142,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
// FIXME: Implement.
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1151,7 +1151,7 @@ public class HTMLDocument extends DefaultStyledDocument
throws NotImplementedException
{
// FIXME: Implement.
- }
+ }
}
/**
@@ -1200,7 +1200,7 @@ public class HTMLDocument extends DefaultStyledDocument
baseTarget = (String) a.getAttribute(HTML.Attribute.TARGET);
}
}
-
+
class HeadAction extends BlockAction
{
/**
@@ -1213,7 +1213,7 @@ public class HTMLDocument extends DefaultStyledDocument
// FIXME: Implement.
super.start(t, a);
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1234,7 +1234,7 @@ public class HTMLDocument extends DefaultStyledDocument
super.end(t);
}
}
-
+
class LinkAction extends HiddenAction
{
/**
@@ -1295,13 +1295,13 @@ public class HTMLDocument extends DefaultStyledDocument
ex.printStackTrace();
}
}
- }
+ }
}
}
}
-
+
}
-
+
class MapAction extends TagAction
{
/**
@@ -1313,7 +1313,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
// FIXME: Implement.
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1322,9 +1322,9 @@ public class HTMLDocument extends DefaultStyledDocument
throws NotImplementedException
{
// FIXME: Implement.
- }
+ }
}
-
+
class MetaAction extends TagAction
{
/**
@@ -1336,7 +1336,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
// FIXME: Implement.
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1345,7 +1345,7 @@ public class HTMLDocument extends DefaultStyledDocument
throws NotImplementedException
{
// FIXME: Implement.
- }
+ }
}
class StyleAction extends TagAction
@@ -1358,7 +1358,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
inStyleTag = true;
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1366,9 +1366,9 @@ public class HTMLDocument extends DefaultStyledDocument
public void end(HTML.Tag t)
{
inStyleTag = false;
- }
+ }
}
-
+
class TitleAction extends TagAction
{
/**
@@ -1380,7 +1380,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
// FIXME: Implement.
}
-
+
/**
* Called when an end tag is seen for one of the types of tags associated
* with this Action.
@@ -1389,14 +1389,14 @@ public class HTMLDocument extends DefaultStyledDocument
throws NotImplementedException
{
// FIXME: Implement.
- }
- }
-
+ }
+ }
+
public HTMLReader(int offset)
{
this (offset, 0, 0, null);
}
-
+
public HTMLReader(int offset, int popDepth, int pushDepth,
HTML.Tag insertTag)
{
@@ -1407,7 +1407,7 @@ public class HTMLDocument extends DefaultStyledDocument
threshold = getTokenThreshold();
initTags();
}
-
+
void initTags()
{
tagToAction = new HashMap(72);
@@ -1427,7 +1427,7 @@ public class HTMLDocument extends DefaultStyledDocument
MetaAction metaAction = new MetaAction();
StyleAction styleAction = new StyleAction();
TitleAction titleAction = new TitleAction();
-
+
ConvertAction convertAction = new ConvertAction();
tagToAction.put(HTML.Tag.A, characterAction);
tagToAction.put(HTML.Tag.ADDRESS, characterAction);
@@ -1486,7 +1486,7 @@ public class HTMLDocument extends DefaultStyledDocument
tagToAction.put(HTML.Tag.SELECT, formAction);
tagToAction.put(HTML.Tag.SMALL, characterAction);
tagToAction.put(HTML.Tag.STRIKE, characterAction);
- tagToAction.put(HTML.Tag.S, characterAction);
+ tagToAction.put(HTML.Tag.S, characterAction);
tagToAction.put(HTML.Tag.STRONG, characterAction);
tagToAction.put(HTML.Tag.STYLE, styleAction);
tagToAction.put(HTML.Tag.SUB, characterAction);
@@ -1502,7 +1502,7 @@ public class HTMLDocument extends DefaultStyledDocument
tagToAction.put(HTML.Tag.UL, blockAction);
tagToAction.put(HTML.Tag.VAR, characterAction);
}
-
+
/**
* Pushes the current character style onto the stack.
*
@@ -1511,9 +1511,9 @@ public class HTMLDocument extends DefaultStyledDocument
{
charAttrStack.push(charAttr.copyAttributes());
}
-
+
/**
- * Pops a character style off of the stack and uses it as the
+ * Pops a character style off of the stack and uses it as the
* current character style.
*
*/
@@ -1522,12 +1522,12 @@ public class HTMLDocument extends DefaultStyledDocument
if (!charAttrStack.isEmpty())
charAttr = (MutableAttributeSet) charAttrStack.pop();
}
-
+
/**
* Registers a given tag with a given Action. All of the well-known tags
* are registered by default, but this method can change their behaviour
* or add support for custom or currently unsupported tags.
- *
+ *
* @param t the Tag to register
* @param a the Action for the Tag
*/
@@ -1535,7 +1535,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
tagToAction.put (t, a);
}
-
+
/**
* This is the last method called on the HTMLReader, allowing any pending
* changes to be flushed to the HTMLDocument.
@@ -1565,9 +1565,9 @@ public class HTMLDocument extends DefaultStyledDocument
}
/**
- * This method is called by the parser to indicate a block of
+ * This method is called by the parser to indicate a block of
* text was encountered. Should insert the text appropriately.
- *
+ *
* @param data the text that was inserted
* @param pos the position at which the text was inserted
*/
@@ -1589,15 +1589,15 @@ public class HTMLDocument extends DefaultStyledDocument
}
else
addContent(data, 0, data.length);
-
+
}
}
-
+
/**
* Checks if the HTML tag should be inserted. The tags before insert tag (if
* specified) are not inserted. Also, the tags after the end of the html are
* not inserted.
- *
+ *
* @return true if the tag should be inserted, false otherwise.
*/
private boolean shouldInsert()
@@ -1605,11 +1605,11 @@ public class HTMLDocument extends DefaultStyledDocument
return ! endHTMLEncountered
&& (insertTagEncountered || insertTag == null);
}
-
+
/**
* This method is called by the parser and should route the call to the
* proper handler for the tag.
- *
+ *
* @param t the HTML.Tag
* @param a the attribute set
* @param pos the position at which the tag was encountered
@@ -1626,10 +1626,10 @@ public class HTMLDocument extends DefaultStyledDocument
action.start(t, a);
}
}
-
+
/**
* This method called by parser to handle a comment block.
- *
+ *
* @param data the comment
* @param pos the position at which the comment was encountered
*/
@@ -1645,11 +1645,11 @@ public class HTMLDocument extends DefaultStyledDocument
}
}
}
-
+
/**
* This method is called by the parser and should route the call to the
* proper handler for the tag.
- *
+ *
* @param t the HTML.Tag
* @param pos the position at which the tag was encountered
*/
@@ -1666,11 +1666,11 @@ public class HTMLDocument extends DefaultStyledDocument
action.end(t);
}
}
-
+
/**
* This is a callback from the parser that should be routed to the
* appropriate handler for the tag.
- *
+ *
* @param t the HTML.Tag that was encountered
* @param a the attribute set
* @param pos the position at which the tag was encountered
@@ -1690,12 +1690,12 @@ public class HTMLDocument extends DefaultStyledDocument
}
}
}
-
+
/**
* This is invoked after the stream has been parsed but before it has been
* flushed.
- *
- * @param eol one of \n, \r, or \r\n, whichever was encountered the most in
+ *
+ * @param eol one of \n, \r, or \r\n, whichever was encountered the most in
* parsing the stream
* @since 1.3
*/
@@ -1703,11 +1703,11 @@ public class HTMLDocument extends DefaultStyledDocument
{
// FIXME: Implement.
}
-
+
/**
* Adds the given text to the textarea document. Called only when we are
- * within a textarea.
- *
+ * within a textarea.
+ *
* @param data the text to add to the textarea
*/
protected void textAreaContent(char[] data)
@@ -1726,7 +1726,7 @@ public class HTMLDocument extends DefaultStyledDocument
assert false;
}
}
-
+
/**
* Adds the given text that was encountered in a <PRE> element.
* This adds synthesized lines to hold the text runs.
@@ -1754,11 +1754,11 @@ public class HTMLDocument extends DefaultStyledDocument
addContent(data, start, data.length - start);
}
}
-
+
/**
- * Instructs the parse buffer to create a block element with the given
+ * Instructs the parse buffer to create a block element with the given
* attributes.
- *
+ *
* @param t the tag that requires opening a new block
* @param attr the attribute set for the new block
*/
@@ -1809,9 +1809,9 @@ public class HTMLDocument extends DefaultStyledDocument
}
/**
- * Instructs the parse buffer to close the block element associated with
+ * Instructs the parse buffer to close the block element associated with
* the given HTML.Tag
- *
+ *
* @param t the HTML.Tag that is closing its block
*/
protected void blockClose(HTML.Tag t)
@@ -1837,14 +1837,14 @@ public class HTMLDocument extends DefaultStyledDocument
}
element = new DefaultStyledDocument.ElementSpec(null,
- DefaultStyledDocument.ElementSpec.EndTagType);
+ DefaultStyledDocument.ElementSpec.EndTagType);
parseBuffer.addElement(element);
}
-
+
/**
* Adds text to the appropriate context using the current character
* attribute set.
- *
+ *
* @param data the text to add
* @param offs the offset at which to add it
* @param length the length of the text to add
@@ -1853,11 +1853,11 @@ public class HTMLDocument extends DefaultStyledDocument
{
addContent(data, offs, length, true);
}
-
+
/**
* Adds text to the appropriate context using the current character
* attribute set, and possibly generating an IMPLIED Tag if necessary.
- *
+ *
* @param data the text to add
* @param offs the offset at which to add it
* @param length the length of the text to add
@@ -1876,7 +1876,7 @@ public class HTMLDocument extends DefaultStyledDocument
DefaultStyledDocument.ElementSpec element;
AttributeSet attributes = null;
- // Copy the attribute set, don't use the same object because
+ // Copy the attribute set, don't use the same object because
// it may change
if (charAttr != null)
attributes = charAttr.copyAttributes();
@@ -1887,7 +1887,7 @@ public class HTMLDocument extends DefaultStyledDocument
element = new DefaultStyledDocument.ElementSpec(attributes,
DefaultStyledDocument.ElementSpec.ContentType,
data, offs, length);
-
+
// Add the element to the buffer
parseBuffer.addElement(element);
@@ -1905,10 +1905,10 @@ public class HTMLDocument extends DefaultStyledDocument
}
}
}
-
+
/**
* Adds content that is specified in the attribute set.
- *
+ *
* @param t the HTML.Tag
* @param a the attribute set specifying the special content
*/
@@ -1920,37 +1920,37 @@ public class HTMLDocument extends DefaultStyledDocument
}
a.addAttribute(StyleConstants.NameAttribute, t);
-
+
// The two spaces are required because some special elements like HR
// must be broken. At least two characters are needed to break into the
// two parts.
DefaultStyledDocument.ElementSpec spec =
new DefaultStyledDocument.ElementSpec(a.copyAttributes(),
- DefaultStyledDocument.ElementSpec.ContentType,
+ DefaultStyledDocument.ElementSpec.ContentType,
new char[] {' '}, 0, 1 );
parseBuffer.add(spec);
}
-
+
}
-
+
/**
- * Gets the reader for the parser to use when loading the document with HTML.
- *
+ * Gets the reader for the parser to use when loading the document with HTML.
+ *
* @param pos - the starting position
* @return - the reader
*/
public HTMLEditorKit.ParserCallback getReader(int pos)
{
return new HTMLReader(pos);
- }
-
+ }
+
/**
- * Gets the reader for the parser to use when loading the document with HTML.
- *
+ * Gets the reader for the parser to use when loading the document with HTML.
+ *
* @param pos - the starting position
* @param popDepth - the number of EndTagTypes to generate before inserting
- * @param pushDepth - the number of StartTagTypes with a direction
- * of JoinNextDirection that should be generated before inserting,
+ * @param pushDepth - the number of StartTagTypes with a direction
+ * of JoinNextDirection that should be generated before inserting,
* but after the end tags have been generated.
* @param insertTag - the first tag to start inserting into document
* @return - the reader
@@ -1962,13 +1962,13 @@ public class HTMLDocument extends DefaultStyledDocument
{
return new HTMLReader(pos, popDepth, pushDepth, insertTag);
}
-
+
/**
* Gets the reader for the parser to use when inserting the HTML fragment into
* the document. Checks if the parser is present, sets the parent in the
* element stack and removes any actions for BODY (it can be only one body in
* a HTMLDocument).
- *
+ *
* @param pos - the starting position
* @param popDepth - the number of EndTagTypes to generate before inserting
* @param pushDepth - the number of StartTagTypes with a direction of
@@ -2009,14 +2009,14 @@ public class HTMLDocument extends DefaultStyledDocument
super.handleEndTag(t, pos);
}
};
-
+
return reader;
- }
-
+ }
+
/**
* Gets the child element that contains the attribute with the value or null.
* Not thread-safe.
- *
+ *
* @param e - the element to begin search at
* @param attribute - the desired attribute
* @param value - the desired value
@@ -2029,14 +2029,14 @@ public class HTMLDocument extends DefaultStyledDocument
{
if (e.getAttributes().containsAttribute(attribute, value))
return e;
-
+
int count = e.getElementCount();
for (int j = 0; j < count; j++)
{
Element child = e.getElement(j);
if (child.getAttributes().containsAttribute(attribute, value))
return child;
-
+
Element grandChild = getElement(child, attribute, value);
if (grandChild != null)
return grandChild;
@@ -2044,13 +2044,13 @@ public class HTMLDocument extends DefaultStyledDocument
}
return null;
}
-
+
/**
* Returns the element that has the given id Attribute (for instance, &lt;p id
* ='my paragraph &gt;'). If it is not found, null is returned. The HTML tag,
* having this attribute, is not checked by this method and can be any. The
* method is not thread-safe.
- *
+ *
* @param attrId - the value of the attribute id to look for
* @return the element that has the given id.
*/
@@ -2059,25 +2059,25 @@ public class HTMLDocument extends DefaultStyledDocument
return getElement(getDefaultRootElement(), HTML.Attribute.ID,
attrId);
}
-
+
/**
* Replaces the children of the given element with the contents of
* the string. The document must have an HTMLEditorKit.Parser set.
* This will be seen as at least two events, n inserts followed by a remove.
- *
+ *
* @param elem - the brance element whose children will be replaced
* @param htmlText - the string to be parsed and assigned to element.
* @throws BadLocationException
* @throws IOException
- * @throws IllegalArgumentException - if elem is a leaf
+ * @throws IllegalArgumentException - if elem is a leaf
* @throws IllegalStateException - if an HTMLEditorKit.Parser has not been set
*/
- public void setInnerHTML(Element elem, String htmlText)
+ public void setInnerHTML(Element elem, String htmlText)
throws BadLocationException, IOException
{
if (elem.isLeaf())
throw new IllegalArgumentException("Element is a leaf");
-
+
int start = elem.getStartOffset();
int end = elem.getEndOffset();
@@ -2086,18 +2086,18 @@ public class HTMLDocument extends DefaultStyledDocument
// TODO charset
getParser().parse(new StringReader(htmlText), reader, true);
-
+
// Remove the previous content
remove(start, end - start);
}
-
+
/**
* Replaces the given element in the parent with the string. When replacing a
* leaf, this will attempt to make sure there is a newline present if one is
* needed. This may result in an additional element being inserted. This will
* be seen as at least two events, n inserts followed by a remove. The
* HTMLEditorKit.Parser must be set.
- *
+ *
* @param elem - the branch element whose parent will be replaced
* @param htmlText - the string to be parsed and assigned to elem
* @throws BadLocationException
@@ -2112,18 +2112,18 @@ public void setOuterHTML(Element elem, String htmlText)
int end = elem.getEndOffset();
remove(start, end-start);
-
+
HTMLEditorKit.ParserCallback reader = getInsertingReader(
start, 0, 0, HTML.Tag.BODY, elem);
// TODO charset
getParser().parse(new StringReader(htmlText), reader, true);
}
-
+
/**
* Inserts the string before the start of the given element. The parser must
* be set.
- *
+ *
* @param elem - the element to be the root for the new text.
* @param htmlText - the string to be parsed and assigned to elem
* @throws BadLocationException
@@ -2139,12 +2139,12 @@ public void setOuterHTML(Element elem, String htmlText)
// TODO charset
getParser().parse(new StringReader(htmlText), reader, true);
}
-
+
/**
* Inserts the string at the end of the element. If elem's children are
* leaves, and the character at elem.getEndOffset() - 1 is a newline, then it
* will be inserted before the newline. The parser must be set.
- *
+ *
* @param elem - the element to be the root for the new text
* @param htmlText - the text to insert
* @throws BadLocationException
@@ -2161,11 +2161,11 @@ public void setOuterHTML(Element elem, String htmlText)
getParser().parse(new StringReader(htmlText), reader, true);
}
-
+
/**
* Inserts the string after the end of the given element.
* The parser must be set.
- *
+ *
* @param elem - the element to be the root for the new text
* @param htmlText - the text to insert
* @throws BadLocationException
@@ -2181,11 +2181,11 @@ public void setOuterHTML(Element elem, String htmlText)
// TODO charset
getParser().parse(new StringReader(htmlText), reader, true);
}
-
+
/**
* Inserts the string at the start of the element.
* The parser must be set.
- *
+ *
* @param elem - the element to be the root for the new text
* @param htmlText - the text to insert
* @throws BadLocationException
diff --git a/javax/swing/text/html/HTMLEditorKit.java b/javax/swing/text/html/HTMLEditorKit.java
index 45381d60e..e3505d3c2 100644
--- a/javax/swing/text/html/HTMLEditorKit.java
+++ b/javax/swing/text/html/HTMLEditorKit.java
@@ -89,7 +89,7 @@ public class HTMLEditorKit
extends StyledEditorKit
implements Serializable, Cloneable, Accessible
{
-
+
/**
* Fires the hyperlink events on the associated component
* when needed.
@@ -107,16 +107,16 @@ public class HTMLEditorKit
/**
* Constructor
*/
- public LinkController()
+ public LinkController()
{
super();
}
-
+
/**
* Dispatched when the mouse is clicked. If the component
* is read-only, then the clicked event is used to drive an
* attempt to follow the reference specified by a link
- *
+ *
* @param e - the mouse event
*/
public void mouseClicked(MouseEvent e)
@@ -130,20 +130,20 @@ public class HTMLEditorKit
activateLink(pos, editor, e.getX(), e.getY());
}
}
-
+
/**
* Dispatched when the mouse is dragged on a component.
- *
+ *
* @param e - the mouse event.
*/
public void mouseDragged(MouseEvent e)
{
// Nothing to do here.
}
-
+
/**
* Dispatched when the mouse cursor has moved into the component.
- *
+ *
* @param e - the mouse event.
*/
public void mouseMoved(MouseEvent e)
@@ -248,7 +248,7 @@ public class HTMLEditorKit
if (event != null)
editor.fireHyperlinkUpdate(event);
}
-
+
}
/**
@@ -275,7 +275,7 @@ public class HTMLEditorKit
{
URL base = doc.getBase();
url = new URL(base, href);
-
+
}
catch (MalformedURLException ex)
{
@@ -303,11 +303,11 @@ public class HTMLEditorKit
return ev;
}
}
-
+
/**
* This class is used to insert a string of HTML into an existing
* document. At least 2 HTML.Tags need to be supplied. The first Tag (parentTag)
- * identifies the parent in the document to add the elements to. The second, (addTag),
+ * identifies the parent in the document to add the elements to. The second, (addTag),
* identifies that the first tag should be added to the document as seen in the string.
* The parser will generate all appropriate (opening/closing tags_ even if they are not
* in the HTML string passed in.
@@ -315,28 +315,28 @@ public class HTMLEditorKit
public static class InsertHTMLTextAction
extends HTMLTextAction
{
-
+
/**
* Tag in HTML to start adding tags from.
*/
protected HTML.Tag addTag;
-
+
/**
* Alternate tag in HTML to start adding tags from if parentTag is
* not found and alternateParentTag is not found.
- */
+ */
protected HTML.Tag alternateAddTag;
-
+
/**
* Alternate tag to check if parentTag is not found.
*/
protected HTML.Tag alternateParentTag;
-
+
/**
* HTML to insert.
*/
protected String html;
-
+
/**
* Tag to check for in the document.
*/
@@ -344,21 +344,21 @@ public class HTMLEditorKit
/**
* Initializes all fields.
- *
+ *
* @param name - the name of the document.
* @param html - the html to insert
* @param parentTag - the parent tag to check for
* @param addTag - the tag to start adding from
*/
- public InsertHTMLTextAction(String name, String html,
+ public InsertHTMLTextAction(String name, String html,
HTML.Tag parentTag, HTML.Tag addTag)
{
this(name, html, parentTag, addTag, null, null);
}
-
+
/**
* Initializes all fields and calls super
- *
+ *
* @param name - the name of the document.
* @param html - the html to insert
* @param parentTag - the parent tag to check for
@@ -366,9 +366,9 @@ public class HTMLEditorKit
* @param alternateParentTag - the alternate parent tag
* @param alternateAddTag - the alternate add tag
*/
- public InsertHTMLTextAction(String name, String html, HTML.Tag parentTag,
- HTML.Tag addTag, HTML.Tag alternateParentTag,
- HTML.Tag alternateAddTag)
+ public InsertHTMLTextAction(String name, String html, HTML.Tag parentTag,
+ HTML.Tag addTag, HTML.Tag alternateParentTag,
+ HTML.Tag alternateAddTag)
{
super(name);
// Fields are for easy access when the action is applied to an actual
@@ -379,11 +379,11 @@ public class HTMLEditorKit
this.alternateParentTag = alternateParentTag;
this.alternateAddTag = alternateAddTag;
}
-
+
/**
* HTMLEditorKit.insertHTML is called. If an exception is
* thrown, it is wrapped in a RuntimeException and thrown.
- *
+ *
* @param editor - the editor to use to get the editorkit
* @param doc -
* the Document to insert the HTML into.
@@ -419,12 +419,12 @@ public class HTMLEditorKit
+ offset).initCause(ex);
}
}
-
+
/**
* Invoked when inserting at a boundary. Determines the number of pops,
* and then the number of pushes that need to be performed. The it calls
* insertHTML.
- *
+ *
* @param editor -
* the editor to use to get the editorkit
* @param doc -
@@ -449,12 +449,12 @@ public class HTMLEditorKit
insertAtBoundry(editor, doc, offset, insertElement,
html, parentTag, addTag);
}
-
+
/**
- * Invoked when inserting at a boundary. Determines the number of pops,
+ * Invoked when inserting at a boundary. Determines the number of pops,
* and then the number of pushes that need to be performed. The it calls
* insertHTML.
- *
+ *
* @param editor - the editor to use to get the editorkit
* @param doc -
* the Document to insert the HTML into.
@@ -464,7 +464,7 @@ public class HTMLEditorKit
* @param html - the html to insert
* @param parentTag - the parent tag
* @param addTag - the first tag
- *
+ *
* @deprecated as of v1.3, use insertAtBoundary
*/
protected void insertAtBoundry(JEditorPane editor,
@@ -518,10 +518,10 @@ public class HTMLEditorKit
insertHTML(editor, doc, offset, html, pops, pushes, addTag);
}
}
-
+
/**
* Inserts the HTML.
- *
+ *
* @param ae - the action performed
*/
public void actionPerformed(ActionEvent ae)
@@ -619,25 +619,25 @@ public class HTMLEditorKit
}
}
}
-
+
/**
* Abstract Action class that helps inserting HTML into an existing document.
*/
public abstract static class HTMLTextAction
extends StyledEditorKit.StyledTextAction
{
-
+
/**
* Constructor
*/
- public HTMLTextAction(String name)
+ public HTMLTextAction(String name)
{
super(name);
}
-
+
/**
* Gets the HTMLDocument from the JEditorPane.
- *
+ *
* @param e - the editor pane
* @return the html document.
*/
@@ -648,25 +648,25 @@ public class HTMLEditorKit
return (HTMLDocument) d;
throw new IllegalArgumentException("Document is not a HTMLDocument.");
}
-
+
/**
* Gets the HTMLEditorKit
- *
+ *
* @param e - the JEditorPane to get the HTMLEditorKit from.
* @return the HTMLEditorKit
*/
- protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
+ protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
{
EditorKit d = e.getEditorKit();
if (d instanceof HTMLEditorKit)
return (HTMLEditorKit) d;
throw new IllegalArgumentException("EditorKit is not a HTMLEditorKit.");
}
-
+
/**
* Returns an array of Elements that contain the offset.
* The first elements corresponds to the roots of the doc.
- *
+ *
* @param doc - the document to get the Elements from.
* @param offset - the offset the Elements must contain
* @return an array of all the elements containing the offset.
@@ -676,7 +676,7 @@ public class HTMLEditorKit
{
return getElementsAt(doc.getDefaultRootElement(), offset, 0);
}
-
+
/**
* Helper function to get all elements using recursion.
*/
@@ -697,12 +697,12 @@ public class HTMLEditorKit
}
return elements;
}
-
+
/**
* Returns the number of elements, starting at the deepest point, needed
* to get an element representing tag. -1 if no elements are found, 0 if
* the parent of the leaf at offset represents the tag.
- *
+ *
* @param doc -
* the document to search
* @param offset -
@@ -718,7 +718,7 @@ public class HTMLEditorKit
Element root = doc.getDefaultRootElement();
int num = -1;
Element next = root.getElement(root.getElementIndex(offset));
-
+
while (!next.isLeaf())
{
num++;
@@ -729,11 +729,11 @@ public class HTMLEditorKit
}
return num;
}
-
+
/**
* Gets the deepest element at offset with the
* matching tag.
- *
+ *
* @param doc - the document to search
* @param offset - the offset to check for
* @param tag - the tag to match
@@ -744,7 +744,7 @@ public class HTMLEditorKit
{
Element element = doc.getDefaultRootElement();
Element tagElement = null;
-
+
while (element != null)
{
Object otag = element.getAttributes().getAttribute(
@@ -753,11 +753,11 @@ public class HTMLEditorKit
tagElement = element;
element = element.getElement(element.getElementIndex(offset));
}
-
+
return tagElement;
}
}
-
+
/**
* A {@link ViewFactory} that is able to create {@link View}s for
* the <code>Element</code>s that are supported.
@@ -765,7 +765,7 @@ public class HTMLEditorKit
public static class HTMLFactory
implements ViewFactory
{
-
+
/**
* Constructor
*/
@@ -773,7 +773,7 @@ public class HTMLEditorKit
{
// Do Nothing here.
}
-
+
/**
* Creates a {@link View} for the specified <code>Element</code>.
*
@@ -815,7 +815,7 @@ public class HTMLEditorKit
view = new BlockView(element, View.X_AXIS);
else if (tag == HTML.Tag.IMG)
view = new ImageView(element);
-
+
else if (tag == HTML.Tag.CONTENT)
view = new InlineView(element);
else if (tag == HTML.Tag.HEAD)
@@ -847,7 +847,7 @@ public class HTMLEditorKit
return view;
}
}
-
+
/**
* The abstract HTML parser declaration.
*/
@@ -888,7 +888,7 @@ public class HTMLEditorKit
{
// Nothing to do here.
}
-
+
/**
* The parser calls this method after it finishes parsing the document.
*/
@@ -1048,9 +1048,9 @@ public class HTMLEditorKit
* The "ident paragraph right" action.
*/
public static final String PARA_INDENT_RIGHT = "html-para-indent-right";
-
+
/**
- * Actions for HTML
+ * Actions for HTML
*/
private static final Action[] defaultActions =
{
@@ -1083,43 +1083,43 @@ public class HTMLEditorKit
"<pre></pre>", HTML.Tag.BODY, HTML.Tag.PRE)
// TODO: The reference impl has an InsertHRAction too.
};
-
+
/**
* The current style sheet.
*/
private StyleSheet styleSheet;
-
+
/**
* The ViewFactory for HTMLFactory.
*/
HTMLFactory viewFactory;
-
+
/**
* The Cursor for links.
*/
Cursor linkCursor;
-
+
/**
* The default cursor.
*/
Cursor defaultCursor;
-
+
/**
* The parser.
*/
Parser parser;
-
+
/**
* The mouse listener used for links.
*/
private LinkController linkController;
-
+
/** The content type */
String contentType = "text/html";
-
+
/** The input attributes defined by default.css */
MutableAttributeSet inputAttributes;
-
+
/** The editor pane used. */
JEditorPane editorPane;
@@ -1139,11 +1139,11 @@ public class HTMLEditorKit
linkController = new LinkController();
autoFormSubmission = true;
}
-
+
/**
- * Gets a factory suitable for producing views of any
+ * Gets a factory suitable for producing views of any
* models that are produced by this kit.
- *
+ *
* @return the view factory suitable for producing views.
*/
public ViewFactory getViewFactory()
@@ -1152,7 +1152,7 @@ public class HTMLEditorKit
viewFactory = new HTMLFactory();
return viewFactory;
}
-
+
/**
* Create a text storage model for this type of editor.
*
@@ -1175,7 +1175,7 @@ public class HTMLEditorKit
/**
* Get the parser that this editor kit uses for reading HTML streams. This
* method can be overridden to use the alternative parser.
- *
+ *
* @return the HTML parser (by default, {@link ParserDelegator}).
*/
protected Parser getParser()
@@ -1186,17 +1186,17 @@ public class HTMLEditorKit
}
return parser;
}
-
+
/**
* Inserts HTML into an existing document.
- *
+ *
* @param doc - the Document to insert the HTML into.
* @param offset - where to begin inserting the HTML.
* @param html - the String to insert
- * @param popDepth - the number of ElementSpec.EndTagTypes
+ * @param popDepth - the number of ElementSpec.EndTagTypes
* to generate before inserting
- * @param pushDepth - the number of ElementSpec.StartTagTypes
- * with a direction of ElementSpec.JoinNextDirection that
+ * @param pushDepth - the number of ElementSpec.StartTagTypes
+ * with a direction of ElementSpec.JoinNextDirection that
* should be generated before
* @param insertTag - the first tag to start inserting into document
* @throws IOException - on any I/O error
@@ -1216,18 +1216,18 @@ public class HTMLEditorKit
ParserCallback pc = doc.getReader(offset, popDepth, pushDepth, insertTag);
// FIXME: What should ignoreCharSet be set to?
-
+
// parser.parse inserts html into the buffer
parser.parse(new StringReader(html), pc, false);
pc.flush();
}
-
+
/**
- * Inserts content from the given stream. Inserting HTML into a non-empty
- * document must be inside the body Element, if you do not insert into
- * the body an exception will be thrown. When inserting into a non-empty
+ * Inserts content from the given stream. Inserting HTML into a non-empty
+ * document must be inside the body Element, if you do not insert into
+ * the body an exception will be thrown. When inserting into a non-empty
* document all tags outside of the body (head, title) will be dropped.
- *
+ *
* @param in - the stream to read from
* @param doc - the destination for the insertion
* @param pos - the location in the document to place the content
@@ -1245,14 +1245,14 @@ public class HTMLEditorKit
throw new BadLocationException("Bad location", pos);
if (parser == null)
throw new IOException("Parser is null.");
-
+
HTMLDocument hd = ((HTMLDocument) doc);
if (editorPane != null)
hd.setBase(editorPane.getPage());
ParserCallback pc = hd.getReader(pos);
-
+
// FIXME: What should ignoreCharSet be set to?
-
+
// parser.parse inserts html into the buffer
parser.parse(in, pc, false);
pc.flush();
@@ -1262,11 +1262,11 @@ public class HTMLEditorKit
// the string is inserted in the document as usual.
super.read(in, doc, pos);
}
-
+
/**
- * Writes content from a document to the given stream in
+ * Writes content from a document to the given stream in
* an appropriate format.
- *
+ *
* @param out - the stream to write to
* @param doc - the source for the write
* @param pos - the location in the document to get the content.
@@ -1293,21 +1293,21 @@ public class HTMLEditorKit
else
super.write(out, doc, pos, len);
}
-
+
/**
* Gets the content type that the kit supports.
* This kit supports the type text/html.
- *
+ *
* @returns the content type supported.
*/
public String getContentType()
{
return contentType;
- }
-
+ }
+
/**
* Creates a copy of the editor kit.
- *
+ *
* @return a copy of this.
*/
public Object clone()
@@ -1317,12 +1317,12 @@ public class HTMLEditorKit
copy.linkController = new LinkController();
return copy;
}
-
+
/**
- * Copies the key/values in elements AttributeSet into set.
+ * Copies the key/values in elements AttributeSet into set.
* This does not copy component, icon, or element names attributes.
- * This is called anytime the caret moves over a different location.
- *
+ * This is called anytime the caret moves over a different location.
+ *
* @param element - the element to create the input attributes for.
* @param set - the set to copy the values into.
*/
@@ -1333,10 +1333,10 @@ public class HTMLEditorKit
set.addAttributes(element.getAttributes());
// FIXME: Not fully implemented.
}
-
+
/**
* Called when this is installed into the JEditorPane.
- *
+ *
* @param c - the JEditorPane installed into.
*/
public void install(JEditorPane c)
@@ -1346,11 +1346,11 @@ public class HTMLEditorKit
c.addMouseMotionListener(linkController);
editorPane = c;
}
-
+
/**
* Called when the this is removed from the JEditorPane.
* It unregisters any listeners.
- *
+ *
* @param c - the JEditorPane being removed from.
*/
public void deinstall(JEditorPane c)
@@ -1360,35 +1360,35 @@ public class HTMLEditorKit
c.removeMouseMotionListener(linkController);
editorPane = null;
}
-
+
/**
* Gets the AccessibleContext associated with this.
- *
+ *
* @return the AccessibleContext for this.
*/
public AccessibleContext getAccessibleContext()
{
- // FIXME: Should return an instance of
+ // FIXME: Should return an instance of
// javax.swing.text.html.AccessibleHTML$RootHTMLAccessibleContext
// Not implemented yet.
return null;
}
-
+
/**
* Gets the action list. This list is supported by the superclass
* augmented by the collection of actions defined locally for style
* operations.
- *
+ *
* @return an array of all the actions
*/
public Action[] getActions()
{
return TextAction.augmentList(super.getActions(), defaultActions);
}
-
+
/**
* Returns the default cursor.
- *
+ *
* @return the default cursor
*/
public Cursor getDefaultCursor()
@@ -1397,10 +1397,10 @@ public class HTMLEditorKit
defaultCursor = Cursor.getDefaultCursor();
return defaultCursor;
}
-
+
/**
* Returns the cursor for links.
- *
+ *
* @return the cursor for links.
*/
public Cursor getLinkCursor()
@@ -1409,42 +1409,42 @@ public class HTMLEditorKit
linkCursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
return linkCursor;
}
-
+
/**
* Sets the Cursor for links.
- *
+ *
* @param cursor - the new cursor for links.
*/
public void setLinkCursor(Cursor cursor)
{
linkCursor = cursor;
}
-
+
/**
* Sets the default cursor.
- *
+ *
* @param cursor - the new default cursor.
*/
public void setDefaultCursor(Cursor cursor)
{
defaultCursor = cursor;
}
-
+
/**
* Gets the input attributes used for the styled editing actions.
- *
+ *
* @return the attribute set
*/
public MutableAttributeSet getInputAttributes()
{
return inputAttributes;
}
-
+
/**
- * Get the set of styles currently being used to render the HTML elements.
- * By default the resource specified by DEFAULT_CSS gets loaded, and is
+ * Get the set of styles currently being used to render the HTML elements.
+ * By default the resource specified by DEFAULT_CSS gets loaded, and is
* shared by all HTMLEditorKit instances.
- *
+ *
* @return the style sheet.
*/
public StyleSheet getStyleSheet()
@@ -1467,14 +1467,14 @@ public class HTMLEditorKit
}
return styleSheet;
}
-
+
/**
- * Set the set of styles to be used to render the various HTML elements.
- * These styles are specified in terms of CSS specifications. Each document
- * produced by the kit will have a copy of the sheet which it can add the
- * document specific styles to. By default, the StyleSheet specified is shared
- * by all HTMLEditorKit instances.
- *
+ * Set the set of styles to be used to render the various HTML elements.
+ * These styles are specified in terms of CSS specifications. Each document
+ * produced by the kit will have a copy of the sheet which it can add the
+ * document specific styles to. By default, the StyleSheet specified is shared
+ * by all HTMLEditorKit instances.
+ *
* @param s - the new style sheet
*/
public void setStyleSheet(StyleSheet s)
@@ -1505,7 +1505,7 @@ public class HTMLEditorKit
/**
* Sets whether or not the editor kit should automatically submit forms.
- *
+ *
* @param auto <code>true</code> when the editor kit should handle form
* submission, <code>false</code> otherwise
*
diff --git a/javax/swing/text/html/HTMLWriter.java b/javax/swing/text/html/HTMLWriter.java
index 6a5e6ed58..55d25ccbb 100644
--- a/javax/swing/text/html/HTMLWriter.java
+++ b/javax/swing/text/html/HTMLWriter.java
@@ -1,4 +1,4 @@
-/* HTMLWriter.java --
+/* HTMLWriter.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,7 +76,7 @@ public class HTMLWriter
/**
* We keep a reference of the HTMLDocument passed by the construct.
*/
- private HTMLDocument htmlDoc = null;
+ private HTMLDocument htmlDoc = null;
/**
* Used to keep track of which embedded has been written out.
@@ -84,10 +84,10 @@ public class HTMLWriter
private HashSet<HTML.Tag> openEmbeddedTagHashSet = null;
private String new_line_str = "" + NEWLINE;
-
+
private char[] html_entity_char_arr = {'<', '>', '&', '"'};
- private String[] html_entity_escape_str_arr = {"&lt;", "&gt;", "&amp;",
+ private String[] html_entity_escape_str_arr = {"&lt;", "&gt;", "&amp;",
"&quot;"};
// variables used to output Html Fragment
@@ -137,7 +137,7 @@ public class HTMLWriter
doc_len_remaining = len;
htmlFragmentParentHashSet = new HashSet<Element>();
} // public HTMLWriter(Writer writer, HTMLDocument doc, int pos, int len)
-
+
/**
* Call this method to start outputing HTML.
*
@@ -155,7 +155,7 @@ public class HTMLWriter
// Normal traversal.
traverse(rootElem);
} // if(doc_pos == -1 && doc_len == -1)
- else
+ else
{
// Html fragment traversal.
if (doc_pos == -1 || doc_len == -1)
@@ -164,7 +164,7 @@ public class HTMLWriter
startElem = htmlDoc.getCharacterElement(doc_pos);
- int start_offset = startElem.getStartOffset();
+ int start_offset = startElem.getStartOffset();
// Positions before start_offset will not be traversed, and thus
// will not be counted.
@@ -206,7 +206,7 @@ public class HTMLWriter
} // for(int i = 0; i < tag_arr.length; i++)
} // public void write() throws IOException, BadLocationException
-
+
/**
* Writes all the attributes in the attrSet, except for attrbutes with
* keys of <code>javax.swing.text.html.HTML.Tag</code>,
@@ -226,7 +226,7 @@ public class HTMLWriter
{
Object key = attrNameEnum.nextElement();
Object value = attrSet.getAttribute(key);
-
+
// HTML.Attribute.ENDTAG is an instance, not a class.
if (!((key instanceof HTML.Tag) || (key instanceof StyleConstants)
|| (key == HTML.Attribute.ENDTAG)))
@@ -240,7 +240,7 @@ public class HTMLWriter
} // if(!((key instanceof HTML.Tag) || (key instanceof
// StyleConstants) || (key == HTML.Attribute.ENDTAG)))
} // while(attrNameEnum.hasMoreElements())
-
+
} // protected void writeAttributes(AttributeSet attrSet) throws IOException
/**
@@ -266,10 +266,10 @@ public class HTMLWriter
{
writeRaw("</" + elem_name + ">");
} // if(isBlockTag(attrSet))
-
+
} // protected void emptyTag(Element paramElem)
// throws IOException, BadLocationException
-
+
/**
* Determines if it is a block tag or not.
*
@@ -326,7 +326,7 @@ public class HTMLWriter
writeAttributes(attrSet);
writeRaw(">");
- Document tempDocument =
+ Document tempDocument =
(Document) attrSet.getAttribute(StyleConstants.ModelAttribute);
writeRaw(tempDocument.getText(0, tempDocument.getLength()));
@@ -528,9 +528,9 @@ public class HTMLWriter
/**
* Closes out an unwanted embedded tag. The tags from the
* openEmbededTagHashSet not found in attrSet will be written out.
- *
+ *
* @param attrSet the AttributeSet of the element to write out
- *
+ *
* @throws IOException on any I/O exceptions
*/
protected void closeOutUnwantedEmbeddedTags(AttributeSet attrSet)
@@ -542,7 +542,7 @@ public class HTMLWriter
for (int i = 0; i < tag_arr.length; i++)
{
HTML.Tag key = tag_arr[i];
-
+
if (!attrSet.isDefined(key))
{
writeRaw("</" + key.toString() + ">");
@@ -592,10 +592,10 @@ public class HTMLWriter
} // protected void output(char[] chars, int off, int len)
// throws IOException
-
+
//-------------------------------------------------------------------------
// private methods
-
+
/**
* The main method used to traverse through the elements.
*
@@ -627,7 +627,7 @@ public class HTMLWriter
else if (matchNameAttribute(attrSet, HTML.Tag.IMPLIED))
{
int child_elem_count = currElem.getElementCount();
-
+
if (child_elem_count > 0)
{
for (int i = 0; i < child_elem_count; i++)
@@ -665,7 +665,7 @@ public class HTMLWriter
indent();
writeRaw("<title>");
- String title_str =
+ String title_str =
(String) htmlDoc.getProperty(HTMLDocument.TitleProperty);
if (title_str != null)
@@ -726,7 +726,7 @@ public class HTMLWriter
else
{
emptyTag(currElem);
- } // else
+ } // else
} // else
} // else
@@ -842,7 +842,7 @@ public class HTMLWriter
} // else if(matchNameAttribute(attrSet, HTML.Tag.IMPLIED))
} // if(synthesizedElement(paramElem))
else
- {
+ {
// NOTE: 20061030 - fchoong - the isLeaf() condition seems to
// generate the closest behavior to the RI.
if (paramElem.isLeaf())
@@ -880,7 +880,7 @@ public class HTMLWriter
indent();
writeRaw("<title>");
- String title_str =
+ String title_str =
(String) htmlDoc.getProperty(HTMLDocument.TitleProperty);
if (title_str != null)
@@ -941,7 +941,7 @@ public class HTMLWriter
else
{
emptyTag(currElem);
- } // else
+ } // else
} // else
} // else
diff --git a/javax/swing/text/html/ImageView.java b/javax/swing/text/html/ImageView.java
index bb6af4f45..bdbe9b3bb 100644
--- a/javax/swing/text/html/ImageView.java
+++ b/javax/swing/text/html/ImageView.java
@@ -26,8 +26,8 @@ import javax.swing.text.html.HTML.Attribute;
/**
* A view, representing a single image, represented by the HTML IMG tag.
- *
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class ImageView extends View
{
@@ -51,7 +51,7 @@ public class ImageView extends View
boolean ret = (flags & ALLBITS) != 0;
return ret;
}
-
+
}
/**
@@ -64,7 +64,7 @@ public class ImageView extends View
* The image icon, wrapping the image,
*/
Image image;
-
+
/**
* The image state.
*/
@@ -124,7 +124,7 @@ public class ImageView extends View
/**
* Creates the image view that represents the given element.
- *
+ *
* @param element the element, represented by this image view.
*/
public ImageView(Element element)
@@ -136,7 +136,7 @@ public class ImageView extends View
reloadImage = true;
loadOnDemand = false;
}
-
+
/**
* Load or reload the image. This method initiates the image reloading. After
* the image is ready, the repaint event will be scheduled. The current image,
@@ -161,13 +161,13 @@ public class ImageView extends View
loading = false;
}
}
-
+
/**
* Get the image alignment. This method works handling standart alignment
* attributes in the HTML IMG tag (align = top bottom middle left right).
* Depending from the parameter, either horizontal or vertical alingment
* information is returned.
- *
+ *
* @param axis -
* either X_AXIS or Y_AXIS
*/
@@ -175,7 +175,7 @@ public class ImageView extends View
{
AttributeSet attrs = getAttributes();
Object al = attrs.getAttribute(Attribute.ALIGN);
-
+
// Default is top left aligned.
if (al == null)
return 0.0f;
@@ -207,7 +207,7 @@ public class ImageView extends View
else
throw new IllegalArgumentException("axis " + axis);
}
-
+
/**
* Get the text that should be shown as the image replacement and also as the
* image tool tip text. The method returns the value of the attribute, having
@@ -229,7 +229,7 @@ public class ImageView extends View
return u.getFile();
}
}
-
+
/**
* Returns the combination of the document and the style sheet attributes.
*/
@@ -239,7 +239,7 @@ public class ImageView extends View
attributes = getStyleSheet().getViewAttributes(this);
return attributes;
}
-
+
/**
* Get the image to render. May return null if the image is not yet loaded.
*/
@@ -248,13 +248,13 @@ public class ImageView extends View
updateState();
return image;
}
-
+
/**
* Get the URL location of the image to render. If this method returns null,
* the "no image" icon is rendered instead. By defaul, url must be present as
* the "src" property of the IMG tag. If it is missing, null is returned and
* the "no image" icon is rendered.
- *
+ *
* @return the URL location of the image to render.
*/
public URL getImageURL()
@@ -280,17 +280,17 @@ public class ImageView extends View
/**
* Get the icon that should be displayed while the image is loading and hence
* not yet available.
- *
+ *
* @return an icon, showing a non broken sheet of paper with image.
*/
public Icon getLoadingImageIcon()
{
return ImageViewIconFactory.getLoadingImageIcon();
}
-
+
/**
* Get the image loading strategy.
- *
+ *
* @return false (default) if the image is loaded when the view is
* constructed, true if the image is only loaded on demand when
* rendering.
@@ -302,21 +302,21 @@ public class ImageView extends View
/**
* Get the icon that should be displayed when the image is not available.
- *
+ *
* @return an icon, showing a broken sheet of paper with image.
*/
public Icon getNoImageIcon()
{
return ImageViewIconFactory.getNoImageIcon();
}
-
+
/**
* Get the preferred span of the image along the axis. The image size is first
* requested to the attributes {@link Attribute#WIDTH} and
* {@link Attribute#HEIGHT}. If they are missing, and the image is already
* loaded, the image size is returned. If there are no attributes, and the
* image is not loaded, zero is returned.
- *
+ *
* @param axis -
* either X_AXIS or Y_AXIS
* @return either width of height of the image, depending on the axis.
@@ -346,10 +346,10 @@ public class ImageView extends View
else
throw new IllegalArgumentException("axis " + axis);
}
-
+
/**
* Get the associated style sheet from the document.
- *
+ *
* @return the associated style sheet.
*/
protected StyleSheet getStyleSheet()
@@ -361,7 +361,7 @@ public class ImageView extends View
/**
* Get the tool tip text. This is overridden to return the value of the
* {@link #getAltText()}. The parameters are ignored.
- *
+ *
* @return that is returned by getAltText().
*/
public String getToolTipText(float x, float y, Shape shape)
@@ -373,7 +373,7 @@ public class ImageView extends View
* Paints the image or one of the two image state icons. The image is resized
* to the shape bounds. If there is no image available, the alternative text
* is displayed besides the image state icon.
- *
+ *
* @param g
* the Graphics, used for painting.
* @param bounds
@@ -407,7 +407,7 @@ public class ImageView extends View
{
loadOnDemand = load_on_demand;
}
-
+
/**
* Update all cached properties from the attribute set, returned by the
* {@link #getAttributes}.
@@ -429,7 +429,7 @@ public class ImageView extends View
spans[Y_AXIS].setFontBases(emBase, exBase);
}
}
-
+
/**
* Maps the picture co-ordinates into the image position in the model. As the
* image is not divideable, this is currently implemented always to return the
@@ -439,15 +439,15 @@ public class ImageView extends View
{
return getStartOffset();
}
-
+
/**
* This is currently implemented always to return the area of the image view,
* as the image is not divideable by character positions.
- *
+ *
* @param pos character position
* @param area of the image view
* @param bias bias
- *
+ *
* @return the shape, where the given character position should be mapped.
*/
public Shape modelToView(int pos, Shape area, Bias bias)
@@ -455,7 +455,7 @@ public class ImageView extends View
{
return area;
}
-
+
/**
* Starts loading the image asynchronuosly. If the image must be loaded
* synchronuosly instead, the {@link #setLoadsSynchronously} must be
@@ -465,7 +465,7 @@ public class ImageView extends View
{
updateState();
// TODO: Implement this when we have an alt view for the alt=... attribute.
- }
+ }
/**
* This makes sure that the image and properties have been loaded.
@@ -504,7 +504,7 @@ public class ImageView extends View
{
Thread.interrupted();
}
-
+
}
}
image = newImage;
diff --git a/javax/swing/text/html/InlineView.java b/javax/swing/text/html/InlineView.java
index 58edc7385..5376c6b9d 100644
--- a/javax/swing/text/html/InlineView.java
+++ b/javax/swing/text/html/InlineView.java
@@ -158,7 +158,7 @@ public class InlineView
return attributes;
}
-
+
public int getBreakWeight(int axis, float pos, float len)
{
int weight;
diff --git a/javax/swing/text/html/ListView.java b/javax/swing/text/html/ListView.java
index 3e809bbd2..f05051a4d 100644
--- a/javax/swing/text/html/ListView.java
+++ b/javax/swing/text/html/ListView.java
@@ -1,4 +1,4 @@
-/* ListView.java --
+/* ListView.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/swing/text/html/MinimalHTMLWriter.java b/javax/swing/text/html/MinimalHTMLWriter.java
index 9f5f019fa..3dddfc3de 100644
--- a/javax/swing/text/html/MinimalHTMLWriter.java
+++ b/javax/swing/text/html/MinimalHTMLWriter.java
@@ -1,4 +1,4 @@
-/* MinimalHTMLWriter.java --
+/* MinimalHTMLWriter.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ import java.awt.Color;
*
* @author Sven de Marothy
*/
-public class MinimalHTMLWriter extends AbstractWriter
+public class MinimalHTMLWriter extends AbstractWriter
{
private StyledDocument doc;
private Deque<String> tagStack;
@@ -114,7 +114,7 @@ public class MinimalHTMLWriter extends AbstractWriter
* Ends a span tag.
*/
protected void endFontTag() throws IOException
- {
+ {
writeEndTag("</span>");
inFontTag = false;
}
@@ -153,7 +153,7 @@ public class MinimalHTMLWriter extends AbstractWriter
/**
* Write the HTML header.
*/
- protected void writeHeader() throws IOException
+ protected void writeHeader() throws IOException
{
writeStartTag("<head>");
writeStartTag("<style>");
@@ -168,7 +168,7 @@ public class MinimalHTMLWriter extends AbstractWriter
* Write a paragraph start tag.
*/
protected void writeStartParagraph(Element elem) throws IOException
- {
+ {
indent();
write("<p class=default>"+NEWLINE); // FIXME: Class value = ?
incrIndent();
@@ -185,7 +185,7 @@ public class MinimalHTMLWriter extends AbstractWriter
/**
* Writes the body of the HTML document.
- */
+ */
protected void writeBody() throws IOException, BadLocationException
{
writeStartTag("<body>");
@@ -195,27 +195,27 @@ public class MinimalHTMLWriter extends AbstractWriter
boolean inParagraph = false;
do
{
- if( e.isLeaf() )
- {
- boolean hasNL = (getText(e).indexOf(NEWLINE) != -1);
- if( !inParagraph && hasText( e ) )
- {
- writeStartParagraph(e);
- inParagraph = true;
- }
-
- if( hasText( e ) )
- writeContent(e, true);
-
- if( hasNL && inParagraph )
- {
- writeEndParagraph();
- inParagraph = false;
- }
- else
- endOpenTags();
- }
- }
+ if( e.isLeaf() )
+ {
+ boolean hasNL = (getText(e).indexOf(NEWLINE) != -1);
+ if( !inParagraph && hasText( e ) )
+ {
+ writeStartParagraph(e);
+ inParagraph = true;
+ }
+
+ if( hasText( e ) )
+ writeContent(e, true);
+
+ if( hasNL && inParagraph )
+ {
+ writeEndParagraph();
+ inParagraph = false;
+ }
+ else
+ endOpenTags();
+ }
+ }
while((e = ei.next()) != null);
writeEndTag("</body>");
@@ -233,28 +233,28 @@ public class MinimalHTMLWriter extends AbstractWriter
{
if(attr.getAttribute(StyleConstants.Bold) != null)
if(((Boolean)attr.getAttribute(StyleConstants.Bold)).booleanValue())
- {
- write("<b>");
- tagStack.push("</b>");
- }
+ {
+ write("<b>");
+ tagStack.push("</b>");
+ }
if(attr.getAttribute(StyleConstants.Italic) != null)
if(((Boolean)attr.getAttribute(StyleConstants.Italic)).booleanValue())
- {
- write("<i>");
- tagStack.push("</i>");
- }
+ {
+ write("<i>");
+ tagStack.push("</i>");
+ }
if(attr.getAttribute(StyleConstants.Underline) != null)
if(((Boolean)attr.getAttribute(StyleConstants.Underline)).booleanValue())
- {
- write("<u>");
- tagStack.push("</u>");
- }
+ {
+ write("<u>");
+ tagStack.push("</u>");
+ }
}
/**
* Returns whether the element contains text or not.
*/
- protected boolean isText(Element elem)
+ protected boolean isText(Element elem)
{
return (elem.getEndOffset() != elem.getStartOffset());
}
@@ -271,7 +271,7 @@ public class MinimalHTMLWriter extends AbstractWriter
writeHTMLTags(elem.getAttributes());
if( isText(elem) )
text(elem);
- else
+ else
writeLeaf(elem);
endOpenTags();
@@ -285,12 +285,12 @@ public class MinimalHTMLWriter extends AbstractWriter
// NOTE: Haven't tested if this is correct.
if(e.getName().equals(StyleConstants.IconElementName))
writeImage(e);
- else
+ else
writeComponent(e);
}
/**
- * Write the HTML attributes which do not have tag equivalents,
+ * Write the HTML attributes which do not have tag equivalents,
* e.g. attributes other than bold/italic/underlined.
*/
protected void writeNonHTMLAttributes(AttributeSet attr) throws IOException
@@ -300,8 +300,8 @@ public class MinimalHTMLWriter extends AbstractWriter
// Alignment? Background?
if( StyleConstants.getForeground(attr) != null )
- style = style + "color: " +
- getColor(StyleConstants.getForeground(attr)) + "; ";
+ style = style + "color: " +
+ getColor(StyleConstants.getForeground(attr)) + "; ";
style = style + "font-size: "+StyleConstants.getFontSize(attr)+"pt; ";
style = style + "font-family: "+StyleConstants.getFontFamily(attr);
@@ -316,15 +316,15 @@ public class MinimalHTMLWriter extends AbstractWriter
{
if(doc instanceof DefaultStyledDocument)
{
- Enumeration<?> styles = ((DefaultStyledDocument)doc).getStyleNames();
- while(styles.hasMoreElements())
- writeStyle(doc.getStyle((String)styles.nextElement()));
+ Enumeration<?> styles = ((DefaultStyledDocument)doc).getStyleNames();
+ while(styles.hasMoreElements())
+ writeStyle(doc.getStyle((String)styles.nextElement()));
}
else
{ // What else to do here?
- Style s = doc.getStyle("default");
- if(s != null)
- writeStyle( s );
+ Style s = doc.getStyle("default");
+ if(s != null)
+ writeStyle( s );
}
}
@@ -336,28 +336,28 @@ public class MinimalHTMLWriter extends AbstractWriter
Enumeration<?> attribs = attr.getAttributeNames();
while(attribs.hasMoreElements())
{
- Object attribName = attribs.nextElement();
- String name = attribName.toString();
- String output = getAttribute(name, attr.getAttribute(attribName));
- if( output != null )
- {
- indent();
- write( output + NEWLINE );
- }
+ Object attribName = attribs.nextElement();
+ String name = attribName.toString();
+ String output = getAttribute(name, attr.getAttribute(attribName));
+ if( output != null )
+ {
+ indent();
+ write( output + NEWLINE );
+ }
}
}
/**
* Deliberately unimplemented, handles component elements.
- */
+ */
protected void writeComponent(Element elem) throws IOException
{
}
/**
- * Deliberately unimplemented.
+ * Deliberately unimplemented.
* Writes StyleConstants.IconElementName elements.
- */
+ */
protected void writeImage(Element elem) throws IOException
{
}
@@ -381,24 +381,24 @@ public class MinimalHTMLWriter extends AbstractWriter
return "family:" + a + ";";
if(name.equals("size"))
{
- int size = ((Integer)a).intValue();
- int htmlSize;
- if( size > 24 )
- htmlSize = 7;
- else if( size > 18 )
- htmlSize = 6;
- else if( size > 14 )
- htmlSize = 5;
- else if( size > 12 )
- htmlSize = 4;
- else if( size > 10 )
- htmlSize = 3;
- else if( size > 8 )
- htmlSize = 2;
- else
- htmlSize = 1;
-
- return "size:" + htmlSize + ";";
+ int size = ((Integer)a).intValue();
+ int htmlSize;
+ if( size > 24 )
+ htmlSize = 7;
+ else if( size > 18 )
+ htmlSize = 6;
+ else if( size > 14 )
+ htmlSize = 5;
+ else if( size > 12 )
+ htmlSize = 4;
+ else if( size > 10 )
+ htmlSize = 3;
+ else if( size > 8 )
+ htmlSize = 2;
+ else
+ htmlSize = 1;
+
+ return "size:" + htmlSize + ";";
}
return null;
@@ -428,8 +428,8 @@ public class MinimalHTMLWriter extends AbstractWriter
if( inFontTag() )
{
- write(""+NEWLINE);
- endFontTag();
+ write(""+NEWLINE);
+ endFontTag();
}
}
diff --git a/javax/swing/text/html/MultiAttributeSet.java b/javax/swing/text/html/MultiAttributeSet.java
index 296144460..e7fa9f373 100644
--- a/javax/swing/text/html/MultiAttributeSet.java
+++ b/javax/swing/text/html/MultiAttributeSet.java
@@ -97,7 +97,7 @@ class MultiAttributeSet
}
return current.nextElement();
}
-
+
}
/**
diff --git a/javax/swing/text/html/MultiStyle.java b/javax/swing/text/html/MultiStyle.java
index 2f43a19c2..eb6215035 100644
--- a/javax/swing/text/html/MultiStyle.java
+++ b/javax/swing/text/html/MultiStyle.java
@@ -48,7 +48,7 @@ import javax.swing.text.Style;
/**
* A Style implementation that is able to multiplex between several other
* Styles. This is used for CSS style resolving.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
class MultiStyle
diff --git a/javax/swing/text/html/ParagraphView.java b/javax/swing/text/html/ParagraphView.java
index d149627ff..cab8edb28 100644
--- a/javax/swing/text/html/ParagraphView.java
+++ b/javax/swing/text/html/ParagraphView.java
@@ -208,7 +208,7 @@ public class ParagraphView
/**
* Sets the span on the SizeRequirements object according to the
* according CSS span value, when it is set.
- *
+ *
* @param r the size requirements
* @param axis the axis
*
diff --git a/javax/swing/text/html/StyleSheet.java b/javax/swing/text/html/StyleSheet.java
index c4ddddb73..5cf015bc5 100644
--- a/javax/swing/text/html/StyleSheet.java
+++ b/javax/swing/text/html/StyleSheet.java
@@ -1,4 +1,4 @@
-/* StyleSheet.java --
+/* StyleSheet.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -86,17 +86,17 @@ import javax.swing.text.View;
/**
* This class adds support for defining the visual characteristics of HTML views
* being rendered. This enables views to be customized by a look-and-feel, mulitple
- * views over the same model can be rendered differently. Each EditorPane has its
+ * views over the same model can be rendered differently. Each EditorPane has its
* own StyleSheet, but by default one sheet will be shared by all of the HTMLEditorKit
* instances. An HTMLDocument can also have a StyleSheet, which holds specific CSS
- * specs.
- *
- * In order for Views to store less state and therefore be more lightweight,
- * the StyleSheet can act as a factory for painters that handle some of the
+ * specs.
+ *
+ * In order for Views to store less state and therefore be more lightweight,
+ * the StyleSheet can act as a factory for painters that handle some of the
* rendering tasks. Since the StyleSheet may be used by views over multiple
* documents the HTML attributes don't effect the selector being used.
- *
- * The rules are stored as named styles, and other information is stored to
+ *
+ * The rules are stored as named styles, and other information is stored to
* translate the context of an element to a rule.
*
* @author Lillian Angel (langel@redhat.com)
@@ -234,15 +234,15 @@ public class StyleSheet extends StyleContext
return other.precedence + other.selector.getSpecificity()
- precedence - selector.getSpecificity();
}
-
+
}
/** The base URL */
URL base;
-
+
/** Base font size (int) */
int baseFontSize;
-
+
/**
* The linked style sheets stored.
*/
@@ -273,7 +273,7 @@ public class StyleSheet extends StyleContext
* Gets the style used to render the given tag. The element represents the tag
* and can be used to determine the nesting, where the attributes will differ
* if there is nesting inside of elements.
- *
+ *
* @param t - the tag to translate to visual attributes
* @param e - the element representing the tag
* @return the set of CSS attributes to use to render the tag.
@@ -362,7 +362,7 @@ public class StyleSheet extends StyleContext
* Fetches a resolved style. If there is no resolved style for the
* specified selector, the resolve the style using
* {@link #resolveStyle(String, List, HTML.Tag)}.
- *
+ *
* @param selector the selector for which to resolve the style
* @param path the Element path, used in the resolving algorithm
* @param tag the tag for which to resolve
@@ -435,7 +435,7 @@ public class StyleSheet extends StyleContext
* @return the resolved style
*/
private Style resolveStyle(String selector, String[] tags,
- List<Map<String,String>> attributes)
+ List<Map<String,String>> attributes)
{
// FIXME: This style resolver is not correct. But it works good enough for
// the default.css.
@@ -471,9 +471,9 @@ public class StyleSheet extends StyleContext
/**
* Gets the rule that best matches the selector. selector is a space
- * separated String of element names. The attributes of the returned
+ * separated String of element names. The attributes of the returned
* Style will change as rules are added and removed.
- *
+ *
* @param selector - the element names separated by spaces
* @return the set of CSS attributes to use to render
*/
@@ -488,11 +488,11 @@ public class StyleSheet extends StyleContext
}
return best;
}
-
+
/**
* Adds a set of rules to the sheet. The rules are expected to be in valid
* CSS format. This is called as a result of parsing a <style> tag
- *
+ *
* @param rule - the rule to add to the sheet
*/
public void addRule(String rule)
@@ -514,11 +514,11 @@ public class StyleSheet extends StyleContext
// on next stylesheet request.
resolvedStyles.clear();
}
-
+
/**
* Translates a CSS declaration into an AttributeSet. This is called
* as a result of encountering an HTML style attribute.
- *
+ *
* @param decl - the declaration to get
* @return the AttributeSet representing the declaration
*/
@@ -527,13 +527,13 @@ public class StyleSheet extends StyleContext
if (decl == null)
return SimpleAttributeSet.EMPTY;
// FIXME: Not implemented.
- return null;
+ return null;
}
-
+
/**
* Loads a set of rules that have been specified in terms of CSS grammar.
* If there are any conflicts with existing rules, the new rule is added.
- *
+ *
* @param in - the stream to read the CSS grammar from.
* @param ref - the reference URL. It is the location of the stream, it may
* be null. All relative URLs specified in the stream will be based upon this
@@ -549,11 +549,11 @@ public class StyleSheet extends StyleContext
CSSParser parser = new CSSParser(in, cb);
parser.parse();
}
-
+
/**
* Gets a set of attributes to use in the view. This is a set of
* attributes that can be used for View.getAttributes
- *
+ *
* @param v - the view to get the set for
* @return the AttributeSet to use in the view.
*/
@@ -561,10 +561,10 @@ public class StyleSheet extends StyleContext
{
return new ViewAttributeSet(v, this);
}
-
+
/**
* Removes a style previously added.
- *
+ *
* @param nm - the name of the style to remove
*/
public void removeStyle(String nm)
@@ -572,12 +572,12 @@ public class StyleSheet extends StyleContext
// FIXME: Not implemented.
super.removeStyle(nm);
}
-
+
/**
* Adds the rules from ss to those of the receiver. ss's rules will
* override the old rules. An added StyleSheet will never override the rules
* of the receiving style sheet.
- *
+ *
* @param ss - the new StyleSheet.
*/
public void addStyleSheet(StyleSheet ss)
@@ -586,10 +586,10 @@ public class StyleSheet extends StyleContext
linked = new ArrayList<StyleSheet>();
linked.add(ss);
}
-
+
/**
* Removes ss from those of the receiver
- *
+ *
* @param ss - the StyleSheet to remove.
*/
public void removeStyleSheet(StyleSheet ss)
@@ -599,10 +599,10 @@ public class StyleSheet extends StyleContext
linked.remove(ss);
}
}
-
+
/**
* Returns an array of the linked StyleSheets. May return null.
- *
+ *
* @return - An array of the linked StyleSheets.
*/
public StyleSheet[] getStyleSheets()
@@ -619,12 +619,12 @@ public class StyleSheet extends StyleContext
}
return linkedSS;
}
-
+
/**
* Imports a style sheet from the url. The rules are directly added to the
* receiver. This is usually called when a <link> tag is resolved in an
* HTML document.
- *
+ *
* @param url the URL to import the StyleSheet from
*/
public void importStyleSheet(URL url)
@@ -643,11 +643,11 @@ public class StyleSheet extends StyleContext
// We can't do anything about it I guess.
}
}
-
+
/**
* Sets the base url. All import statements that are relative, will be
* relative to base.
- *
+ *
* @param base -
* the base URL.
*/
@@ -655,20 +655,20 @@ public class StyleSheet extends StyleContext
{
this.base = base;
}
-
+
/**
* Gets the base url.
- *
+ *
* @return - the base
*/
public URL getBase()
{
return base;
}
-
+
/**
* Adds a CSS attribute to the given set.
- *
+ *
* @param attr - the attribute set
* @param key - the attribute to add
* @param value - the value of the key
@@ -680,13 +680,13 @@ public class StyleSheet extends StyleContext
CSS.addInternal(attr, key, value);
attr.addAttribute(key, val);
}
-
+
/**
* Adds a CSS attribute to the given set.
- * This method parses the value argument from HTML based on key.
- * Returns true if it finds a valid value for the given key,
+ * This method parses the value argument from HTML based on key.
+ * Returns true if it finds a valid value for the given key,
* and false otherwise.
- *
+ *
* @param attr - the attribute set
* @param key - the attribute to add
* @param value - the value of the key
@@ -699,10 +699,10 @@ public class StyleSheet extends StyleContext
attr.addAttribute(key, value);
return attr.containsAttribute(key, value);
}
-
+
/**
* Converts a set of HTML attributes to an equivalent set of CSS attributes.
- *
+ *
* @param htmlAttrSet - the set containing the HTML attributes.
* @return the set of CSS attributes
*/
@@ -772,7 +772,7 @@ public class StyleSheet extends StyleContext
* Translates a HTML border attribute to a corresponding set of CSS
* attributes.
*
- * @param cssAttr the original set of CSS attributes to add to
+ * @param cssAttr the original set of CSS attributes to add to
* @param o the value of the border attribute
*
* @return the new set of CSS attributes
@@ -799,24 +799,24 @@ public class StyleSheet extends StyleContext
* to convert StyleConstants attributes to CSS before forwarding them to the superclass.
* The StyleConstants attribute do not have corresponding CSS entry, the attribute
* is stored (but will likely not be used).
- *
+ *
* @param old - the old set
* @param key - the non-null attribute key
* @param value - the attribute value
- * @return the updated set
+ * @return the updated set
*/
public AttributeSet addAttribute(AttributeSet old, Object key,
Object value)
{
// FIXME: Not implemented.
- return super.addAttribute(old, key, value);
+ return super.addAttribute(old, key, value);
}
-
+
/**
* Adds a set of attributes to the element. If any of these attributes are
- * StyleConstants, they will be converted to CSS before forwarding to the
+ * StyleConstants, they will be converted to CSS before forwarding to the
* superclass.
- *
+ *
* @param old - the old set
* @param attr - the attributes to add
* @return the updated attribute set
@@ -824,44 +824,44 @@ public class StyleSheet extends StyleContext
public AttributeSet addAttributes(AttributeSet old, AttributeSet attr)
{
// FIXME: Not implemented.
- return super.addAttributes(old, attr);
+ return super.addAttributes(old, attr);
}
-
+
/**
* Removes an attribute from the set. If the attribute is a
- * StyleConstants, it will be converted to CSS before forwarding to the
+ * StyleConstants, it will be converted to CSS before forwarding to the
* superclass.
- *
+ *
* @param old - the old set
* @param key - the non-null attribute key
- * @return the updated set
+ * @return the updated set
*/
public AttributeSet removeAttribute(AttributeSet old, Object key)
{
// FIXME: Not implemented.
- return super.removeAttribute(old, key);
+ return super.removeAttribute(old, key);
}
-
+
/**
* Removes an attribute from the set. If any of the attributes are
- * StyleConstants, they will be converted to CSS before forwarding to the
+ * StyleConstants, they will be converted to CSS before forwarding to the
* superclass.
- *
+ *
* @param old - the old set
* @param attrs - the attributes to remove
- * @return the updated set
+ * @return the updated set
*/
public AttributeSet removeAttributes(AttributeSet old, AttributeSet attrs)
{
// FIXME: Not implemented.
- return super.removeAttributes(old, attrs);
+ return super.removeAttributes(old, attrs);
}
-
+
/**
* Removes a set of attributes for the element. If any of the attributes is a
- * StyleConstants, they will be converted to CSS before forwarding to the
+ * StyleConstants, they will be converted to CSS before forwarding to the
* superclass.
- *
+ *
* @param old - the old attribute set
* @param names - the attribute names
* @return the update attribute set
@@ -871,35 +871,35 @@ public class StyleSheet extends StyleContext
// FIXME: Not implemented.
return super.removeAttributes(old, names);
}
-
+
/**
* Creates a compact set of attributes that might be shared. This is a hook
* for subclasses that want to change the behaviour of SmallAttributeSet.
- *
+ *
* @param a - the set of attributes to be represented in the compact form.
* @return the set of attributes created
*/
protected StyleContext.SmallAttributeSet createSmallAttributeSet(AttributeSet a)
{
- return super.createSmallAttributeSet(a);
+ return super.createSmallAttributeSet(a);
}
-
+
/**
* Creates a large set of attributes. This set is not shared. This is a hook
* for subclasses that want to change the behaviour of the larger attribute
* storage format.
- *
+ *
* @param a - the set of attributes to be represented in the larger form.
* @return the large set of attributes.
*/
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a)
{
- return super.createLargeAttributeSet(a);
+ return super.createLargeAttributeSet(a);
}
-
+
/**
* Gets the font to use for the given set.
- *
+ *
* @param a - the set to get the font for.
* @return the font for the set
*/
@@ -978,7 +978,7 @@ public class StyleSheet extends StyleContext
AttributeSet resolver = atts.getResolveParent();
if (resolver != null)
parSize = getFontSize(resolver);
- size = fs.getValue(parSize);
+ size = fs.getValue(parSize);
}
else
{
@@ -998,7 +998,7 @@ public class StyleSheet extends StyleContext
* Takes a set of attributes and turns it into a foreground
* color specification. This is used to specify things like, brigher, more hue
* etc.
- *
+ *
* @param a - the set to get the foreground color for
* @return the foreground color for the set
*/
@@ -1008,14 +1008,14 @@ public class StyleSheet extends StyleContext
Color color = null;
if (c != null)
color = c.getValue();
- return color;
+ return color;
}
-
+
/**
* Takes a set of attributes and turns it into a background
* color specification. This is used to specify things like, brigher, more hue
* etc.
- *
+ *
* @param a - the set to get the background color for
* @return the background color for the set
*/
@@ -1025,34 +1025,34 @@ public class StyleSheet extends StyleContext
Color color = null;
if (c != null)
color = c.getValue();
- return color;
+ return color;
}
-
+
/**
* Gets the box formatter to use for the given set of CSS attributes.
- *
+ *
* @param a - the given set
* @return the box formatter
*/
public BoxPainter getBoxPainter(AttributeSet a)
{
- return new BoxPainter(a, this);
+ return new BoxPainter(a, this);
}
-
+
/**
* Gets the list formatter to use for the given set of CSS attributes.
- *
+ *
* @param a - the given set
* @return the list formatter
*/
public ListPainter getListPainter(AttributeSet a)
{
- return new ListPainter(a, this);
+ return new ListPainter(a, this);
}
-
+
/**
* Sets the base font size between 1 and 7.
- *
+ *
* @param sz - the new font size for the base.
*/
public void setBaseFontSize(int sz)
@@ -1060,12 +1060,12 @@ public class StyleSheet extends StyleContext
if (sz <= 7 && sz >= 1)
baseFontSize = sz;
}
-
+
/**
* Sets the base font size from the String. It can either identify
* a specific font size (between 1 and 7) or identify a relative
* font size such as +1 or -2.
- *
+ *
* @param size - the new font size as a String.
*/
public void setBaseFontSize(String size)
@@ -1093,10 +1093,10 @@ public class StyleSheet extends StyleContext
// Do nothing here
}
}
-
+
/**
* TODO
- *
+ *
* @param pt - TODO
* @return TODO
*/
@@ -1105,35 +1105,35 @@ public class StyleSheet extends StyleContext
// FIXME: Not implemented.
return 0;
}
-
+
/**
* Gets the point size, given a size index.
- *
+ *
* @param index - the size index
* @return the point size.
*/
public float getPointSize(int index)
{
// FIXME: Not implemented.
- return 0;
+ return 0;
}
-
+
/**
* Given the string of the size, returns the point size value.
- *
+ *
* @param size - the string representation of the size.
* @return - the point size value.
*/
public float getPointSize(String size)
{
// FIXME: Not implemented.
- return 0;
+ return 0;
}
-
+
/**
* Convert the color string represenation into java.awt.Color. The valid
* values are like "aqua" , "#00FFFF" or "rgb(1,6,44)".
- *
+ *
* @param colorName the color to convert.
* @return the matching java.awt.color
*/
@@ -1141,14 +1141,14 @@ public class StyleSheet extends StyleContext
{
return CSSColor.convertValue(colorName);
}
-
+
/**
* This class carries out some of the duties of CSS formatting. This enables views
* to present the CSS formatting while not knowing how the CSS values are cached.
- *
+ *
* This object is reponsible for the insets of a View and making sure
* the background is maintained according to the CSS attributes.
- *
+ *
* @author Lillian Angel (langel@redhat.com)
*/
public static class BoxPainter extends Object implements Serializable
@@ -1191,7 +1191,7 @@ public class StyleSheet extends StyleContext
/**
* Package-private constructor.
- *
+ *
* @param as - AttributeSet for painter
*/
BoxPainter(AttributeSet as, StyleSheet ss)
@@ -1257,12 +1257,12 @@ public class StyleSheet extends StyleContext
background = ss.getBackground(as);
}
-
-
+
+
/**
* Gets the inset needed on a given side to account for the margin, border
* and padding.
- *
+ *
* @param size - the size of the box to get the inset for. View.TOP, View.LEFT,
* View.BOTTOM or View.RIGHT.
* @param v - the view making the request. This is used to get the AttributeSet,
@@ -1304,11 +1304,11 @@ public class StyleSheet extends StyleContext
}
return inset;
}
-
+
/**
* Paints the CSS box according to the attributes given. This should
* paint the border, padding and background.
- *
+ *
* @param g - the graphics configuration
* @param x - the x coordinate
* @param y - the y coordinate
@@ -1333,12 +1333,12 @@ public class StyleSheet extends StyleContext
}
}
}
-
+
/**
* This class carries out some of the CSS list formatting duties. Implementations
* of this class enable views to present the CSS formatting while not knowing anything
* about how the CSS values are being cached.
- *
+ *
* @author Lillian Angel (langel@redhat.com)
*/
public static class ListPainter implements Serializable
@@ -1361,7 +1361,7 @@ public class StyleSheet extends StyleContext
/**
* Package-private constructor.
- *
+ *
* @param as - AttributeSet for painter
*/
ListPainter(AttributeSet as, StyleSheet ss)
@@ -1378,7 +1378,7 @@ public class StyleSheet extends StyleContext
/**
* Paints the CSS list decoration according to the attributes given.
- *
+ *
* @param g - the graphics configuration
* @param x - the x coordinate
* @param y - the y coordinate
@@ -1410,7 +1410,7 @@ public class StyleSheet extends StyleContext
{
View v1 = itemView.getView(0);
if (v1 instanceof ParagraphView && v1.getViewCount() > 0)
- {
+ {
Shape a1 = itemView.getChildAllocation(0, tmpRect);
Rectangle r1 = a1 instanceof Rectangle ? (Rectangle) a1
: a1.getBounds();
diff --git a/javax/swing/text/html/TableView.java b/javax/swing/text/html/TableView.java
index 912240c28..2ad1b6d38 100644
--- a/javax/swing/text/html/TableView.java
+++ b/javax/swing/text/html/TableView.java
@@ -477,7 +477,7 @@ class TableView
* Overridden to perform the table layout before calling the super
* implementation.
*/
- protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets,
+ protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets,
int[] spans)
{
updateGrid();
diff --git a/javax/swing/text/html/ViewAttributeSet.java b/javax/swing/text/html/ViewAttributeSet.java
index 8838646d5..fb57872ce 100644
--- a/javax/swing/text/html/ViewAttributeSet.java
+++ b/javax/swing/text/html/ViewAttributeSet.java
@@ -109,7 +109,7 @@ class ViewAttributeSet
{
HTML.Tag tag =
(HTML.Tag) elAtts.getAttribute(StyleConstants.NameAttribute);
- AttributeSet rule = styleSheet.getRule(tag, el);
+ AttributeSet rule = styleSheet.getRule(tag, el);
if (rule != null)
atts.add(rule);
}
diff --git a/javax/swing/text/html/parser/Entity.java b/javax/swing/text/html/parser/Entity.java
index 1d59df237..d40fb94f3 100644
--- a/javax/swing/text/html/parser/Entity.java
+++ b/javax/swing/text/html/parser/Entity.java
@@ -170,14 +170,14 @@ public final class Entity
return sdata;
}
-
+
/**
* Get the entity type.
* @return the value of the {@link #type}.
*/
- public int getType()
+ public int getType()
{
return type;
- }
-
+ }
+
}
diff --git a/javax/swing/text/html/parser/Parser.java b/javax/swing/text/html/parser/Parser.java
index a88e9ce19..f3faa2524 100644
--- a/javax/swing/text/html/parser/Parser.java
+++ b/javax/swing/text/html/parser/Parser.java
@@ -73,7 +73,7 @@ import javax.swing.text.SimpleAttributeSet;
* </p>
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class Parser
+public class Parser
implements DTDConstants
{
/**
diff --git a/javax/swing/text/rtf/RTFParser.java b/javax/swing/text/rtf/RTFParser.java
index de1b1c6ff..3306056ff 100644
--- a/javax/swing/text/rtf/RTFParser.java
+++ b/javax/swing/text/rtf/RTFParser.java
@@ -139,7 +139,7 @@ class RTFParser
parseHeader();
parseDocument();
-
+
Token t2 = scanner.peekToken();
if (t2.type == Token.RCURLY)
{
diff --git a/javax/swing/text/rtf/RTFScanner.java b/javax/swing/text/rtf/RTFScanner.java
index 060e087eb..2eca159c4 100644
--- a/javax/swing/text/rtf/RTFScanner.java
+++ b/javax/swing/text/rtf/RTFScanner.java
@@ -50,7 +50,7 @@ import java.io.Reader;
*
* This scanner is based upon the RTF specification 1.6
* available at:
- *
+ *
* <a
* href="http://msdn.microsoft.com/library/en-us/dnrtfspec/html/rtfspec.asp">
* RTF specification at MSDN</a>
diff --git a/javax/swing/tree/AbstractLayoutCache.java b/javax/swing/tree/AbstractLayoutCache.java
index 4a6899fbe..29ce165a9 100644
--- a/javax/swing/tree/AbstractLayoutCache.java
+++ b/javax/swing/tree/AbstractLayoutCache.java
@@ -45,7 +45,7 @@ import javax.swing.event.TreeModelEvent;
/**
* class AbstractLayoutCache
- *
+ *
* @author Andrew Selkirk
*/
public abstract class AbstractLayoutCache
@@ -69,7 +69,7 @@ public abstract class AbstractLayoutCache
* the method is overridden, like if {@link FixedHeightLayoutCache}. If the
* method is not overridden and the property is not set, the InternalError is
* thrown.
- *
+ *
* @param value the last node in the path
* @param row the node row
* @param depth the indentation depth
@@ -116,7 +116,7 @@ public abstract class AbstractLayoutCache
/**
* setNodeDimensions
- *
+ *
* @param dimensions TODO
*/
public void setNodeDimensions(NodeDimensions dimensions)
@@ -126,7 +126,7 @@ public abstract class AbstractLayoutCache
/**
* getNodeDimensions
- *
+ *
* @return NodeDimensions
*/
public NodeDimensions getNodeDimensions()
@@ -139,7 +139,7 @@ public abstract class AbstractLayoutCache
* (unless the method is overridden, like if
* {@link FixedHeightLayoutCache}. If the method is not overridden and
* the property is not set, the InternalError is thrown.
- *
+ *
* @param value the last node in the path
* @param row the node row
* @param depth the indentation depth
@@ -152,13 +152,13 @@ public abstract class AbstractLayoutCache
Rectangle d = null;
if (nodeDimensions != null)
d = nodeDimensions.getNodeDimensions(value, row, depth, expanded,
- bounds);
+ bounds);
return d;
}
/**
* Sets the model that provides the tree data.
- *
+ *
* @param model the model
*/
public void setModel(TreeModel model)
@@ -168,7 +168,7 @@ public abstract class AbstractLayoutCache
/**
* Returns the model that provides the tree data.
- *
+ *
* @return the model
*/
public TreeModel getModel()
@@ -178,7 +178,7 @@ public abstract class AbstractLayoutCache
/**
* setRootVisible
- *
+ *
* @param visible <code>true</code> if root should be visible,
* <code>false</code> otherwise
*/
@@ -189,7 +189,7 @@ public abstract class AbstractLayoutCache
/**
* isRootVisible
- *
+ *
* @return <code>true</code> if root is visible,
* <code>false</code> otherwise
*/
@@ -200,7 +200,7 @@ public abstract class AbstractLayoutCache
/**
* setRowHeight
- *
+ *
* @param height the row height
*/
public void setRowHeight(int height)
@@ -211,7 +211,7 @@ public abstract class AbstractLayoutCache
/**
* getRowHeight
- *
+ *
* @return the row height
*/
public int getRowHeight()
@@ -221,7 +221,7 @@ public abstract class AbstractLayoutCache
/**
* setSelectionModel
- *
+ *
* @param model the model
*/
public void setSelectionModel(TreeSelectionModel model)
@@ -231,12 +231,12 @@ public abstract class AbstractLayoutCache
treeSelectionModel = model;
if (treeSelectionModel != null)
treeSelectionModel.setRowMapper(this);
-
+
}
/**
* getSelectionModel
- *
+ *
* @return the model
*/
public TreeSelectionModel getSelectionModel()
@@ -246,7 +246,7 @@ public abstract class AbstractLayoutCache
/**
* Get the sum of heights for all rows. This class provides a general not
- * optimized implementation that is overridded in derived classes
+ * optimized implementation that is overridded in derived classes
* ({@link VariableHeightLayoutCache}, {@link FixedHeightLayoutCache}) for
* the better performance.
*/
@@ -265,10 +265,10 @@ public abstract class AbstractLayoutCache
/**
* Get the maximal width. This class provides a general not
- * optimized implementation that is overridded in derived classes
+ * optimized implementation that is overridded in derived classes
* ({@link VariableHeightLayoutCache}, {@link FixedHeightLayoutCache}) for
* the better performance.
- *
+ *
* @param rect the rectangle that is used during the method work
*/
public int getPreferredWidth(Rectangle rect)
@@ -279,7 +279,7 @@ public abstract class AbstractLayoutCache
for (int i = 0; i < n; i++)
{
TreePath path = getPathForRow(i);
- r.setBounds(0, 0, 0, 0);
+ r.setBounds(0, 0, 0, 0);
r = getBounds(path, r);
if (r.x + r.width > maximalWidth)
maximalWidth = r.x + r.width;
@@ -292,90 +292,90 @@ public abstract class AbstractLayoutCache
}
/**
* isExpanded
- *
+ *
* @param value0 TODO
- *
+ *
* @return boolean
*/
public abstract boolean isExpanded(TreePath value0);
/**
* getBounds
- *
+ *
* @param value0 TODO
* @param value1 TODO
- *
+ *
* @return Rectangle
*/
public abstract Rectangle getBounds(TreePath value0, Rectangle value1);
/**
* getPathForRow
- *
+ *
* @param row the row
- *
+ *
* @return the tree path
*/
public abstract TreePath getPathForRow(int row);
/**
* getRowForPath
- *
+ *
* @param path the tree path
- *
+ *
* @return the row
*/
public abstract int getRowForPath(TreePath path);
/**
* getPathClosestTo
- *
+ *
* @param value0 TODO
* @param value1 TODO
- *
+ *
* @return the tree path
*/
public abstract TreePath getPathClosestTo(int value0, int value1);
/**
* getVisiblePathsFrom
- *
+ *
* @param path the tree path
- *
+ *
* @return Enumeration
*/
public abstract Enumeration<TreePath> getVisiblePathsFrom(TreePath path);
/**
* getVisibleChildCount
- *
+ *
* @param path the tree path
- *
+ *
* @return int
*/
public abstract int getVisibleChildCount(TreePath path);
/**
* setExpandedState
- *
+ *
* @param value0 TODO
- *
+ *
* @param value1 TODO
*/
public abstract void setExpandedState(TreePath value0, boolean value1);
/**
* getExpandedState
- *
+ *
* @param path the tree path
- *
+ *
* @return boolean
*/
public abstract boolean getExpandedState(TreePath path);
/**
* getRowCount
- *
+ *
* @return the number of rows
*/
public abstract int getRowCount();
@@ -387,35 +387,35 @@ public abstract class AbstractLayoutCache
/**
* invalidatePathBounds
- *
+ *
* @param path the tree path
*/
public abstract void invalidatePathBounds(TreePath path);
/**
* treeNodesChanged
- *
+ *
* @param event the event to send
*/
public abstract void treeNodesChanged(TreeModelEvent event);
/**
* treeNodesInserted
- *
+ *
* @param event the event to send
*/
public abstract void treeNodesInserted(TreeModelEvent event);
/**
* treeNodesRemoved
- *
+ *
* @param event the event to send
*/
public abstract void treeNodesRemoved(TreeModelEvent event);
/**
* treeStructureChanged
- *
+ *
* @param event the event to send
*/
public abstract void treeStructureChanged(TreeModelEvent event);
@@ -426,7 +426,7 @@ public abstract class AbstractLayoutCache
* one. To have the benefit from the bulk conversion, the method must be
* overridden in the derived classes. The default method delegates work
* to the {@link #getRowForPath(TreePath)}.
- *
+ *
* @param paths the tree paths the array of the tree pathes.
* @return the array of the matching tree rows.
*/
@@ -445,7 +445,7 @@ public abstract class AbstractLayoutCache
/**
* Returns true if this layout supposes that all rows have the fixed
* height.
- *
+ *
* @return boolean true if all rows in the tree must have the fixed
* height (false by default).
*/
diff --git a/javax/swing/tree/DefaultMutableTreeNode.java b/javax/swing/tree/DefaultMutableTreeNode.java
index e4cc97838..260c385aa 100644
--- a/javax/swing/tree/DefaultMutableTreeNode.java
+++ b/javax/swing/tree/DefaultMutableTreeNode.java
@@ -101,7 +101,7 @@ public class DefaultMutableTreeNode
/**
* Creates a <code>DefaultMutableTreeNode</code> object with the given
- * user object attached to it. This is equivalent to
+ * user object attached to it. This is equivalent to
* <code>DefaultMutableTreeNode(userObject, true)</code>.
*
* @param userObject the user object (<code>null</code> permitted).
@@ -126,7 +126,7 @@ public class DefaultMutableTreeNode
}
/**
- * Returns a clone of the node. The clone contains a shallow copy of the
+ * Returns a clone of the node. The clone contains a shallow copy of the
* user object, and does not copy the parent node or the child nodes.
*
* @return A clone of the node.
@@ -159,24 +159,24 @@ public class DefaultMutableTreeNode
*
* @param child the child node (<code>null</code> not permitted).
*
- * @throws IllegalStateException if {@link #getAllowsChildren()} returns
+ * @throws IllegalStateException if {@link #getAllowsChildren()} returns
* <code>false</code>.
* @throws IllegalArgumentException if {@link #isNodeAncestor} returns
- * <code>true</code>.
- * @throws IllegalArgumentException if <code>child</code> is
+ * <code>true</code>.
+ * @throws IllegalArgumentException if <code>child</code> is
* <code>null</code>.
*/
public void add(MutableTreeNode child)
{
if (! allowsChildren)
throw new IllegalStateException();
-
+
if (child == null)
throw new IllegalArgumentException();
if (isNodeAncestor(child))
throw new IllegalArgumentException("Cannot add ancestor node.");
-
+
children.add(child);
child.setParent(this);
}
@@ -194,10 +194,10 @@ public class DefaultMutableTreeNode
/**
* Removes the child with the given index from this node.
*
- * @param index the index (in the range <code>0</code> to
+ * @param index the index (in the range <code>0</code> to
* <code>getChildCount() - 1</code>).
- *
- * @throws ArrayIndexOutOfBoundsException if <code>index</code> is outside
+ *
+ * @throws ArrayIndexOutOfBoundsException if <code>index</code> is outside
* the valid range.
*/
public void remove(int index)
@@ -207,12 +207,12 @@ public class DefaultMutableTreeNode
}
/**
- * Removes the given child from this node and sets its parent to
+ * Removes the given child from this node and sets its parent to
* <code>null</code>.
*
* @param node the child node (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>node</code> is not a child of
+ *
+ * @throws IllegalArgumentException if <code>node</code> is not a child of
* this node.
* @throws IllegalArgumentException if <code>node</code> is null.
*/
@@ -259,8 +259,8 @@ public class DefaultMutableTreeNode
*
* @param node the child node (<code>null</code> not permitted).
* @param index the index.
- *
- * @throws IllegalArgumentException if <code>node</code> is
+ *
+ * @throws IllegalArgumentException if <code>node</code> is
* </code>null</code>.
*/
public void insert(MutableTreeNode node, int index)
@@ -270,7 +270,7 @@ public class DefaultMutableTreeNode
if (node == null)
throw new IllegalArgumentException("Null 'node' argument.");
-
+
if (isNodeAncestor(node))
throw new IllegalArgumentException("Cannot insert ancestor node.");
@@ -298,7 +298,7 @@ public class DefaultMutableTreeNode
{
if (children.size() == 0)
return EMPTY_ENUMERATION;
-
+
return children.elements();
}
@@ -337,11 +337,11 @@ public class DefaultMutableTreeNode
/**
* Returns the index of the specified child node, or -1 if the node is not
* in fact a child of this node.
- *
+ *
* @param node the node (<code>null</code> not permitted).
- *
+ *
* @return The index of the specified child node, or -1.
- *
+ *
* @throws IllegalArgumentException if <code>node</code> is <code>null</code>.
*/
public int getIndex(TreeNode node)
@@ -352,7 +352,7 @@ public class DefaultMutableTreeNode
}
/**
- * Sets the flag that controls whether or not this node allows the addition /
+ * Sets the flag that controls whether or not this node allows the addition /
* insertion of child nodes. If the flag is set to <code>false</code>, any
* existing children are removed.
*
@@ -422,9 +422,9 @@ public class DefaultMutableTreeNode
* <li>the parent node (if there is one);</li>
* <li>any ancestor of the parent node;</li>
* </ul>
- * If <code>node</code> is <code>null</code>, this method returns
+ * If <code>node</code> is <code>null</code>, this method returns
* <code>false</code>.
- *
+ *
* @param node the node (<code>null</code> permitted).
*
* @return A boolean.
@@ -450,9 +450,9 @@ public class DefaultMutableTreeNode
* <li>the child nodes belonging to this tree node, if there are any;</li>
* <li>any descendants of the child nodes;</li>
* </ul>
- * If <code>node</code> is <code>null</code>, this method returns
+ * If <code>node</code> is <code>null</code>, this method returns
* <code>false</code>.
- *
+ *
* @param node the node (<code>null</code> permitted).
*
* @return A boolean.
@@ -463,7 +463,7 @@ public class DefaultMutableTreeNode
return false;
TreeNode current = node;
-
+
while (current != null
&& current != this)
current = current.getParent();
@@ -533,7 +533,7 @@ public class DefaultMutableTreeNode
TreeNode node = getChildAt(0);
int depth = 0;
int current = 1;
-
+
while (! stack.empty())
{
if (node.getChildCount() != 0)
@@ -549,7 +549,7 @@ public class DefaultMutableTreeNode
int size;
int index;
-
+
do
{
node = node.getParent();
@@ -606,7 +606,7 @@ public class DefaultMutableTreeNode
{
if (depth == 0)
return null;
-
+
return new TreeNode[depth];
}
@@ -624,7 +624,7 @@ public class DefaultMutableTreeNode
{
TreeNode[] path = getPathToRoot(this, 0);
Object[] object = new Object[path.length];
-
+
for (int index = 0; index < path.length; ++index)
object[index] = ((DefaultMutableTreeNode) path[index]).getUserObject();
@@ -640,7 +640,7 @@ public class DefaultMutableTreeNode
{
TreeNode current = this;
TreeNode check = current.getParent();
-
+
while (check != null)
{
current = check;
@@ -675,7 +675,7 @@ public class DefaultMutableTreeNode
// Return next sibling (if needed the sibling of some parent).
DefaultMutableTreeNode node = this;
DefaultMutableTreeNode sibling;
-
+
do
{
sibling = node.getNextSibling();
@@ -683,7 +683,7 @@ public class DefaultMutableTreeNode
}
while (sibling == null &&
node != null);
-
+
// Return sibling.
return sibling;
}
@@ -698,7 +698,7 @@ public class DefaultMutableTreeNode
// Return null if no parent.
if (parent == null)
return null;
-
+
DefaultMutableTreeNode sibling = getPreviousSibling();
// Return parent if no sibling.
@@ -769,7 +769,7 @@ public class DefaultMutableTreeNode
{
if (node == null)
throw new IllegalArgumentException();
-
+
TreeNode parent = this;
Vector<TreeNode> nodes = new Vector<TreeNode>();
nodes.add(this);
@@ -782,13 +782,13 @@ public class DefaultMutableTreeNode
if (parent != node)
throw new IllegalArgumentException();
-
+
return nodes.elements();
}
/**
- * Returns <code>true</code> if <code>node</code> is a child of this tree
- * node, and <code>false</code> otherwise. If <code>node</code> is
+ * Returns <code>true</code> if <code>node</code> is a child of this tree
+ * node, and <code>false</code> otherwise. If <code>node</code> is
* <code>null</code>, this method returns <code>false</code>.
*
* @param node the node (<code>null</code> permitted).
@@ -807,7 +807,7 @@ public class DefaultMutableTreeNode
* Returns the first child node belonging to this tree node.
*
* @return The first child node.
- *
+ *
* @throws NoSuchElementException if this tree node has no children.
*/
public TreeNode getFirstChild()
@@ -819,7 +819,7 @@ public class DefaultMutableTreeNode
* Returns the last child node belonging to this tree node.
*
* @return The last child node.
- *
+ *
* @throws NoSuchElementException if this tree node has no children.
*/
public TreeNode getLastChild()
@@ -828,15 +828,15 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the next child after the specified <code>node</code>, or
- * <code>null</code> if there is no child after the specified
+ * Returns the next child after the specified <code>node</code>, or
+ * <code>null</code> if there is no child after the specified
* <code>node</code>.
*
* @param node a child of this node (<code>null</code> not permitted).
*
* @return The next child, or <code>null</code>.
- *
- * @throws IllegalArgumentException if <code>node</code> is not a child of
+ *
+ * @throws IllegalArgumentException if <code>node</code> is not a child of
* this node, or is <code>null</code>.
*/
public TreeNode getChildAfter(TreeNode node)
@@ -853,15 +853,15 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the previous child before the specified <code>node</code>, or
- * <code>null</code> if there is no child before the specified
+ * Returns the previous child before the specified <code>node</code>, or
+ * <code>null</code> if there is no child before the specified
* <code>node</code>.
*
* @param node a child of this node (<code>null</code> not permitted).
*
* @return The previous child, or <code>null</code>.
- *
- * @throws IllegalArgumentException if <code>node</code> is not a child of
+ *
+ * @throws IllegalArgumentException if <code>node</code> is not a child of
* this node, or is <code>null</code>.
*/
public TreeNode getChildBefore(TreeNode node)
@@ -913,8 +913,8 @@ public class DefaultMutableTreeNode
/**
* Returns the next sibling for this tree node. If this node has no parent,
- * or this node is the last child of its parent, this method returns
- * <code>null</code>.
+ * or this node is the last child of its parent, this method returns
+ * <code>null</code>.
*
* @return The next sibling, or <code>null</code>.
*/
@@ -924,7 +924,7 @@ public class DefaultMutableTreeNode
return null;
int index = parent.getIndex(this) + 1;
-
+
if (index == parent.getChildCount())
return null;
@@ -932,9 +932,9 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the previous sibling for this tree node. If this node has no
- * parent, or this node is the first child of its parent, this method returns
- * <code>null</code>.
+ * Returns the previous sibling for this tree node. If this node has no
+ * parent, or this node is the first child of its parent, this method returns
+ * <code>null</code>.
*
* @return The previous sibling, or <code>null</code>.
*/
@@ -952,7 +952,7 @@ public class DefaultMutableTreeNode
}
/**
- * Returns <code>true</code> if this tree node is a lead node (that is, it
+ * Returns <code>true</code> if this tree node is a lead node (that is, it
* has no children), and <code>false</otherwise>.
*
* @return A boolean.
@@ -963,8 +963,8 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the first leaf node that is a descendant of this node. Recall
- * that a node is its own descendant, so if this node has no children then
+ * Returns the first leaf node that is a descendant of this node. Recall
+ * that a node is its own descendant, so if this node has no children then
* it is returned as the first leaf.
*
* @return The first leaf node.
@@ -972,7 +972,7 @@ public class DefaultMutableTreeNode
public DefaultMutableTreeNode getFirstLeaf()
{
TreeNode current = this;
-
+
while (current.getChildCount() > 0)
current = current.getChildAt(0);
@@ -980,8 +980,8 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the last leaf node that is a descendant of this node. Recall
- * that a node is its own descendant, so if this node has no children then
+ * Returns the last leaf node that is a descendant of this node. Recall
+ * that a node is its own descendant, so if this node has no children then
* it is returned as the last leaf.
*
* @return The first leaf node.
@@ -990,7 +990,7 @@ public class DefaultMutableTreeNode
{
TreeNode current = this;
int size = current.getChildCount();
-
+
while (size > 0)
{
current = current.getChildAt(size - 1);
@@ -1001,7 +1001,7 @@ public class DefaultMutableTreeNode
}
/**
- * Returns the next leaf node after this tree node.
+ * Returns the next leaf node after this tree node.
*
* @return The next leaf node, or <code>null</code>.
*/
@@ -1047,7 +1047,7 @@ public class DefaultMutableTreeNode
while (e.hasMoreElements())
{
TreeNode current = (TreeNode) e.nextElement();
-
+
if (current.isLeaf())
count++;
}
@@ -1082,7 +1082,7 @@ public class DefaultMutableTreeNode
TreeNode node = queue.removeFirst();
Enumeration<TreeNode> children =
- (Enumeration<TreeNode>) node.children();
+ (Enumeration<TreeNode>) node.children();
while (children.hasMoreElements())
queue.add(children.nextElement());
@@ -1095,10 +1095,10 @@ public class DefaultMutableTreeNode
*/
static class PreorderEnumeration implements Enumeration<TreeNode>
{
- TreeNode next;
+ TreeNode next;
Stack<Enumeration<TreeNode>> childrenEnums =
- new Stack<Enumeration<TreeNode>>();
+ new Stack<Enumeration<TreeNode>>();
@SuppressWarnings("unchecked")
PreorderEnumeration(TreeNode node)
@@ -1138,7 +1138,7 @@ public class DefaultMutableTreeNode
return child;
}
-
+
// If no children are left, we return to a higher level.
childrenEnums.pop();
@@ -1161,7 +1161,7 @@ public class DefaultMutableTreeNode
Stack<TreeNode> nodes = new Stack<TreeNode>();
Stack<Enumeration<TreeNode>> childrenEnums =
- new Stack<Enumeration<TreeNode>>();
+ new Stack<Enumeration<TreeNode>>();
@SuppressWarnings("unchecked")
PostorderEnumeration(TreeNode node)
@@ -1194,7 +1194,7 @@ public class DefaultMutableTreeNode
nodes.push(node);
Enumeration<TreeNode> newChildren =
- (Enumeration<TreeNode>) node.children();
+ (Enumeration<TreeNode>) node.children();
childrenEnums.push(newChildren);
return traverse(newChildren);
diff --git a/javax/swing/tree/DefaultTreeCellEditor.java b/javax/swing/tree/DefaultTreeCellEditor.java
index 04897986d..9ee0a14ba 100644
--- a/javax/swing/tree/DefaultTreeCellEditor.java
+++ b/javax/swing/tree/DefaultTreeCellEditor.java
@@ -68,7 +68,7 @@ import javax.swing.event.TreeSelectionListener;
/**
* Participates in the tree cell editing.
- *
+ *
* @author Andrew Selkirk
* @author Audrius Meskauskas
*/
@@ -77,8 +77,8 @@ public class DefaultTreeCellEditor
{
/**
* This container that appears on the tree during editing session.
- * It contains the editing component displays various other editor -
- * specific parts like editing icon.
+ * It contains the editing component displays various other editor -
+ * specific parts like editing icon.
*/
public class EditorContainer extends Container
{
@@ -86,7 +86,7 @@ public class DefaultTreeCellEditor
* Use v 1.5 serial version UID for interoperability.
*/
static final long serialVersionUID = 6470339600449699810L;
-
+
/**
* Creates an <code>EditorContainer</code> object.
*/
@@ -103,11 +103,11 @@ public class DefaultTreeCellEditor
{
// Do nothing here.
}
-
+
/**
* Overrides Container.paint to paint the node's icon and use the selection
* color for the background.
- *
+ *
* @param g -
* the specified Graphics window
*/
@@ -175,8 +175,8 @@ public class DefaultTreeCellEditor
/**
* Use v 1.5 serial version UID for interoperability.
*/
- static final long serialVersionUID = -6629304544265300143L;
-
+ static final long serialVersionUID = -6629304544265300143L;
+
/**
* The border of the text field.
*/
@@ -194,9 +194,9 @@ public class DefaultTreeCellEditor
/**
* Gets the font of this component.
- * @return this component's font; if a font has not been set for
+ * @return this component's font; if a font has not been set for
* this component, the font of its parent is returned (if the parent
- * is not null, otherwise null is returned).
+ * is not null, otherwise null is returned).
*/
public Font getFont()
{
@@ -222,9 +222,9 @@ public class DefaultTreeCellEditor
}
/**
- * Overrides JTextField.getPreferredSize to return the preferred size
+ * Overrides JTextField.getPreferredSize to return the preferred size
* based on current font, if set, or else use renderer's font.
- *
+ *
* @return the Dimension of this textfield.
*/
public Dimension getPreferredSize()
@@ -237,9 +237,9 @@ public class DefaultTreeCellEditor
return renderer.getPreferredSize();
}
}
-
+
private EventListenerList listenerList = new EventListenerList();
-
+
/**
* Editor handling the editing.
*/
@@ -261,8 +261,8 @@ public class DefaultTreeCellEditor
protected transient Component editingComponent;
/**
- * As of Java 2 platform v1.4 this field should no longer be used.
- * If you wish to provide similar behavior you should directly
+ * As of Java 2 platform v1.4 this field should no longer be used.
+ * If you wish to provide similar behavior you should directly
* override isCellEditable.
*/
protected boolean canEdit;
@@ -306,12 +306,12 @@ public class DefaultTreeCellEditor
* Font to paint with, null indicates font of renderer is to be used.
*/
protected Font font;
-
+
/**
- * Constructs a DefaultTreeCellEditor object for a JTree using the
- * specified renderer and a default editor. (Use this constructor
+ * Constructs a DefaultTreeCellEditor object for a JTree using the
+ * specified renderer and a default editor. (Use this constructor
* for normal editing.)
- *
+ *
* @param tree - a JTree object
* @param renderer - a DefaultTreeCellRenderer object
*/
@@ -321,10 +321,10 @@ public class DefaultTreeCellEditor
}
/**
- * Constructs a DefaultTreeCellEditor object for a JTree using the specified
- * renderer and the specified editor. (Use this constructor
+ * Constructs a DefaultTreeCellEditor object for a JTree using the specified
+ * renderer and the specified editor. (Use this constructor
* for specialized editing.)
- *
+ *
* @param tree - a JTree object
* @param renderer - a DefaultTreeCellRenderer object
* @param editor - a TreeCellEditor object
@@ -341,10 +341,10 @@ public class DefaultTreeCellEditor
Color c = UIManager.getColor("Tree.editorBorderSelectionColor");
setBorderSelectionColor(c);
}
-
+
/**
* writeObject
- *
+ *
* @param value0
* TODO
* @exception IOException
@@ -386,12 +386,12 @@ public class DefaultTreeCellEditor
}
/**
- * Sets the font to edit with. null indicates the renderers
- * font should be used. This will NOT override any font you have
- * set in the editor the receiver was instantied with. If null for
- * an editor was passed in, a default editor will be created that
+ * Sets the font to edit with. null indicates the renderers
+ * font should be used. This will NOT override any font you have
+ * set in the editor the receiver was instantied with. If null for
+ * an editor was passed in, a default editor will be created that
* will pick up this font.
- *
+ *
* @param font - the editing Font
*/
public void setFont(Font font)
@@ -404,7 +404,7 @@ public class DefaultTreeCellEditor
/**
* Gets the font used for editing.
- *
+ *
* @return the editing font
*/
public Font getFont()
@@ -414,20 +414,20 @@ public class DefaultTreeCellEditor
/**
* Configures the editor. Passed onto the realEditor.
- * Sets an initial value for the editor. This will cause
- * the editor to stopEditing and lose any partially edited value
- * if the editor is editing when this method is called.
- * Returns the component that should be added to the client's Component
- * hierarchy. Once installed in the client's hierarchy this component will
- * then be able to draw and receive user input.
- *
+ * Sets an initial value for the editor. This will cause
+ * the editor to stopEditing and lose any partially edited value
+ * if the editor is editing when this method is called.
+ * Returns the component that should be added to the client's Component
+ * hierarchy. Once installed in the client's hierarchy this component will
+ * then be able to draw and receive user input.
+ *
* @param tree - the JTree that is asking the editor to edit; this parameter can be null
* @param value - the value of the cell to be edited
* @param isSelected - true is the cell is to be rendered with selection highlighting
* @param expanded - true if the node is expanded
* @param leaf - true if the node is a leaf node
* @param row - the row index of the node being edited
- *
+ *
* @return the component for editing
*/
public Component getTreeCellEditorComponent(JTree tree, Object value,
@@ -461,19 +461,19 @@ public class DefaultTreeCellEditor
/**
* Returns the value currently being edited (requests it from the
* {@link #realEditor}.
- *
+ *
* @return the value currently being edited
*/
public Object getCellEditorValue()
{
return realEditor.getCellEditorValue();
}
-
+
/**
- * If the realEditor returns true to this message, prepareForEditing
+ * If the realEditor returns true to this message, prepareForEditing
* is messaged and true is returned.
- *
- * @param event - the event the editor should use to consider whether to
+ *
+ * @param event - the event the editor should use to consider whether to
* begin editing or not
* @return true if editing can be started
*/
@@ -507,7 +507,7 @@ public class DefaultTreeCellEditor
}
if (! realEditor.isCellEditable(event))
ret = false;
- else
+ else
{
if (canEditImmediately(event))
ret = true;
@@ -519,12 +519,12 @@ public class DefaultTreeCellEditor
if (ret)
prepareForEditing();
return ret;
-
+
}
/**
* Messages the realEditor for the return value.
- *
+ *
* @param event -
* the event the editor should use to start editing
* @return true if the editor would like the editing cell to be selected;
@@ -570,7 +570,7 @@ public class DefaultTreeCellEditor
/**
* Adds a <code>CellEditorListener</code> object to this editor.
- *
+ *
* @param listener
* the listener to add
*/
@@ -603,7 +603,7 @@ public class DefaultTreeCellEditor
/**
* Resets lastPath.
- *
+ *
* @param e - the event that characterizes the change.
*/
public void valueChanged(TreeSelectionEvent e)
@@ -621,10 +621,10 @@ public class DefaultTreeCellEditor
// if (timer != null)
// timer.stop();
}
-
+
/**
* Messaged when the timer fires.
- *
+ *
* @param e the event that characterizes the action.
*/
public void actionPerformed(ActionEvent e)
@@ -636,7 +636,7 @@ public class DefaultTreeCellEditor
/**
* Sets the tree currently editing for. This is needed to add a selection
* listener.
- *
+ *
* @param newTree -
* the new tree to be edited
*/
@@ -657,7 +657,7 @@ public class DefaultTreeCellEditor
/**
* Returns true if event is a MouseEvent and the click count is 1.
- *
+ *
* @param event - the event being studied
* @return true if editing should start
*/
@@ -674,7 +674,7 @@ public class DefaultTreeCellEditor
}
/**
- * Starts the editing timer (if one installed).
+ * Starts the editing timer (if one installed).
*/
protected void startEditingTimer()
{
@@ -687,33 +687,33 @@ public class DefaultTreeCellEditor
}
/**
- * Returns true if event is null, or it is a MouseEvent with
+ * Returns true if event is null, or it is a MouseEvent with
* a click count > 2 and inHitRegion returns true.
- *
+ *
* @param event - the event being studied
- * @return true if event is null, or it is a MouseEvent with
- * a click count > 2 and inHitRegion returns true
+ * @return true if event is null, or it is a MouseEvent with
+ * a click count > 2 and inHitRegion returns true
*/
protected boolean canEditImmediately(EventObject event)
{
if (event == null || !(event instanceof MouseEvent) || (((MouseEvent) event).
- getClickCount() > 2 && inHitRegion(((MouseEvent) event).getX(),
+ getClickCount() > 2 && inHitRegion(((MouseEvent) event).getX(),
((MouseEvent) event).getY())))
return true;
return false;
}
/**
- * Returns true if the passed in location is a valid mouse location
+ * Returns true if the passed in location is a valid mouse location
* to start editing from. This is implemented to return false if x is
- * less than or equal to the width of the icon and icon
- * gap displayed by the renderer. In other words this returns true if
- * the user clicks over the text part displayed by the renderer, and
+ * less than or equal to the width of the icon and icon
+ * gap displayed by the renderer. In other words this returns true if
+ * the user clicks over the text part displayed by the renderer, and
* false otherwise.
- *
+ *
* @param x - the x-coordinate of the point
* @param y - the y-coordinate of the point
- *
+ *
* @return true if the passed in location is a valid mouse location
*/
protected boolean inHitRegion(int x, int y)
@@ -725,11 +725,11 @@ public class DefaultTreeCellEditor
/**
* determineOffset
* @param tree -
- * @param value -
- * @param isSelected -
- * @param expanded -
- * @param leaf -
- * @param row -
+ * @param value -
+ * @param isSelected -
+ * @param expanded -
+ * @param leaf -
+ * @param row -
*/
protected void determineOffset(JTree tree, Object value, boolean isSelected,
boolean expanded, boolean leaf, int row)
@@ -755,7 +755,7 @@ public class DefaultTreeCellEditor
}
/**
- * Invoked just before editing is to start. Will add the
+ * Invoked just before editing is to start. Will add the
* editingComponent to the editingContainer.
*/
protected void prepareForEditing()
@@ -766,7 +766,7 @@ public class DefaultTreeCellEditor
/**
* Creates the container to manage placement of editingComponent.
- *
+ *
* @return the container to manage the placement of the editingComponent.
*/
protected Container createContainer()
@@ -775,9 +775,9 @@ public class DefaultTreeCellEditor
}
/**
- * This is invoked if a TreeCellEditor is not supplied in the constructor.
+ * This is invoked if a TreeCellEditor is not supplied in the constructor.
* It returns a TextField editor.
- *
+ *
* @return a new TextField editor
*/
protected TreeCellEditor createTreeCellEditor()
diff --git a/javax/swing/tree/DefaultTreeCellRenderer.java b/javax/swing/tree/DefaultTreeCellRenderer.java
index b9c84013d..a2c8fc204 100644
--- a/javax/swing/tree/DefaultTreeCellRenderer.java
+++ b/javax/swing/tree/DefaultTreeCellRenderer.java
@@ -1,6 +1,6 @@
-/* DefaultTreeCellRenderer.java
+/* DefaultTreeCellRenderer.java
Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@ import javax.swing.plaf.UIResource;
/**
* A default implementation of the {@link TreeCellRenderer} interface.
- *
+ *
* @author Andrew Selkirk
*/
public class DefaultTreeCellRenderer
@@ -79,62 +79,62 @@ public class DefaultTreeCellRenderer
/**
* The icon used to represent non-leaf nodes that are closed.
- *
+ *
* @see #setClosedIcon(Icon)
*/
protected transient Icon closedIcon;
/**
* The icon used to represent leaf nodes.
- *
+ *
* @see #setLeafIcon(Icon)
*/
protected transient Icon leafIcon;
/**
* The icon used to represent non-leaf nodes that are open.
- *
+ *
* @see #setOpenIcon(Icon)
*/
protected transient Icon openIcon;
/**
* The color used for text in selected cells.
- *
+ *
* @see #setTextSelectionColor(Color)
*/
protected Color textSelectionColor;
/**
* The color used for text in non-selected cells.
- *
+ *
* @see #setTextNonSelectionColor(Color)
*/
protected Color textNonSelectionColor;
/**
* The background color for selected cells.
- *
+ *
* @see #setBackgroundSelectionColor(Color)
*/
protected Color backgroundSelectionColor;
/**
* The background color for non-selected cells.
- *
+ *
* @see #setBackgroundNonSelectionColor(Color)
*/
protected Color backgroundNonSelectionColor;
/**
* The border color for selected tree cells.
- *
+ *
* @see #setBorderSelectionColor(Color)
*/
protected Color borderSelectionColor;
/**
- * Creates a new tree cell renderer with defaults appropriate for the
+ * Creates a new tree cell renderer with defaults appropriate for the
* current {@link LookAndFeel}.
*/
public DefaultTreeCellRenderer()
@@ -154,9 +154,9 @@ public class DefaultTreeCellRenderer
/**
* Returns the default icon for non-leaf tree cells that are open (expanded).
- * The icon is fetched from the defaults table for the current
+ * The icon is fetched from the defaults table for the current
* {@link LookAndFeel} using the key <code>Tree.openIcon</code>.
- *
+ *
* @return The default icon.
*/
public Icon getDefaultOpenIcon()
@@ -165,10 +165,10 @@ public class DefaultTreeCellRenderer
}
/**
- * Returns the default icon for non-leaf tree cells that are closed (not
- * expanded). The icon is fetched from the defaults table for the current
+ * Returns the default icon for non-leaf tree cells that are closed (not
+ * expanded). The icon is fetched from the defaults table for the current
* {@link LookAndFeel} using the key <code>Tree.closedIcon</code>.
- *
+ *
* @return The default icon.
*/
public Icon getDefaultClosedIcon()
@@ -177,10 +177,10 @@ public class DefaultTreeCellRenderer
}
/**
- * Returns the default icon for leaf tree cells. The icon is fetched from
- * the defaults table for the current {@link LookAndFeel} using the key
+ * Returns the default icon for leaf tree cells. The icon is fetched from
+ * the defaults table for the current {@link LookAndFeel} using the key
* <code>Tree.leafIcon</code>.
- *
+ *
* @return The default icon.
*/
public Icon getDefaultLeafIcon()
@@ -191,9 +191,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the icon to be displayed for non-leaf nodes that are open (expanded).
* Set this to <code>null</code> if no icon is required.
- *
+ *
* @param icon the icon (<code>null</code> permitted).
- *
+ *
* @see #getOpenIcon()
*/
public void setOpenIcon(Icon icon)
@@ -202,11 +202,11 @@ public class DefaultTreeCellRenderer
}
/**
- * Returns the icon displayed for non-leaf nodes that are open (expanded).
+ * Returns the icon displayed for non-leaf nodes that are open (expanded).
* The default value is initialised from the {@link LookAndFeel}.
- *
+ *
* @return The open icon (possibly <code>null</code>).
- *
+ *
* @see #setOpenIcon(Icon)
*/
public Icon getOpenIcon()
@@ -215,11 +215,11 @@ public class DefaultTreeCellRenderer
}
/**
- * Sets the icon to be displayed for non-leaf nodes that are closed. Set
+ * Sets the icon to be displayed for non-leaf nodes that are closed. Set
* this to <code>null</code> if no icon is required.
- *
+ *
* @param icon the icon (<code>null</code> permitted).
- *
+ *
* @see #getClosedIcon()
*/
public void setClosedIcon(Icon icon)
@@ -228,11 +228,11 @@ public class DefaultTreeCellRenderer
}
/**
- * Returns the icon displayed for non-leaf nodes that are closed. The
+ * Returns the icon displayed for non-leaf nodes that are closed. The
* default value is initialised from the {@link LookAndFeel}.
- *
+ *
* @return The closed icon (possibly <code>null</code>).
- *
+ *
* @see #setClosedIcon(Icon)
*/
public Icon getClosedIcon()
@@ -241,11 +241,11 @@ public class DefaultTreeCellRenderer
}
/**
- * Sets the icon to be displayed for leaf nodes. Set this to
+ * Sets the icon to be displayed for leaf nodes. Set this to
* <code>null</code> if no icon is required.
- *
+ *
* @param icon the icon (<code>null</code> permitted).
- *
+ *
* @see #getLeafIcon()
*/
public void setLeafIcon(Icon icon)
@@ -254,11 +254,11 @@ public class DefaultTreeCellRenderer
}
/**
- * Returns the icon displayed for leaf nodes. The default value is
+ * Returns the icon displayed for leaf nodes. The default value is
* initialised from the {@link LookAndFeel}.
- *
+ *
* @return The leaf icon (possibly <code>null</code>).
- *
+ *
* @see #setLeafIcon(Icon)
*/
public Icon getLeafIcon()
@@ -268,9 +268,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the text color for tree cells that are selected.
- *
+ *
* @param c the color (<code>null</code> permitted).
- *
+ *
* @see #getTextSelectionColor()
*/
public void setTextSelectionColor(Color c)
@@ -282,9 +282,9 @@ public class DefaultTreeCellRenderer
* Returns the text color for tree cells that are selected.
* The default value is obtained from the {@link LookAndFeel} defaults
* table using the key <code>Tree.selectionForeground</code>.
- *
+ *
* @return The text color for tree cells that are selected.
- *
+ *
* @see #setTextSelectionColor(Color)
*/
public Color getTextSelectionColor()
@@ -294,9 +294,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the text color for tree cells that are not selected.
- *
+ *
* @param c the color (<code>null</code> permitted).
- *
+ *
* @see #getTextNonSelectionColor()
*/
public void setTextNonSelectionColor(Color c)
@@ -308,9 +308,9 @@ public class DefaultTreeCellRenderer
* Returns the text color for tree cells that are not selected.
* The default value is obtained from the {@link LookAndFeel} defaults
* table using the key <code>Tree.selectionForeground</code>.
- *
+ *
* @return The background color for tree cells that are not selected.
- *
+ *
* @see #setTextgroundNonSelectionColor(Color)
*/
public Color getTextNonSelectionColor()
@@ -320,9 +320,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the background color for tree cells that are selected.
- *
+ *
* @param c the color (<code>null</code> permitted).
- *
+ *
* @see #getBackgroundSelectionColor()
*/
public void setBackgroundSelectionColor(Color c)
@@ -334,9 +334,9 @@ public class DefaultTreeCellRenderer
* Returns the background color for tree cells that are selected.
* The default value is obtained from the {@link LookAndFeel} defaults
* table using the key <code>Tree.selectionBackground</code>.
- *
+ *
* @return The background color for tree cells that are selected.
- *
+ *
* @see #setBackgroundSelectionColor(Color)
*/
public Color getBackgroundSelectionColor()
@@ -346,9 +346,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the background color for tree cells that are not selected.
- *
+ *
* @param c the color (<code>null</code> permitted).
- *
+ *
* @see #getBackgroundNonSelectionColor()
*/
public void setBackgroundNonSelectionColor(Color c)
@@ -360,9 +360,9 @@ public class DefaultTreeCellRenderer
* Returns the background color for tree cells that are not selected.
* The default value is obtained from the {@link LookAndFeel} defaults
* table using the key <code>Tree.textBackground</code>.
- *
+ *
* @return The background color for tree cells that are not selected.
- *
+ *
* @see #setBackgroundNonSelectionColor(Color)
*/
public Color getBackgroundNonSelectionColor()
@@ -372,9 +372,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the border color for tree cells that are selected.
- *
+ *
* @param c the color (<code>null</code> permitted).
- *
+ *
* @see #getBorderSelectionColor()
*/
public void setBorderSelectionColor(Color c)
@@ -386,9 +386,9 @@ public class DefaultTreeCellRenderer
* Returns the border color for tree cells that are selected.
* The default value is obtained from the {@link LookAndFeel} defaults
* table using the key <code>Tree.selectionBorderColor</code>.
- *
+ *
* @return The border color for tree cells that are selected.
- *
+ *
* @see #setBorderSelectionColor(Color)
*/
public Color getBorderSelectionColor()
@@ -398,9 +398,9 @@ public class DefaultTreeCellRenderer
/**
* Sets the font.
- *
+ *
* @param f the font.
- *
+ *
* @see #getFont()
*/
public void setFont(Font f)
@@ -412,7 +412,7 @@ public class DefaultTreeCellRenderer
/**
* Sets the background color.
- *
+ *
* @param c the color.
*/
public void setBackground(Color c)
@@ -425,7 +425,7 @@ public class DefaultTreeCellRenderer
/**
* Returns a component (in fact <code>this</code>) that can be used to
* render a tree cell with the specified state.
- *
+ *
* @param tree the tree that the cell belongs to.
* @param val the cell value.
* @param selected indicates whether or not the cell is selected.
@@ -433,7 +433,7 @@ public class DefaultTreeCellRenderer
* @param leaf indicates whether or not the cell is a leaf in the tree.
* @param row the row index.
* @param hasFocus indicates whether or not the cell has the focus.
- *
+ *
* @return <code>this</code>.
*/
public Component getTreeCellRendererComponent(JTree tree, Object val,
@@ -461,7 +461,7 @@ public class DefaultTreeCellRenderer
{
super.setBackground(getBackgroundSelectionColor());
setForeground(getTextSelectionColor());
-
+
if (hasFocus)
setBorderSelectionColor(UIManager.getLookAndFeelDefaults().
getColor("Tree.selectionBorderColor"));
@@ -480,9 +480,9 @@ public class DefaultTreeCellRenderer
/**
* Returns the current font.
- *
+ *
* @return The current font.
- *
+ *
* @see #setFont(Font)
*/
public Font getFont()
@@ -492,7 +492,7 @@ public class DefaultTreeCellRenderer
/**
* Paints the value. The background is filled based on selected.
- *
+ *
* @param g the graphics device.
*/
public void paint(Graphics g)
@@ -504,25 +504,25 @@ public class DefaultTreeCellRenderer
else
{
bgColor = getBackgroundNonSelectionColor();
- if (bgColor == null)
+ if (bgColor == null)
bgColor = getBackground();
}
// Paint background.
int xOffset = -1;
if (bgColor != null)
{
- xOffset = getXOffset();
- g.setColor(bgColor);
- g.fillRect(xOffset, 0, getWidth() - xOffset, getHeight());
+ xOffset = getXOffset();
+ g.setColor(bgColor);
+ g.fillRect(xOffset, 0, getWidth() - xOffset, getHeight());
}
if (hasFocus)
{
if (drawsFocusBorderAroundIcon)
xOffset = 0;
- else if (xOffset == -1)
+ else if (xOffset == -1)
xOffset = getXOffset();
- paintFocus(g, xOffset, 0, getWidth() - xOffset, getHeight());
+ paintFocus(g, xOffset, 0, getWidth() - xOffset, getHeight());
}
super.paint(g);
}
@@ -536,7 +536,7 @@ public class DefaultTreeCellRenderer
if (col != null)
{
g.setColor(col);
- g.drawRect(x, y, w - 1, h - 1);
+ g.drawRect(x, y, w - 1, h - 1);
}
}
@@ -557,7 +557,7 @@ public class DefaultTreeCellRenderer
/**
* Returns the preferred size of the cell.
- *
+ *
* @return The preferred size of the cell.
*/
public Dimension getPreferredSize()
@@ -565,7 +565,7 @@ public class DefaultTreeCellRenderer
Dimension size = super.getPreferredSize();
size.width += 3;
return size;
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
@@ -573,7 +573,7 @@ public class DefaultTreeCellRenderer
public void validate()
{
// Overridden for performance reasons.
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
@@ -581,11 +581,11 @@ public class DefaultTreeCellRenderer
public void revalidate()
{
// Overridden for performance reasons.
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param tm ignored
* @param x coordinate of the region to mark as dirty
* @param y coordinate of the region to mark as dirty
@@ -595,26 +595,26 @@ public class DefaultTreeCellRenderer
public void repaint(long tm, int x, int y, int width, int height)
{
// Overridden for performance reasons.
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param area the area to repaint.
*/
public void repaint(Rectangle area)
{
// Overridden for performance reasons.
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
*/
- protected void firePropertyChange(String name, Object oldValue,
+ protected void firePropertyChange(String name, Object oldValue,
Object newValue)
{
// Overridden for performance reasons.
@@ -622,7 +622,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -634,7 +634,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -646,7 +646,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -654,11 +654,11 @@ public class DefaultTreeCellRenderer
public void firePropertyChange(String name, short oldValue, short newValue)
{
// Overridden for performance reasons.
- }
+ }
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -670,7 +670,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -682,7 +682,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -694,7 +694,7 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
@@ -706,15 +706,15 @@ public class DefaultTreeCellRenderer
/**
* For performance reasons, this method is overridden to do nothing.
- *
+ *
* @param name the property name.
* @param oldValue the old value.
* @param newValue the new value.
*/
- public void firePropertyChange(String name, boolean oldValue,
+ public void firePropertyChange(String name, boolean oldValue,
boolean newValue)
{
// Overridden for performance reasons.
- }
+ }
-}
+}
diff --git a/javax/swing/tree/DefaultTreeModel.java b/javax/swing/tree/DefaultTreeModel.java
index afee7ea22..0fa444586 100644
--- a/javax/swing/tree/DefaultTreeModel.java
+++ b/javax/swing/tree/DefaultTreeModel.java
@@ -1,6 +1,6 @@
-/* DefaultTreeModel.java --
+/* DefaultTreeModel.java --
Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -49,7 +49,7 @@ import javax.swing.event.TreeModelListener;
/**
* DefaultTreeModel
- *
+ *
* @author Andrew Selkirk
*/
public class DefaultTreeModel
@@ -74,7 +74,7 @@ public class DefaultTreeModel
/**
* Constructor DefaultTreeModel where any node can have children.
- *
+ *
* @param root the tree root.
*/
public DefaultTreeModel(TreeNode root)
@@ -85,9 +85,9 @@ public class DefaultTreeModel
/**
* Create the DefaultTreeModel that may check if the nodes can have
* children or not.
- *
+ *
* @param aRoot the tree root.
- * @param asksAllowsChildren if true, each node is asked if it can have
+ * @param asksAllowsChildren if true, each node is asked if it can have
* children. If false, the model does not care about this, supposing, that
* any node can have children.
*/
@@ -101,7 +101,7 @@ public class DefaultTreeModel
/**
* writeObject
- *
+ *
* @param obj the object.
* @exception IOException TODO
*/
@@ -112,7 +112,7 @@ public class DefaultTreeModel
/**
* readObject
- *
+ *
* @param value0 TODO
* @exception IOException TODO
* @exception ClassNotFoundException TODO
@@ -125,7 +125,7 @@ public class DefaultTreeModel
/**
* asksAllowsChildren
- *
+ *
* @return boolean
*/
public boolean asksAllowsChildren()
@@ -135,7 +135,7 @@ public class DefaultTreeModel
/**
* setAsksAllowsChildren
- *
+ *
* @param value TODO
*/
public void setAsksAllowsChildren(boolean value)
@@ -145,7 +145,7 @@ public class DefaultTreeModel
/**
* setRoot
- *
+ *
* @param root the root node.
*/
public void setRoot(TreeNode root)
@@ -155,7 +155,7 @@ public class DefaultTreeModel
/**
* getRoot
- *
+ *
* @return Object
*/
public Object getRoot()
@@ -165,7 +165,7 @@ public class DefaultTreeModel
/**
* getIndexOfChild
- *
+ *
* @param parent TODO
* @param child TODO
* @return int
@@ -182,7 +182,7 @@ public class DefaultTreeModel
/**
* getChild
- *
+ *
* @param node TODO
* @param idx TODO
* @return Object
@@ -197,7 +197,7 @@ public class DefaultTreeModel
/**
* getChildCount
- *
+ *
* @param node TODO
* @return int
*/
@@ -214,7 +214,7 @@ public class DefaultTreeModel
* {@link #asksAllowsChildren} is true, then this checks if the TreeNode
* allows children, otherwise it returns the TreeNode's <code>leaf</code>
* property.
- *
+ *
* @param node the node to check
*
* @return boolean <code>true</code> if the node is a leaf node,
@@ -275,7 +275,7 @@ public class DefaultTreeModel
* changed. It will fire the events, necessary to update the layout caches and
* repaint the tree. The tree will <i>not</i> be properly refreshed if you
* call the JTree.repaint instead.
- *
+ *
* @param node - the tree node, from which the tree nodes have changed
* (inclusive). If you do not know this node, call {@link #reload()}
* instead.
@@ -296,14 +296,14 @@ public class DefaultTreeModel
}
/**
- * Messaged when the user has altered the value for the item
- * identified by path to newValue. If newValue signifies a truly new
+ * Messaged when the user has altered the value for the item
+ * identified by path to newValue. If newValue signifies a truly new
* value the model should post a treeNodesChanged event.
- * This sets the user object of the TreeNode identified by
- * path and posts a node changed. If you use custom user objects
- * in the TreeModel you're going to need to subclass this and set
+ * This sets the user object of the TreeNode identified by
+ * path and posts a node changed. If you use custom user objects
+ * in the TreeModel you're going to need to subclass this and set
* the user object of the changed node to something meaningful.
- *
+ *
* @param path - path to the node that the user has altered
* @param newValue - the new value from the TreeCellEditor
*/
@@ -314,7 +314,7 @@ public class DefaultTreeModel
{
((MutableTreeNode) node).setUserObject(newValue);
int[] ci = null;
- Object[] c = null;
+ Object[] c = null;
Object[] parentPath = path.getPath();
if (path.getPathCount() > 1)
{
@@ -327,17 +327,17 @@ public class DefaultTreeModel
c[0] = node;
parentPath = path.getParentPath().getPath();
}
-
+
fireTreeNodesChanged(this, parentPath, ci, c);
}
}
/**
* Invoked this to insert newChild at location index in parents children.
- * This will then message nodesWereInserted to create the appropriate event.
- * This is the preferred way to add children as it will create the
+ * This will then message nodesWereInserted to create the appropriate event.
+ * This is the preferred way to add children as it will create the
* appropriate event.
- *
+ *
* @param newChild is the node to add to the parent's children
* @param parent is the parent of the newChild
* @param index is the index of the newChild
@@ -353,10 +353,10 @@ public class DefaultTreeModel
}
/**
- * Message this to remove node from its parent. This will message
- * nodesWereRemoved to create the appropriate event. This is the preferred
+ * Message this to remove node from its parent. This will message
+ * nodesWereRemoved to create the appropriate event. This is the preferred
* way to remove a node as it handles the event creation for you.
- *
+ *
* @param node to be removed
*/
public void removeNodeFromParent(MutableTreeNode node)
@@ -373,7 +373,7 @@ public class DefaultTreeModel
/**
* Invoke this method after you've changed how node is to be represented
* in the tree.
- *
+ *
* @param node that was changed
*/
public void nodeChanged(TreeNode node)
@@ -387,10 +387,10 @@ public class DefaultTreeModel
}
/**
- * Invoke this method after you've inserted some TreeNodes
- * into node. childIndices should be the index of the new elements and must
+ * Invoke this method after you've inserted some TreeNodes
+ * into node. childIndices should be the index of the new elements and must
* be sorted in ascending order.
- *
+ *
* @param parent that had a child added to
* @param childIndices of the children added
*/
@@ -403,26 +403,26 @@ public class DefaultTreeModel
}
/**
- * Invoke this method after you've removed some TreeNodes from node.
- * childIndices should be the index of the removed elements and
- * must be sorted in ascending order. And removedChildren should be the
+ * Invoke this method after you've removed some TreeNodes from node.
+ * childIndices should be the index of the removed elements and
+ * must be sorted in ascending order. And removedChildren should be the
* array of the children objects that were removed.
- *
+ *
* @param parent that had a child added to
* @param childIndices of the children added
* @param removedChildren are all the children removed from parent.
*/
- public void nodesWereRemoved(TreeNode parent, int[] childIndices,
+ public void nodesWereRemoved(TreeNode parent, int[] childIndices,
Object[] removedChildren)
{
- fireTreeNodesRemoved(this, getPathToRoot(parent), childIndices,
+ fireTreeNodesRemoved(this, getPathToRoot(parent), childIndices,
removedChildren);
}
/**
- * Invoke this method after you've changed how the children identified by
+ * Invoke this method after you've changed how the children identified by
* childIndices are to be represented in the tree.
- *
+ *
* @param node that is the parent of the children that changed in a tree.
* @param childIndices are the child nodes that changed.
*/
@@ -435,9 +435,9 @@ public class DefaultTreeModel
}
/**
- * Invoke this method if you've totally changed the children of node and
+ * Invoke this method if you've totally changed the children of node and
* its childrens children. This will post a treeStructureChanged event.
- *
+ *
* @param node that had its children and grandchildren changed.
*/
public void nodeStructureChanged(TreeNode node)
@@ -456,10 +456,10 @@ public class DefaultTreeModel
}
/**
- * Builds the parents of node up to and including the root node, where
- * the original node is the last element in the returned array. The
+ * Builds the parents of node up to and including the root node, where
+ * the original node is the last element in the returned array. The
* length of the returned array gives the node's depth in the tree.
- *
+ *
* @param node - the TreeNode to get the path for
* @return TreeNode[] - the path from node to the root
*/
@@ -469,14 +469,14 @@ public class DefaultTreeModel
}
/**
- * Builds the parents of node up to and including the root node, where
- * the original node is the last element in the returned array. The
+ * Builds the parents of node up to and including the root node, where
+ * the original node is the last element in the returned array. The
* length of the returned array gives the node's depth in the tree.
- *
+ *
* @param node - the TreeNode to get the path for
- * @param depth - an int giving the number of steps already taken
+ * @param depth - an int giving the number of steps already taken
* towards the root (on recursive calls), used to size the returned array
- * @return an array of TreeNodes giving the path from the root to the
+ * @return an array of TreeNodes giving the path from the root to the
* specified node
*/
protected TreeNode[] getPathToRoot(TreeNode node, int depth)
@@ -485,7 +485,7 @@ public class DefaultTreeModel
{
if (depth == 0)
return null;
-
+
return new TreeNode[depth];
}
@@ -496,7 +496,7 @@ public class DefaultTreeModel
/**
* Registers a listere to the model.
- *
+ *
* @param listener the listener to add
*/
public void addTreeModelListener(TreeModelListener listener)
@@ -506,7 +506,7 @@ public class DefaultTreeModel
/**
* Removes a listener from the model.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeModelListener(TreeModelListener listener)
@@ -516,9 +516,9 @@ public class DefaultTreeModel
/**
* Returns all registered <code>TreeModelListener</code> listeners.
- *
+ *
* @return an array of listeners.
- *
+ *
* @since 1.4
*/
public TreeModelListener[] getTreeModelListeners()
@@ -528,10 +528,10 @@ public class DefaultTreeModel
}
/**
- * Notifies all listeners that have registered interest for notification
- * on this event type. The event instance is lazily created using the parameters
+ * Notifies all listeners that have registered interest for notification
+ * on this event type. The event instance is lazily created using the parameters
* passed into the fire method.
- *
+ *
* @param source the node being changed
* @param path the path to the root node
* @param childIndices the indices of the changed elements
@@ -551,7 +551,7 @@ public class DefaultTreeModel
/**
* fireTreeNodesInserted
- *
+ *
* @param source the node where new nodes got inserted
* @param path the path to the root node
* @param childIndices the indices of the new elements
@@ -570,7 +570,7 @@ public class DefaultTreeModel
/**
* fireTreeNodesRemoved
- *
+ *
* @param source the node where nodes got removed-
* @param path the path to the root node
* @param childIndices the indices of the removed elements
@@ -589,7 +589,7 @@ public class DefaultTreeModel
/**
* fireTreeStructureChanged
- *
+ *
* @param source the node where the model has changed
* @param path the path to the root node
* @param childIndices the indices of the affected elements
diff --git a/javax/swing/tree/DefaultTreeSelectionModel.java b/javax/swing/tree/DefaultTreeSelectionModel.java
index b2806f272..29add0e7b 100644
--- a/javax/swing/tree/DefaultTreeSelectionModel.java
+++ b/javax/swing/tree/DefaultTreeSelectionModel.java
@@ -1,6 +1,6 @@
-/* DefaultTreeSelectionModel.java
+/* DefaultTreeSelectionModel.java
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -63,7 +63,7 @@ import javax.swing.event.TreeSelectionListener;
* listeners are notified about the path and not the row changes. If you
* specifically need to track the row changes, register the listener for the
* expansion events.
- *
+ *
* @author Andrew Selkirk
* @author Audrius Meskauskas
*/
@@ -195,13 +195,13 @@ public class DefaultTreeSelectionModel
* Creates a clone of this DefaultTreeSelectionModel with the same selection.
* The cloned instance will have the same registered listeners, the listeners
* themselves will not be cloned. The selection will be cloned.
- *
+ *
* @exception CloneNotSupportedException should not be thrown here
* @return a copy of this DefaultTreeSelectionModel
*/
public Object clone() throws CloneNotSupportedException
{
- DefaultTreeSelectionModel cloned =
+ DefaultTreeSelectionModel cloned =
(DefaultTreeSelectionModel) super.clone();
cloned.changeSupport = null;
cloned.selection = (TreePath[]) selection.clone();
@@ -217,10 +217,10 @@ public class DefaultTreeSelectionModel
/**
* Returns a string that shows this object's properties.
* The returned string lists the selected tree rows, if any.
- *
+ *
* @return a string that shows this object's properties
*/
- public String toString()
+ public String toString()
{
if (isSelectionEmpty())
return "[selection empty]";
@@ -239,7 +239,7 @@ public class DefaultTreeSelectionModel
/**
* writeObject
- *
+ *
* @param value0 TODO
* @exception IOException TODO
*/
@@ -250,7 +250,7 @@ public class DefaultTreeSelectionModel
/**
* readObject
- *
+ *
* @param value0 TODO
* @exception IOException TODO
* @exception ClassNotFoundException TODO
@@ -263,7 +263,7 @@ public class DefaultTreeSelectionModel
/**
* Sets the RowMapper that should be used to map between paths and their rows.
- *
+ *
* @param mapper the RowMapper to set
* @see RowMapper
*/
@@ -276,7 +276,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the RowMapper that is currently used to map between paths and their
* rows.
- *
+ *
* @return the current RowMapper
* @see RowMapper
*/
@@ -289,7 +289,7 @@ public class DefaultTreeSelectionModel
* Sets the current selection mode. Possible values are
* {@link #SINGLE_TREE_SELECTION}, {@link #CONTIGUOUS_TREE_SELECTION} and
* {@link #DISCONTIGUOUS_TREE_SELECTION}.
- *
+ *
* @param mode the selection mode to be set
* @see #getSelectionMode
* @see #SINGLE_TREE_SELECTION
@@ -314,7 +314,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the current selection mode.
- *
+ *
* @return the current selection mode
* @see #setSelectionMode
* @see #SINGLE_TREE_SELECTION
@@ -329,7 +329,7 @@ public class DefaultTreeSelectionModel
/**
* Sets this path as the only selection. If this changes the selection the
* registered TreeSelectionListeners are notified.
- *
+ *
* @param path the path to set as selection
*/
public void setSelectionPath(TreePath path)
@@ -339,10 +339,10 @@ public class DefaultTreeSelectionModel
paths = new TreePath[]{ path };
setSelectionPaths(paths);
}
-
+
/**
* Get the number of the tree row for the given path.
- *
+ *
* @param path the tree path
* @return the tree row for this path or -1 if the path is not visible.
*/
@@ -373,7 +373,7 @@ public class DefaultTreeSelectionModel
* Sets the paths as selection. This method checks for duplicates and removes
* them. If this changes the selection the registered TreeSelectionListeners
* are notified.
- *
+ *
* @param paths the paths to set as selection
*/
public void setSelectionPaths(TreePath[] paths)
@@ -468,10 +468,10 @@ public class DefaultTreeSelectionModel
* Adds a path to the list of selected paths. This method checks if the path
* is already selected and doesn't add the same path twice. If this changes
* the selection the registered TreeSelectionListeners are notified.
- *
- * The lead path is changed to the added path. This also happen if the
+ *
+ * The lead path is changed to the added path. This also happen if the
* passed path was already selected before.
- *
+ *
* @param path the path to add to the selection
*/
public void addSelectionPath(TreePath path)
@@ -487,7 +487,7 @@ public class DefaultTreeSelectionModel
* Adds the paths to the list of selected paths. This method checks if the
* paths are already selected and doesn't add the same path twice. If this
* changes the selection the registered TreeSelectionListeners are notified.
- *
+ *
* @param paths the paths to add to the selection
*/
public void addSelectionPaths(TreePath[] paths)
@@ -568,7 +568,7 @@ public class DefaultTreeSelectionModel
/**
* Removes the path from the selection. If this changes the selection the
* registered TreeSelectionListeners are notified.
- *
+ *
* @param path the path to remove
*/
public void removeSelectionPath(TreePath path)
@@ -580,7 +580,7 @@ public class DefaultTreeSelectionModel
/**
* Removes the paths from the selection. If this changes the selection the
* registered TreeSelectionListeners are notified.
- *
+ *
* @param paths the paths to remove
*/
public void removeSelectionPaths(TreePath[] paths)
@@ -639,7 +639,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the first path in the selection. This is especially useful when the
* selectionMode is {@link #SINGLE_TREE_SELECTION}.
- *
+ *
* @return the first path in the selection
*/
public TreePath getSelectionPath()
@@ -652,7 +652,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the complete selection.
- *
+ *
* @return the complete selection
*/
public TreePath[] getSelectionPaths()
@@ -662,7 +662,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the number of paths in the selection.
- *
+ *
* @return the number of paths in the selection
*/
public int getSelectionCount()
@@ -675,7 +675,7 @@ public class DefaultTreeSelectionModel
/**
* Checks if a given path is in the selection.
- *
+ *
* @param path the path to check
* @return <code>true</code> if the path is in the selection,
* <code>false</code> otherwise
@@ -695,7 +695,7 @@ public class DefaultTreeSelectionModel
/**
* Checks if the selection is empty.
- *
+ *
* @return <code>true</code> if the selection is empty, <code>false</code>
* otherwise
*/
@@ -729,7 +729,7 @@ public class DefaultTreeSelectionModel
/**
* Adds a <code>TreeSelectionListener</code> object to this model.
- *
+ *
* @param listener the listener to add
*/
public void addTreeSelectionListener(TreeSelectionListener listener)
@@ -739,7 +739,7 @@ public class DefaultTreeSelectionModel
/**
* Removes a <code>TreeSelectionListener</code> object from this model.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeSelectionListener(TreeSelectionListener listener)
@@ -749,7 +749,7 @@ public class DefaultTreeSelectionModel
/**
* Returns all <code>TreeSelectionListener</code> added to this model.
- *
+ *
* @return an array of listeners
* @since 1.4
*/
@@ -760,7 +760,7 @@ public class DefaultTreeSelectionModel
/**
* fireValueChanged
- *
+ *
* @param event the event to fire.
*/
protected void fireValueChanged(TreeSelectionEvent event)
@@ -773,7 +773,7 @@ public class DefaultTreeSelectionModel
/**
* Returns all added listeners of a special type.
- *
+ *
* @param listenerType the listener type
* @return an array of listeners
* @since 1.3
@@ -785,7 +785,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the currently selected rows.
- *
+ *
* @return the currently selected rows
*/
public int[] getSelectionRows()
@@ -802,7 +802,7 @@ public class DefaultTreeSelectionModel
{
if (rows[i] == -1)
invisible++;
-
+
}
// Clean up invisible rows.
if (invisible > 0)
@@ -831,7 +831,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the smallest row index from the selection.
- *
+ *
* @return the smallest row index from the selection
*/
public int getMinSelectionRow()
@@ -841,7 +841,7 @@ public class DefaultTreeSelectionModel
/**
* Returns the largest row index from the selection.
- *
+ *
* @return the largest row index from the selection
*/
public int getMaxSelectionRow()
@@ -851,7 +851,7 @@ public class DefaultTreeSelectionModel
/**
* Checks if a particular row is selected.
- *
+ *
* @param row the index of the row to check
* @return <code>true</code> if the row is in this selection,
* <code>false</code> otherwise
@@ -899,7 +899,7 @@ public class DefaultTreeSelectionModel
/**
* getLeadSelectionRow
- *
+ *
* @return int
*/
public int getLeadSelectionRow()
@@ -909,7 +909,7 @@ public class DefaultTreeSelectionModel
/**
* getLeadSelectionPath
- *
+ *
* @return TreePath
*/
public TreePath getLeadSelectionPath()
@@ -919,7 +919,7 @@ public class DefaultTreeSelectionModel
/**
* Adds a <code>PropertyChangeListener</code> object to this model.
- *
+ *
* @param listener the listener to add.
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
@@ -931,7 +931,7 @@ public class DefaultTreeSelectionModel
/**
* Removes a <code>PropertyChangeListener</code> object from this model.
- *
+ *
* @param listener the listener to remove.
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
@@ -942,7 +942,7 @@ public class DefaultTreeSelectionModel
/**
* Returns all added <code>PropertyChangeListener</code> objects.
- *
+ *
* @return an array of listeners.
* @since 1.4
*/
@@ -1000,12 +1000,12 @@ public class DefaultTreeSelectionModel
&& selection.length > 1)
setSelectionPath(selection[0]);
}
-
+
/**
* Returns <code>true</code> if the paths are contiguous (take subsequent
* rows in the diplayed tree view. The method returns <code>true</code> if
* we have no RowMapper assigned.
- *
+ *
* @param paths the paths to check for continuity
* @return <code>true</code> if the paths are contiguous or we have no
* RowMapper assigned
@@ -1038,7 +1038,7 @@ public class DefaultTreeSelectionModel
selected.set(row);
valid++;
}
-
+
}
}
int max = valid + min;
@@ -1057,7 +1057,7 @@ public class DefaultTreeSelectionModel
* <li>selectionMode is {@link #DISCONTIGUOUS_TREE_SELECTION}</li>
* <li>adding the paths to the selection still results in a contiguous set of
* paths</li>
- *
+ *
* @param paths the paths to check
* @return <code>true</code> if the paths can be added with respect to the
* selectionMode
@@ -1107,11 +1107,11 @@ public class DefaultTreeSelectionModel
return false;
return true;
}
-
+
/**
* Checks if the paths can be removed without breaking the continuity of the
* selection according to selectionMode.
- *
+ *
* @param paths the paths to check
* @return <code>true</code> if the paths can be removed with respect to the
* selectionMode
@@ -1121,20 +1121,20 @@ public class DefaultTreeSelectionModel
if (rowMapper == null || isSelectionEmpty()
|| selectionMode == DISCONTIGUOUS_TREE_SELECTION)
return true;
-
+
HashSet<TreePath> set = new HashSet<TreePath>();
for (int i = 0; i < selection.length; i++)
set.add(selection[i]);
-
+
for (int i = 0; i < paths.length; i++)
set.remove(paths[i]);
-
+
TreePath[] remaining = new TreePath[set.size()];
Iterator<TreePath> iter = set.iterator();
-
+
for (int i = 0; i < remaining.length; i++)
remaining[i] = iter.next();
-
+
return arePathsContiguous(remaining);
}
@@ -1142,12 +1142,12 @@ public class DefaultTreeSelectionModel
* Notify the installed listeners that the given patches have changed. This
* method will call listeners if invoked, but it is not called from the
* implementation of this class.
- *
+ *
* @param vPaths the vector of the changed patches
* @param oldLeadSelection the old selection index
*/
protected void notifyPathChange(Vector<PathPlaceHolder> vPaths,
- TreePath oldLeadSelection)
+ TreePath oldLeadSelection)
{
int numChangedPaths = vPaths.size();
diff --git a/javax/swing/tree/ExpandVetoException.java b/javax/swing/tree/ExpandVetoException.java
index 57531d542..fd6330cf7 100644
--- a/javax/swing/tree/ExpandVetoException.java
+++ b/javax/swing/tree/ExpandVetoException.java
@@ -43,7 +43,7 @@ import javax.swing.event.TreeExpansionEvent;
* ExpandVetoException
* @author Andrew Selkirk
*/
-public class ExpandVetoException extends Exception
+public class ExpandVetoException extends Exception
{
/**
@@ -56,21 +56,21 @@ public class ExpandVetoException extends Exception
* Constructor ExpandVetoException
* @param event Tree Expansion Event
*/
- public ExpandVetoException(TreeExpansionEvent event)
+ public ExpandVetoException(TreeExpansionEvent event)
{
super();
this.event = event;
- }
+ }
/**
* Constructor ExpandVetoException
* @param event Tree Expansion Event
* @param message Message
*/
- public ExpandVetoException(TreeExpansionEvent event, String message)
+ public ExpandVetoException(TreeExpansionEvent event, String message)
{
super(message);
this.event = event;
- }
+ }
-}
+}
diff --git a/javax/swing/tree/FixedHeightLayoutCache.java b/javax/swing/tree/FixedHeightLayoutCache.java
index 89f05d31c..6ff2e3595 100644
--- a/javax/swing/tree/FixedHeightLayoutCache.java
+++ b/javax/swing/tree/FixedHeightLayoutCache.java
@@ -55,13 +55,13 @@ import javax.swing.event.TreeModelEvent;
* have the same fixed height. This may be not the case, for instance, if leaves
* and branches have different height, of if the tree rows may have arbitrary
* variable height. This class will also work if the NodeDimensions are not
- * set.
- *
+ * set.
+ *
* @author Audrius Meskauskas
- * @author Andrew Selkirk
+ * @author Andrew Selkirk
*/
public class FixedHeightLayoutCache
- extends VariableHeightLayoutCache
+ extends VariableHeightLayoutCache
{
/**
* The cached node record.
@@ -74,47 +74,47 @@ public class FixedHeightLayoutCache
depth = aDepth;
parent = aParent;
node = aNode;
-
- isExpanded = expanded.contains(aNode);
+
+ isExpanded = expanded.contains(aNode);
}
-
+
/**
* The row, where the tree node is displayed.
*/
- final int row;
-
+ final int row;
+
/**
* The nesting depth
*/
final int depth;
-
+
/**
* The parent of the given node, null for the root node.
*/
final Object parent;
-
+
/**
* This node.
*/
final Object node;
-
+
/**
* True for the expanded nodes. The value is calculated in constructor.
* Using this field saves one hashtable access operation.
*/
final boolean isExpanded;
-
+
/**
* The cached bounds of the tree row.
*/
Rectangle bounds;
-
+
/**
* The path from the tree top to the given node (computed under first
* demand)
*/
private TreePath path;
-
+
/**
* Get the path for this node. The derived class is returned,
* making check for the last child of some parent easier.
@@ -155,7 +155,7 @@ public class FixedHeightLayoutCache
}
return path;
}
-
+
/**
* Get the rectangle bounds (compute, if required).
*/
@@ -164,37 +164,37 @@ public class FixedHeightLayoutCache
// This method may be called in the context when the tree rectangle is
// not known. To work around this, it is assumed near infinitely large.
if (bounds == null)
- bounds = getNodeDimensions(node, row, depth, isExpanded,
+ bounds = getNodeDimensions(node, row, depth, isExpanded,
new Rectangle());
- return bounds;
+ return bounds;
}
}
-
+
/**
* The set of all expanded tree nodes.
*/
Set<Object> expanded = new HashSet<Object>();
-
+
/**
* Maps nodes to the row numbers.
*/
Hashtable<Object,NodeRecord> nodes = new Hashtable<Object,NodeRecord>();
-
+
/**
* Maps row numbers to nodes.
*/
Hashtable<Integer,Object> row2node = new Hashtable<Integer,Object>();
-
+
/**
* If true, the row map must be recomputed before using.
*/
boolean dirty;
-
+
/**
* The cumulative height of all rows.
*/
int totalHeight;
-
+
/**
* The maximal width.
*/
@@ -208,21 +208,21 @@ public class FixedHeightLayoutCache
public FixedHeightLayoutCache()
{
// Nothing to do here.
- }
+ }
/**
* Get the total number of rows in the tree. Every displayed node occupies the
* single row. The root node row is included if the root node is set as
* visible (false by default).
- *
+ *
* @return int the number of the displayed rows.
*/
public int getRowCount()
{
if (dirty) update();
return row2node.size();
- }
-
+ }
+
/**
* Refresh the row map.
*/
@@ -230,7 +230,7 @@ public class FixedHeightLayoutCache
{
nodes.clear();
row2node.clear();
-
+
totalHeight = maximalWidth = 0;
Object root = treeModel.getRoot();
@@ -250,7 +250,7 @@ public class FixedHeightLayoutCache
}
dirty = false;
}
-
+
/**
* Recursively counts all rows in the tree.
*/
@@ -258,10 +258,10 @@ public class FixedHeightLayoutCache
{
Integer n = new Integer(row2node.size());
row2node.put(n, node);
-
+
NodeRecord nr = new NodeRecord(n.intValue(), depth, node, parent);
nodes.put(node, nr);
-
+
// For expanded nodes and for the root node.
if (expanded.contains(node))
{
@@ -277,7 +277,7 @@ public class FixedHeightLayoutCache
/**
* Discard the bound information for the given path.
- *
+ *
* @param path the path, for that the bound information must be recomputed.
*/
public void invalidatePathBounds(TreePath path)
@@ -285,7 +285,7 @@ public class FixedHeightLayoutCache
NodeRecord r = (NodeRecord) nodes.get(path.getLastPathComponent());
if (r != null)
r.bounds = null;
- }
+ }
/**
* Mark all cached information as invalid.
@@ -293,11 +293,11 @@ public class FixedHeightLayoutCache
public void invalidateSizes()
{
dirty = true;
- }
+ }
/**
* Set the expanded state of the given path. The expansion states must be
- * always updated when expanding and colapsing the tree nodes. Otherwise
+ * always updated when expanding and colapsing the tree nodes. Otherwise
* other methods will not work correctly after the nodes are collapsed or
* expanded.
*
@@ -310,23 +310,23 @@ public class FixedHeightLayoutCache
expanded.add(path.getLastPathComponent());
else
expanded.remove(path.getLastPathComponent());
-
+
dirty = true;
}
-
+
/**
* Get the expanded state for the given tree path.
- *
+ *
* @return true if the given path is expanded, false otherwise.
*/
public boolean isExpanded(TreePath path)
{
return expanded.contains(path.getLastPathComponent());
- }
+ }
/**
* Get bounds for the given tree path.
- *
+ *
* @param path the tree path
* @param rect the rectangle that will be reused to return the result.
* @return Rectangle the bounds of the last line, defined by the given path.
@@ -356,11 +356,11 @@ public class FixedHeightLayoutCache
rect.setRect(r.bounds);
}
return rect;
- }
+ }
/**
* Get the path, the last element of that is displayed in the given row.
- *
+ *
* @param row the row
* @return TreePath the path
*/
@@ -376,11 +376,11 @@ public class FixedHeightLayoutCache
NodeRecord r = nodes.get(last);
return r.getPath();
}
- }
+ }
/**
* Get the row, displaying the last node of the given path.
- *
+ *
* @param path the path
* @return int the row number or -1 if the end of the path is not visible.
*/
@@ -388,7 +388,7 @@ public class FixedHeightLayoutCache
{
if (path == null)
return -1;
-
+
if (dirty) update();
NodeRecord r = nodes.get(path.getLastPathComponent());
@@ -396,11 +396,11 @@ public class FixedHeightLayoutCache
return - 1;
else
return r.row;
- }
+ }
/**
* Get the path, closest to the given point.
- *
+ *
* @param x the point x coordinate
* @param y the point y coordinate
* @return the tree path, closest to the the given point
@@ -414,7 +414,7 @@ public class FixedHeightLayoutCache
NodeRecord best = null;
NodeRecord r;
Enumeration<NodeRecord> en = nodes.elements();
-
+
int dist = Integer.MAX_VALUE;
while (en.hasMoreElements() && dist > 0)
@@ -440,8 +440,8 @@ public class FixedHeightLayoutCache
return null;
else
return best.getPath();
- }
-
+ }
+
/**
* Get the closest distance from this point till the given rectangle. Only
* vertical distance is taken into consideration.
@@ -461,22 +461,22 @@ public class FixedHeightLayoutCache
* is not expanded, 0 is returned. Otherwise, the number of children is
* obtained from the model as the number of children for the last path
* component.
- *
+ *
* @param path the tree path
* @return int the number of the visible childs (for row).
*/
- public int getVisibleChildCount(TreePath path)
+ public int getVisibleChildCount(TreePath path)
{
if (isExpanded(path))
- return 0;
+ return 0;
else
return treeModel.getChildCount(path.getLastPathComponent());
- }
+ }
/**
* Get the enumeration over all visible paths that start from the given
* parent path.
- *
+ *
* @param parentPath the parent path
* @return the enumeration over pathes
*/
@@ -500,9 +500,9 @@ public class FixedHeightLayoutCache
/**
* Return the expansion state of the given tree path. The expansion state
- * must be previously set with the
+ * must be previously set with the
* {@link #setExpandedState(TreePath, boolean)}
- *
+ *
* @param path the path being checked
* @return true if the last node of the path is expanded, false otherwise.
*/
@@ -513,44 +513,44 @@ public class FixedHeightLayoutCache
/**
* The listener method, called when the tree nodes are changed.
- *
+ *
* @param event the change event
*/
public void treeNodesChanged(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
* The listener method, called when the tree nodes are inserted.
- *
+ *
* @param event the change event
*/
public void treeNodesInserted(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
* The listener method, called when the tree nodes are removed.
- *
+ *
* @param event the change event
*/
public void treeNodesRemoved(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
- * Called when the tree structure has been changed.
- *
+ * Called when the tree structure has been changed.
+ *
* @param event the change event
*/
public void treeStructureChanged(TreeModelEvent event)
{
dirty = true;
- }
-
+ }
+
/**
* Set the tree model that will provide the data.
*/
@@ -561,11 +561,11 @@ public class FixedHeightLayoutCache
expanded.add(treeModel.getRoot());
dirty = true;
}
-
+
/**
* Inform the instance if the tree root node is visible. If this method
* is not called, it is assumed that the tree root node is not visible.
- *
+ *
* @param visible true if the tree root node is visible, false
* otherwise.
*/
@@ -600,7 +600,7 @@ public class FixedHeightLayoutCache
{
if (dirty)
update();
-
+
maximalWidth = 0;
Enumeration<NodeRecord> en = nodes.elements();
while (en.hasMoreElements())
@@ -612,17 +612,17 @@ public class FixedHeightLayoutCache
}
return maximalWidth;
}
-
+
/**
* Returns true if this layout supposes that all rows have the fixed
* height.
- *
+ *
* @return boolean true if all rows in the tree must have the fixed
* height (true by default).
*/
protected boolean isFixedRowHeight()
{
- return true;
+ return true;
}
-
+
}
diff --git a/javax/swing/tree/MutableTreeNode.java b/javax/swing/tree/MutableTreeNode.java
index 9f0ff4ded..4a0f4b69f 100644
--- a/javax/swing/tree/MutableTreeNode.java
+++ b/javax/swing/tree/MutableTreeNode.java
@@ -39,7 +39,7 @@ package javax.swing.tree;
/**
* MutableTreeNode public interface
-
+
* @author Andrew Selkirk
*/
public interface MutableTreeNode extends TreeNode
@@ -79,7 +79,7 @@ public interface MutableTreeNode extends TreeNode
void remove(MutableTreeNode node);
/**
- * Sets a user object, the data represented by the node.
+ * Sets a user object, the data represented by the node.
*
* @param object the data
*/
diff --git a/javax/swing/tree/RowMapper.java b/javax/swing/tree/RowMapper.java
index 59eb1e3a9..d62b703c6 100644
--- a/javax/swing/tree/RowMapper.java
+++ b/javax/swing/tree/RowMapper.java
@@ -41,7 +41,7 @@ package javax.swing.tree;
* RowMapper public interface
* @author Andrew Selkirk
*/
-public interface RowMapper
+public interface RowMapper
{
/**
@@ -51,4 +51,4 @@ public interface RowMapper
*/
int[] getRowsForPaths(TreePath[] path);
-} \ No newline at end of file
+}
diff --git a/javax/swing/tree/TreeCellEditor.java b/javax/swing/tree/TreeCellEditor.java
index 8951f3137..614f98df8 100644
--- a/javax/swing/tree/TreeCellEditor.java
+++ b/javax/swing/tree/TreeCellEditor.java
@@ -46,26 +46,26 @@ import javax.swing.JTree;
/**
* A <code>TreeCellEditor</code> is used by the {@link JTree} component to
* edit individual tree elements (nodes).
- *
+ *
* @author Andrew Selkirk
*/
public interface TreeCellEditor extends CellEditor
{
/**
- * Returns a component that has been configured to edit one element (or
+ * Returns a component that has been configured to edit one element (or
* node) in a {@link JTree} component. The arguments to this method are used
* to pass in the value and state of the element to be edited.
- *
+ *
* @param tree the tree.
* @param value the value to render.
* @param isSelected is the tree element selected?
* @param expanded is the tree element expanded?
* @param leaf is the tree element a leaf node?
* @param row the row index.
- *
+ *
* @return A component that is configured for editing the tree element.
*/
Component getTreeCellEditorComponent(JTree tree, Object value,
- boolean isSelected, boolean expanded,
- boolean leaf, int row);
+ boolean isSelected, boolean expanded,
+ boolean leaf, int row);
}
diff --git a/javax/swing/tree/TreeCellRenderer.java b/javax/swing/tree/TreeCellRenderer.java
index b7eeb9c6c..fdfc0a116 100644
--- a/javax/swing/tree/TreeCellRenderer.java
+++ b/javax/swing/tree/TreeCellRenderer.java
@@ -45,16 +45,16 @@ import javax.swing.JTree;
/**
* A <code>TreeCellRenderer</code> is used by the {@link JTree} component to
* paint individual tree elements (nodes).
- *
+ *
* @author Andrew Selkirk
*/
public interface TreeCellRenderer
{
/**
- * Returns a component that has been configured to display one element (or
+ * Returns a component that has been configured to display one element (or
* node) in a {@link JTree} component. The arguments to this method are used
* to pass in the value and state of the element to be rendered.
- *
+ *
* @param tree the tree.
* @param value the value to render.
* @param selected is the tree element selected?
@@ -62,7 +62,7 @@ public interface TreeCellRenderer
* @param leaf is the tree element a leaf node?
* @param row the row index.
* @param hasFocus does the tree element have the focus?
- *
+ *
* @return A component that is configured for rendering the tree element.
*/
Component getTreeCellRendererComponent(JTree tree, Object value,
diff --git a/javax/swing/tree/TreeNode.java b/javax/swing/tree/TreeNode.java
index 53d52f0a7..b68b498a7 100644
--- a/javax/swing/tree/TreeNode.java
+++ b/javax/swing/tree/TreeNode.java
@@ -42,16 +42,16 @@ import java.util.Enumeration;
/**
* A tree node.
- *
+ *
* @author Andrew Selkirk
*/
-public interface TreeNode
+public interface TreeNode
{
/**
* Returns the parent node for this tree node, or <code>null</code> if this
* node has no parent.
- *
+ *
* @return The parent node (possibly <code>null</code>).
*/
TreeNode getParent();
@@ -59,56 +59,55 @@ public interface TreeNode
/**
* Returns the index of the specified child node, or -1 if the node is not
* in fact a child of this node.
- *
+ *
* @param node the node (<code>null</code> not permitted).
- *
+ *
* @return The index of the specified child node, or -1.
- *
+ *
* @throws IllegalArgumentException if <code>node</code> is <code>null</code>.
*/
int getIndex(TreeNode node);
/**
* Returns the child node at the given index.
- *
- * @param index the index (in the range <code>0</code> to
+ *
+ * @param index the index (in the range <code>0</code> to
* <code>getChildCount() - 1</code>).
- *
+ *
* @return The child node at the given index.
*/
TreeNode getChildAt(int index);
/**
* Returns the number of children for this node.
- *
+ *
* @return The number of children for this node.
*/
int getChildCount();
/**
- * Returns <code>true</code> if this node allows children, and
+ * Returns <code>true</code> if this node allows children, and
* <code>false</code> otherwise.
- *
+ *
* @return A boolean.
*/
boolean getAllowsChildren();
/**
- * Returns <code>true</code> if this node is a leaf node, and
+ * Returns <code>true</code> if this node is a leaf node, and
* <code>false</code> otherwise.
- *
+ *
* @return A boolean.
*/
boolean isLeaf();
/**
- * Returns an enumeration of the children of this node, or an empty
+ * Returns an enumeration of the children of this node, or an empty
* enumeration if this node has no children.
- *
+ *
* @return An enumeration of the children of this node.
*/
@SuppressWarnings("unchecked") // Required for API compatibility
Enumeration children();
-}
-
+}
diff --git a/javax/swing/tree/TreePath.java b/javax/swing/tree/TreePath.java
index 1c4d78787..764970696 100644
--- a/javax/swing/tree/TreePath.java
+++ b/javax/swing/tree/TreePath.java
@@ -45,7 +45,7 @@ import java.util.Arrays;
* A <code>TreePath</code> represents a sequence of tree elements that form
* a path starting from the root of a tree. A tree element can be represented
* by any {@link Object}.
- *
+ *
* @author Andrew Selkirk
*/
public class TreePath implements Serializable
@@ -57,7 +57,7 @@ public class TreePath implements Serializable
* assumes that the TreePath is immutable, so it is marked final here.
*/
private final Object[] path;
-
+
/**
* The parent path (to be reused).
*/
@@ -68,9 +68,9 @@ public class TreePath implements Serializable
* Creates a path from the list of objects representing tree elements. The
* incoming array is copied so that subsequent changes do not affect this
* tree path.
- *
+ *
* @param path the elements in the path (<code>null</code> not permitted).
- *
+ *
* @throws IllegalArgumentException if <code>path</code> is <code>null</code>.
*/
public TreePath(Object[] path)
@@ -83,10 +83,10 @@ public class TreePath implements Serializable
/**
* Creates a new path from a single element.
- *
+ *
* @param element the element (<code>null</code> not permitted).
- *
- * @throws IllegalArgumentException if <code>element</code> is
+ *
+ * @throws IllegalArgumentException if <code>element</code> is
* <code>null</code>.
*/
public TreePath(Object element)
@@ -98,7 +98,7 @@ public class TreePath implements Serializable
/**
* Creates a new tree path by adding the specified <code>element</code> to
* the <code>path</code>.
- *
+ *
* @param path a tree path.
* @param element a path element.
*/
@@ -117,7 +117,7 @@ public class TreePath implements Serializable
/**
* Creates a new tree path using the first <code>length</code> elements
* from the given array.
- *
+ *
* @param path the path elements.
* @param length the path length.
*/
@@ -139,7 +139,7 @@ public class TreePath implements Serializable
/**
* Returns a hashcode for the path.
- *
+ *
* @return A hashcode.
*/
public int hashCode()
@@ -148,7 +148,7 @@ public class TreePath implements Serializable
}
/**
- * Tests this path for equality with an arbitrary object. An object is
+ * Tests this path for equality with an arbitrary object. An object is
* considered equal to this path if and only if:
* <ul>
* <li>the object is not <code>null</code>;</li>
@@ -156,9 +156,9 @@ public class TreePath implements Serializable
* <li>the object contains the same elements in the same order as this
* {@link TreePath};</li>
* </ul>
- *
+ *
* @param object the object (<code>null</code> permitted).
- *
+ *
* @return <code>true</code> if <code>obj</code> is equal to this tree path,
* and <code>false</code> otherwise.
*/
@@ -188,7 +188,7 @@ public class TreePath implements Serializable
/**
* Returns a string representation of this path.
- *
+ *
* @return A string representation of this path.
*/
public String toString()
@@ -201,7 +201,7 @@ public class TreePath implements Serializable
/**
* Returns an array containing the path elements.
- *
+ *
* @return An array containing the path elements.
*/
public Object[] getPath()
@@ -211,7 +211,7 @@ public class TreePath implements Serializable
/**
* Returns the last object in the path.
- *
+ *
* @return The last object in the path.
*/
public Object getLastPathComponent()
@@ -221,7 +221,7 @@ public class TreePath implements Serializable
/**
* Returns the number of elements in the path.
- *
+ *
* @return The number of elements in the path.
*/
public int getPathCount()
@@ -231,29 +231,29 @@ public class TreePath implements Serializable
/**
* Returns the element at the specified position in the path.
- *
- * @param position the element position (<code>0 &lt N - 1</code>, where
+ *
+ * @param position the element position (<code>0 &lt N - 1</code>, where
* <code>N</code> is the number of elements in the path).
- *
+ *
* @return The element at the specified position.
- *
+ *
* @throws IllegalArgumentException if <code>position</code> is outside the
* valid range.
*/
public Object getPathComponent(int position)
{
- if (position < 0 || position >= getPathCount())
+ if (position < 0 || position >= getPathCount())
throw new IllegalArgumentException("Invalid position: " + position);
return path[position];
}
/**
* Returns <code>true</code> if <code>path</code> is a descendant of this
- * path, and <code>false</code> otherwise. If <code>path</code> is
+ * path, and <code>false</code> otherwise. If <code>path</code> is
* <code>null</code>, this method returns <code>false</code>.
- *
+ *
* @param path the path to check (<code>null</code> permitted).
- *
+ *
* @return <code>true</code> if <code>path</code> is a descendant of this
* path, and <code>false</code> otherwise
*/
@@ -270,16 +270,16 @@ public class TreePath implements Serializable
otherPathLength--;
path = path.getParentPath();
}
-
+
return equals(path);
}
/**
* Creates a new path that is equivalent to this path plus the specified
* element.
- *
+ *
* @param element the element.
- *
+ *
* @return A tree path.
*/
public TreePath pathByAddingChild(Object element)
@@ -291,7 +291,7 @@ public class TreePath implements Serializable
* Returns the parent path, which is a path containing all the same elements
* as this path, except for the last one. If this path contains only one
* element, the method returns <code>null</code>.
- *
+ *
* @return The parent path, or <code>null</code> if this path has only one
* element.
*/
@@ -301,12 +301,12 @@ public class TreePath implements Serializable
// is what the JDK does.
if (path.length <= 1)
return null;
-
+
// Reuse the parent path, if possible. The parent path is requested
// during the tree repainting, so reusing generates a lot less garbage.
if (parentPath == null)
parentPath = new TreePath(this.getPath(), path.length - 1);
-
+
return parentPath;
}
}
diff --git a/javax/swing/tree/TreeSelectionModel.java b/javax/swing/tree/TreeSelectionModel.java
index 9bdc99be3..f2ba02a17 100644
--- a/javax/swing/tree/TreeSelectionModel.java
+++ b/javax/swing/tree/TreeSelectionModel.java
@@ -46,7 +46,7 @@ import javax.swing.event.TreeSelectionListener;
* TreeSelectionModel public interface
* @author Andrew Selkirk
*/
-public interface TreeSelectionModel
+public interface TreeSelectionModel
{
int SINGLE_TREE_SELECTION = 1;
diff --git a/javax/swing/tree/VariableHeightLayoutCache.java b/javax/swing/tree/VariableHeightLayoutCache.java
index aac68692e..0887061b3 100644
--- a/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/javax/swing/tree/VariableHeightLayoutCache.java
@@ -53,11 +53,11 @@ import javax.swing.event.TreeModelEvent;
/**
* The fixed height tree layout. This class requires the NodeDimensions to be
* set and ignores the row height property.
- *
+ *
* @specnote the methods, of this class, returning TreePath, actually returns
* the derived class GnuPath that provides additional information for optimized
* painting. See the GnuPath code for details.
- *
+ *
* @author Audrius Meskauskas
*/
public class VariableHeightLayoutCache
@@ -80,27 +80,27 @@ public class VariableHeightLayoutCache
isExpanded = expanded.contains(aNode);
bounds = new Rectangle(0, -1, 0, 0);
}
-
+
/**
* The row, where the tree node is displayed.
*/
- final int row;
-
+ final int row;
+
/**
* The nesting depth
*/
final int depth;
-
+
/**
* The parent of the given node, null for the root node.
*/
final Object parent;
-
+
/**
* This node.
*/
final Object node;
-
+
/**
* True for the expanded nodes. The value is calculated in constructor.
* Using this field saves one hashtable access operation.
@@ -111,13 +111,13 @@ public class VariableHeightLayoutCache
* The cached bounds of the tree row.
*/
Rectangle bounds;
-
+
/**
* The path from the tree top to the given node (computed under first
* demand)
*/
private TreePath path;
-
+
/**
* Get the path for this node. The derived class is returned, making check
* for the last child of some parent easier.
@@ -158,41 +158,41 @@ public class VariableHeightLayoutCache
}
return path;
}
-
+
/**
* Get the rectangle bounds (compute, if required).
*/
Rectangle getBounds()
{
- return bounds;
+ return bounds;
}
}
-
+
/**
* The set of all expanded tree nodes.
*/
Set<Object> expanded = new HashSet<Object>();
-
+
/**
* Maps nodes to the row numbers.
*/
Hashtable<Object,NodeRecord> nodes = new Hashtable<Object,NodeRecord>();
-
+
/**
* Maps row numbers to nodes.
*/
ArrayList<Object> row2node = new ArrayList<Object>();
-
+
/**
* If true, the row map must be recomputed before using.
*/
boolean dirty;
-
+
/**
* The cumulative height of all rows.
*/
int totalHeight;
-
+
/**
* The maximal width.
*/
@@ -206,21 +206,21 @@ public class VariableHeightLayoutCache
public VariableHeightLayoutCache()
{
// Nothing to do here.
- }
+ }
/**
* Get the total number of rows in the tree. Every displayed node occupies the
* single row. The root node row is included if the root node is set as
* visible (false by default).
- *
+ *
* @return int the number of the displayed rows.
*/
public int getRowCount()
{
if (dirty) update();
return row2node.size();
- }
-
+ }
+
/**
* Refresh the row map.
*/
@@ -228,7 +228,7 @@ public class VariableHeightLayoutCache
{
nodes.clear();
row2node.clear();
-
+
totalHeight = maximalWidth = 0;
if (treeModel == null)
@@ -238,7 +238,7 @@ public class VariableHeightLayoutCache
countRows(root, null, 0, 0);
dirty = false;
}
-
+
/**
* Recursively counts all rows in the tree.
*/
@@ -287,7 +287,7 @@ public class VariableHeightLayoutCache
/**
* Discard the bound information for the given path.
- *
+ *
* @param path the path, for that the bound information must be recomputed.
*/
public void invalidatePathBounds(TreePath path)
@@ -295,7 +295,7 @@ public class VariableHeightLayoutCache
NodeRecord r = nodes.get(path.getLastPathComponent());
if (r != null)
r.bounds = null;
- }
+ }
/**
* Mark all cached information as invalid.
@@ -303,11 +303,11 @@ public class VariableHeightLayoutCache
public void invalidateSizes()
{
dirty = true;
- }
+ }
/**
* Set the expanded state of the given path. The expansion states must be
- * always updated when expanding and colapsing the tree nodes. Otherwise
+ * always updated when expanding and colapsing the tree nodes. Otherwise
* other methods will not work correctly after the nodes are collapsed or
* expanded.
*
@@ -327,20 +327,20 @@ public class VariableHeightLayoutCache
dirty = true;
}
-
+
/**
* Get the expanded state for the given tree path.
- *
+ *
* @return true if the given path is expanded, false otherwise.
*/
public boolean isExpanded(TreePath path)
{
return expanded.contains(path.getLastPathComponent());
- }
+ }
/**
* Get bounds for the given tree path.
- *
+ *
* @param path the tree path
* @param rect the rectangle that will be reused to return the result.
* @return Rectangle the bounds of the last line, defined by the given path.
@@ -366,11 +366,11 @@ public class VariableHeightLayoutCache
result.setBounds(r.bounds);
}
return result;
- }
+ }
/**
* Get the path, the last element of that is displayed in the given row.
- *
+ *
* @param row the row
* @return TreePath the path
*/
@@ -389,11 +389,11 @@ public class VariableHeightLayoutCache
path = record.getPath();
}
return path;
- }
+ }
/**
* Get the row, displaying the last node of the given path.
- *
+ *
* @param path the path
* @return int the row number or -1 if the end of the path is not visible.
*/
@@ -410,11 +410,11 @@ public class VariableHeightLayoutCache
return - 1;
else
return r.row;
- }
+ }
/**
* Get the path, closest to the given point.
- *
+ *
* @param x the point x coordinate
* @param y the point y coordinate
* @return the tree path, closest to the the given point
@@ -428,7 +428,7 @@ public class VariableHeightLayoutCache
NodeRecord best = null;
NodeRecord r;
Enumeration<NodeRecord> en = nodes.elements();
-
+
int dist = Integer.MAX_VALUE;
while (en.hasMoreElements() && dist > 0)
@@ -454,8 +454,8 @@ public class VariableHeightLayoutCache
return null;
else
return best.getPath();
- }
-
+ }
+
/**
* Get the closest distance from this point till the given rectangle. Only
* vertical distance is taken into consideration.
@@ -475,22 +475,22 @@ public class VariableHeightLayoutCache
* is not expanded, 0 is returned. Otherwise, the number of children is
* obtained from the model as the number of children for the last path
* component.
- *
+ *
* @param path the tree path
* @return int the number of the visible childs (for row).
*/
- public int getVisibleChildCount(TreePath path)
+ public int getVisibleChildCount(TreePath path)
{
if (! isExpanded(path) || treeModel == null)
- return 0;
+ return 0;
else
return treeModel.getChildCount(path.getLastPathComponent());
- }
+ }
/**
* Get the enumeration over all visible paths that start from the given
* parent path.
- *
+ *
* @param parentPath the parent path
* @return the enumeration over pathes
*/
@@ -514,9 +514,9 @@ public class VariableHeightLayoutCache
/**
* Return the expansion state of the given tree path. The expansion state
- * must be previously set with the
+ * must be previously set with the
* {@link #setExpandedState(TreePath, boolean)}
- *
+ *
* @param path the path being checked
* @return true if the last node of the path is expanded, false otherwise.
*/
@@ -527,44 +527,44 @@ public class VariableHeightLayoutCache
/**
* The listener method, called when the tree nodes are changed.
- *
+ *
* @param event the change event
*/
public void treeNodesChanged(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
* The listener method, called when the tree nodes are inserted.
- *
+ *
* @param event the change event
*/
public void treeNodesInserted(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
* The listener method, called when the tree nodes are removed.
- *
+ *
* @param event the change event
*/
public void treeNodesRemoved(TreeModelEvent event)
{
dirty = true;
- }
+ }
/**
- * Called when the tree structure has been changed.
- *
+ * Called when the tree structure has been changed.
+ *
* @param event the change event
*/
public void treeStructureChanged(TreeModelEvent event)
{
dirty = true;
- }
-
+ }
+
/**
* Set the tree model that will provide the data.
*/
@@ -578,11 +578,11 @@ public class VariableHeightLayoutCache
expanded.add(treeModel.getRoot());
}
}
-
+
/**
* Inform the instance if the tree root node is visible. If this method
* is not called, it is assumed that the tree root node is not visible.
- *
+ *
* @param visible true if the tree root node is visible, false
* otherwise.
*/
@@ -616,7 +616,7 @@ public class VariableHeightLayoutCache
{
if (dirty)
update();
-
+
maximalWidth = 0;
Enumeration<NodeRecord> en = nodes.elements();
while (en.hasMoreElements())
diff --git a/javax/swing/undo/AbstractUndoableEdit.java b/javax/swing/undo/AbstractUndoableEdit.java
index 34c41aea2..fc586604a 100644
--- a/javax/swing/undo/AbstractUndoableEdit.java
+++ b/javax/swing/undo/AbstractUndoableEdit.java
@@ -130,8 +130,8 @@ public class AbstractUndoableEdit
throw new CannotUndoException();
hasBeenDone = false;
}
-
-
+
+
/**
* Determines whether it would be possible to undo this editing
* action.
@@ -146,8 +146,8 @@ public class AbstractUndoableEdit
{
return alive && hasBeenDone;
}
-
-
+
+
/**
* Redoes this editing action.
*
@@ -165,8 +165,8 @@ public class AbstractUndoableEdit
throw new CannotRedoException();
hasBeenDone = true;
}
-
-
+
+
/**
* Determines whether it would be possible to redo this editing
* action.
@@ -208,8 +208,8 @@ public class AbstractUndoableEdit
{
return false;
}
-
-
+
+
/**
* Incorporates another editing action into this one, thus forming a
* combined action that replaces the argument action.
@@ -223,8 +223,8 @@ public class AbstractUndoableEdit
{
return false;
}
-
-
+
+
/**
* Determines whether this editing action is significant enough for
* being seperately undoable by the user. A typical significant
@@ -242,8 +242,8 @@ public class AbstractUndoableEdit
{
return true;
}
-
-
+
+
/**
* Returns a human-readable, localized name that describes this
* editing action and can be displayed to the user.
diff --git a/javax/swing/undo/CompoundEdit.java b/javax/swing/undo/CompoundEdit.java
index fbff2a264..64e51740d 100644
--- a/javax/swing/undo/CompoundEdit.java
+++ b/javax/swing/undo/CompoundEdit.java
@@ -82,7 +82,7 @@ public class CompoundEdit
* Indicates whether the creation of this CompoundEdit is still in
* progress. Initially, the value of this flag is
* <code>true</code>. The {@link #end()} method changes the flag to
- * <code>false</code>.
+ * <code>false</code>.
*/
private boolean inProgress;
@@ -95,7 +95,7 @@ public class CompoundEdit
edits = new Vector<UndoableEdit>();
inProgress = true;
}
-
+
/**
* Undoes all edits that are part of of this
@@ -146,7 +146,7 @@ public class CompoundEdit
edits.elementAt(i).redo();
}
-
+
/**
* Returns the the <code>UndoableEdit</code> that was last added to
* this compound.
@@ -191,7 +191,7 @@ public class CompoundEdit
* UndoableEdit#replaceEdit(UndoableEdit) replace} the last added
* edit. If this fails as well, <code>edit</code> gets added as a
* new compound to {@link #edits}.
- *
+ *
* @param edit the editing action being added.
*
* @return <code>true</code> if <code>edit</code> could somehow be
@@ -321,7 +321,7 @@ public class CompoundEdit
return false;
}
-
+
/**
* Returns a human-readable, localized name that describes this
@@ -386,8 +386,8 @@ public class CompoundEdit
else
return last.getRedoPresentationName();
}
-
-
+
+
/**
* Calculates a string that may be useful for debugging.
*/
diff --git a/javax/swing/undo/StateEdit.java b/javax/swing/undo/StateEdit.java
index a032d02cd..819d052c5 100644
--- a/javax/swing/undo/StateEdit.java
+++ b/javax/swing/undo/StateEdit.java
@@ -251,15 +251,15 @@ public class StateEdit
Iterator<Object> i = preState.keySet().iterator();
while (i.hasNext())
{
- Object key = i.next();
- if (postState.containsKey(key))
- {
- if (preState.get(key).equals(postState.get(key)))
- {
- i.remove();
- postState.remove(key);
- }
- }
+ Object key = i.next();
+ if (postState.containsKey(key))
+ {
+ if (preState.get(key).equals(postState.get(key)))
+ {
+ i.remove();
+ postState.remove(key);
+ }
+ }
}
}
}
diff --git a/javax/swing/undo/UndoManager.java b/javax/swing/undo/UndoManager.java
index 1f47d5170..9b10cc575 100644
--- a/javax/swing/undo/UndoManager.java
+++ b/javax/swing/undo/UndoManager.java
@@ -356,7 +356,7 @@ public class UndoManager
}
}
-
+
/**
* Undoes or redoes the last action. If the last action has already
* been undone, it will be re-done, and vice versa.
@@ -598,8 +598,8 @@ public class UndoManager
else
return edit.getRedoPresentationName();
}
-
-
+
+
/**
* Registers the edit action of an {@link UndoableEditEvent}
* with this UndoManager.
diff --git a/javax/swing/undo/UndoableEdit.java b/javax/swing/undo/UndoableEdit.java
index 9938af751..1a08ecaa5 100644
--- a/javax/swing/undo/UndoableEdit.java
+++ b/javax/swing/undo/UndoableEdit.java
@@ -39,10 +39,10 @@ package javax.swing.undo;
/**
* An editing operation that supports undo/redoability.
- *
+ *
* @author Andrew Selkirk
*/
-public interface UndoableEdit
+public interface UndoableEdit
{
/**
@@ -50,8 +50,8 @@ public interface UndoableEdit
* combined action.
*
* @param edit the editing action to be incorporated.
- *
- * @return <code>true</code> if the edit was combined successfully, and
+ *
+ * @return <code>true</code> if the edit was combined successfully, and
* <code>false</code> if it could not be combined.
*/
boolean addEdit(UndoableEdit edit);
@@ -98,14 +98,14 @@ public interface UndoableEdit
/**
* Returns the redo presentation name.
- *
+ *
* @return The redo presentation name.
*/
String getRedoPresentationName();
/**
* Returns the undo presentation name.
- *
+ *
* @return The undo presentation name.
*/
String getUndoPresentationName();
@@ -138,8 +138,8 @@ public interface UndoableEdit
* combined action that replaces the argument action.
*
* @param edit the editing action to be replaced.
- *
- * @return <code>true</code> if the edit is successfully replaced, and
+ *
+ * @return <code>true</code> if the edit is successfully replaced, and
* <code>false</code> otherwise.
*/
boolean replaceEdit(UndoableEdit edit);
diff --git a/javax/tools/FileObject.java b/javax/tools/FileObject.java
index a1d65c642..e04c056c7 100644
--- a/javax/tools/FileObject.java
+++ b/javax/tools/FileObject.java
@@ -116,7 +116,7 @@ public interface FileObject
* that cannot be decoded will be replaced by the default replacement
* character. A diagnostic may be reported, unless
* <code>ignoreEncodingErrors</code> is <code>true</code>.
- *
+ *
* @param ignoreEncodingErrors <code>true</code> when encoding errors should be ignored
* <code>false</code> otherwise
* @return the character content, or <code>null</code> if not available
diff --git a/javax/transaction/HeuristicCommitException.java b/javax/transaction/HeuristicCommitException.java
index 60ac7756a..e6af0d4ff 100644
--- a/javax/transaction/HeuristicCommitException.java
+++ b/javax/transaction/HeuristicCommitException.java
@@ -1,4 +1,4 @@
-/* HeuristicCommitException.java --
+/* HeuristicCommitException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/HeuristicMixedException.java b/javax/transaction/HeuristicMixedException.java
index b5e89fb1a..3b38cb9f8 100644
--- a/javax/transaction/HeuristicMixedException.java
+++ b/javax/transaction/HeuristicMixedException.java
@@ -1,4 +1,4 @@
-/* HeuristicMixedException.java --
+/* HeuristicMixedException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/HeuristicRollbackException.java b/javax/transaction/HeuristicRollbackException.java
index 3ad34fa47..ebd0db78f 100644
--- a/javax/transaction/HeuristicRollbackException.java
+++ b/javax/transaction/HeuristicRollbackException.java
@@ -1,4 +1,4 @@
-/* HeuristicRollbackException.java --
+/* HeuristicRollbackException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/InvalidTransactionException.java b/javax/transaction/InvalidTransactionException.java
index 82eefe67e..e7a8b23d7 100644
--- a/javax/transaction/InvalidTransactionException.java
+++ b/javax/transaction/InvalidTransactionException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction;
-
+
import java.rmi.RemoteException;
/**
diff --git a/javax/transaction/NotSupportedException.java b/javax/transaction/NotSupportedException.java
index a416d133a..15fe8a06b 100644
--- a/javax/transaction/NotSupportedException.java
+++ b/javax/transaction/NotSupportedException.java
@@ -1,4 +1,4 @@
-/* NotSupportedException.java --
+/* NotSupportedException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/RollbackException.java b/javax/transaction/RollbackException.java
index 4fd51cf6e..1be0604ad 100644
--- a/javax/transaction/RollbackException.java
+++ b/javax/transaction/RollbackException.java
@@ -1,4 +1,4 @@
-/* RollbackException.java --
+/* RollbackException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/Status.java b/javax/transaction/Status.java
index 6bbbffbf0..59df5036b 100644
--- a/javax/transaction/Status.java
+++ b/javax/transaction/Status.java
@@ -1,4 +1,4 @@
-/* Status.java --
+/* Status.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/Synchronization.java b/javax/transaction/Synchronization.java
index eea50277c..504436aa2 100644
--- a/javax/transaction/Synchronization.java
+++ b/javax/transaction/Synchronization.java
@@ -1,4 +1,4 @@
-/* Synchronization.java --
+/* Synchronization.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/SystemException.java b/javax/transaction/SystemException.java
index d614fb3c5..79e644335 100644
--- a/javax/transaction/SystemException.java
+++ b/javax/transaction/SystemException.java
@@ -1,4 +1,4 @@
-/* SystemException.java --
+/* SystemException.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/Transaction.java b/javax/transaction/Transaction.java
index b5b7108f0..060bb10e7 100644
--- a/javax/transaction/Transaction.java
+++ b/javax/transaction/Transaction.java
@@ -1,4 +1,4 @@
-/* Transaction.java --
+/* Transaction.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.transaction;
import javax.transaction.xa.XAResource;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/TransactionManager.java b/javax/transaction/TransactionManager.java
index 85a4da9f5..c2eb43210 100644
--- a/javax/transaction/TransactionManager.java
+++ b/javax/transaction/TransactionManager.java
@@ -1,4 +1,4 @@
-/* TransactionManager.java --
+/* TransactionManager.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/TransactionRequiredException.java b/javax/transaction/TransactionRequiredException.java
index 6c8894810..91e3332cd 100644
--- a/javax/transaction/TransactionRequiredException.java
+++ b/javax/transaction/TransactionRequiredException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction;
-
+
import java.rmi.RemoteException;
/**
diff --git a/javax/transaction/TransactionRolledbackException.java b/javax/transaction/TransactionRolledbackException.java
index 49c22a70e..e8aa033a2 100644
--- a/javax/transaction/TransactionRolledbackException.java
+++ b/javax/transaction/TransactionRolledbackException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction;
-
+
import java.rmi.RemoteException;
/**
diff --git a/javax/transaction/UserTransaction.java b/javax/transaction/UserTransaction.java
index 86922932e..e31953b5a 100644
--- a/javax/transaction/UserTransaction.java
+++ b/javax/transaction/UserTransaction.java
@@ -1,4 +1,4 @@
-/* UserTransaction.java --
+/* UserTransaction.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.transaction;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/xa/XAException.java b/javax/transaction/xa/XAException.java
index ceb76f090..c7aa9e08a 100644
--- a/javax/transaction/xa/XAException.java
+++ b/javax/transaction/xa/XAException.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction.xa;
-
+
/**
* @author Tom Tromey (tromey@redhat.com)
* @date April 18, 2001
diff --git a/javax/transaction/xa/XAResource.java b/javax/transaction/xa/XAResource.java
index 394063441..09098d5a6 100644
--- a/javax/transaction/xa/XAResource.java
+++ b/javax/transaction/xa/XAResource.java
@@ -1,4 +1,4 @@
-/* XAResource.java --
+/* XAResource.java --
Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction.xa;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/transaction/xa/Xid.java b/javax/transaction/xa/Xid.java
index 51e3102b6..12c2fbb8e 100644
--- a/javax/transaction/xa/Xid.java
+++ b/javax/transaction/xa/Xid.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -36,7 +36,7 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.transaction.xa;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date May 25, 2001
diff --git a/javax/xml/XMLConstants.java b/javax/xml/XMLConstants.java
index 0d4a65ff9..82485c8df 100644
--- a/javax/xml/XMLConstants.java
+++ b/javax/xml/XMLConstants.java
@@ -1,4 +1,4 @@
-/* XMLConstants.java --
+/* XMLConstants.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ package javax.xml;
*/
public final class XMLConstants
{
-
+
private XMLConstants()
{
// to prevent instantiation
@@ -68,7 +68,7 @@ public final class XMLConstants
* @see http://www.w3.org/TR/REC-xml-names/#ns-qualnames
*/
public static final String XML_NS_URI =
- "http://www.w3.org/XML/1998/namespace";
+ "http://www.w3.org/XML/1998/namespace";
/**
* The XML Namespace prefix.
@@ -81,7 +81,7 @@ public final class XMLConstants
* @see http://www.w3.org/TR/REC-xml-names/#ns-qualnames
*/
public static final String XMLNS_ATTRIBUTE_NS_URI =
- "http://www.w3.org/2000/xmlns/";
+ "http://www.w3.org/2000/xmlns/";
/**
* The XML Namespace declaration attribute.
@@ -94,21 +94,21 @@ public final class XMLConstants
* @see http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions
*/
public static final String W3C_XML_SCHEMA_NS_URI =
- "http://www.w3.org/2001/XMLSchema";
+ "http://www.w3.org/2001/XMLSchema";
/**
* The XML Schema Instance (XSI) namespace URI.
* @see http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions
*/
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
- "http://www.w3.org/2001/XMLSchema-instance";
+ "http://www.w3.org/2001/XMLSchema-instance";
/**
* The XPath 2.0 datatypes namespace URI.
* @see http://www.w3.org/TR/xpath-datamodel
*/
public static final String W3C_XPATH_DATATYPE_NS_URI =
- "http://www.w3.org/2003/11/xpath-datatypes";
+ "http://www.w3.org/2003/11/xpath-datatypes";
/**
* The XML DTD namespace URI.
@@ -120,12 +120,12 @@ public final class XMLConstants
* @see http://relaxng.org/spec-20011203.html
*/
public static final String RELAXNG_NS_URI =
- "http://relaxng.org/ns/structure/1.0";
+ "http://relaxng.org/ns/structure/1.0";
/**
* DOM feature for secure processing.
*/
public static final String FEATURE_SECURE_PROCESSING =
- "http://javax.xml.XMLConstants/feature/secure-processing";
-
+ "http://javax.xml.XMLConstants/feature/secure-processing";
+
}
diff --git a/javax/xml/datatype/DatatypeConfigurationException.java b/javax/xml/datatype/DatatypeConfigurationException.java
index c17a89a7d..642cdcaf3 100644
--- a/javax/xml/datatype/DatatypeConfigurationException.java
+++ b/javax/xml/datatype/DatatypeConfigurationException.java
@@ -1,4 +1,4 @@
-/* DatatypeConfigurationException.java --
+/* DatatypeConfigurationException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,10 +61,10 @@ public class DatatypeConfigurationException
{
super(message, cause);
}
-
+
public DatatypeConfigurationException(Throwable cause)
{
super(cause);
}
-
+
}
diff --git a/javax/xml/datatype/DatatypeConstants.java b/javax/xml/datatype/DatatypeConstants.java
index 6098e084b..1fe439e00 100644
--- a/javax/xml/datatype/DatatypeConstants.java
+++ b/javax/xml/datatype/DatatypeConstants.java
@@ -1,4 +1,4 @@
-/* DatatypeConstants.java --
+/* DatatypeConstants.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ public final class DatatypeConstants
{
// to prevent instantiation
}
-
+
/**
* Typesafe enumerated class representing the six fields of the
* <a href='Duration.html'>Duration</a> class.
@@ -73,94 +73,94 @@ public final class DatatypeConstants
{
return id;
}
-
+
public String toString()
{
return name;
}
-
+
}
/**
* Value for January.
*/
public static final int JANUARY = 1;
-
+
/**
* Value for February.
*/
public static final int FEBRUARY = 2;
-
+
/**
* Value for March.
*/
public static final int MARCH = 3;
-
+
/**
* Value for April.
*/
public static final int APRIL = 4;
-
+
/**
* Value for May.
*/
public static final int MAY = 5;
-
+
/**
* Value for June.
*/
public static final int JUNE = 6;
-
+
/**
* Value for July.
*/
public static final int JULY = 7;
-
+
/**
* Value for August.
*/
public static final int AUGUST = 8;
-
+
/**
* Value for September.
*/
public static final int SEPTEMBER = 9;
-
+
/**
* Value for October.
*/
public static final int OCTOBER = 10;
-
+
/**
* Value for November.
*/
public static final int NOVEMBER = 11;
-
+
/**
* Value for December.
*/
public static final int DECEMBER = 12;
-
+
/**
* Comparison result.
*/
public static final int LESSER = -1;
-
+
/**
* Comparison result.
*/
public static final int EQUAL = 0;
-
+
/**
* Comparison result.
*/
public static final int GREATER = 1;
-
+
/**
* Comparison result.
*/
public static final int INDETERMINATE = 2;
-
+
/**
* Comparison result.
*/
@@ -170,27 +170,27 @@ public final class DatatypeConstants
* Constant that represents the years field.
*/
public static final Field YEARS = new Field(1, "YEARS");
-
+
/**
* Constant that represents the months field.
*/
public static final Field MONTHS = new Field(2, "MONTHS");
-
+
/**
* Constant that represents the days field.
*/
public static final Field DAYS = new Field(3, "DAYS");
-
+
/**
* Constant that represents the hours field.
*/
public static final Field HOURS = new Field(4, "HOURS");
-
+
/**
* Constant that represents the minutes field.
*/
public static final Field MINUTES = new Field(5, "MINUTES");
-
+
/**
* Constant that represents the seconds field.
*/
@@ -200,52 +200,52 @@ public final class DatatypeConstants
* The qualified-name for the <code>dateTime</code> data type.
*/
public static final QName DATETIME = new QName ("http://www.w3.org/2001/XMLSchema#dateTime", "");
-
+
/**
* The qualified-name for the <code>time</code> data type.
*/
public static final QName TIME = new QName ("http://www.w3.org/2001/XMLSchema#time", "");
-
+
/**
* The qualified-name for the <code>date</code> data type.
*/
public static final QName DATE = new QName ("http://www.w3.org/2001/XMLSchema#date", "");
-
+
/**
* The qualified-name for the <code>gYearMonth</code> data type.
*/
public static final QName GYEARMONTH = new QName ("http://www.w3.org/2001/XMLSchema#gYearMonth", "");
-
+
/**
* The qualified-name for the <code>gMonthDay</code> data type.
*/
public static final QName GMONTHDAY = new QName ("http://www.w3.org/2001/XMLSchema#gMonthDay", "");
-
+
/**
* The qualified-name for the <code>gYear</code> data type.
*/
public static final QName GYEAR = new QName ("http://www.w3.org/2001/XMLSchema#gYear", "");
-
+
/**
* The qualified-name for the <code>gMonth</code> data type.
*/
public static final QName GMONTH = new QName ("http://www.w3.org/2001/XMLSchema#gMonth", "");
-
+
/**
* The qualified-name for the <code>gDay</code> data type.
*/
public static final QName GDAY = new QName ("http://www.w3.org/2001/XMLSchema#gDay", "");
-
+
/**
* The qualified-name for the <code>duration</code> data type.
*/
public static final QName DURATION = new QName ("http://www.w3.org/2001/XMLSchema#duration", "");
-
+
/**
* The qualified-name for the <code>dayTimeDuration</code> data type.
*/
public static final QName DURATION_DAYTIME = new QName ("http://www.w3.org/2001/XMLSchema#dayTimeDuration", "");
-
+
/**
* The qualified-name for the <code>yearMonthDuration</code> data type.
*/
@@ -255,10 +255,10 @@ public final class DatatypeConstants
* XML Schema maximum timezone offset, in minutes.
*/
public static final int MAX_TIMEZONE_OFFSET = -840;
-
+
/**
* XML Schema minimum timezone offset, in minutes.
*/
public static final int MIN_TIMEZONE_OFFSET = 840;
-
+
}
diff --git a/javax/xml/datatype/DatatypeFactory.java b/javax/xml/datatype/DatatypeFactory.java
index 386d5b852..924a610c1 100644
--- a/javax/xml/datatype/DatatypeFactory.java
+++ b/javax/xml/datatype/DatatypeFactory.java
@@ -1,4 +1,4 @@
-/* DatatypeFactory.java --
+/* DatatypeFactory.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -303,7 +303,7 @@ public abstract class DatatypeFactory
* XML Schema 1.0 Part 2, section 3.2.[7-14].1.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(String lexicalRepresentation);
-
+
/**
* Returns a new XMLGregorianCalendar based on the specified Gregorian
* calendar.
@@ -417,5 +417,5 @@ public abstract class DatatypeFactory
new BigDecimal(((double) milliseconds) / 1000.0),
timezone);
}
-
+
}
diff --git a/javax/xml/datatype/Duration.java b/javax/xml/datatype/Duration.java
index 96390fde4..7f53021ce 100644
--- a/javax/xml/datatype/Duration.java
+++ b/javax/xml/datatype/Duration.java
@@ -1,4 +1,4 @@
-/* Duration.java --
+/* Duration.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,7 +91,7 @@ public abstract class Duration
Number val = getField(DatatypeConstants.YEARS);
return (val == null) ? 0 : val.intValue();
}
-
+
/**
* Returns the months in this duration as an int, or 0 if not present.
*/
@@ -100,7 +100,7 @@ public abstract class Duration
Number val = getField(DatatypeConstants.MONTHS);
return (val == null) ? 0 : val.intValue();
}
-
+
/**
* Returns the days in this duration as an int, or 0 if not present.
*/
@@ -109,7 +109,7 @@ public abstract class Duration
Number val = getField(DatatypeConstants.DAYS);
return (val == null) ? 0 : val.intValue();
}
-
+
/**
* Returns the hours in this duration as an int, or 0 if not present.
*/
@@ -118,7 +118,7 @@ public abstract class Duration
Number val = getField(DatatypeConstants.HOURS);
return (val == null) ? 0 : val.intValue();
}
-
+
/**
* Returns the minutes in this duration as an int, or 0 if not present.
*/
@@ -127,7 +127,7 @@ public abstract class Duration
Number val = getField(DatatypeConstants.MINUTES);
return (val == null) ? 0 : val.intValue();
}
-
+
/**
* Returns the seconds in this duration as an int, or 0 if not present.
*/
@@ -207,7 +207,7 @@ public abstract class Duration
calendar.add(Calendar.SECOND, getSeconds());
}
}*/
-
+
/**
* Adds this duration to the specified date.
*/
@@ -246,7 +246,7 @@ public abstract class Duration
* Returns the unary negative of this duration.
*/
public abstract Duration negate();
-
+
/**
* Converts the years and months fields into the days field using a
* specific time instant as the reference point.
@@ -276,7 +276,7 @@ public abstract class Duration
// TODO
throw new UnsupportedOperationException();
}
-
+
public abstract int hashCode();
/**
@@ -287,5 +287,5 @@ public abstract class Duration
// TODO
throw new UnsupportedOperationException();
}
-
+
}
diff --git a/javax/xml/datatype/XMLGregorianCalendar.java b/javax/xml/datatype/XMLGregorianCalendar.java
index c0b68681c..a8a9272e0 100644
--- a/javax/xml/datatype/XMLGregorianCalendar.java
+++ b/javax/xml/datatype/XMLGregorianCalendar.java
@@ -1,4 +1,4 @@
-/* XMLGregorianCalendar.java --
+/* XMLGregorianCalendar.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -213,5 +213,5 @@ public abstract class XMLGregorianCalendar
public abstract TimeZone getTimeZone(int defaultZoneoffset);
public abstract Object clone();
-
+
}
diff --git a/javax/xml/namespace/NamespaceContext.java b/javax/xml/namespace/NamespaceContext.java
index b9722a47a..b3e1e1f61 100644
--- a/javax/xml/namespace/NamespaceContext.java
+++ b/javax/xml/namespace/NamespaceContext.java
@@ -1,4 +1,4 @@
-/* NamespaceContext.java --
+/* NamespaceContext.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,5 +63,5 @@ public interface NamespaceContext
*/
@SuppressWarnings("unchecked")
public Iterator getPrefixes(String namespaceURI);
-
+
}
diff --git a/javax/xml/namespace/QName.java b/javax/xml/namespace/QName.java
index 3c7562378..4033febfc 100644
--- a/javax/xml/namespace/QName.java
+++ b/javax/xml/namespace/QName.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -128,20 +128,20 @@ public class QName implements Serializable
{
if (qName == null)
{
- CPStringBuilder buf = new CPStringBuilder();
- if (namespaceURI.length() > 0)
- {
- buf.append('{');
- buf.append(namespaceURI);
- buf.append('}');
- }
- if (prefix.length() > 0)
- {
- buf.append(prefix);
- buf.append(':');
- }
- buf.append(localPart);
- qName = buf.toString();
+ CPStringBuilder buf = new CPStringBuilder();
+ if (namespaceURI.length() > 0)
+ {
+ buf.append('{');
+ buf.append(namespaceURI);
+ buf.append('}');
+ }
+ if (prefix.length() > 0)
+ {
+ buf.append(prefix);
+ buf.append(':');
+ }
+ buf.append(localPart);
+ qName = buf.toString();
}
return qName;
}
@@ -150,7 +150,7 @@ public class QName implements Serializable
{
if (qNameAsString == null)
throw new IllegalArgumentException("qNameAsString can't be null");
-
+
String namespaceUri = "", prefix = null;
int start = qNameAsString.indexOf('{');
int end = qNameAsString.indexOf('}');
@@ -169,5 +169,5 @@ public class QName implements Serializable
}
return new QName(namespaceUri, qNameAsString, prefix);
}
-
+
}
diff --git a/javax/xml/parsers/DocumentBuilder.java b/javax/xml/parsers/DocumentBuilder.java
index a574c98d4..8e4eccbb0 100644
--- a/javax/xml/parsers/DocumentBuilder.java
+++ b/javax/xml/parsers/DocumentBuilder.java
@@ -1,4 +1,4 @@
-/* DocumentBuilder.java --
+/* DocumentBuilder.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -70,7 +70,7 @@ public abstract class DocumentBuilder
* @param is an XML input stream
* @exception IllegalArgumentException if the input stream is null
*/
- public Document parse(InputStream is)
+ public Document parse(InputStream is)
throws SAXException, IOException
{
if (is == null)
@@ -86,7 +86,7 @@ public abstract class DocumentBuilder
* @param systemId the system ID of the XML document
* @exception IllegalArgumentException if the input stream is null
*/
- public Document parse(InputStream is, String systemId)
+ public Document parse(InputStream is, String systemId)
throws SAXException, IOException
{
if (is == null)
@@ -103,7 +103,7 @@ public abstract class DocumentBuilder
* @param uri an XML system ID
* @exception IllegalArgumentException if the URI is null
*/
- public Document parse(String uri)
+ public Document parse(String uri)
throws SAXException, IOException
{
if (uri == null)
@@ -118,7 +118,7 @@ public abstract class DocumentBuilder
* @param f the XML file
* @exception IllegalArgumentException if the file is null
*/
- public Document parse(File f)
+ public Document parse(File f)
throws SAXException, IOException
{
if (f == null)
@@ -135,7 +135,7 @@ public abstract class DocumentBuilder
* @param source the input source
* @exception IllegalArgumentException if the input source is null
*/
- public abstract Document parse(InputSource source)
+ public abstract Document parse(InputSource source)
throws SAXException, IOException;
/**
@@ -175,7 +175,7 @@ public abstract class DocumentBuilder
public abstract DOMImplementation getDOMImplementation();
// -- JAXP 1.3 methods --
-
+
/**
* Reset this document builder to its original configuration.
* @since 1.3
@@ -199,5 +199,5 @@ public abstract class DocumentBuilder
{
return false;
}
-
+
}
diff --git a/javax/xml/parsers/DocumentBuilderFactory.java b/javax/xml/parsers/DocumentBuilderFactory.java
index a1350c549..5f8b49d7c 100644
--- a/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/javax/xml/parsers/DocumentBuilderFactory.java
@@ -1,4 +1,4 @@
-/* DocumentBuilderFactory.java --
+/* DocumentBuilderFactory.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -111,13 +111,13 @@ public abstract class DocumentBuilderFactory
{
throw new FactoryConfigurationError(e,
"error instantiating class " + className);
- }
+ }
}
}
while (className == null && count < 3);
return new gnu.xml.dom.DomDocumentBuilderFactory();
}
-
+
private static String getFactoryClassName(ClassLoader loader, int attempt)
{
final String propertyName = "javax.xml.parsers.DocumentBuilderFactory";
@@ -141,7 +141,7 @@ public abstract class DocumentBuilderFactory
{
return null;
}
- case 2:
+ case 2:
try
{
String serviceKey = "/META-INF/services/" + propertyName;
@@ -293,7 +293,7 @@ public abstract class DocumentBuilderFactory
* @param value the new value
* @exception IllegalArgumentException if the attribute is not recognized
*/
- public abstract void setAttribute(String name, Object value)
+ public abstract void setAttribute(String name, Object value)
throws IllegalArgumentException;
/**
@@ -301,7 +301,7 @@ public abstract class DocumentBuilderFactory
* @param name the name of the attribute
* @exception IllegalArgumentException if the attribute is not recognized
*/
- public abstract Object getAttribute(String name)
+ public abstract Object getAttribute(String name)
throws IllegalArgumentException;
// -- JAXP 1.3 methods --
@@ -365,5 +365,5 @@ public abstract class DocumentBuilderFactory
*/
public abstract boolean getFeature(String name)
throws ParserConfigurationException;
-
+
}
diff --git a/javax/xml/parsers/FactoryConfigurationError.java b/javax/xml/parsers/FactoryConfigurationError.java
index 96d0fc082..6e2ebfadb 100644
--- a/javax/xml/parsers/FactoryConfigurationError.java
+++ b/javax/xml/parsers/FactoryConfigurationError.java
@@ -1,4 +1,4 @@
-/* FactoryConfigurationError.java --
+/* FactoryConfigurationError.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package javax.xml.parsers;
/**
* An error occurred during configuration of the parser factory.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public class FactoryConfigurationError
diff --git a/javax/xml/parsers/ParserConfigurationException.java b/javax/xml/parsers/ParserConfigurationException.java
index 412872f17..a58decedb 100644
--- a/javax/xml/parsers/ParserConfigurationException.java
+++ b/javax/xml/parsers/ParserConfigurationException.java
@@ -1,4 +1,4 @@
-/* ParserConfigurationException.java --
+/* ParserConfigurationException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package javax.xml.parsers;
/**
* An exception occurred during configuration of the XML parser.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public class ParserConfigurationException
diff --git a/javax/xml/parsers/SAXParser.java b/javax/xml/parsers/SAXParser.java
index d38c6579e..e53558760 100644
--- a/javax/xml/parsers/SAXParser.java
+++ b/javax/xml/parsers/SAXParser.java
@@ -1,4 +1,4 @@
-/* SAXParser.java --
+/* SAXParser.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ import org.xml.sax.helpers.DefaultHandler;
*/
public abstract class SAXParser
{
-
+
protected SAXParser()
{
}
@@ -76,7 +76,7 @@ public abstract class SAXParser
* @exception IllegalArgumentException if the input stream is null
* @see #parse(java.io.InputStream,org.xml.sax.helpers.DefaultHandler)
*/
- public void parse(InputStream is, HandlerBase hb)
+ public void parse(InputStream is, HandlerBase hb)
throws SAXException, IOException
{
if (is == null)
@@ -118,7 +118,7 @@ public abstract class SAXParser
* @param dh the SAX2 handler
* @exception IllegalArgumentException if the input stream is null
*/
- public void parse(InputStream is, DefaultHandler dh)
+ public void parse(InputStream is, DefaultHandler dh)
throws SAXException, IOException
{
if (is == null)
@@ -158,7 +158,7 @@ public abstract class SAXParser
* @exception IllegalArgumentException if the URI is null
* @see #parse(java.lang.String,org.xml.sax.helpers.DefaultHandler)
*/
- public void parse(String uri, HandlerBase hb)
+ public void parse(String uri, HandlerBase hb)
throws SAXException, IOException
{
if (uri == null)
@@ -175,7 +175,7 @@ public abstract class SAXParser
* @param dh the SAX2 handler
* @exception IllegalArgumentException if the URI is null
*/
- public void parse(String uri, DefaultHandler dh)
+ public void parse(String uri, DefaultHandler dh)
throws SAXException, IOException
{
if (uri == null)
@@ -195,7 +195,7 @@ public abstract class SAXParser
* @exception IllegalArgumentException if the file is null
* @see #parse(java.io.File,org.xml.sax.helpers.DefaultHandler)
*/
- public void parse(File f, HandlerBase hb)
+ public void parse(File f, HandlerBase hb)
throws SAXException, IOException
{
if (f == null)
@@ -214,7 +214,7 @@ public abstract class SAXParser
* @param dh the SAX2 handler
* @exception IllegalArgumentException if the file is null
*/
- public void parse(File f, DefaultHandler dh)
+ public void parse(File f, DefaultHandler dh)
throws SAXException, IOException
{
if (f == null)
@@ -236,7 +236,7 @@ public abstract class SAXParser
* @exception IllegalArgumentException if the input source is null
* @see #parse(org.xml.sax.InputSource,org.xml.sax.helpers.DefaultHandler)
*/
- public void parse(InputSource is, HandlerBase hb)
+ public void parse(InputSource is, HandlerBase hb)
throws SAXException, IOException
{
if (is == null)
@@ -258,7 +258,7 @@ public abstract class SAXParser
* @param dh the SAX2 handler
* @exception IllegalArgumentException if the input source is null
*/
- public void parse(InputSource is, DefaultHandler dh)
+ public void parse(InputSource is, DefaultHandler dh)
throws SAXException, IOException
{
if (is == null)
@@ -299,14 +299,14 @@ public abstract class SAXParser
* @param name the name of the property
* @param value the value of the property
*/
- public abstract void setProperty(String name, Object value)
+ public abstract void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException;
/**
* Returns the value of the specified SAX2 parser property.
* @param name the name of the property
*/
- public abstract Object getProperty(String name)
+ public abstract Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException;
// -- JAXP 1.3 methods --
@@ -336,5 +336,5 @@ public abstract class SAXParser
{
return false;
}
-
+
}
diff --git a/javax/xml/parsers/SAXParserFactory.java b/javax/xml/parsers/SAXParserFactory.java
index 9f8f7bafe..13aca0f2b 100644
--- a/javax/xml/parsers/SAXParserFactory.java
+++ b/javax/xml/parsers/SAXParserFactory.java
@@ -1,4 +1,4 @@
-/* SAXParserFactory.java --
+/* SAXParserFactory.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -216,8 +216,8 @@ public abstract class SAXParserFactory
* @param name the feature name
* @param value the featurevalue
*/
- public abstract void setFeature(String name, boolean value)
- throws ParserConfigurationException, SAXNotRecognizedException,
+ public abstract void setFeature(String name, boolean value)
+ throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException;
/**
@@ -225,8 +225,8 @@ public abstract class SAXParserFactory
* factory.
* @param name the feature name
*/
- public abstract boolean getFeature(String name)
- throws ParserConfigurationException, SAXNotRecognizedException,
+ public abstract boolean getFeature(String name)
+ throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException;
// -- JAXP 1.3 methods --
diff --git a/javax/xml/stream/EventFilter.java b/javax/xml/stream/EventFilter.java
index 6d0cb6552..eed54f8a9 100644
--- a/javax/xml/stream/EventFilter.java
+++ b/javax/xml/stream/EventFilter.java
@@ -1,4 +1,4 @@
-/* EventFilter.java --
+/* EventFilter.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,6 +49,5 @@ public interface EventFilter
* Indicates whether this filter can accept the specified event.
*/
boolean accept(XMLEvent event);
-
-}
+}
diff --git a/javax/xml/stream/FactoryConfigurationError.java b/javax/xml/stream/FactoryConfigurationError.java
index d04e71a8c..104b160cd 100644
--- a/javax/xml/stream/FactoryConfigurationError.java
+++ b/javax/xml/stream/FactoryConfigurationError.java
@@ -1,4 +1,4 @@
-/* FactoryConfigurationError.java --
+/* FactoryConfigurationError.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,6 +81,5 @@ public class FactoryConfigurationError
{
return super.getMessage();
}
-
-}
+}
diff --git a/javax/xml/stream/Location.java b/javax/xml/stream/Location.java
index 8f9f807e0..6e3483a5c 100644
--- a/javax/xml/stream/Location.java
+++ b/javax/xml/stream/Location.java
@@ -1,4 +1,4 @@
-/* Location.java --
+/* Location.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,6 +71,5 @@ public interface Location
* Returns the system identifier for the underlying source.
*/
String getSystemId();
-
-}
+}
diff --git a/javax/xml/stream/StreamFilter.java b/javax/xml/stream/StreamFilter.java
index 376bd940a..a0ff2c8f3 100644
--- a/javax/xml/stream/StreamFilter.java
+++ b/javax/xml/stream/StreamFilter.java
@@ -1,4 +1,4 @@
-/* StreamFilter.java --
+/* StreamFilter.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,5 @@ public interface StreamFilter
* this stream.
*/
boolean accept(XMLStreamReader reader);
-
-}
+}
diff --git a/javax/xml/stream/XMLEventFactory.java b/javax/xml/stream/XMLEventFactory.java
index 7e7a98140..fc2d493d5 100644
--- a/javax/xml/stream/XMLEventFactory.java
+++ b/javax/xml/stream/XMLEventFactory.java
@@ -1,4 +1,4 @@
-/* XMLEventFactory.java --
+/* XMLEventFactory.java --
Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -199,7 +199,7 @@ public abstract class XMLEventFactory
*/
public abstract Attribute createAttribute(String prefix, String namespaceURI,
String localName, String value);
-
+
/**
* Create an attribute event.
*/
@@ -255,7 +255,7 @@ public abstract class XMLEventFactory
Iterator attributes,
Iterator namespaces,
NamespaceContext context);
-
+
/**
* Create an end-element event.
*/
@@ -348,6 +348,5 @@ public abstract class XMLEventFactory
* Create a DOCTYPE declaration event.
*/
public abstract DTD createDTD(String dtd);
-
-}
+}
diff --git a/javax/xml/stream/XMLEventReader.java b/javax/xml/stream/XMLEventReader.java
index ee0354f94..d5c76b6b1 100644
--- a/javax/xml/stream/XMLEventReader.java
+++ b/javax/xml/stream/XMLEventReader.java
@@ -1,4 +1,4 @@
-/* XMLEventReader.java --
+/* XMLEventReader.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ public interface XMLEventReader
* Indicates whether there are more XML events to be read.
*/
boolean hasNext();
-
+
/**
* Looks at the next XML event without advancing the cursor in the stream.
* Returns <code>null</code> if there are no more events to read.
@@ -100,4 +100,3 @@ public interface XMLEventReader
throws XMLStreamException;
}
-
diff --git a/javax/xml/stream/XMLEventWriter.java b/javax/xml/stream/XMLEventWriter.java
index fe85f236e..5eb18760a 100644
--- a/javax/xml/stream/XMLEventWriter.java
+++ b/javax/xml/stream/XMLEventWriter.java
@@ -1,4 +1,4 @@
-/* XMLEventWriter.java --
+/* XMLEventWriter.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -104,6 +104,5 @@ public interface XMLEventWriter
* Returns the namespace context.
*/
NamespaceContext getNamespaceContext();
-
-}
+}
diff --git a/javax/xml/stream/XMLInputFactory.java b/javax/xml/stream/XMLInputFactory.java
index e57449d77..39ba8e3b4 100644
--- a/javax/xml/stream/XMLInputFactory.java
+++ b/javax/xml/stream/XMLInputFactory.java
@@ -1,4 +1,4 @@
-/* XMLInputFactory.java --
+/* XMLInputFactory.java --
Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -132,7 +132,7 @@ public abstract class XMLInputFactory
/**
* Property used to control namespace support.
*/
- public static final String IS_NAMESPACE_AWARE =
+ public static final String IS_NAMESPACE_AWARE =
"javax.xml.stream.isNamespaceAware";
/**
@@ -352,7 +352,7 @@ public abstract class XMLInputFactory
public abstract XMLEventReader createXMLEventReader(String systemId,
Reader reader)
throws XMLStreamException;
-
+
/**
* Creates a new event reader.
*/
@@ -449,4 +449,3 @@ public abstract class XMLInputFactory
public abstract XMLEventAllocator getEventAllocator();
}
-
diff --git a/javax/xml/stream/XMLOutputFactory.java b/javax/xml/stream/XMLOutputFactory.java
index ef89b6497..a8579aa31 100644
--- a/javax/xml/stream/XMLOutputFactory.java
+++ b/javax/xml/stream/XMLOutputFactory.java
@@ -1,4 +1,4 @@
-/* XMLOutputFactory.java --
+/* XMLOutputFactory.java --
Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,7 @@ public abstract class XMLOutputFactory
* If true, the writer will create a namespace declaration for any
* attribute that doesn't have a namespace declaration in scope.
*/
- public static final java.lang.String IS_REPAIRING_NAMESPACES =
+ public static final java.lang.String IS_REPAIRING_NAMESPACES =
"javax.xml.stream.isRepairingNamespaces";
protected XMLOutputFactory()
@@ -229,7 +229,7 @@ public abstract class XMLOutputFactory
*/
public abstract XMLStreamWriter createXMLStreamWriter(Result result)
throws XMLStreamException;
-
+
/**
* Creates a new event writer.
* @exception UnsupportedOperationException if this method is not
@@ -277,4 +277,3 @@ public abstract class XMLOutputFactory
public abstract boolean isPropertySupported(String name);
}
-
diff --git a/javax/xml/stream/XMLReporter.java b/javax/xml/stream/XMLReporter.java
index d54565681..389437542 100644
--- a/javax/xml/stream/XMLReporter.java
+++ b/javax/xml/stream/XMLReporter.java
@@ -1,4 +1,4 @@
-/* XMLReporter.java --
+/* XMLReporter.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,6 +53,5 @@ public interface XMLReporter
void report(String message, String errorType,
Object relatedInformation, Location location)
throws XMLStreamException;
-
-}
+}
diff --git a/javax/xml/stream/XMLResolver.java b/javax/xml/stream/XMLResolver.java
index 2dabaeea4..e537bb74c 100644
--- a/javax/xml/stream/XMLResolver.java
+++ b/javax/xml/stream/XMLResolver.java
@@ -1,4 +1,4 @@
-/* XMLResolver.java --
+/* XMLResolver.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,4 +63,3 @@ public interface XMLResolver
throws XMLStreamException;
}
-
diff --git a/javax/xml/stream/XMLStreamConstants.java b/javax/xml/stream/XMLStreamConstants.java
index e41627dd6..60541344e 100644
--- a/javax/xml/stream/XMLStreamConstants.java
+++ b/javax/xml/stream/XMLStreamConstants.java
@@ -1,4 +1,4 @@
-/* XMLStreamConstants.java --
+/* XMLStreamConstants.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -117,6 +117,5 @@ public interface XMLStreamConstants
* An entity declaration event.
*/
static final int ENTITY_DECLARATION = 15;
-
-}
+}
diff --git a/javax/xml/stream/XMLStreamException.java b/javax/xml/stream/XMLStreamException.java
index 0e91ed7a9..929afbb75 100644
--- a/javax/xml/stream/XMLStreamException.java
+++ b/javax/xml/stream/XMLStreamException.java
@@ -1,4 +1,4 @@
-/* XMLStreamException.java --
+/* XMLStreamException.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -94,6 +94,5 @@ public class XMLStreamException
{
return location;
}
-
-}
+}
diff --git a/javax/xml/stream/XMLStreamReader.java b/javax/xml/stream/XMLStreamReader.java
index f8648b1ad..10bc4a5a5 100644
--- a/javax/xml/stream/XMLStreamReader.java
+++ b/javax/xml/stream/XMLStreamReader.java
@@ -1,4 +1,4 @@
-/* XMLStreamReader.java --
+/* XMLStreamReader.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -281,7 +281,7 @@ public interface XMLStreamReader
* Indicates whether the standalone flag was set in the document.
*/
boolean standaloneSet();
-
+
/**
* Returns the encoding declared in the XML declaration.
*/
@@ -296,6 +296,5 @@ public interface XMLStreamReader
* Returns the data of the current processing instruction event.
*/
String getPIData();
-
-}
+}
diff --git a/javax/xml/stream/XMLStreamWriter.java b/javax/xml/stream/XMLStreamWriter.java
index 5fe9e9f70..d7d739660 100644
--- a/javax/xml/stream/XMLStreamWriter.java
+++ b/javax/xml/stream/XMLStreamWriter.java
@@ -1,4 +1,4 @@
-/* XMLStreamWriter.java --
+/* XMLStreamWriter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,7 +44,7 @@ import javax.xml.namespace.NamespaceContext;
*/
public interface XMLStreamWriter
{
-
+
/**
* Write the start of a tag.
*/
@@ -178,7 +178,7 @@ public interface XMLStreamWriter
*/
void writeStartDocument()
throws XMLStreamException;
-
+
/**
* Write an XML declaration with the specified XML version.
*/
@@ -239,6 +239,5 @@ public interface XMLStreamWriter
*/
Object getProperty(String name)
throws IllegalArgumentException;
-
-}
+}
diff --git a/javax/xml/stream/events/Attribute.java b/javax/xml/stream/events/Attribute.java
index 6e6d0274c..1824a9c02 100644
--- a/javax/xml/stream/events/Attribute.java
+++ b/javax/xml/stream/events/Attribute.java
@@ -1,4 +1,4 @@
-/* Attribute.java --
+/* Attribute.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -66,6 +66,5 @@ public interface Attribute
* just defaulted by the DTD.
*/
boolean isSpecified();
-
-}
+}
diff --git a/javax/xml/stream/events/Characters.java b/javax/xml/stream/events/Characters.java
index 3728a997c..d82009247 100644
--- a/javax/xml/stream/events/Characters.java
+++ b/javax/xml/stream/events/Characters.java
@@ -1,4 +1,4 @@
-/* Characters.java --
+/* Characters.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,11 +58,10 @@ public interface Characters
* Indicates whether this is a CDATA section.
*/
boolean isCData();
-
+
/**
* Indicates whether this text is all ignorable whitespace.
*/
boolean isIgnorableWhiteSpace();
-
-}
+}
diff --git a/javax/xml/stream/events/Comment.java b/javax/xml/stream/events/Comment.java
index 300e32c92..4419e58f2 100644
--- a/javax/xml/stream/events/Comment.java
+++ b/javax/xml/stream/events/Comment.java
@@ -1,4 +1,4 @@
-/* Comment.java --
+/* Comment.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,5 @@ public interface Comment
* Returns the comment text.
*/
String getText();
-
-}
+}
diff --git a/javax/xml/stream/events/DTD.java b/javax/xml/stream/events/DTD.java
index 943572ef3..b1a906919 100644
--- a/javax/xml/stream/events/DTD.java
+++ b/javax/xml/stream/events/DTD.java
@@ -1,4 +1,4 @@
-/* DTD.java --
+/* DTD.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,6 +68,5 @@ public interface DTD
*/
@SuppressWarnings("unchecked")
List getEntities();
-
-}
+}
diff --git a/javax/xml/stream/events/EndDocument.java b/javax/xml/stream/events/EndDocument.java
index 57d93af92..fd7e3fa4f 100644
--- a/javax/xml/stream/events/EndDocument.java
+++ b/javax/xml/stream/events/EndDocument.java
@@ -1,4 +1,4 @@
-/* EndDocument.java --
+/* EndDocument.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,4 +44,3 @@ public interface EndDocument
extends XMLEvent
{
}
-
diff --git a/javax/xml/stream/events/EndElement.java b/javax/xml/stream/events/EndElement.java
index 3bde8f8ad..a6b5c3fa2 100644
--- a/javax/xml/stream/events/EndElement.java
+++ b/javax/xml/stream/events/EndElement.java
@@ -1,4 +1,4 @@
-/* EndElement.java --
+/* EndElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,6 +57,5 @@ public interface EndElement
*/
@SuppressWarnings("unchecked")
Iterator getNamespaces();
-
-}
+}
diff --git a/javax/xml/stream/events/EntityDeclaration.java b/javax/xml/stream/events/EntityDeclaration.java
index a0120ddb0..61fa177f9 100644
--- a/javax/xml/stream/events/EntityDeclaration.java
+++ b/javax/xml/stream/events/EntityDeclaration.java
@@ -1,4 +1,4 @@
-/* EntityDeclaration.java --
+/* EntityDeclaration.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,4 +75,3 @@ public interface EntityDeclaration
String getBaseURI();
}
-
diff --git a/javax/xml/stream/events/EntityReference.java b/javax/xml/stream/events/EntityReference.java
index 460433c16..27bcb040f 100644
--- a/javax/xml/stream/events/EntityReference.java
+++ b/javax/xml/stream/events/EntityReference.java
@@ -1,4 +1,4 @@
-/* EntityReference.java --
+/* EntityReference.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,4 +55,3 @@ public interface EntityReference
String getName();
}
-
diff --git a/javax/xml/stream/events/Namespace.java b/javax/xml/stream/events/Namespace.java
index 13dd92fda..05de86c96 100644
--- a/javax/xml/stream/events/Namespace.java
+++ b/javax/xml/stream/events/Namespace.java
@@ -1,4 +1,4 @@
-/* Namespace.java --
+/* Namespace.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,6 +58,5 @@ public interface Namespace
* Indicates whether this event declares the default namespace.
*/
boolean isDefaultNamespaceDeclaration();
-
-}
+}
diff --git a/javax/xml/stream/events/NotationDeclaration.java b/javax/xml/stream/events/NotationDeclaration.java
index 9ac29e9cc..708beb5f5 100644
--- a/javax/xml/stream/events/NotationDeclaration.java
+++ b/javax/xml/stream/events/NotationDeclaration.java
@@ -1,4 +1,4 @@
-/* NotationDeclaration.java --
+/* NotationDeclaration.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,6 +58,5 @@ public interface NotationDeclaration
* Returns the system identifier of the notation.
*/
String getSystemId();
-
-}
+}
diff --git a/javax/xml/stream/events/ProcessingInstruction.java b/javax/xml/stream/events/ProcessingInstruction.java
index 861dd30be..340202300 100644
--- a/javax/xml/stream/events/ProcessingInstruction.java
+++ b/javax/xml/stream/events/ProcessingInstruction.java
@@ -1,4 +1,4 @@
-/* ProcessingInstruction.java --
+/* ProcessingInstruction.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -53,6 +53,5 @@ public interface ProcessingInstruction
* Returns the processing instruction data.
*/
String getData();
-
-}
+}
diff --git a/javax/xml/stream/events/StartDocument.java b/javax/xml/stream/events/StartDocument.java
index 2bd251e4a..7a5434624 100644
--- a/javax/xml/stream/events/StartDocument.java
+++ b/javax/xml/stream/events/StartDocument.java
@@ -1,4 +1,4 @@
-/* StartDocument.java --
+/* StartDocument.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,6 +75,5 @@ public interface StartDocument
* Returns the XML version of the document.
*/
String getVersion();
-
-}
+}
diff --git a/javax/xml/stream/events/StartElement.java b/javax/xml/stream/events/StartElement.java
index 0916368c9..359b57eef 100644
--- a/javax/xml/stream/events/StartElement.java
+++ b/javax/xml/stream/events/StartElement.java
@@ -1,4 +1,4 @@
-/* StartElement.java --
+/* StartElement.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,6 +79,5 @@ public interface StartElement
* Returns the namespace URI associated with the given prefix.
*/
String getNamespaceURI(String prefix);
-
-}
+}
diff --git a/javax/xml/stream/events/XMLEvent.java b/javax/xml/stream/events/XMLEvent.java
index 7c427da87..90f354667 100644
--- a/javax/xml/stream/events/XMLEvent.java
+++ b/javax/xml/stream/events/XMLEvent.java
@@ -1,4 +1,4 @@
-/* XMLEvent.java --
+/* XMLEvent.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -125,12 +125,11 @@ public interface XMLEvent
* not available.
*/
QName getSchemaType();
-
+
/**
* Writes this event to the specified writer.
*/
void writeAsEncodedUnicode(Writer writer)
throws XMLStreamException;
-
-}
+}
diff --git a/javax/xml/stream/util/EventReaderDelegate.java b/javax/xml/stream/util/EventReaderDelegate.java
index be943e465..2c04c09de 100644
--- a/javax/xml/stream/util/EventReaderDelegate.java
+++ b/javax/xml/stream/util/EventReaderDelegate.java
@@ -1,4 +1,4 @@
-/* EventReaderDelegate.java --
+/* EventReaderDelegate.java --
Copyright (C) 2005,2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -149,4 +149,3 @@ public class EventReaderDelegate
}
}
-
diff --git a/javax/xml/stream/util/StreamReaderDelegate.java b/javax/xml/stream/util/StreamReaderDelegate.java
index 1c407a245..75a7ca597 100644
--- a/javax/xml/stream/util/StreamReaderDelegate.java
+++ b/javax/xml/stream/util/StreamReaderDelegate.java
@@ -1,4 +1,4 @@
-/* StreamReaderDelegate.java --
+/* StreamReaderDelegate.java --
Copyright (C) 2005,2006,2009 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -404,6 +404,5 @@ public class StreamReaderDelegate
return parent.getProperty(name);
throw new IllegalArgumentException();
}
-
-}
+}
diff --git a/javax/xml/stream/util/XMLEventAllocator.java b/javax/xml/stream/util/XMLEventAllocator.java
index d66bcbe52..b8a7ddab8 100644
--- a/javax/xml/stream/util/XMLEventAllocator.java
+++ b/javax/xml/stream/util/XMLEventAllocator.java
@@ -1,4 +1,4 @@
-/* XMLEventAllocator.java --
+/* XMLEventAllocator.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ public interface XMLEventAllocator
* Creates a new allocator.
*/
XMLEventAllocator newInstance();
-
+
/**
* Allocates an event based on the current state of the stream reader.
*/
@@ -64,6 +64,5 @@ public interface XMLEventAllocator
*/
void allocate(XMLStreamReader reader, XMLEventConsumer consumer)
throws XMLStreamException;
-
-}
+}
diff --git a/javax/xml/stream/util/XMLEventConsumer.java b/javax/xml/stream/util/XMLEventConsumer.java
index c9deaf199..3a825f9de 100644
--- a/javax/xml/stream/util/XMLEventConsumer.java
+++ b/javax/xml/stream/util/XMLEventConsumer.java
@@ -1,4 +1,4 @@
-/* XMLEventConsumer.java --
+/* XMLEventConsumer.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,6 +51,5 @@ public interface XMLEventConsumer
*/
void add(XMLEvent event)
throws XMLStreamException;
-
-}
+}
diff --git a/javax/xml/transform/ErrorListener.java b/javax/xml/transform/ErrorListener.java
index 5a9eee81f..ac236642a 100644
--- a/javax/xml/transform/ErrorListener.java
+++ b/javax/xml/transform/ErrorListener.java
@@ -1,4 +1,4 @@
-/* ErrorListener.java --
+/* ErrorListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/OutputKeys.java b/javax/xml/transform/OutputKeys.java
index 8a86c1369..09cf96cb9 100644
--- a/javax/xml/transform/OutputKeys.java
+++ b/javax/xml/transform/OutputKeys.java
@@ -1,4 +1,4 @@
-/* OutputKeys.java --
+/* OutputKeys.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package javax.xml.transform;
/**
* Constants for XSLT output attributes.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public class OutputKeys
@@ -49,53 +49,53 @@ public class OutputKeys
* The output method (xml, html, or text).
*/
public static final String METHOD = "method";
-
+
/**
* The version of the output method.
*/
public static final String VERSION = "version";
-
+
/**
* The preferred output character encoding.
*/
public static final String ENCODING = "encoding";
-
+
/**
* Whether not to output an XML declaration (yes or no).
*/
public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
-
+
/**
* Whether to output a standalone document declaration (yes or no).
*/
public static final String STANDALONE = "standalone";
-
+
/**
* The public ID to output in the doctype declaration.
*/
public static final String DOCTYPE_PUBLIC = "doctype-public";
-
+
/**
* The system ID to output in the doctype declaration.
*/
public static final String DOCTYPE_SYSTEM = "doctype-system";
-
+
/**
* Whitespace-separated list of element names for which text children
* should be output as CDATA sections.
*/
public static final String CDATA_SECTION_ELEMENTS = "cdata-section-elements";
-
+
/**
* Whether to indent the result tree (yes or no).
*/
public static final String INDENT = "indent";
-
+
/**
* The MIME content type of the output data.
*/
public static final String MEDIA_TYPE = "media-type";
-
+
private OutputKeys()
{
}
diff --git a/javax/xml/transform/Result.java b/javax/xml/transform/Result.java
index 58afebafe..8f4d6c714 100644
--- a/javax/xml/transform/Result.java
+++ b/javax/xml/transform/Result.java
@@ -1,4 +1,4 @@
-/* Result.java --
+/* Result.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,7 @@ package javax.xml.transform;
/**
* The result of an XSL transformation.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public interface Result
diff --git a/javax/xml/transform/Source.java b/javax/xml/transform/Source.java
index 2143b4ec4..f109dcc35 100644
--- a/javax/xml/transform/Source.java
+++ b/javax/xml/transform/Source.java
@@ -1,4 +1,4 @@
-/* Source.java --
+/* Source.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/SourceLocator.java b/javax/xml/transform/SourceLocator.java
index 5304d2547..190a3b165 100644
--- a/javax/xml/transform/SourceLocator.java
+++ b/javax/xml/transform/SourceLocator.java
@@ -1,4 +1,4 @@
-/* SourceLocator.java --
+/* SourceLocator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package javax.xml.transform;
/**
* The location in an XML resource at which an event occurred.
* Tis is equivalent to the SAX Locator.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public interface SourceLocator
diff --git a/javax/xml/transform/Templates.java b/javax/xml/transform/Templates.java
index b4d1fbe68..34d953327 100644
--- a/javax/xml/transform/Templates.java
+++ b/javax/xml/transform/Templates.java
@@ -1,4 +1,4 @@
-/* Templates.java --
+/* Templates.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ import java.util.Properties;
/**
* A compiled, reusable XSL transformation.
* Implementations of this class are guaranteed to be thread safe.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public interface Templates
diff --git a/javax/xml/transform/Transformer.java b/javax/xml/transform/Transformer.java
index 905412559..316675b41 100644
--- a/javax/xml/transform/Transformer.java
+++ b/javax/xml/transform/Transformer.java
@@ -1,4 +1,4 @@
-/* Transformer.java --
+/* Transformer.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,9 +58,9 @@ public abstract class Transformer
* @param xmlSource the XML source
* @param outputTarget the result of the transformation
*/
- public abstract void transform(Source xmlSource, Result outputTarget)
+ public abstract void transform(Source xmlSource, Result outputTarget)
throws TransformerException;
-
+
/**
* Sets a parameter value for the transformation.
* Parameters may be referenced in the XSLT stylesheet.
@@ -104,7 +104,7 @@ public abstract class Transformer
* @param oformat a set of output properties, or null to reset all the
* properties to their default values
*/
- public abstract void setOutputProperties(Properties oformat)
+ public abstract void setOutputProperties(Properties oformat)
throws IllegalArgumentException;
/**
@@ -125,7 +125,7 @@ public abstract class Transformer
* @param value the string value of the property
* @exception IllegalArgumentException if the property is not supported
*/
- public abstract void setOutputProperty(String name, String value)
+ public abstract void setOutputProperty(String name, String value)
throws IllegalArgumentException;
/**
@@ -136,7 +136,7 @@ public abstract class Transformer
* XML Name of the form <code>{<i>namespaceURI</i>}<i>localName</i></code>
* @exception IllegalArgumentException if the property is not supported
*/
- public abstract String getOutputProperty(String name)
+ public abstract String getOutputProperty(String name)
throws IllegalArgumentException;
/**
@@ -145,7 +145,7 @@ public abstract class Transformer
*/
public abstract void setErrorListener(ErrorListener listener)
throws IllegalArgumentException;
-
+
/**
* Returns the callback used to report errors during the transformation.
*/
diff --git a/javax/xml/transform/TransformerConfigurationException.java b/javax/xml/transform/TransformerConfigurationException.java
index 81db3bed9..3343a8041 100644
--- a/javax/xml/transform/TransformerConfigurationException.java
+++ b/javax/xml/transform/TransformerConfigurationException.java
@@ -1,4 +1,4 @@
-/* TransformerConfigurationException.java --
+/* TransformerConfigurationException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -96,6 +96,6 @@ public class TransformerConfigurationException
Throwable e)
{
super(message, locator, e);
- }
+ }
}
diff --git a/javax/xml/transform/TransformerException.java b/javax/xml/transform/TransformerException.java
index 7a0b5ad98..ac83e969c 100644
--- a/javax/xml/transform/TransformerException.java
+++ b/javax/xml/transform/TransformerException.java
@@ -1,4 +1,4 @@
-/* TransformerException.java --
+/* TransformerException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,7 +91,7 @@ public class TransformerException
/**
* Constructor with detail message, locator and underlying cause.
*/
- public TransformerException(String msg, SourceLocator locator,
+ public TransformerException(String msg, SourceLocator locator,
Throwable cause)
{
super(msg);
diff --git a/javax/xml/transform/TransformerFactory.java b/javax/xml/transform/TransformerFactory.java
index e3e6c0cbd..0bcc48627 100644
--- a/javax/xml/transform/TransformerFactory.java
+++ b/javax/xml/transform/TransformerFactory.java
@@ -1,4 +1,4 @@
-/* TransformerFactory.java --
+/* TransformerFactory.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,7 +72,7 @@ public abstract class TransformerFactory
* <li>the default factory class</li>
* </ol>
*/
- public static TransformerFactory newInstance()
+ public static TransformerFactory newInstance()
throws TransformerFactoryConfigurationError
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
@@ -98,10 +98,10 @@ public abstract class TransformerFactory
className = null;
}
catch (Exception e)
- {
+ {
throw new TransformerFactoryConfigurationError(e,
"error instantiating class " + className);
- }
+ }
}
}
while (className == null && count < 3);
@@ -116,7 +116,7 @@ public abstract class TransformerFactory
throw new TransformerFactoryConfigurationError(e);
}
}
-
+
private static String getFactoryClassName(ClassLoader loader, int attempt)
{
final String propertyName = "javax.xml.transform.TransformerFactory";
@@ -140,7 +140,7 @@ public abstract class TransformerFactory
{
return null;
}
- case 2:
+ case 2:
try
{
String serviceKey = "/META-INF/services/" + propertyName;
@@ -164,19 +164,19 @@ public abstract class TransformerFactory
return null;
}
}
-
+
/**
* Creates a new transformer using the specified stylesheet.
* @param source the source of an <a href='http://www.w3.org/TR/xslt'>XSLT
* stylesheet</a> specifying the transformation to apply
*/
- public abstract Transformer newTransformer(Source source)
+ public abstract Transformer newTransformer(Source source)
throws TransformerConfigurationException;
/**
* Creates a new transformer that applies the identity transform.
*/
- public abstract Transformer newTransformer()
+ public abstract Transformer newTransformer()
throws TransformerConfigurationException;
/**
@@ -184,7 +184,7 @@ public abstract class TransformerFactory
* @param source the source of an <a href='http://www.w3.org/TR/xslt'>XSLT
* stylesheet</a> specifying the transformation to apply
*/
- public abstract Templates newTemplates(Source source)
+ public abstract Templates newTemplates(Source source)
throws TransformerConfigurationException;
/**
@@ -201,10 +201,10 @@ public abstract class TransformerFactory
* @param charset the charset attribute to match, or <code>null</code> to
* match any
*/
- public abstract Source getAssociatedStylesheet(Source source,
+ public abstract Source getAssociatedStylesheet(Source source,
String media,
String title,
- String charset)
+ String charset)
throws TransformerConfigurationException;
/**
@@ -265,14 +265,14 @@ public abstract class TransformerFactory
* @param name the attribute name
* @exception IllegalArgumentException if the attribute is not supported
*/
- public abstract Object getAttribute(String name)
+ public abstract Object getAttribute(String name)
throws IllegalArgumentException;
/**
* Sets the callback to be used by transformers obtained from this factory
* to report transformation errors.
*/
- public abstract void setErrorListener(ErrorListener listener)
+ public abstract void setErrorListener(ErrorListener listener)
throws IllegalArgumentException;
/**
diff --git a/javax/xml/transform/TransformerFactoryConfigurationError.java b/javax/xml/transform/TransformerFactoryConfigurationError.java
index 82afeeac7..45e3d3928 100644
--- a/javax/xml/transform/TransformerFactoryConfigurationError.java
+++ b/javax/xml/transform/TransformerFactoryConfigurationError.java
@@ -1,4 +1,4 @@
-/* TransformerFactoryConfigurationError.java --
+/* TransformerFactoryConfigurationError.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,7 +45,7 @@ public class TransformerFactoryConfigurationError
extends Error
{
private static final long serialVersionUID = -6527718720676281516L;
-
+
// Name is fixed by the serialization spec.
private final Exception exception;
@@ -102,5 +102,5 @@ public class TransformerFactoryConfigurationError
{
return exception;
}
-
+
}
diff --git a/javax/xml/transform/URIResolver.java b/javax/xml/transform/URIResolver.java
index a3d8e8f41..e6315bba4 100644
--- a/javax/xml/transform/URIResolver.java
+++ b/javax/xml/transform/URIResolver.java
@@ -1,4 +1,4 @@
-/* URIResolver.java --
+/* URIResolver.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,7 +39,7 @@ package javax.xml.transform;
/**
* Callback that can resolve a URI into source XML for transformation.
* Equivalent to the SAX EntityResolver.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public interface URIResolver
diff --git a/javax/xml/transform/dom/DOMLocator.java b/javax/xml/transform/dom/DOMLocator.java
index 7f2370659..acea08e57 100644
--- a/javax/xml/transform/dom/DOMLocator.java
+++ b/javax/xml/transform/dom/DOMLocator.java
@@ -1,4 +1,4 @@
-/* DOMLocator.java --
+/* DOMLocator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/dom/DOMResult.java b/javax/xml/transform/dom/DOMResult.java
index 6656f42d4..7577f2d98 100644
--- a/javax/xml/transform/dom/DOMResult.java
+++ b/javax/xml/transform/dom/DOMResult.java
@@ -1,4 +1,4 @@
-/* DOMResult.java --
+/* DOMResult.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -87,7 +87,7 @@ public class DOMResult
{
this(node, nextSibling, null);
}
-
+
/**
* Constructor with the node to append to and the system ID.
*/
@@ -95,7 +95,7 @@ public class DOMResult
{
this(node, null, systemID);
}
-
+
/**
* Constructor with the node to append to, the child node before which
* the result should be appended, and the system ID.
diff --git a/javax/xml/transform/dom/DOMSource.java b/javax/xml/transform/dom/DOMSource.java
index 2321496dd..5922665a0 100644
--- a/javax/xml/transform/dom/DOMSource.java
+++ b/javax/xml/transform/dom/DOMSource.java
@@ -1,4 +1,4 @@
-/* DOMSource.java --
+/* DOMSource.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ import org.w3c.dom.Node;
/**
* An XML source specified as a W3C DOM node context.
- *
+ *
* @author (a href='mailto:dog@gnu.org'>Chris Burdess</a)
*/
public class DOMSource
diff --git a/javax/xml/transform/sax/SAXResult.java b/javax/xml/transform/sax/SAXResult.java
index ea6b8dd4b..265b9512c 100644
--- a/javax/xml/transform/sax/SAXResult.java
+++ b/javax/xml/transform/sax/SAXResult.java
@@ -1,4 +1,4 @@
-/* SAXResult.java --
+/* SAXResult.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,7 +49,7 @@ import org.xml.sax.ext.LexicalHandler;
*/
public class SAXResult implements Result
{
-
+
/**
* Factory feature indicating that SAX results are supported.
*/
@@ -102,7 +102,7 @@ public class SAXResult implements Result
{
lexicalHandler = handler;
}
-
+
/**
* Returns the lexical handler to which lexical events will be propagated.
* If a lexical handler is not set, the transformer should attempt to cast
diff --git a/javax/xml/transform/sax/SAXSource.java b/javax/xml/transform/sax/SAXSource.java
index 4b1f5ee2a..1ef4b7391 100644
--- a/javax/xml/transform/sax/SAXSource.java
+++ b/javax/xml/transform/sax/SAXSource.java
@@ -1,4 +1,4 @@
-/* SAXSource.java --
+/* SAXSource.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/sax/SAXTransformerFactory.java b/javax/xml/transform/sax/SAXTransformerFactory.java
index 8508777d2..2e3713760 100644
--- a/javax/xml/transform/sax/SAXTransformerFactory.java
+++ b/javax/xml/transform/sax/SAXTransformerFactory.java
@@ -1,4 +1,4 @@
-/* SAXTransformerFactory.java --
+/* SAXTransformerFactory.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/sax/TemplatesHandler.java b/javax/xml/transform/sax/TemplatesHandler.java
index ae8e6640e..86d46aceb 100644
--- a/javax/xml/transform/sax/TemplatesHandler.java
+++ b/javax/xml/transform/sax/TemplatesHandler.java
@@ -1,4 +1,4 @@
-/* TemplatesHandler.java --
+/* TemplatesHandler.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/sax/TransformerHandler.java b/javax/xml/transform/sax/TransformerHandler.java
index f31c3f8de..aae56e2a9 100644
--- a/javax/xml/transform/sax/TransformerHandler.java
+++ b/javax/xml/transform/sax/TransformerHandler.java
@@ -1,4 +1,4 @@
-/* TransformerHandler.java --
+/* TransformerHandler.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,12 +51,12 @@ import org.xml.sax.ext.LexicalHandler;
public interface TransformerHandler
extends ContentHandler, LexicalHandler, DTDHandler
{
-
+
/**
* Sets the result sink to be used as the output of the transformation.
* @exception IllegalArgumentException if the result is not a valid target
*/
- public void setResult(Result result)
+ public void setResult(Result result)
throws IllegalArgumentException;
/**
diff --git a/javax/xml/transform/stream/StreamResult.java b/javax/xml/transform/stream/StreamResult.java
index 8fbf3a365..b44e6ce58 100644
--- a/javax/xml/transform/stream/StreamResult.java
+++ b/javax/xml/transform/stream/StreamResult.java
@@ -1,4 +1,4 @@
-/* StreamResult.java --
+/* StreamResult.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/transform/stream/StreamSource.java b/javax/xml/transform/stream/StreamSource.java
index 65e2c7078..def73d8c0 100644
--- a/javax/xml/transform/stream/StreamSource.java
+++ b/javax/xml/transform/stream/StreamSource.java
@@ -1,4 +1,4 @@
-/* StreamSource.java --
+/* StreamSource.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/validation/Schema.java b/javax/xml/validation/Schema.java
index 46926c8c8..1329eabf2 100644
--- a/javax/xml/validation/Schema.java
+++ b/javax/xml/validation/Schema.java
@@ -1,4 +1,4 @@
-/* Schema.java --
+/* Schema.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,5 +57,5 @@ public abstract class Schema
public abstract Validator newValidator();
public abstract ValidatorHandler newValidatorHandler();
-
+
}
diff --git a/javax/xml/validation/SchemaFactory.java b/javax/xml/validation/SchemaFactory.java
index 0b83b6f4d..1c099bbe2 100644
--- a/javax/xml/validation/SchemaFactory.java
+++ b/javax/xml/validation/SchemaFactory.java
@@ -1,4 +1,4 @@
-/* SchemaFactory.java --
+/* SchemaFactory.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -188,33 +188,33 @@ public abstract class SchemaFactory
{
throw new SAXNotRecognizedException(name);
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public abstract ErrorHandler getErrorHandler();
-
+
public abstract void setErrorHandler(ErrorHandler errorHandler);
public abstract LSResourceResolver getResourceResolver();
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
-
+
/**
* Returns a schema based on the specified source resource.
* @param schema the source resource
@@ -234,7 +234,7 @@ public abstract class SchemaFactory
{
return newSchema(new StreamSource(schema));
}
-
+
/**
* Returns a schema based on the specified URL.
* @param schema the source resource
@@ -244,7 +244,7 @@ public abstract class SchemaFactory
{
return newSchema(new StreamSource(schema.toString()));
}
-
+
/**
* Parses the specified sources, and combine them into a single schema.
* The exact procedure and semantics of this depends on the schema
@@ -253,12 +253,12 @@ public abstract class SchemaFactory
*/
public abstract Schema newSchema(Source[] schemata)
throws SAXException;
-
+
/**
* Creates a special schema.
* The exact semantics of this depends on the schema language.
*/
public abstract Schema newSchema()
throws SAXException;
-
+
}
diff --git a/javax/xml/validation/SchemaFactoryLoader.java b/javax/xml/validation/SchemaFactoryLoader.java
index dc80a33cc..7d6013835 100644
--- a/javax/xml/validation/SchemaFactoryLoader.java
+++ b/javax/xml/validation/SchemaFactoryLoader.java
@@ -1,4 +1,4 @@
-/* SchemaFactory.java --
+/* SchemaFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,5 +48,5 @@ public abstract class SchemaFactoryLoader
}
public abstract SchemaFactory newFactory(String schemaLanguage);
-
+
}
diff --git a/javax/xml/validation/TypeInfoProvider.java b/javax/xml/validation/TypeInfoProvider.java
index 99bf2832f..c8bb227ec 100644
--- a/javax/xml/validation/TypeInfoProvider.java
+++ b/javax/xml/validation/TypeInfoProvider.java
@@ -1,4 +1,4 @@
-/* TypeInfoProvider.java --
+/* TypeInfoProvider.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,5 +79,5 @@ public abstract class TypeInfoProvider
* the startElement callback
*/
public abstract boolean isSpecified(int index);
-
+
}
diff --git a/javax/xml/validation/Validator.java b/javax/xml/validation/Validator.java
index 4a96fc13a..f12401a68 100644
--- a/javax/xml/validation/Validator.java
+++ b/javax/xml/validation/Validator.java
@@ -1,4 +1,4 @@
-/* Validator.java --
+/* Validator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -81,7 +81,7 @@ public abstract class Validator
*/
public abstract void validate(Source source, Result result)
throws SAXException, IOException;
-
+
public abstract void setErrorHandler(ErrorHandler errorHandler);
public abstract ErrorHandler getErrorHandler();
@@ -95,23 +95,23 @@ public abstract class Validator
{
throw new SAXNotRecognizedException(name);
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
}
diff --git a/javax/xml/validation/ValidatorHandler.java b/javax/xml/validation/ValidatorHandler.java
index 50cd15165..639086bbf 100644
--- a/javax/xml/validation/ValidatorHandler.java
+++ b/javax/xml/validation/ValidatorHandler.java
@@ -1,4 +1,4 @@
-/* ValidatorHandler.java --
+/* ValidatorHandler.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,7 +73,7 @@ public abstract class ValidatorHandler
public abstract void setErrorHandler(ErrorHandler errorHandler);
public abstract ErrorHandler getErrorHandler();
-
+
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
public abstract LSResourceResolver getResourceResolver();
@@ -89,7 +89,7 @@ public abstract class ValidatorHandler
}
throw new SAXNotRecognizedException(name);
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
@@ -99,17 +99,17 @@ public abstract class ValidatorHandler
}
throw new SAXNotRecognizedException(name);
}
-
+
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
throw new SAXNotRecognizedException(name);
}
-
+
}
diff --git a/javax/xml/xpath/XPath.java b/javax/xml/xpath/XPath.java
index 1bcfa63d2..eb652b1ae 100644
--- a/javax/xml/xpath/XPath.java
+++ b/javax/xml/xpath/XPath.java
@@ -1,4 +1,4 @@
-/* XPath.java --
+/* XPath.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -111,5 +111,5 @@ public interface XPath
String evaluate(String expression,
InputSource source)
throws XPathExpressionException;
-
+
}
diff --git a/javax/xml/xpath/XPathConstants.java b/javax/xml/xpath/XPathConstants.java
index fbfb99981..9c39db9f3 100644
--- a/javax/xml/xpath/XPathConstants.java
+++ b/javax/xml/xpath/XPathConstants.java
@@ -1,4 +1,4 @@
-/* XPathConstants.java --
+/* XPathConstants.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,25 +57,25 @@ public class XPathConstants
*/
public static final QName NUMBER =
new QName("http://java.sun.com/jaxp/xpath/dom#number", "");
-
+
/**
* The XPath 1.0 string data type.
*/
public static final QName STRING =
new QName("http://java.sun.com/jaxp/xpath/dom#string", "");
-
+
/**
* The XPath 1.0 boolean data type.
*/
public static final QName BOOLEAN =
new QName("http://java.sun.com/jaxp/xpath/dom#boolean", "");
-
+
/**
* The XPath 1.0 node-set data type.
*/
public static final QName NODESET =
new QName("http://java.sun.com/jaxp/xpath/dom#node-set", "");
-
+
/**
* The XPath 1.0 node data type.
*/
@@ -87,5 +87,5 @@ public class XPathConstants
*/
public static final String DOM_OBJECT_MODEL =
"http://java.sun.com/jaxp/xpath/dom";
-
+
}
diff --git a/javax/xml/xpath/XPathException.java b/javax/xml/xpath/XPathException.java
index cf004c179..7d45fa747 100644
--- a/javax/xml/xpath/XPathException.java
+++ b/javax/xml/xpath/XPathException.java
@@ -1,4 +1,4 @@
-/* XPathException.java --
+/* XPathException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ public class XPathException
{
super(message);
}
-
+
public XPathException(Throwable cause)
{
super(cause);
diff --git a/javax/xml/xpath/XPathExpression.java b/javax/xml/xpath/XPathExpression.java
index 9ead27b8f..89c6494c2 100644
--- a/javax/xml/xpath/XPathExpression.java
+++ b/javax/xml/xpath/XPathExpression.java
@@ -1,4 +1,4 @@
-/* XPathExpression.java --
+/* XPathExpression.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/xpath/XPathExpressionException.java b/javax/xml/xpath/XPathExpressionException.java
index 6257adb47..543570485 100644
--- a/javax/xml/xpath/XPathExpressionException.java
+++ b/javax/xml/xpath/XPathExpressionException.java
@@ -1,4 +1,4 @@
-/* XPathExpressionException.java --
+/* XPathExpressionException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/xpath/XPathFactory.java b/javax/xml/xpath/XPathFactory.java
index 76a88a10c..62c17154a 100644
--- a/javax/xml/xpath/XPathFactory.java
+++ b/javax/xml/xpath/XPathFactory.java
@@ -1,4 +1,4 @@
-/* XPathFactory.java --
+/* XPathFactory.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,7 +58,7 @@ public abstract class XPathFactory
* The default property name according to the JAXP specification.
*/
public static final String DEFAULT_PROPERTY_NAME =
- "javax.xml.xpath.XPathFactory";
+ "javax.xml.xpath.XPathFactory";
/**
* The default object model URI.
@@ -223,5 +223,5 @@ public abstract class XPathFactory
* Returns a new XPath evaluation environment.
*/
public abstract XPath newXPath();
-
+
}
diff --git a/javax/xml/xpath/XPathFactoryConfigurationException.java b/javax/xml/xpath/XPathFactoryConfigurationException.java
index 0fc68a763..929cbe64b 100644
--- a/javax/xml/xpath/XPathFactoryConfigurationException.java
+++ b/javax/xml/xpath/XPathFactoryConfigurationException.java
@@ -1,4 +1,4 @@
-/* XPathFactoryConfigurationException.java --
+/* XPathFactoryConfigurationException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/xpath/XPathFunction.java b/javax/xml/xpath/XPathFunction.java
index dbda11bfe..4406e318c 100644
--- a/javax/xml/xpath/XPathFunction.java
+++ b/javax/xml/xpath/XPathFunction.java
@@ -1,4 +1,4 @@
-/* XPathFunction.java --
+/* XPathFunction.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,5 +55,5 @@ public interface XPathFunction
@SuppressWarnings("unchecked")
Object evaluate(List args)
throws XPathFunctionException;
-
+
}
diff --git a/javax/xml/xpath/XPathFunctionException.java b/javax/xml/xpath/XPathFunctionException.java
index db680ae65..c1d3b98cd 100644
--- a/javax/xml/xpath/XPathFunctionException.java
+++ b/javax/xml/xpath/XPathFunctionException.java
@@ -1,4 +1,4 @@
-/* XPathFunctionException.java --
+/* XPathFunctionException.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/javax/xml/xpath/XPathFunctionResolver.java b/javax/xml/xpath/XPathFunctionResolver.java
index 208f43216..e896690e6 100644
--- a/javax/xml/xpath/XPathFunctionResolver.java
+++ b/javax/xml/xpath/XPathFunctionResolver.java
@@ -1,4 +1,4 @@
-/* XPathFunctionResolver.java --
+/* XPathFunctionResolver.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,5 +55,5 @@ public interface XPathFunctionResolver
*/
XPathFunction resolveFunction(QName functionName,
int arity);
-
+
}
diff --git a/javax/xml/xpath/XPathVariableResolver.java b/javax/xml/xpath/XPathVariableResolver.java
index 35226894a..2da4a6e63 100644
--- a/javax/xml/xpath/XPathVariableResolver.java
+++ b/javax/xml/xpath/XPathVariableResolver.java
@@ -1,4 +1,4 @@
-/* XPathVariableResolver.java --
+/* XPathVariableResolver.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,5 +48,5 @@ public interface XPathVariableResolver
{
Object resolveVariable(QName variableName);
-
+
}