diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-03-11 13:28:08 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-03-11 13:28:08 +0000 |
commit | b23a3cab041d6ba0f093fb4e8efad55c1bee8c37 (patch) | |
tree | 514e06627e0e1d616c5ec412c0a8353fa6349d49 /src/java | |
parent | 6f741562339691572fd56b1b523a910108585362 (diff) | |
download | xmlgraphics-fop-b23a3cab041d6ba0f093fb4e8efad55c1bee8c37.tar.gz xmlgraphics-fop-b23a3cab041d6ba0f093fb4e8efad55c1bee8c37.zip |
Convenience method to access conditionality component.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198479 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/fo/properties/SpaceProperty.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/properties/SpaceProperty.java b/src/java/org/apache/fop/fo/properties/SpaceProperty.java index d28f38c37..2ef52a48f 100644 --- a/src/java/org/apache/fop/fo/properties/SpaceProperty.java +++ b/src/java/org/apache/fop/fo/properties/SpaceProperty.java @@ -18,6 +18,7 @@ package org.apache.fop.fo.properties; +import org.apache.fop.fo.Constants; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.expr.PropertyException; @@ -126,6 +127,14 @@ public class SpaceProperty extends LengthRangeProperty { return this.conditionality; } + /** + * Indicates if the length can be discarded on certain conditions. + * @return true if the length can be discarded. + */ + public boolean isDiscard() { + return this.conditionality.getEnum() == Constants.EN_DISCARD; + } + public String toString() { return "Space[" + "min:" + getMinimum().getObject() + |