harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r427121 [1/29] - in /incubator/harmony/enhanced/classlib/trunk/modules/swing: make/ src/main/java/common/javax/swing/ src/main/java/common/javax/swing/text/ src/main/java/common/javax/swing/text/html/ src/main/java/common/javax/swing/text/h...
Date Mon, 31 Jul 2006 14:08:55 GMT
Author: mloenko
Date: Mon Jul 31 07:08:47 2006
New Revision: 427121

URL: http://svn.apache.org/viewvc?rev=427121&view=rev
Log:
integration of HARMONY-948
Contribution of The HTML sub-component of the SWING component

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BRView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BackgroundImageLoader.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/CSS.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/CascadedStyle.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/CompositeAttributeSet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormSubmitEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormViewComponentFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FormViewUtils.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FrameSetTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/FrameTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HRuleTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTML.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLEditorKit.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLFrameHyperlinkEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/HTMLWriter.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/InlineView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/InvisibleTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ListView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/MinimalHTMLWriter.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/NoFramesTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ObjectView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/Option.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ParagraphView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/Selector.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/SelectorMatcher.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/SimpleSelector.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/Specificity.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/SpecificityComparator.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/StyleSheet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/TableTagView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/TagIterator.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ViewAttributeSet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/default.css
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/AttributeList.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ContentModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTD.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTDConstants.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DTDUtilities.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/DocumentParser.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/Element.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ElementsHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/EntitiesHandler.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/Entity.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/HTMLConstants.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/Parser.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/ParserDelegator.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/TagElement.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/parser/transitional401.bdtd   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/HTMLIconFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSGrammar.jj
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSLogger.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParser.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParserConstants.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/CSSParserTokenManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/NOTE.txt
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/ParseException.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/SimpleCharStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/Token.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/TokenMgrError.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/TokenResolver.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/metamodel/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/metamodel/Property.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/metamodel/RuleSet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/cssparser/metamodel/Sheet.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/Form.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormAttributes.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormButtonModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormElement.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormFieldsetModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormOption.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormOptionGroup.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormRootOptionGroup.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormSelectComboBoxModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormSelectListModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormSelectModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormTextModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/form/FormToggleButtonModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/icons/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/icons/loadingFailedIcon.gif   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/icons/loadingImageIcon.gif   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/text/html/icons/noImageIcon.gif   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/BlockViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/CSSTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/CSS_AttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/FormSubmitEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/FormViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/FormView_FormInputElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/FormView_FormSelectElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/FormView_FormTextAreaElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocumentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocumentTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_BlockElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_InsertsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_ReaderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_Reader_ActionsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_Reader_FormActionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_RunElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLEditorKitTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLEditorKit_HTMLFactoryTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLEditorKit_HTMLTextActionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLEditorKit_InsertHTMLTextActionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLFrameHyperlinkEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLWriterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTML_AttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTML_TagTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTML_UnknownTagTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/ImageViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/InlineViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/ListViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/MinimalHTMLWriterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/OptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/ParagraphViewTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/ParagraphView_RequirementsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheetTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_BoxPainterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundAttachmentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundImageTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundPositionAdvancedTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundPositionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundRepeatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BackgroundTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BoldTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderBottomTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderBottomWidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderColorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderLeftTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderLeftWidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderPartTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderRightTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderRightWidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderStyleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderTopTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderTopWidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderWidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderWidthTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ClearTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ColorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_DisplayTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FontFamilyTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FontSizeLengthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FontSizeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FontTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_FontVariantTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_HeightTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ItalicTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_LengthTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_LetterSpacingTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_LineHeightTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ListStyleImageTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ListStylePositionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ListStyleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_ListStyleTypeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginBottomTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginLeftTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginRightTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_MarginTopTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_PaddingTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_SpaceTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_SpacingTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_TextAlignTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_TextDecorationTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_TextIndentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_TextTransformTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_VerticalAlignTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_WhiteSpaceTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_WidthTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_WordSpacingTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_Large_Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ResolvedRulesClassTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ResolvedRulesTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_RulesTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_Small_Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_StyleSheetsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_TranslateHTMLToCSS.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ViewAttributesTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/AttributeListTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ContentModelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/DTD401Test.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/DTDConstantsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/DTDTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/DocumentParserTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/ElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/EntityTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/TagElementTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/Utils.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/Utils401.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/html/parser/test41.html
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/swing/make/patternset.txt
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultStyledDocument.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/FlowView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/ParagraphView.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/View.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/org/apache/harmony/x/swing/StringConstants.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/make/patternset.txt
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/make/patternset.txt?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/make/patternset.txt (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/make/patternset.txt Mon Jul 31 07:08:47 2006
@@ -22,9 +22,16 @@
 javax/swing/plaf/metal/*
 javax/swing/table/*
 javax/swing/text/*
+javax/swing/text/html/*
+javax/swing/text/html/parser/*
 javax/swing/tree/*
 javax/swing/undo/*
 org/apache/harmony/x/swing/*
+org/apache/harmony/x/swing/text/html/*
+org/apache/harmony/x/swing/text/html/cssparser/*
+org/apache/harmony/x/swing/text/html/cssparser/metamodel/*
+org/apache/harmony/x/swing/text/html/form/*
+org/apache/harmony/x/swing/text/html/icons/*
 org/apache/harmony/x/swing/filechooser/*
 org/apache/harmony/x/swing/filechooser/windows/*
 org/apache/harmony/x/swing/plaf/resources/basic/*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JEditorPane.java Mon Jul 31 07:08:47 2006
@@ -22,11 +22,14 @@
 
 import java.awt.Container;
 import java.awt.Dimension;
+import java.awt.Rectangle;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.StringReader;
 import java.io.StringWriter;
 import java.net.URL;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 
 import javax.accessibility.AccessibleContext;
@@ -40,6 +43,7 @@
 import javax.swing.text.AbstractDocument;
 import javax.swing.text.AttributeSet;
 import javax.swing.text.BadLocationException;
+import javax.swing.text.ChangedCharSetException;
 import javax.swing.text.DefaultEditorKit;
 import javax.swing.text.Document;
 import javax.swing.text.EditorKit;
@@ -51,6 +55,10 @@
 import javax.swing.text.WrappedPlainView;
 //import javax.swing.text.html.HTML;
 //import javax.swing.text.html.HTMLDocument;
+//import javax.swing.text.html.HTMLEditorKit;
+//import javax.swing.text.rtf.RTFEditorKit;
+
+import org.apache.harmony.x.swing.StringConstants;
 
 public class JEditorPane extends JTextComponent {
     protected class AccessibleJEditorPane extends
@@ -176,7 +184,7 @@
 
     private static final String RTF_HEADER = "{\\rtf";
 
-    private static final String HTML_HEADER = "<html>";
+    private static final String HTML_HEADER = "<html";
 
     private ArrayList localContentTypes = new ArrayList();
 
@@ -388,7 +396,8 @@
                         break;
                     }
                     buffer = new String(bytes);
-                    if (HTML_HEADER.equals("<" + buffer.toLowerCase())) {
+                    if (("<" + buffer.toLowerCase()).startsWith(HTML_HEADER)) {
+
                         return HTML_CONTENT_TYPE;
                     }
                 } else {
@@ -449,13 +458,14 @@
 
     public void read(final InputStream stream, final Object type)
                    throws IOException {
-       //Here is some bug for HTML text: may be fix in DefaultEditorKit.read or
-        //here. API is very hazily for this one.
        if (type instanceof String) {
            setContentType((String)type);
        }
        try {
-          editorKit.read(stream, getDocument(), 0);
+          Document doc = getDocument();
+          doc.putProperty(StringConstants.IGNORE_CHARSET_DIRECTIVE,
+                          Boolean.TRUE);
+          editorKit.read(new InputStreamReader(stream), doc, 0);
        } catch (BadLocationException e) {
        }
     }
@@ -490,11 +500,9 @@
     }
 
     public void scrollToReference(final String ref) {
-        /*if (true) {
-            throw new UnsupportedOperationException("Not implemented");
-        }*/
-       //temporarily commented-out: HTMLDocument not implemented
-        /*Document doc = getDocument();
+        // temporarily commented-out: HTMLDocument not implemented
+        /*
+        Document doc = getDocument();
         if (ref == null || !(doc instanceof HTMLDocument)) {
             return;
         }
@@ -518,22 +526,35 @@
         if (visibleRect != null) {
             rect.height = visibleRect.height;
         }
-        scrollRectToVisible(rect); */
+        scrollRectToVisible(rect);
+        */
+    }
+
+    /*
+    private boolean changeEditoKit(final String contentType) {
+        return !((RTF_CONTENT_TYPE.equals(contentType)
+                && editorKit instanceof RTFEditorKit)
+              || (HTML_CONTENT_TYPE.equals(contentType)
+                && editorKit instanceof HTMLEditorKit)
+              || (PLAIN_CONTENT_TYPE.equals(contentType)
+                && editorKit instanceof PlainEditorKit));
     }
+    */
 
     public final void setContentType(final String type) {
         if (type == "text/html" || type == "text/rtf") {
             System.err.println("WARNING: HTML/RTF is not supported yet. Plain text will be shown");
         }
-       /* if (type == "text/html" || type == "text/rtf") {
-            throw new UnsupportedOperationException("Not implemented");
-        }
+        /*
         int index = contentTypes.indexOf(type);
         contentType = (index >= 0) ? (String)contentTypes.get(index)
                 : PLAIN_CONTENT_TYPE;
-        EditorKit kit = JEditorPane.createEditorKitForContentType(contentType);
-        updateEditorKit((kit != null) ? kit : new PlainEditorKit());
-        updateDocument(editorKit); */
+        if (changeEditoKit(contentType)) {
+            EditorKit kit = getEditorKitForContentType(contentType);
+            updateEditorKit((kit != null) ? kit : new PlainEditorKit());
+            updateDocument(editorKit);
+        } 
+        */
     }
 
     private String getContentTypeByEditorKit(final EditorKit kit) {
@@ -577,13 +598,12 @@
             updateEditorKit(kit);
             updateDocument(kit);
         }
