This fixes the BoxView constructor in the StyledViewFactory.
2005-08-25 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/text/StyledEditorKit.java
(StyledViewFactory.create): Use new BoxView constructor. Throw
AssertionError if an unknown element type is encountered,
since this should not happen.
/Roman
Index: javax/swing/text/StyledEditorKit.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/StyledEditorKit.java,v
retrieving revision 1.12
diff -u -r1.12 StyledEditorKit.java
--- javax/swing/text/StyledEditorKit.java 29 Jul 2005 23:02:02 -0000 1.12
+++ javax/swing/text/StyledEditorKit.java 25 Aug 2005 19:30:58 -0000
@@ -488,12 +488,15 @@
else if (name.equals(AbstractDocument.ParagraphElementName))
view = new ParagraphView(element);
else if (name.equals(AbstractDocument.SectionElementName))
- view = new BoxView(element);
+ view = new BoxView(element, View.Y_AXIS);
else if (name.equals(StyleConstants.ComponentElementName))
view = new ComponentView(element);
else if (name.equals(StyleConstants.IconElementName))
view = new IconView(element);
-
+ else
+ throw new AssertionError("Unknown Element type: "
+ + element.getClass().getName() + " : "
+ + name);
return view;
}
}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches