You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by kl...@apache.org on 2001/04/11 23:39:55 UTC
cvs commit: xml-fop/src/org/apache/fop/datatypes LengthPair.java
klease 01/04/11 14:39:55
Added: src/org/apache/fop/datatypes LengthPair.java
Log:
New datatype to represent the property border-separation
Revision Changes Path
1.1 xml-fop/src/org/apache/fop/datatypes/LengthPair.java
Index: LengthPair.java
===================================================================
/*-- $Id: LengthPair.java,v 1.1 2001/04/11 21:39:55 klease Exp $ --
* 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;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org