-         /*String newContentType = getContentTypeByEditorKit(kit);
-         if (newContentType == "text/html" || newContentType == "text/rtf") {
-             throw new UnsupportedOperationException("Not implemented");
-         }
+        /*
+         String newContentType = getContentTypeByEditorKit(kit);
          updateEditorKit(kit);
          updateDocument(kit);
-         contentType = newContentType; */
+         contentType = newContentType;
+         */
     }
 
     public void setEditorKitForContentType(final String type,
@@ -601,10 +621,27 @@
         setPage(new URL(page));
     }
 
-    private void documentLoading(final InputStream str, final Document doc)
+    private void documentLoading(final InputStream str, final Document doc,
+                                 final URL url)
             throws IOException {
         try {
             editorKit.read(str, doc, 0);
+        } catch (ChangedCharSetException e) {
+            try {
+                doc.putProperty(StringConstants.IGNORE_CHARSET_DIRECTIVE,
+                                Boolean.TRUE);
+                doc.remove(0, doc.getLength());
+                final String htmlAttribute = e.getCharSetSpec();
+                final int charSetIndex = htmlAttribute.lastIndexOf("charset=");
+                if (charSetIndex >= 0) {
+                    String charSet = htmlAttribute.substring(charSetIndex + 8);
+                    InputStreamReader reader =
+                        new InputStreamReader(url.openStream(),
+                                              Charset.forName(charSet));
+                    editorKit.read(reader, doc, 0);
+                }
+             } catch (BadLocationException e1) {
+             }
         } catch (BadLocationException e) {
         }
     }
