From: Karen Lease Date: Sun, 4 Mar 2001 21:27:10 +0000 (+0000) Subject: Add some utility accessors X-Git-Tag: fop-0_18_1~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=45ffd37060fb91b80f2e4147e7324fb827714365;p=xmlgraphics-fop.git Add some utility accessors git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194123 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/datatypes/CondLength.java b/src/org/apache/fop/datatypes/CondLength.java index 6114d4da8..a338f7586 100644 --- a/src/org/apache/fop/datatypes/CondLength.java +++ b/src/org/apache/fop/datatypes/CondLength.java @@ -51,6 +51,8 @@ package org.apache.fop.datatypes; import org.apache.fop.fo.Property; +import org.apache.fop.fo.properties.Constants; + /** * a space quantity in XSL (space-before, space-after) */ @@ -83,4 +85,12 @@ public class CondLength implements CompoundDatatype { public Property getLength() { return this.length; } + + public boolean isDiscard() { + return this.conditionality.getEnum() == Constants.DISCARD ; + } + + public int mvalue() { + return this.length.getLength().mvalue(); + } }