Index: javax/swing/text/ParagraphView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/ParagraphView.java,v
retrieving revision 1.1
diff -u -r1.1 ParagraphView.java
--- javax/swing/text/ParagraphView.java 29 Jul 2005 09:56:10 -0000 1.1
+++ javax/swing/text/ParagraphView.java 25 Aug 2005 19:12:55 -0000
@@ -38,10 +38,28 @@
package javax.swing.text;
-// TODO: Implement this class.
-public class ParagraphView
- extends FlowView
+/**
+ * A address@hidden FlowView} that flows it's children horizontally and boxes the rows
+ * vertically.
+ *
+ * @author Roman Kennke (address@hidden)
+ */
+public class ParagraphView extends FlowView implements TabExpander
{
+ /**
+ * A specialized horizontal BoxView
that represents exactly
+ * one row in a ParagraphView
.
+ */
+ class Row extends BoxView
+ {
+ /**
+ * Creates a new instance of Row
.
+ */
+ Row(Element el)
+ {
+ super(el, X_AXIS);
+ }
+ }
/**
* Creates a new ParagraphView
for the given
@@ -49,8 +67,23 @@
*
* @param element the element that is rendered by this ParagraphView
*/
- public ParagraphView(Element element)
+ public ParagraphView(Element element)
+ {
+ super(element, Y_AXIS);
+ }
+
+ public float nextTabStop(float x, int tabOffset)
+ {
+ throw new InternalError("Not implemented yet");
+ }
+
+ /**
+ * Creates a new view that represents a row within a flow.
+ *
+ * @return a view for a new row
+ */
+ protected View createRow()
{
- super(element);
+ return new Row(getElement());
}
}