diff options
author | Karen Lease <klease@apache.org> | 2001-04-11 21:39:55 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2001-04-11 21:39:55 +0000 |
commit | 8dc9d50fea90ab3812cac2823b5ba56676128f11 (patch) | |
tree | 5e8c349ce7e739216ff001df4ae2e4de2a4f625d /src | |
parent | d7d50983f8c96a0a0ecaae67a5adebef9e169903 (diff) | |
download | xmlgraphics-fop-8dc9d50fea90ab3812cac2823b5ba56676128f11.tar.gz xmlgraphics-fop-8dc9d50fea90ab3812cac2823b5ba56676128f11.zip |
New datatype to represent the property border-separation
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194200 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/org/apache/fop/datatypes/LengthPair.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/org/apache/fop/datatypes/LengthPair.java b/src/org/apache/fop/datatypes/LengthPair.java new file mode 100644 index 000000000..00e70fded --- /dev/null +++ b/src/org/apache/fop/datatypes/LengthPair.java @@ -0,0 +1,47 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.datatypes; + +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.Property; + +/** + * This datatype hold a pair of lengths, specifiying the dimensions in + * both inline and block-progression-directions. + * It is currently only used to specify border-separation in tables. + */ +public class LengthPair implements CompoundDatatype { + + private Property ipd; + private Property bpd; + + // From CompoundDatatype + public void setComponent(String sCmpnName, Property cmpnValue, + boolean bIsDefault) { + if (sCmpnName.equals("block-progression-direction")) + bpd = cmpnValue; + else if (sCmpnName.equals("inline-progression-direction")) + ipd = cmpnValue; + } + + // From CompoundDatatype + public Property getComponent(String sCmpnName) { + if (sCmpnName.equals("block-progression-direction")) + return getBPD(); + else if (sCmpnName.equals("inline-progression-direction")) + return getIPD(); + else return null; // SHOULDN'T HAPPEN + } + + public Property getIPD() { + return this.ipd; + } + + public Property getBPD() { + return this.bpd; + } +} |