From b36d96ca65dfe216087a1684d14b16a3eab5a500 Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Sun, 11 Nov 2001 14:10:29 +0000 Subject: [PATCH] A few changes to tie in some more LayoutManager classes git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194555 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/area/MainReference.java | 1 + src/org/apache/fop/area/MinOptMax.java | 2 +- src/org/apache/fop/area/Span.java | 1 + src/org/apache/fop/area/inline/InlineArea.java | 7 +++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/org/apache/fop/area/MainReference.java b/src/org/apache/fop/area/MainReference.java index 95b3bd82a..b18401995 100644 --- a/src/org/apache/fop/area/MainReference.java +++ b/src/org/apache/fop/area/MainReference.java @@ -19,6 +19,7 @@ public class MainReference extends Area implements Serializable { public void addSpan(Span span) { spanAreas.add(span); + span.setParent(this); } public List getSpans() { diff --git a/src/org/apache/fop/area/MinOptMax.java b/src/org/apache/fop/area/MinOptMax.java index e7ed4add5..8a6684cd1 100644 --- a/src/org/apache/fop/area/MinOptMax.java +++ b/src/org/apache/fop/area/MinOptMax.java @@ -14,7 +14,7 @@ package org.apache.fop.area; * variables are package visible. */ -public class MinOptMax { +public class MinOptMax implements java.io.Serializable { /** Publicly visible min(imum), opt(imum) and max(imum) values.*/ public int min; diff --git a/src/org/apache/fop/area/Span.java b/src/org/apache/fop/area/Span.java index 85012cdb9..20661dad7 100644 --- a/src/org/apache/fop/area/Span.java +++ b/src/org/apache/fop/area/Span.java @@ -22,6 +22,7 @@ public class Span extends Area { public void addFlow(Flow flow) { flowAreas.add(flow); + flow.setParent(this); } public int getColumnCount() { diff --git a/src/org/apache/fop/area/inline/InlineArea.java b/src/org/apache/fop/area/inline/InlineArea.java index d688ae038..5a63ef0ed 100644 --- a/src/org/apache/fop/area/inline/InlineArea.java +++ b/src/org/apache/fop/area/inline/InlineArea.java @@ -8,6 +8,7 @@ package org.apache.fop.area.inline; import org.apache.fop.area.Area; +import org.apache.fop.area.MinOptMax; import org.apache.fop.area.Property; import org.apache.fop.render.Renderer; @@ -45,6 +46,12 @@ public class InlineArea extends Area { return width; } + public MinOptMax getAllocationIPD() { + // Should also account for any borders and padding in the + // inline progression dimension + return new MinOptMax(width); + } + public void setOffset(int v) { verticalPosition = v; } -- 2.39.5