aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-25 17:06:46 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-25 17:06:46 +0000
commite2e87bec61fc0f36023221b099c469f8ba2251ed (patch)
tree10a804a16714087f965473d05b652a972fe49d9a /src/java
parent443169f2501500ab3d69cf11a58a707945860218 (diff)
downloadxmlgraphics-fop-e2e87bec61fc0f36023221b099c469f8ba2251ed.tar.gz
xmlgraphics-fop-e2e87bec61fc0f36023221b099c469f8ba2251ed.zip
move fo/flow/Leader.getAllocIPD() to layoutmgr/AddLMVisitor.getLeaderAllocIPD()
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java12
-rw-r--r--src/java/org/apache/fop/layoutmgr/AddLMVisitor.java11
2 files changed, 11 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java
index be9770ea8..df1e96af5 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -67,7 +67,6 @@ import org.apache.fop.fo.FOTreeControl;
import org.apache.fop.fonts.Font;
import org.apache.fop.fo.properties.CommonMarginInline;
import org.apache.fop.fo.properties.CommonRelativePosition;
-import org.apache.fop.layoutmgr.MinOptMax;
/**
* Class modelling fo:leader object. See Sec. 6.6.9 of the XSL-FO Standard.
@@ -178,16 +177,7 @@ public class Leader extends FObjMixed {
}
- public MinOptMax getAllocIPD(int ipd) {
- // length of the leader
- int opt = getLength("leader-length.optimum", ipd);
- int min = getLength("leader-length.minimum", ipd);
- int max = getLength("leader-length.maximum", ipd);
-
- return new MinOptMax(min, opt, max);
- }
-
- protected int getLength(String prop, int dim) {
+ public int getLength(String prop, int dim) {
int length;
Length maxlength = properties.get(prop).getLength();
if (maxlength instanceof PercentLength) {
diff --git a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
index d1ce46a52..4a3139df5 100644
--- a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
+++ b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
@@ -278,7 +278,7 @@ public class AddLMVisitor extends FOTreeVisitor {
}
protected MinOptMax getAllocationIPD(int refIPD) {
- return node.getAllocIPD(refIPD);
+ return getLeaderAllocIPD(node, refIPD);
}
/*protected void offsetArea(LayoutContext context) {
@@ -293,6 +293,15 @@ public class AddLMVisitor extends FOTreeVisitor {
currentLMList.add(lm);
}
+ public MinOptMax getLeaderAllocIPD(Leader node, int ipd) {
+ // length of the leader
+ int opt = node.getLength("leader-length.optimum", ipd);
+ int min = node.getLength("leader-length.minimum", ipd);
+ int max = node.getLength("leader-length.maximum", ipd);
+
+ return new MinOptMax(min, opt, max);
+ }
+
private InlineArea getLeaderInlineArea(Leader node) {
node.setup();
InlineArea leaderArea = null;