package org.apache.fop.fo.properties;
import org.apache.fop.fo.properties.Property;
import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.Numeric;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.expr.PropertyException;
public class BorderCommonWidth extends Property {
public static final int THIN = 1;
public static final int MEDIUM = 2;
public static final int THICK = 3;
private static final String[] rwEnums = {
null
,"thin"
,"medium"
,"thick"
};
private static final double[] mappedPoints = {
0d
,0.5d
,1d
,2d
};
@param@param@return
public Numeric getMappedLength(FONode node, int property, int enum)
throws PropertyException
{
return
Length.makeLength(property, mappedPoints[enum], Length.PT);
}
public int getEnumIndex(String enum) throws PropertyException {
return enumValueToIndex(enum, rwEnums);
}
public String getEnumText(int index) {
return rwEnums[index];
}
}