@@ -612,14 +649,17 @@
     private class AsynchLoad extends Thread {
         InputStream inputStream;
         boolean successfulLoading = true;
-        public AsynchLoad(final int priority, final InputStream stream) {
+        URL url;
+        public AsynchLoad(final int priority, final InputStream stream,
+                          final URL url) {
            super();
            setPriority(priority);
            inputStream = stream;
+           this.url = url;
         }
         public void run() {
             try {
-                documentLoading(inputStream, getDocument());
+                documentLoading(inputStream, getDocument(), url);
             } catch (IOException e) {
                 successfulLoading = false;
             }
@@ -627,11 +667,9 @@
     }
 
     public void setPage(final URL page) throws IOException {
-        /*if (true) {
-            throw new UnsupportedOperationException("Not implemented");
-        }*/
-       //temporarily commented-out: HTMLDocument not implemented
-        /*String url = page.toString();
+        //temporarily commented-out: HTMLDocument not implemented
+        /*
+        String url = page.toString();
         String baseUrl = getBaseURL(url);
         Document oldDoc = getDocument();
         if (baseUrl != null
@@ -650,7 +688,8 @@
         //Perhaps, it is reasonable only for HTMLDocument...
         if (newDoc instanceof HTMLDocument) {
             newDoc.putProperty(Document.StreamDescriptionProperty, baseUrl);
-            newDoc.putProperty("IgnoreCharsetDirective", new Boolean(true));
+            newDoc.putProperty(StringConstants.IGNORE_CHARSET_DIRECTIVE,
+                               new Boolean(false));
             try {
                 ((HTMLDocument)newDoc).setBase(new URL(baseUrl));
             } catch (IOException e) {
@@ -665,20 +704,21 @@
         if (asynchronousLoadPriority >= 0) {
             setDocument(newDoc);
             AsynchLoad newThread = new AsynchLoad(asynchronousLoadPriority,
-                                                  stream);
+                                                  stream, page);
             newThread.start();
             if (newThread.successfulLoading) {
                 changePage(page);
             }
         } else {
             try {
-                documentLoading(stream, newDoc);
+                documentLoading(stream, newDoc, page);
                 stream.close();
                 setDocument(newDoc);
                 changePage(page);
             } catch (IOException e) {
             }
-        } */
+        }
+        */
     }
 
     private void changePage(final URL newPage) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/AbstractDocument.java Mon Jul 31 07:08:47 2006
@@ -65,7 +65,7 @@
 
         private transient AttributeSet attrs;
 
-        private Element parent;
+        private final Element parent;
 
         public AbstractElement(final Element parent,
                                final AttributeSet attributes) {
@@ -180,11 +180,9 @@
 
         public Object getAttribute(final Object key) {
             Object value = attrs.getAttribute(key);
-            if (value == null && parent != null) {
-                AttributeSet resolveSet = parent.getAttributes();
-                if (resolveSet != null) {
-                    value = resolveSet.getAttribute(key);
-                }
+            AttributeSet resolver = getResolveParent();
+            if (value == null && resolver != null) {
+                value = resolver.getAttribute(key);
             }
             return value;
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/BoxView.java Mon Jul 31 07:08:47 2006
@@ -30,6 +30,7 @@
 import javax.swing.text.Position.Bias;
 
 import org.apache.harmony.x.swing.SizeRequirementsHelper;
+import org.apache.harmony.x.swing.Utilities;
 
 
 public class BoxView extends CompositeView {
@@ -85,19 +86,20 @@
     public float getMinimumSpan(final int axis) {
         isAxisValid(axis);
 
-        return getTotalRequirements(axis).minimum;
+        return getTotalRequirements(axis).minimum + getSideInset(axis);
     }
 
     public float getPreferredSpan(final int axis)  {
         isAxisValid(axis);
 
-        return getTotalRequirements(axis).preferred;
+        return getTotalRequirements(axis).preferred + getSideInset(axis);
     }
 
     public float getMaximumSpan(final int axis) {
         isAxisValid(axis);
 
-        return getTotalRequirements(axis).maximum;
+        return Utilities.safeIntSum(getTotalRequirements(axis).maximum,
+                                    getSideInset(axis));
     }
 
     public int getResizeWeight(final int axis) {
@@ -116,12 +118,12 @@
     }
 
     public void paint(final Graphics g, final Shape shape) {
-        final Rectangle bounds = shape.getBounds();
+        final Rectangle insideAlloc = getInsideAllocation(shape);
         final Rectangle allocation = new Rectangle();
         final Rectangle clipBounds = g.getClipBounds();
 
         for (int i = 0; i < getViewCount(); i++) {
-            allocation.setBounds(bounds);
+            allocation.setBounds(insideAlloc);
             childAllocation(i, allocation);
             if (allocation.intersects(clipBounds)) {
                 paintChild(g, allocation, i);
@@ -160,8 +162,8 @@
     }
 
     public void setSize(final float width, final float height) {
-        layout((int)(width - getLeftInset() - getRightInset()),
-               (int)(height - getTopInset() - getBottomInset()));
+        layout((int)(width - getSideInset(X_AXIS)),
+               (int)(height - getSideInset(Y_AXIS)));
     }
 
     public int getWidth() {
@@ -560,4 +562,10 @@
          return newArray;
      }
 
+    private int getSideInset(final int axis) {
+        if (axis == X_AXIS) {
+            return getLeftInset() + getRightInset();
+        }
+        return getTopInset() + getBottomInset();
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/CompositeView.java Mon Jul 31 07:08:47 2006
@@ -102,7 +102,7 @@
     public void setParent(final View parentView) {
         super.setParent(parentView);
 
-        if (getViewCount() == 0) {
+        if (parentView != null && getViewCount() == 0) {
             loadChildren(getViewFactory());
         }
     }
@@ -175,7 +175,7 @@
                            final Bias[] biasReturn) {
         biasReturn[0] = Bias.Forward;
 
-        Rectangle bounds = shape.getBounds();
+        Rectangle bounds = getInsideAllocation(shape);
 
         if (isBefore((int)x, (int)y, bounds)) {
             return getStartOffset();
@@ -212,6 +212,10 @@
     }
 
     protected void loadChildren(final ViewFactory factory) {
+        if (factory == null) {
+            return;
+        }
+        
         final int count = getElement().getElementCount();
 
         View[] views = new View[count];

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java?rev=427121&r1=427120&r2=427121&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/DefaultEditorKit.java Mon Jul 31 07:08:47 2006
@@ -22,7 +22,9 @@
 import java.awt.event.ActionEvent;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.Reader;
 import java.io.Writer;
 import javax.swing.Action;
@@ -316,15 +318,7 @@
 
     public void read(final InputStream in, final Document doc, final int pos)
             throws IOException, BadLocationException {
-        byte[] readArray = new byte[in.available()];
-        in.read(readArray);
-        String readStr = new String(readArray);
-        doc.putProperty(EndOfLineStringProperty, null);
-        if (checkDelimiters(readStr, doc)) {
-            readStr = replaceLineDelimiters(doc, readStr);
-        }
-        AttributeSet attributes = doc.getDefaultRootElement().getAttributes();
-        doc.insertString(pos, readStr, attributes);
+        read(new InputStreamReader(in), doc, pos);
     }
 
     public void read(final Reader in, final Document doc, final int pos)
@@ -342,10 +336,14 @@
         while ((numCharRead = in.read(readArray, 0, maxCharToRead)) != -1) {
             String readStr = new String(readArray, 0, numCharRead);
             if (!delimiterInitialised) {
-                delimiterInitialised = checkDelimiters(readStr, doc);
+                final String lineDelimeter = checkDelimiters(readStr);
+                if (lineDelimeter != null) {
+                    doc.putProperty(EndOfLineStringProperty, lineDelimeter);
+                    delimiterInitialised = true;
+                }
             }
             if (delimiterInitialised) {
-                readStr = replaceLineDelimiters(doc, readStr);
+                readStr = replaceLineDelimiters(readStr);
             }
             doc.insertString(offset, readStr, attributes);
             offset += readStr.length();
@@ -355,13 +353,7 @@
     public void write(final OutputStream out, final Document doc,
             final int pos, final int len) throws IOException,
             BadLocationException {
-        String writeStr = doc.getText(pos, len);
-        String newLine = (String) doc.getProperty(EndOfLineStringProperty);
-        if (newLine != null) {
-            writeStr = writeStr.replaceAll("\n", (String) doc
-                    .getProperty(EndOfLineStringProperty));
-        }
-        out.write(writeStr.getBytes());
+        write(new OutputStreamWriter(out), doc, pos, len);
     }
 
     public void write(final Writer out, final Document doc, final int pos,
@@ -375,7 +367,7 @@
         out.write(writeStr);
     }
 
-    private boolean checkDelimiters(final String str, final Document doc) {
+    private String checkDelimiters(final String str) {
         String lineDelimeter = null;
         final int length = str.length();
         for (int i = 0; i < length; i++) {
@@ -392,14 +384,10 @@
                 break;
             }
         }
-        if (lineDelimeter == null) {
-            return false;
-        }
-        doc.putProperty(EndOfLineStringProperty, lineDelimeter);
-        return true;
+        return lineDelimeter;
     }
 
-    private String replaceLineDelimiters(final Document doc, final String str) {
+    private String replaceLineDelimiters(final String str) {
         int index = str.indexOf('\r');
         if (index == -1) {
             return str;



Mime
View raw message