]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add some utility accessors
authorKaren Lease <klease@apache.org>
Sun, 4 Mar 2001 21:27:10 +0000 (21:27 +0000)
committerKaren Lease <klease@apache.org>
Sun, 4 Mar 2001 21:27:10 +0000 (21:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194123 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/datatypes/CondLength.java

index 6114d4da82e55edc7b3bca90a2a3344a03a9ac32..a338f75864fae5371174151f71e915fd39650af5 100644 (file)
@@ -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();
+  }
 }