<xsl:template match="propval/parwmrel2abs">
<xsl:text>
- sbExpr.append(parentFO.properties.wmRelToAbs(PropertyList.</xsl:text>
+ sbExpr.append(parentFO.propertyList.wmRelToAbs(PropertyList.</xsl:text>
<xsl:value-of select="@dir"/>
<xsl:text>));</xsl:text>
</xsl:template>
import org.apache.fop.area.extensions.BookmarkData;
import org.apache.fop.fo.extensions.Outline;
-import org.apache.fop.apps.Document;
import java.util.ArrayList;
import java.util.List;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.flow.Marker;
+import org.apache.fop.fo.properties.FOPropertyMapping;
import org.xml.sax.Attributes;
/**
public class FObj extends FONode {
private static final String FO_URI = "http://www.w3.org/1999/XSL/Format";
+ public static HashMap propertyListTable = null;
+ public static HashMap elementTable = null;
+
/**
* Formatting properties for this fo element.
*/
- public PropertyList properties;
+ public PropertyList propertyList;
/**
* Property manager for handling some common properties.
*/
public FObj(FONode parent) {
super(parent);
+
+ if (propertyListTable == null) {
+ propertyListTable = new HashMap();
+ propertyListTable.putAll(FOPropertyMapping.getGenericMappings());
+ }
+
+ if (elementTable == null) {
+ elementTable = new HashMap();
+ for (Iterator iter =
+ FOPropertyMapping.getElementMappings().iterator();
+ iter.hasNext();) {
+ String elem = (String) iter.next();
+ elementTable.put(elem, FOPropertyMapping.getElementMapping(elem));
+ }
+ }
+
}
/** Marks input file containing this object **/
*/
public void handleAttrs(Attributes attlist) throws FOPException {
FObj parentFO = findNearestAncestorFObj();
- PropertyList parentProperties = null;
+ PropertyList parentPropertyList = null;
if (parentFO != null) {
- parentProperties = parentFO.getPropertiesForNamespace(FO_URI);
+ parentPropertyList = parentFO.getPropertiesForNamespace(FO_URI);
}
- properties = new PropertyList(this, parentProperties, FO_URI, name);
- properties.addAttributesToList(attlist);
- this.propMgr = makePropertyManager(properties);
+ propertyList = new PropertyList(this, parentPropertyList, FO_URI,
+ name);
+ propertyList.addAttributesToList(attlist);
+ this.propMgr = makePropertyManager(propertyList);
setWritingMode();
}
* For a given namespace, determine whether the properties of this object
* match that namespace.
* @param nameSpaceURI the namespace URI to be tested against
- * @return this.properties, if the namespaces match; otherwise, null
+ * @return this.propertyList, if the namespaces match; otherwise, null
*/
public PropertyList getPropertiesForNamespace(String nameSpaceURI) {
- if (this.properties == null) {
+ if (this.propertyList == null) {
return null;
}
- if (!nameSpaceURI.equals(this.properties.getNameSpace())) {
+ if (!nameSpaceURI.equals(this.propertyList.getNameSpace())) {
return null;
}
- return this.properties;
+ return this.propertyList;
}
/**
* @return the property
*/
public Property getProperty(String name) {
- return (properties.get(name));
+ return (propertyList.get(name));
}
/**
* fo and sets the id attribute of this object.
*/
public void setupID() {
- Property prop = this.properties.get("id");
+ Property prop = this.propertyList.get("id");
if (prop != null) {
String str = prop.getString();
if (str != null && !str.equals("")) {
*/
protected void setWritingMode() {
FObj p = findNearestAncestorGeneratingRAs(true, true);
- this.properties.setWritingMode(
+ this.propertyList.setWritingMode(
p.getProperty("writing-mode").getEnum());
}
}
private void setup() {
- if (this.properties != null) {
+ if (this.propertyList != null) {
setupID();
}
}
// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.Property.Maker;
-import org.apache.fop.fo.properties.FOPropertyMapping;
import org.apache.fop.fo.properties.WritingMode;
-import org.apache.fop.apps.FOPException;
-
/**
private String element = "";
private FObj fobj = null;
- private static HashMap propertyListTable = null;
- private static HashMap elementTable = null;
-
/**
* Basic constructor.
* @param parentPropertyList the PropertyList belonging to the new objects
this.parentPropertyList = parentPropertyList;
this.namespace = space;
this.element = elementName;
-
- if (propertyListTable == null) {
- propertyListTable = new HashMap();
- propertyListTable.putAll(FOPropertyMapping.getGenericMappings());
- }
-
- if (elementTable == null) {
- elementTable = new HashMap();
- for (Iterator iter =
- FOPropertyMapping.getElementMappings().iterator();
- iter.hasNext();) {
- String elem = (String) iter.next();
- elementTable.put(elem, FOPropertyMapping.getElementMapping(elem));
- }
- }
}
/**
FObj parentFO = fobj.findNearestAncestorFObj();
HashMap validProperties;
- validProperties = (HashMap) elementTable.get(element);
+ validProperties = (HashMap) fobj.elementTable.get(element);
/* Handle "compound" properties, ex. space-before.minimum */
String basePropertyName = findBasePropertyName(attributeName);
*/
protected Property.Maker findMaker(String space, String elementName,
String propertyName) {
- return findMaker((HashMap)elementTable.get(elementName),
+ return findMaker((HashMap) fobj.elementTable.get(elementName),
propertyName);
}
String propertyName) {
Property.Maker propertyMaker = null;
if (elemTable != null) {
- propertyMaker = (Property.Maker)elemTable.get(propertyName);
+ propertyMaker = (Property.Maker) elemTable.get(propertyName);
}
if (propertyMaker == null) {
propertyMaker =
- (Property.Maker)propertyListTable.get(propertyName);
+ (Property.Maker) fobj.propertyListTable.get(propertyName);
}
return propertyMaker;
}
*/
public class PropertyManager {
- private PropertyList properties;
+ private PropertyList propertyList;
private FOTreeControl foTreeControl = null;
private Font fontState = null;
private CommonBorderAndPadding borderAndPadding = null;
* @param pList property list
*/
public PropertyManager(PropertyList pList) {
- this.properties = pList;
+ this.propertyList = pList;
}
/**
* Returns the property list that is used for lookup.
* @return the property list
*/
- public PropertyList getProperties() {
- return properties;
+ public PropertyList getPropertyList() {
+ return propertyList;
}
/**
}
/**@todo this is ugly. need to improve. */
- String fontFamily = properties.get("font-family").getString();
- String fontStyle = properties.get("font-style").getString();
- String fw = properties.get("font-weight").getString();
+ String fontFamily = propertyList.get("font-family").getString();
+ String fontStyle = propertyList.get("font-style").getString();
+ String fw = propertyList.get("font-weight").getString();
int fontWeight = 400;
if (fw.equals("bolder")) {
// +100 from inherited
// NOTE: this is incomplete. font-size may be specified with
// various kinds of keywords too
- int fontSize = properties.get("font-size").getLength().getValue();
- //int fontVariant = properties.get("font-variant").getEnum();
+ int fontSize = propertyList.get("font-size").getLength().getValue();
+ //int fontVariant = propertyList.get("font-variant").getEnum();
String fname = foTreeControl.fontLookup(fontFamily, fontStyle,
fontWeight);
FontMetrics metrics = foTreeControl.getMetricsFor(fname);
private void initBorderInfo(int whichSide, String[] saSide) {
borderAndPadding.setPadding(whichSide,
- properties.get(
+ propertyList.get(
MSGFMT_PADDING.format(saSide)).getCondLength());
// If style = none, force width to 0, don't get Color (spec 7.7.20)
- int style = properties.get(MSGFMT_STYLE.format(saSide)).getEnum();
+ int style = propertyList.get(MSGFMT_STYLE.format(saSide)).getEnum();
if (style != Constants.NONE) {
borderAndPadding.setBorder(whichSide, style,
- properties.get(
+ propertyList.get(
MSGFMT_WIDTH.format(saSide)).getCondLength(),
- properties.get(
+ propertyList.get(
MSGFMT_COLOR.format(saSide)).getColorType());
}
}
if (hyphProps == null) {
this.hyphProps = new CommonHyphenation();
hyphProps.hyphenate =
- this.properties.get("hyphenate").getEnum();
- hyphProps.hyphenationChar = this.properties.get(
+ this.propertyList.get("hyphenate").getEnum();
+ hyphProps.hyphenationChar = this.propertyList.get(
"hyphenation-character").getCharacter();
- hyphProps.hyphenationPushCharacterCount = this.properties.get(
+ hyphProps.hyphenationPushCharacterCount = this.propertyList.get(
"hyphenation-push-character-count").getNumber().
intValue();
- hyphProps.hyphenationRemainCharacterCount = this.properties.get(
+ hyphProps.hyphenationRemainCharacterCount = this.propertyList.get(
"hyphenation-remain-character-count").getNumber().
intValue();
hyphProps.language =
- this.properties.get("language").getString();
- hyphProps.country = this.properties.get("country").getString();
+ this.propertyList.get("language").getString();
+ hyphProps.country = this.propertyList.get("country").getString();
}
return hyphProps;
}
/*public int checkBreakBefore(Area area) {
if (!(area instanceof ColumnArea)) {
- switch (properties.get("break-before").getEnum()) {
+ switch (propertyList.get("break-before").getEnum()) {
case BreakBefore.PAGE:
return Status.FORCE_PAGE_BREAK;
case BreakBefore.ODD_PAGE:
}
} else {
ColumnArea colArea = (ColumnArea)area;
- switch (properties.get("break-before").getEnum()) {
+ switch (propertyList.get("break-before").getEnum()) {
case BreakBefore.PAGE:
// if first ColumnArea, and empty, return OK
if (!colArea.hasChildren() && (colArea.getColumnIndex() == 1))
}
public int checkBreakAfter(Area area) {
- switch (properties.get("break-after").getEnum()) {
+ switch (propertyList.get("break-after").getEnum()) {
case BreakAfter.PAGE:
return Status.FORCE_PAGE_BREAK;
case BreakAfter.ODD_PAGE:
// Common Margin Properties-Block
props.marginTop =
- this.properties.get("margin-top").getLength().getValue();
+ this.propertyList.get("margin-top").getLength().getValue();
props.marginBottom =
- this.properties.get("margin-bottom").getLength().getValue();
+ this.propertyList.get("margin-bottom").getLength().getValue();
props.marginLeft =
- this.properties.get("margin-left").getLength().getValue();
+ this.propertyList.get("margin-left").getLength().getValue();
props.marginRight =
- this.properties.get("margin-right").getLength().getValue();
+ this.propertyList.get("margin-right").getLength().getValue();
// For now, we only get the optimum value for space-before and after
- props.spaceBefore = this.properties.get("space-before").
+ props.spaceBefore = this.propertyList.get("space-before").
getSpace().getOptimum().getLength().getValue();
- props.spaceAfter = this.properties.get("space-after").
+ props.spaceAfter = this.propertyList.get("space-after").
getSpace().getOptimum().getLength().getValue();
- props.startIndent = this.properties.get("start-indent").
+ props.startIndent = this.propertyList.get("start-indent").
getLength().getValue();
- props.endIndent = this.properties.get("end-indent").
+ props.endIndent = this.propertyList.get("end-indent").
getLength().getValue();
return props;
*/
public CommonBackground getBackgroundProps() {
CommonBackground bp = new CommonBackground();
- bp.backAttachment = properties.get("background-attachment").getEnum();
- bp.backColor = properties.get("background-color").getColorType();
+ bp.backAttachment = propertyList.get("background-attachment").getEnum();
+ bp.backColor = propertyList.get("background-color").getColorType();
if (bp.backColor.getAlpha() == 0) {
bp.backColor = null;
}
- bp.backImage = properties.get("background-image").getString();
+ bp.backImage = propertyList.get("background-image").getString();
if (bp.backImage == null || NONE.equals(bp.backImage)) {
bp.backImage = null;
} else {
- bp.backRepeat = properties.get("background-repeat").getEnum();
- Property prop = properties.get("background-position-horizontal");
+ bp.backRepeat = propertyList.get("background-repeat").getEnum();
+ Property prop = propertyList.get("background-position-horizontal");
if (prop != null) {
bp.backPosHorizontal = prop.getLength();
}
- prop = properties.get("background-position-vertical");
+ prop = propertyList.get("background-position-vertical");
if (prop != null) {
bp.backPosVertical = prop.getLength();
}
*/
public InlineProps getInlineProps() {
InlineProps props = new InlineProps();
- props.spaceStart = new SpaceVal(properties.get("space-start").getSpace());
- props.spaceEnd = new SpaceVal(properties.get("space-end").getSpace());
+ props.spaceStart = new SpaceVal(propertyList.get("space-start").getSpace());
+ props.spaceEnd = new SpaceVal(propertyList.get("space-end").getSpace());
return props;
}
public CommonAccessibility getAccessibilityProps() {
CommonAccessibility props = new CommonAccessibility();
String str;
- str = this.properties.get("source-document").getString();
+ str = this.propertyList.get("source-document").getString();
if (!NONE.equals(str)) {
props.sourceDoc = str;
}
- str = this.properties.get("role").getString();
+ str = this.propertyList.get("role").getString();
if (!NONE.equals(str)) {
props.role = str;
}
public CommonAbsolutePosition getAbsolutePositionProps() {
CommonAbsolutePosition props = new CommonAbsolutePosition();
props.absolutePosition =
- this.properties.get("absolute-position").getEnum();
- props.top = this.properties.get("top").getLength().getValue();
- props.bottom = this.properties.get("bottom").getLength().getValue();
- props.left = this.properties.get("left").getLength().getValue();
- props.right = this.properties.get("right").getLength().getValue();
+ this.propertyList.get("absolute-position").getEnum();
+ props.top = this.propertyList.get("top").getLength().getValue();
+ props.bottom = this.propertyList.get("bottom").getLength().getValue();
+ props.left = this.propertyList.get("left").getLength().getValue();
+ props.right = this.propertyList.get("right").getLength().getValue();
return props;
}
*/
public BlockProps getBlockProps() {
BlockProps props = new BlockProps();
- props.firstIndent = this.properties.get("text-indent").getLength().getValue();
+ props.firstIndent = this.propertyList.get("text-indent").getLength().getValue();
props.lastIndent = 0;
- /*this.properties.get("last-line-end-indent").getLength().mvalue(); */
- props.textAlign = this.properties.get("text-align").getEnum();
- props.textAlignLast = this.properties.get("text-align-last").getEnum();
- props.lineStackType = this.properties.get("line-stacking-strategy").getEnum();
+ /*this.propertyList.get("last-line-end-indent").getLength().mvalue(); */
+ props.textAlign = this.propertyList.get("text-align").getEnum();
+ props.textAlignLast = this.propertyList.get("text-align-last").getEnum();
+ props.lineStackType = this.propertyList.get("line-stacking-strategy").getEnum();
return props;
}
*/
public LayoutProps getLayoutProps() {
LayoutProps props = new LayoutProps();
- props.breakBefore = this.properties.get("break-before").getEnum();
- props.breakAfter = this.properties.get("break-after").getEnum();
- props.bIsSpan = (this.properties.get("span").getEnum() == Span.ALL);
+ props.breakBefore = this.propertyList.get("break-before").getEnum();
+ props.breakAfter = this.propertyList.get("break-after").getEnum();
+ props.bIsSpan = (this.propertyList.get("span").getEnum() == Span.ALL);
props.spaceBefore = new SpaceVal(
- this.properties.get("space-before").getSpace());
+ this.propertyList.get("space-before").getSpace());
props.spaceAfter = new SpaceVal(
- this.properties.get("space-after").getSpace());
+ this.propertyList.get("space-after").getSpace());
return props;
}
if (textInfo == null) {
textInfo = new TextInfo();
textInfo.fs = getFontState(foTreeControl);
- textInfo.color = properties.get("color").getColorType();
+ textInfo.color = propertyList.get("color").getColorType();
textInfo.verticalAlign =
- properties.get("vertical-align").getEnum();
+ propertyList.get("vertical-align").getEnum();
- textInfo.wrapOption = properties.get("wrap-option").getEnum();
+ textInfo.wrapOption = propertyList.get("wrap-option").getEnum();
textInfo.bWrap = (textInfo.wrapOption == Constants.WRAP);
textInfo.wordSpacing = new SpaceVal(
- properties.get("word-spacing").getSpace());
+ propertyList.get("word-spacing").getSpace());
/* textInfo.letterSpacing =
- new SpaceVal(properties.get("letter-spacing").getSpace());*/
+ new SpaceVal(propertyList.get("letter-spacing").getSpace());*/
textInfo.whiteSpaceCollapse =
- properties.get("white-space-collapse").getEnum();
+ propertyList.get("white-space-collapse").getEnum();
- textInfo.lineHeight = this.properties.get(
+ textInfo.lineHeight = this.propertyList.get(
"line-height").getLength().getValue();
textInfo.textTransform
- = this.properties.get("text-transform").getEnum();
+ = this.propertyList.get("text-transform").getEnum();
}
return textInfo;
* @return the enumerated reference-orientation
*/
public int getAbsRefOrient() {
- return properties.get("reference-orientation").getNumber().intValue();
+ return propertyList.get("reference-orientation").getNumber().intValue();
}
/**
* @return the enumerated writing-mode
*/
public int getWritingMode() {
- return properties.get("writing-mode").getEnum();
+ return propertyList.get("writing-mode").getEnum();
}
}
}
Numeric startIndent =
- ((ListItem)item).properties.get("start-indent").getNumeric();
+ ((ListItem)item).propertyList.get("start-indent").getNumeric();
return new NumericProperty(distance.add(startIndent));
}
if (item == null) {
throw new PropertyException("label-end() called from outside an fo:list-item");
}
- Length startIndent = ((ListItem)item).properties.get("start-indent").getLength();
+ Length startIndent = ((ListItem)item).propertyList.get("start-indent").getLength();
LinearCombinationLength labelEnd = new LinearCombinationLength();
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("destination-place-offset");
- // this.properties.get("dominant-baseline");
- String ext = properties.get("external-destination").getString();
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("destination-place-offset");
+ // this.propertyList.get("dominant-baseline");
+ String ext = propertyList.get("external-destination").getString();
setupID();
- // this.properties.get("indicate-destination");
- String internal = properties.get("internal-destination").getString();
+ // this.propertyList.get("indicate-destination");
+ String internal = propertyList.get("internal-destination").getString();
if (ext.length() > 0) {
link = ext;
external = true;
} else {
getLogger().error("basic-link requires an internal or external destination");
}
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("show-destination");
- // this.properties.get("target-processing-context");
- // this.properties.get("target-presentation-context");
- // this.properties.get("target-stylesheet");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("show-destination");
+ // this.propertyList.get("target-processing-context");
+ // this.propertyList.get("target-presentation-context");
+ // this.propertyList.get("target-stylesheet");
}
// Common Margin Properties-Inline
CommonRelativePosition mProps = propMgr.getRelativePositionProps();
- // this.properties.get("color");
- // this.properties.get("direction");
+ // this.propertyList.get("color");
+ // this.propertyList.get("direction");
setupID();
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("score-spaces");
- // this.properties.get("text-shadow");
- // this.properties.get("text-transform");
- // this.properties.get("unicode-bidi");
- // this.properties.get("word-spacing");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("score-spaces");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("text-transform");
+ // this.propertyList.get("unicode-bidi");
+ // this.propertyList.get("word-spacing");
}
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
- this.span = this.properties.get("span").getEnum();
+ this.span = this.propertyList.get("span").getEnum();
this.wsTreatment =
- this.properties.get("white-space-treatment").getEnum();
+ this.propertyList.get("white-space-treatment").getEnum();
this.bWScollapse =
- (this.properties.get("white-space-collapse").getEnum()
+ (this.propertyList.get("white-space-collapse").getEnum()
== Constants.TRUE);
this.lfTreatment =
- this.properties.get("linefeed-treatment").getEnum();
+ this.propertyList.get("linefeed-treatment").getEnum();
setupID();
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("break-after");
- // this.properties.get("break-before");
- // this.properties.get("color");
- // this.properties.get("text-depth");
- // this.properties.get("text-altitude");
- // this.properties.get("hyphenation-keep");
- // this.properties.get("hyphenation-ladder-count");
+ // this.propertyList.get("break-after");
+ // this.propertyList.get("break-before");
+ // this.propertyList.get("color");
+ // this.propertyList.get("text-depth");
+ // this.propertyList.get("text-altitude");
+ // this.propertyList.get("hyphenation-keep");
+ // this.propertyList.get("hyphenation-ladder-count");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("last-line-end-indent");
- // this.properties.get("linefeed-treatment");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("line-stacking-strategy");
- // this.properties.get("orphans");
- // this.properties.get("white-space-treatment");
- // this.properties.get("span");
- // this.properties.get("text-align");
- // this.properties.get("text-align-last");
- // this.properties.get("text-indent");
- // this.properties.get("visibility");
- // this.properties.get("white-space-collapse");
- // this.properties.get("widows");
- // this.properties.get("wrap-option");
- // this.properties.get("z-index");
-
- this.align = this.properties.get("text-align").getEnum();
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("last-line-end-indent");
+ // this.propertyList.get("linefeed-treatment");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("line-stacking-strategy");
+ // this.propertyList.get("orphans");
+ // this.propertyList.get("white-space-treatment");
+ // this.propertyList.get("span");
+ // this.propertyList.get("text-align");
+ // this.propertyList.get("text-align-last");
+ // this.propertyList.get("text-indent");
+ // this.propertyList.get("visibility");
+ // this.propertyList.get("white-space-collapse");
+ // this.propertyList.get("widows");
+ // this.propertyList.get("wrap-option");
+ // this.propertyList.get("z-index");
+
+ this.align = this.propertyList.get("text-align").getEnum();
this.alignLast =
- this.properties.get("text-align-last").getEnum();
- this.breakAfter = this.properties.get("break-after").getEnum();
- this.lineHeight = this.properties.get(
+ this.propertyList.get("text-align-last").getEnum();
+ this.breakAfter = this.propertyList.get("break-after").getEnum();
+ this.lineHeight = this.propertyList.get(
"line-height").getLength().getValue();
- this.startIndent = this.properties.get(
+ this.startIndent = this.propertyList.get(
"start-indent").getLength().getValue();
- this.endIndent = this.properties.get(
+ this.endIndent = this.propertyList.get(
"end-indent").getLength().getValue();
- this.spaceBefore = this.properties.get(
+ this.spaceBefore = this.propertyList.get(
"space-before.optimum").getLength().getValue();
- this.spaceAfter = this.properties.get(
+ this.spaceAfter = this.propertyList.get(
"space-after.optimum").getLength().getValue();
- this.textIndent = this.properties.get(
+ this.textIndent = this.propertyList.get(
"text-indent").getLength().getValue();
this.keepWithNext =
- this.properties.get("keep-with-next").getEnum();
+ this.propertyList.get("keep-with-next").getEnum();
this.blockWidows =
- this.properties.get("widows").getNumber().intValue();
+ this.propertyList.get("widows").getNumber().intValue();
this.blockOrphans =
- this.properties.get("orphans").getNumber().intValue();
+ this.propertyList.get("orphans").getNumber().intValue();
}
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
- this.span = this.properties.get("span").getEnum();
+ this.span = this.propertyList.get("span").getEnum();
setupID();
}
// Common Margin-Block Properties
CommonMarginBlock mProps = propMgr.getMarginProps();
- // this.properties.get("block-progression-dimension");
- // this.properties.get("break-after");
- // this.properties.get("break-before");
- // this.properties.get("clip");
- // this.properties.get("display-align");
- // this.properties.get("height");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("break-after");
+ // this.propertyList.get("break-before");
+ // this.propertyList.get("clip");
+ // this.propertyList.get("display-align");
+ // this.propertyList.get("height");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("overflow");
- // this.properties.get("reference-orientation");
- // this.properties.get("span");
- // this.properties.get("width");
- // this.properties.get("writing-mode");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("overflow");
+ // this.propertyList.get("reference-orientation");
+ // this.propertyList.get("span");
+ // this.propertyList.get("width");
+ // this.propertyList.get("writing-mode");
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
- this.width = this.properties.get("width").getLength().getValue();
- this.height = this.properties.get("height").getLength().getValue();
- span = this.properties.get("span").getEnum();
+ this.width = this.propertyList.get("width").getLength().getValue();
+ this.height = this.propertyList.get("height").getLength().getValue();
+ span = this.propertyList.get("span").getEnum();
}
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("treat-as-word-space");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("character");
- // this.properties.get("color");
- // this.properties.get("dominant-baseline");
- // this.properties.get("text-depth");
- // this.properties.get("text-altitude");
- // this.properties.get("glyph-orientation-horizontal");
- // this.properties.get("glyph-orientation-vertical");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("treat-as-word-space");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("character");
+ // this.propertyList.get("color");
+ // this.propertyList.get("dominant-baseline");
+ // this.propertyList.get("text-depth");
+ // this.propertyList.get("text-altitude");
+ // this.propertyList.get("glyph-orientation-horizontal");
+ // this.propertyList.get("glyph-orientation-vertical");
setupID();
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("score-spaces");
- // this.properties.get("suppress-at-line-break");
- // this.properties.get("text-decoration");
- // this.properties.get("text-shadow");
- // this.properties.get("text-transform");
- // this.properties.get("word-spacing");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("score-spaces");
+ // this.propertyList.get("suppress-at-line-break");
+ // this.propertyList.get("text-decoration");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("text-transform");
+ // this.propertyList.get("word-spacing");
}
/**
* This gets the sizes for the image and the dimensions and clipping.
*/
public void setup() {
- url = this.properties.get("src").getString();
+ url = this.propertyList.get("src").getString();
if (url == null) {
return;
}
url = ImageFactory.getURL(url);
// assume lr-tb for now
- Length ipd = properties.get("inline-progression-dimension.optimum").getLength();
+ Length ipd = propertyList.get("inline-progression-dimension.optimum").getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
} else {
- ipd = properties.get("width").getLength();
+ ipd = propertyList.get("width").getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
}
}
- Length bpd = properties.get("block-progression-dimension.optimum").getLength();
+ Length bpd = propertyList.get("block-progression-dimension.optimum").getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
} else {
- bpd = properties.get("height").getLength();
+ bpd = propertyList.get("height").getLength();
if (!bpd.isAuto()) {
viewHeight = bpd.getValue();
}
int cwidth = -1;
int cheight = -1;
- Length ch = properties.get("content-height").getLength();
+ Length ch = propertyList.get("content-height").getLength();
if (!ch.isAuto()) {
/*if (ch.scaleToFit()) {
if (viewHeight != -1) {
} else {*/
cheight = ch.getValue();
}
- Length cw = properties.get("content-width").getLength();
+ Length cw = propertyList.get("content-width").getLength();
if (!cw.isAuto()) {
/*if (cw.scaleToFit()) {
if (viewWidth != -1) {
cwidth = cw.getValue();
}
- int scaling = properties.get("scaling").getEnum();
+ int scaling = propertyList.get("scaling").getEnum();
if ((scaling == Scaling.UNIFORM) || (cwidth == -1) || cheight == -1) {
ImageFactory fact = ImageFactory.getInstance();
fopimage = fact.getImage(url, getUserAgent());
}
if (cwidth > viewWidth || cheight > viewHeight) {
- int overflow = properties.get("overflow").getEnum();
+ int overflow = propertyList.get("overflow").getEnum();
if (overflow == Overflow.HIDDEN) {
clip = true;
} else if (overflow == Overflow.ERROR_IF_OVERFLOW) {
int xoffset = 0;
int yoffset = 0;
- int da = properties.get("display-align").getEnum();
+ int da = propertyList.get("display-align").getEnum();
switch(da) {
case DisplayAlign.BEFORE:
break;
break;
}
- int ta = properties.get("text-align").getEnum();
+ int ta = propertyList.get("text-align").getEnum();
switch(ta) {
case TextAlign.CENTER:
xoffset = (viewWidth - cwidth) / 2;
private void setup() {
- // this.properties.get("float");
- // this.properties.get("clear");
+ // this.propertyList.get("float");
+ // this.propertyList.get("clear");
}
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("color");
+ // this.propertyList.get("color");
setupID();
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("score-spaces");
- // this.properties.get("text-decoration");
- // this.properties.get("text-shadow");
- // this.properties.get("text-transform");
- // this.properties.get("word-spacing");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("score-spaces");
+ // this.propertyList.get("text-decoration");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("text-transform");
+ // this.propertyList.get("word-spacing");
}
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("color");
- // this.properties.get("dominant-baseline");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("color");
+ // this.propertyList.get("dominant-baseline");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("text-devoration");
- // this.properties.get("visibility");
- // this.properties.get("z-index");
-
- int textDecoration = this.properties.get("text-decoration").getEnum();
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("text-devoration");
+ // this.propertyList.get("visibility");
+ // this.propertyList.get("z-index");
+
+ int textDecoration = this.propertyList.get("text-decoration").getEnum();
if (textDecoration == TextDecoration.UNDERLINE) {
this.underlined = true;
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("block-progression-dimension");
- // this.properties.get("clip");
- // this.properties.get("display-align");
- // this.properties.get("dominant-baseline");
- // this.properties.get("height");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("clip");
+ // this.propertyList.get("display-align");
+ // this.propertyList.get("dominant-baseline");
+ // this.propertyList.get("height");
setupID();
- // this.properties.get("inline-progression-dimension");
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("overflow");
- // this.properties.get("reference-orientation");
- // this.properties.get("width");
- // this.properties.get("writing-mode");
+ // this.propertyList.get("inline-progression-dimension");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("overflow");
+ // this.propertyList.get("reference-orientation");
+ // this.propertyList.get("width");
+ // this.propertyList.get("writing-mode");
}
/**
public int computeXOffset (int ipd, int cwidth) {
int xoffset = 0;
- int ta = properties.get("text-align").getEnum();
+ int ta = propertyList.get("text-align").getEnum();
switch (ta) {
case TextAlign.CENTER:
xoffset = (ipd - cwidth) / 2;
public int computeYOffset(int bpd, int cheight) {
int yoffset = 0;
- int da = properties.get("display-align").getEnum();
+ int da = propertyList.get("display-align").getEnum();
switch (da) {
case DisplayAlign.BEFORE:
break;
// Common Relative Position Properties
RelativePositionProps mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("block-progression-dimension");
- // this.properties.get("content-height");
- // this.properties.get("content-type");
- // this.properties.get("content-width");
- // this.properties.get("display-align");
- // this.properties.get("dominant-baseline");
- // this.properties.get("height");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("content-height");
+ // this.propertyList.get("content-type");
+ // this.propertyList.get("content-width");
+ // this.propertyList.get("display-align");
+ // this.propertyList.get("dominant-baseline");
+ // this.propertyList.get("height");
setupID();
- // this.properties.get("inline-progression-dimension");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("overflow");
- // this.properties.get("scaling");
- // this.properties.get("scaling-method");
- // this.properties.get("text-align");
- // this.properties.get("width");
+ // this.propertyList.get("inline-progression-dimension");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("overflow");
+ // this.propertyList.get("scaling");
+ // this.propertyList.get("scaling-method");
+ // this.propertyList.get("text-align");
+ // this.propertyList.get("width");
/* retrieve properties *
- int align = this.properties.get("text-align").getEnum();
- int valign = this.properties.get("vertical-align").getEnum();
- int overflow = this.properties.get("overflow").getEnum();
-
- this.breakBefore = this.properties.get("break-before").getEnum();
- this.breakAfter = this.properties.get("break-after").getEnum();
- this.width = this.properties.get("width").getLength().mvalue();
- this.height = this.properties.get("height").getLength().mvalue();
+ int align = this.propertyList.get("text-align").getEnum();
+ int valign = this.propertyList.get("vertical-align").getEnum();
+ int overflow = this.propertyList.get("overflow").getEnum();
+
+ this.breakBefore = this.propertyList.get("break-before").getEnum();
+ this.breakAfter = this.propertyList.get("break-after").getEnum();
+ this.width = this.propertyList.get("width").getLength().mvalue();
+ this.height = this.propertyList.get("height").getLength().mvalue();
this.contwidth =
- this.properties.get("content-width").getLength().mvalue();
+ this.propertyList.get("content-width").getLength().mvalue();
this.contheight =
- this.properties.get("content-height").getLength().mvalue();
- this.wauto = this.properties.get("width").getLength().isAuto();
- this.hauto = this.properties.get("height").getLength().isAuto();
+ this.propertyList.get("content-height").getLength().mvalue();
+ this.wauto = this.propertyList.get("width").getLength().isAuto();
+ this.hauto = this.propertyList.get("height").getLength().isAuto();
this.cwauto =
- this.properties.get("content-width").getLength().isAuto();
+ this.propertyList.get("content-width").getLength().isAuto();
this.chauto =
- this.properties.get("content-height").getLength().isAuto();
+ this.propertyList.get("content-height").getLength().isAuto();
this.startIndent =
- this.properties.get("start-indent").getLength().mvalue();
+ this.propertyList.get("start-indent").getLength().mvalue();
this.endIndent =
- this.properties.get("end-indent").getLength().mvalue();
+ this.propertyList.get("end-indent").getLength().mvalue();
this.spaceBefore =
- this.properties.get("space-before.optimum").getLength().mvalue();
+ this.propertyList.get("space-before.optimum").getLength().mvalue();
this.spaceAfter =
- this.properties.get("space-after.optimum").getLength().mvalue();
+ this.propertyList.get("space-after.optimum").getLength().mvalue();
- this.scaling = this.properties.get("scaling").getEnum();
+ this.scaling = this.propertyList.get("scaling").getEnum();
*/
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("color");
- // this.properties.get("dominant-baseline");
- // this.properties.get("text-depth");
- // this.properties.get("text-altitude");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("color");
+ // this.propertyList.get("dominant-baseline");
+ // this.propertyList.get("text-depth");
+ // this.propertyList.get("text-altitude");
setupID();
- // this.properties.get("leader-alignment");
- // this.properties.get("leader-length");
- // this.properties.get("leader-pattern");
- // this.properties.get("leader-pattern-width");
- // this.properties.get("rule-style");
- // this.properties.get("rule-thickness");
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("text-shadow");
- // this.properties.get("visibility");
- // this.properties.get("word-spacing");
- // this.properties.get("z-index");
+ // this.propertyList.get("leader-alignment");
+ // this.propertyList.get("leader-length");
+ // this.propertyList.get("leader-pattern");
+ // this.propertyList.get("leader-pattern-width");
+ // this.propertyList.get("rule-style");
+ // this.propertyList.get("rule-thickness");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("visibility");
+ // this.propertyList.get("word-spacing");
+ // this.propertyList.get("z-index");
// color properties
- ColorType c = this.properties.get("color").getColorType();
+ ColorType c = this.propertyList.get("color").getColorType();
float red = c.getRed();
float green = c.getGreen();
float blue = c.getBlue();
// fo:leader specific properties
// determines the pattern of leader; allowed values: space, rule,dots, use-content
- leaderPattern = this.properties.get("leader-pattern").getEnum();
+ leaderPattern = this.propertyList.get("leader-pattern").getEnum();
switch(leaderPattern) {
case LeaderPattern.SPACE:
// use Space
// the following properties only apply
// for leader-pattern = "rule"
ruleThickness =
- properties.get("rule-thickness").getLength().getValue();
- ruleStyle = properties.get("rule-style").getEnum();
+ propertyList.get("rule-thickness").getLength().getValue();
+ ruleStyle = propertyList.get("rule-style").getEnum();
break;
case LeaderPattern.DOTS:
break;
// if leaderPatternWidth = 0 = default = use-font-metric
patternWidth =
- this.properties.get("leader-pattern-width").getLength().getValue();
+ this.propertyList.get("leader-pattern-width").getLength().getValue();
}
public int getLength(String prop, int dim) {
int length;
- Length maxlength = properties.get(prop).getLength();
+ Length maxlength = propertyList.get(prop).getLength();
if (maxlength instanceof PercentLength) {
length = (int)(((PercentLength)maxlength).value()
* dim);
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("break-after");
- // this.properties.get("break-before");
+ // this.propertyList.get("break-after");
+ // this.propertyList.get("break-before");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("provisional-distance-between-starts");
- // this.properties.get("provisional-label-separation");
-
- this.align = this.properties.get("text-align").getEnum();
- this.alignLast = this.properties.get("text-align-last").getEnum();
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("provisional-distance-between-starts");
+ // this.propertyList.get("provisional-label-separation");
+
+ this.align = this.propertyList.get("text-align").getEnum();
+ this.alignLast = this.propertyList.get("text-align-last").getEnum();
this.lineHeight =
- this.properties.get("line-height").getLength().getValue();
+ this.propertyList.get("line-height").getLength().getValue();
this.startIndent =
- this.properties.get("start-indent").getLength().getValue();
+ this.propertyList.get("start-indent").getLength().getValue();
this.endIndent =
- this.properties.get("end-indent").getLength().getValue();
+ this.propertyList.get("end-indent").getLength().getValue();
this.spaceBefore =
- this.properties.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get("space-before.optimum").getLength().getValue();
this.spaceAfter =
- this.properties.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get("space-after.optimum").getLength().getValue();
this.spaceBetweenListRows = 0; // not used at present
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
}
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("break-after");
- // this.properties.get("break-before");
+ // this.propertyList.get("break-after");
+ // this.propertyList.get("break-before");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("relative-align");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("relative-align");
- this.align = this.properties.get("text-align").getEnum();
- this.alignLast = this.properties.get("text-align-last").getEnum();
+ this.align = this.propertyList.get("text-align").getEnum();
+ this.alignLast = this.propertyList.get("text-align-last").getEnum();
this.lineHeight =
- this.properties.get("line-height").getLength().getValue();
+ this.propertyList.get("line-height").getLength().getValue();
this.spaceBefore =
- this.properties.get("space-before.optimum").getLength().getValue();
+ this.propertyList.get("space-before.optimum").getLength().getValue();
this.spaceAfter =
- this.properties.get("space-after.optimum").getLength().getValue();
+ this.propertyList.get("space-after.optimum").getLength().getValue();
}
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
setupID();
- // this.properties.get("keep-together");
+ // this.propertyList.get("keep-together");
/*
* For calculating the lineage - The fo:list-item-body formatting object
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
setupID();
- // this.properties.get("keep-together");
+ // this.propertyList.get("keep-together");
/*
* For calculating the lineage - The fo:list-item-label formatting object
super.handleAttrs(attlist);
this.markerClassName =
- this.properties.get("marker-class-name").getString();
+ this.propertyList.get("marker-class-name").getString();
}
/**
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
setupID();
- // this.properties.get("starting-state");
- // this.properties.get("case-name");
- // this.properties.get("case-title");
+ // this.propertyList.get("starting-state");
+ // this.propertyList.get("case-name");
+ // this.propertyList.get("case-title");
}
private void setup() {
setupID();
- // this.properties.get("active-state");
+ // this.propertyList.get("active-state");
}
// Common Accessibility Properties
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
- // this.properties.get("auto-restore");
+ // this.propertyList.get("auto-restore");
setupID();
}
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
setupID();
- // this.properties.get("switch-to");
+ // this.propertyList.get("switch-to");
}
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("dominant-baseline");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("dominant-baseline");
setupID();
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("score-spaces");
- // this.properties.get("text-decoration");
- // this.properties.get("text-shadow");
- // this.properties.get("text-transform");
- // this.properties.get("word-spacing");
-
- ColorType c = this.properties.get("color").getColorType();
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("score-spaces");
+ // this.propertyList.get("text-decoration");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("text-transform");
+ // this.propertyList.get("word-spacing");
+
+ ColorType c = this.propertyList.get("color").getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.properties.get("wrap-option").getEnum();
+ this.wrapOption = this.propertyList.get("wrap-option").getEnum();
}
import org.apache.fop.fo.properties.CommonMarginInline;
import org.apache.fop.fo.properties.CommonRelativePosition;
import org.apache.fop.fonts.Font;
-import org.apache.fop.util.CharUtilities;
+
/**
* Class modelling the fo:page-number-citation object. See Sec. 6.6.11 of the
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("alignment-adjust");
- // this.properties.get("alignment-baseline");
- // this.properties.get("baseline-shift");
- // this.properties.get("dominant-baseline");
+ // this.propertyList.get("alignment-adjust");
+ // this.propertyList.get("alignment-baseline");
+ // this.propertyList.get("baseline-shift");
+ // this.propertyList.get("dominant-baseline");
setupID();
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("letter-spacing");
- // this.properties.get("line-height");
- // this.properties.get("line-height-shift-adjustment");
- // this.properties.get("ref-id");
- // this.properties.get("score-spaces");
- // this.properties.get("text-decoration");
- // this.properties.get("text-shadow");
- // this.properties.get("text-transform");
- // this.properties.get("word-spacing");
-
- ColorType c = this.properties.get("color").getColorType();
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("letter-spacing");
+ // this.propertyList.get("line-height");
+ // this.propertyList.get("line-height-shift-adjustment");
+ // this.propertyList.get("ref-id");
+ // this.propertyList.get("score-spaces");
+ // this.propertyList.get("text-decoration");
+ // this.propertyList.get("text-shadow");
+ // this.propertyList.get("text-transform");
+ // this.propertyList.get("word-spacing");
+
+ ColorType c = this.propertyList.get("color").getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
- this.wrapOption = this.properties.get("wrap-option").getEnum();
- this.refId = this.properties.get("ref-id").getString();
+ this.wrapOption = this.propertyList.get("wrap-option").getEnum();
+ this.refId = this.propertyList.get("ref-id").getString();
if (this.refId.equals("")) {
//throw new FOPException("page-number-citation must contain \"ref-id\"");
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
this.retrieveClassName =
- this.properties.get("retrieve-class-name").getString();
+ this.propertyList.get("retrieve-class-name").getString();
this.retrievePosition =
- this.properties.get("retrieve-position").getEnum();
+ this.propertyList.get("retrieve-position").getEnum();
this.retrieveBoundary =
- this.properties.get("retrieve-boundary").getEnum();
+ this.propertyList.get("retrieve-boundary").getEnum();
}
public String getRetrieveClassName() {
CommonRelativePosition mRelProps =
propMgr.getRelativePositionProps();
- // this.properties.get("block-progression-dimension");
- // this.properties.get("border-after-precendence");
- // this.properties.get("border-before-precedence");
- // this.properties.get("border-collapse");
- // this.properties.get("border-end-precendence");
- // this.properties.get("border-separation");
- // this.properties.get("border-start-precendence");
- // this.properties.get("break-after");
- // this.properties.get("break-before");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("border-after-precendence");
+ // this.propertyList.get("border-before-precedence");
+ // this.propertyList.get("border-collapse");
+ // this.propertyList.get("border-end-precendence");
+ // this.propertyList.get("border-separation");
+ // this.propertyList.get("border-start-precendence");
+ // this.propertyList.get("break-after");
+ // this.propertyList.get("break-before");
setupID();
- // this.properties.get("inline-progression-dimension");
- // this.properties.get("height");
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
- // this.properties.get("table-layout");
- // this.properties.get("table-omit-footer-at-break");
- // this.properties.get("table-omit-header-at-break");
- // this.properties.get("width");
- // this.properties.get("writing-mode");
-
- this.breakBefore = this.properties.get("break-before").getEnum();
- this.breakAfter = this.properties.get("break-after").getEnum();
- this.spaceBefore = this.properties.get(
+ // this.propertyList.get("inline-progression-dimension");
+ // this.propertyList.get("height");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
+ // this.propertyList.get("table-layout");
+ // this.propertyList.get("table-omit-footer-at-break");
+ // this.propertyList.get("table-omit-header-at-break");
+ // this.propertyList.get("width");
+ // this.propertyList.get("writing-mode");
+
+ this.breakBefore = this.propertyList.get("break-before").getEnum();
+ this.breakAfter = this.propertyList.get("break-after").getEnum();
+ this.spaceBefore = this.propertyList.get(
"space-before.optimum").getLength().getValue();
- this.spaceAfter = this.properties.get(
+ this.spaceAfter = this.propertyList.get(
"space-after.optimum").getLength().getValue();
this.backgroundColor =
- this.properties.get("background-color").getColorType();
- this.ipd = this.properties.get(
+ this.propertyList.get("background-color").getColorType();
+ this.ipd = this.propertyList.get(
"inline-progression-dimension").getLengthRange();
- this.height = this.properties.get("height").getLength().getValue();
- this.bAutoLayout = (this.properties.get(
+ this.height = this.propertyList.get("height").getLength().getValue();
+ this.bAutoLayout = (this.propertyList.get(
"table-layout").getEnum() == TableLayout.AUTO);
- this.omitHeaderAtBreak = this.properties.get(
+ this.omitHeaderAtBreak = this.propertyList.get(
"table-omit-header-at-break").getEnum()
== TableOmitHeaderAtBreak.TRUE;
- this.omitFooterAtBreak = this.properties.get(
+ this.omitFooterAtBreak = this.propertyList.get(
"table-omit-footer-at-break").getEnum()
== TableOmitFooterAtBreak.TRUE;
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("caption-side");
+ // this.propertyList.get("caption-side");
setupID();
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
}
setupID();
- this.spaceBefore = this.properties.get(
+ this.spaceBefore = this.propertyList.get(
"space-before.optimum").getLength().getValue();
- this.spaceAfter = this.properties.get(
+ this.spaceAfter = this.propertyList.get(
"space-after.optimum").getLength().getValue();
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
}
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("block-progression-dimension");
- // this.properties.get("height");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("height");
setupID();
- // this.properties.get("inline-progression-dimension");
- // this.properties.get("keep-togethe");
- // this.properties.get("width");
+ // this.propertyList.get("inline-progression-dimension");
+ // this.propertyList.get("keep-togethe");
+ // this.propertyList.get("width");
}
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("border-after-precedence");
- // this.properties.get("border-before-precendence");
- // this.properties.get("border-end-precendence");
- // this.properties.get("border-start-precendence");
- // this.properties.get("block-progression-dimension");
- // this.properties.get("column-number");
- // this.properties.get("display-align");
- // this.properties.get("relative-align");
- // this.properties.get("empty-cells");
- // this.properties.get("ends-row");
- // this.properties.get("height");
+ // this.propertyList.get("border-after-precedence");
+ // this.propertyList.get("border-before-precendence");
+ // this.propertyList.get("border-end-precendence");
+ // this.propertyList.get("border-start-precendence");
+ // this.propertyList.get("block-progression-dimension");
+ // this.propertyList.get("column-number");
+ // this.propertyList.get("display-align");
+ // this.propertyList.get("relative-align");
+ // this.propertyList.get("empty-cells");
+ // this.propertyList.get("ends-row");
+ // this.propertyList.get("height");
setupID();
- // this.properties.get("number-columns-spanned");
- // this.properties.get("number-rows-spanned");
- // this.properties.get("starts-row");
- // this.properties.get("width");
+ // this.propertyList.get("number-columns-spanned");
+ // this.propertyList.get("number-rows-spanned");
+ // this.propertyList.get("starts-row");
+ // this.propertyList.get("width");
this.iColNumber =
- properties.get("column-number").getNumber().intValue();
+ propertyList.get("column-number").getNumber().intValue();
if (iColNumber < 0) {
iColNumber = 0;
}
this.numColumnsSpanned =
- this.properties.get("number-columns-spanned").getNumber().intValue();
+ this.propertyList.get("number-columns-spanned").getNumber().intValue();
if (numColumnsSpanned < 1) {
numColumnsSpanned = 1;
}
this.numRowsSpanned =
- this.properties.get("number-rows-spanned").getNumber().intValue();
+ this.propertyList.get("number-rows-spanned").getNumber().intValue();
if (numRowsSpanned < 1) {
numRowsSpanned = 1;
}
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
- bSepBorders = (this.properties.get("border-collapse").getEnum()
+ bSepBorders = (this.propertyList.get("border-collapse").getEnum()
== BorderCollapse.SEPARATE);
calcBorders(propMgr.getBorderAndPadding());
// Vertical cell alignment
- verticalAlign = this.properties.get("display-align").getEnum();
+ verticalAlign = this.propertyList.get("display-align").getEnum();
if (verticalAlign == DisplayAlign.AUTO) {
// Depends on all cells starting in row
bRelativeAlign = true;
- verticalAlign = this.properties.get("relative-align").getEnum();
+ verticalAlign = this.propertyList.get("relative-align").getEnum();
} else {
bRelativeAlign = false; // Align on a per-cell basis
}
this.minCellHeight =
- this.properties.get("height").getLength().getValue();
+ this.propertyList.get("height").getLength().getValue();
}
/**
* border-separate should only be specified on the table object,
* but it inherits.
*/
- int iSep = properties.get(
+ int iSep = propertyList.get(
"border-separation.inline-progression-direction").getLength().getValue();
this.startAdjust = iSep / 2 + bp.getBorderStartWidth(false)
+ bp.getPaddingStart(false);
+ bp.getPaddingEnd(false);
// Offset of content rectangle in the block-progression direction
- borderSeparation = properties.get(
+ borderSeparation = propertyList.get(
"border-separation.block-progression-direction").getLength().getValue();
this.beforeOffset = borderSeparation / 2
+ bp.getBorderBeforeWidth(false)
CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
CommonBackground bProps = propMgr.getBackgroundProps();
- // this.properties.get("column-width");
- // this.properties.get("number-columns-repeated");
- // this.properties.get("number-columns-spanned");
- // this.properties.get("visibility");
+ // this.propertyList.get("column-width");
+ // this.propertyList.get("number-columns-repeated");
+ // this.propertyList.get("number-columns-spanned");
+ // this.propertyList.get("visibility");
- iColumnNumber = properties.get("column-number").getNumber().intValue();
+ iColumnNumber = propertyList.get("column-number").getNumber().intValue();
numColumnsRepeated =
- properties.get("number-columns-repeated").getNumber().intValue();
+ propertyList.get("number-columns-repeated").getNumber().intValue();
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
- Property prop = this.properties.get("column-width");
+ Property prop = this.propertyList.get("column-width");
if (prop != null) {
- columnWidthPropVal = properties.get("column-width").getLength();
+ columnWidthPropVal = propertyList.get("column-width").getLength();
// This won't include resolved table-units or % values yet.
columnWidth = columnWidthPropVal.getValue();
// Common Accessibility Properties
CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
- // this.properties.get("block-progression-dimension");
+ // this.propertyList.get("block-progression-dimension");
// Common Aural Properties
CommonAural mAurProps = propMgr.getAuralProps();
// Common Relative Position Properties
CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
- // this.properties.get("break-before");
- // this.properties.get("break-after");
+ // this.propertyList.get("break-before");
+ // this.propertyList.get("break-after");
setupID();
- // this.properties.get("height");
- // this.properties.get("keep-together");
- // this.properties.get("keep-with-next");
- // this.properties.get("keep-with-previous");
+ // this.propertyList.get("height");
+ // this.propertyList.get("keep-together");
+ // this.propertyList.get("keep-with-next");
+ // this.propertyList.get("keep-with-previous");
- this.breakAfter = this.properties.get("break-after").getEnum();
+ this.breakAfter = this.propertyList.get("break-after").getEnum();
this.backgroundColor =
- this.properties.get("background-color").getColorType();
+ this.propertyList.get("background-color").getColorType();
this.keepTogether = getKeepValue("keep-together.within-column");
this.keepWithNext = getKeepValue("keep-with-next.within-column");
this.keepWithPrevious =
getKeepValue("keep-with-previous.within-column");
- this.minHeight = this.properties.get("height").getLength().getValue();
+ this.minHeight = this.propertyList.get("height").getLength().getValue();
setup = true;
}
private KeepValue getKeepValue(String sPropName) {
- Property p = this.properties.get(sPropName);
+ Property p = this.propertyList.get(sPropName);
Number n = p.getNumber();
if (n != null) {
return new KeepValue(KeepValue.KEEP_WITH_VALUE, n.intValue());
* object.
*/
public void end() {
- src = this.properties.get("src").getString();
- profileName = this.properties.get("color-profile-name").getString();
- intent = this.properties.get("rendering-intent").getEnum();
- this.properties = null;
+ src = this.propertyList.get("src").getString();
+ profileName = this.propertyList.get("color-profile-name").getString();
+ intent = this.propertyList.get("rendering-intent").getEnum();
+ this.propertyList = null;
}
/**
validateParent(parent);
- this.pagePosition = this.properties.get("page-position").getEnum();
- this.oddOrEven = this.properties.get("odd-or-even").getEnum();
- this.blankOrNotBlank = this.properties.get("blank-or-not-blank").getEnum();
+ this.pagePosition = this.propertyList.get("page-position").getEnum();
+ this.oddOrEven = this.propertyList.get("odd-or-even").getEnum();
+ this.blankOrNotBlank = this.propertyList.get("blank-or-not-blank").getEnum();
}
/**
// we are now on the first page of the page sequence
thisIsFirstPage = true;
- ipnValue = this.properties.get("initial-page-number").getString();
+ ipnValue = this.propertyList.get("initial-page-number").getString();
if (ipnValue.equals("auto")) {
pageNumberType = AUTO;
}
- String masterName = this.properties.get("master-reference").getString();
+ String masterName = this.propertyList.get("master-reference").getString();
this.simplePageMaster =
this.layoutMasterSet.getSimplePageMaster(masterName);
if (this.simplePageMaster == null) {
// get the 'format' properties
this.pageNumberGenerator =
- new PageNumberGenerator(this.properties.get("format").getString(),
- this.properties.get("grouping-separator").getCharacter(),
- this.properties.get("grouping-size").getNumber().intValue(),
- this.properties.get("letter-value").getEnum());
+ new PageNumberGenerator(this.propertyList.get("format").getString(),
+ this.propertyList.get("grouping-separator").getCharacter(),
+ this.propertyList.get("grouping-size").getNumber().intValue(),
+ this.propertyList.get("letter-value").getEnum());
this.pageNumberGenerator.enableLogging(getLogger());
this.forcePageCount =
- this.properties.get("force-page-count").getEnum();
+ this.propertyList.get("force-page-count").getEnum();
- // this.properties.get("country");
- // this.properties.get("language");
+ // this.propertyList.get("country");
+ // this.propertyList.get("language");
setupID();
//call startStructuredPageSequence to ensure, that startPageSequence is called
if (parent.getName().equals("fo:layout-master-set")) {
this.layoutMasterSet = (LayoutMasterSet)parent;
- String pm = this.properties.get("master-name").getString();
+ String pm = this.propertyList.get("master-name").getString();
if (pm == null) {
getLogger().warn("page-sequence-master does not have "
+ "a master-name and so is being ignored");
super.handleAttrs(attlist);
// regions may have name, or default
- if (null == this.properties.get(PROP_REGION_NAME)) {
+ if (null == this.propertyList.get(PROP_REGION_NAME)) {
setRegionName(getDefaultRegionName());
- } else if (this.properties.get(PROP_REGION_NAME).getString().equals("")) {
+ } else if (this.propertyList.get(PROP_REGION_NAME).getString().equals("")) {
setRegionName(getDefaultRegionName());
} else {
- setRegionName(this.properties.get(PROP_REGION_NAME).getString());
+ setRegionName(this.propertyList.get(PROP_REGION_NAME).getString());
// check that name is OK. Not very pretty.
if (isReserved(getRegionName())
&& !getRegionName().equals(getDefaultRegionName())) {
+ "of simple-page-master, not "
+ parent.getName());
}
- this.wm = this.properties.get("writing-mode").getEnum();
+ this.wm = this.propertyList.get("writing-mode").getEnum();
- // this.properties.get("clip");
- // this.properties.get("display-align");
- this.overflow = this.properties.get("overflow").getEnum();
+ // this.propertyList.get("clip");
+ // this.propertyList.get("display-align");
+ this.overflow = this.propertyList.get("overflow").getEnum();
}
public abstract Rectangle getViewportRectangle(FODimension pageRefRect);
public void end() {
super.end();
bPrecedence =
- (this.properties.get("precedence").getEnum() == Precedence.TRUE);
+ (this.propertyList.get("precedence").getEnum() == Precedence.TRUE);
}
/**
public void end() {
// The problem with this is that it might not be known yet....
// Supposing extent is calculated in terms of percentage
- this.extent = this.properties.get("extent").getLength().getValue();
+ this.extent = this.propertyList.get("extent").getLength().getValue();
}
/**
private int getRelMargin(int reldir, String sRelPropName) {
FObj parent = (FObj) getParent();
String sPropName = "margin-"
- + parent.properties.wmRelToAbs(reldir);
- Property prop = properties.getExplicitBaseProp(sPropName);
+ + parent.propertyList.wmRelToAbs(reldir);
+ Property prop = propertyList.getExplicitBaseProp(sPropName);
if (prop == null) {
- prop = properties.getExplicitBaseProp(sRelPropName);
+ prop = propertyList.getExplicitBaseProp(sRelPropName);
}
return ((prop != null) ? prop.getLength().getValue() : 0);
}
*/
public Root(FONode parent) {
super(parent);
- // this.properties.get("media-usage");
+ // this.propertyList.get("media-usage");
pageSequences = new java.util.ArrayList();
if (parent != null) {
//throw new FOPException("root must be root element");
if (parent.getName().equals("fo:layout-master-set")) {
LayoutMasterSet layoutMasterSet = (LayoutMasterSet)parent;
- masterName = this.properties.get("master-name").getString();
+ masterName = this.propertyList.get("master-name").getString();
if (masterName == null) {
getLogger().warn("simple-page-master does not have "
+ "a master-name and so is being ignored");
CommonMarginInline mProps = propMgr.getMarginInlineProps();
Property prop;
- prop = this.properties.get("baseline-shift");
+ prop = this.propertyList.get("baseline-shift");
if (prop instanceof LengthProperty) {
Length bShift = prop.getLength();
} else if (prop instanceof EnumProperty) {
int bShift = prop.getEnum();
}
- ColorType col = this.properties.get("color").getColorType();
- Length lHeight = this.properties.get("line-height").getLength();
- int lShiftAdj = this.properties.get(
+ ColorType col = this.propertyList.get("color").getColorType();
+ Length lHeight = this.propertyList.get("line-height").getLength();
+ int lShiftAdj = this.propertyList.get(
"line-height-shift-adjustment").getEnum();
- int vis = this.properties.get("visibility").getEnum();
- Length zIndex = this.properties.get("z-index").getLength();
+ int vis = this.propertyList.get("visibility").getEnum();
+ Length zIndex = this.propertyList.get("z-index").getLength();
}
import org.apache.avalon.framework.configuration.ConfigurationException;
// Java
-import java.util.Map;
-import java.util.Iterator;
import java.util.List;
/**
import org.apache.fop.layoutmgr.table.Row;
import org.apache.fop.layoutmgr.table.TableLayoutManager;
import org.apache.fop.traits.MinOptMax;
-import org.apache.fop.util.CharUtilities;
/**
* Concrete implementation of FOTreeVisitor for the purpose of adding
};
lm.setUserAgent(node.getUserAgent());
lm.setFObj(node);
- lm.setAlignment(node.properties.get("leader-alignment").getEnum());
+ lm.setAlignment(node.propertyList.get("leader-alignment").getEnum());
currentLMList.add(lm);
}
}
public InlineArea getCharacterInlineArea(Character node) {
- String str = node.properties.get("character").getString();
+ String str = node.propertyList.get("character").getString();
if (str.length() == 1) {
org.apache.fop.area.inline.Character ch =
new org.apache.fop.area.inline.Character(
lm.setUserAgent(node.getUserAgent());
lm.setFObj(node);
lm.setCurrentArea(area);
- lm.setAlignment(node.properties.get("vertical-align").getEnum());
+ lm.setAlignment(node.propertyList.get("vertical-align").getEnum());
lm.setLead(node.getViewHeight());
currentLMList.add(lm);
}
BlockContainerLayoutManager blm = new BlockContainerLayoutManager();
blm.setUserAgent(node.getUserAgent());
blm.setFObj(node);
- blm.setOverflow(node.properties.get("overflow").getEnum());
+ blm.setOverflow(node.propertyList.get("overflow").getEnum());
currentLMList.add(blm);
}
lm.setUserAgent(node.getUserAgent());
lm.setFObj(node);
lm.setCurrentArea(areaCurrent);
- lm.setAlignment(node.properties.get("vertical-align").getEnum());
+ lm.setAlignment(node.propertyList.get("vertical-align").getEnum());
lm.setLead(areaCurrent.getHeight());
currentLMList.add(lm);
}
// and inline-progression-dimension
// if replaced then use height then ignore block-progression-dimension
- //int h = this.properties.get("height").getLength().mvalue();
+ //int h = this.propertyList.get("height").getLength().mvalue();
// use specified line-height then ignore dimension in height direction
- boolean hasLH = false;//properties.get("line-height").getSpecifiedValue() != null;
+ boolean hasLH = false;//propertyList.get("line-height").getSpecifiedValue() != null;
Length len;
int ipd = -1;
boolean bpdauto = false;
if (hasLH) {
- bpd = node.properties.get("line-height").getLength().getValue();
+ bpd = node.propertyList.get("line-height").getLength().getValue();
} else {
// this property does not apply when the line-height applies
// isn't the block-progression-dimension always in the same
// direction as the line height?
- len = node.properties.get("block-progression-dimension.optimum").getLength();
+ len = node.propertyList.get("block-progression-dimension.optimum").getLength();
if (!len.isAuto()) {
bpd = len.getValue();
} else {
- len = node.properties.get("height").getLength();
+ len = node.propertyList.get("height").getLength();
if (!len.isAuto()) {
bpd = len.getValue();
}
}
}
- len = node.properties.get("inline-progression-dimension.optimum").getLength();
+ len = node.propertyList.get("inline-progression-dimension.optimum").getLength();
if (!len.isAuto()) {
ipd = len.getValue();
} else {
- len = node.properties.get("width").getLength();
+ len = node.propertyList.get("width").getLength();
if (!len.isAuto()) {
ipd = len.getValue();
}
// to the content-height and content-width
int cwidth = -1;
int cheight = -1;
- len = node.properties.get("content-width").getLength();
+ len = node.propertyList.get("content-width").getLength();
if (!len.isAuto()) {
/*if(len.scaleToFit()) {
if(ipd != -1) {
} else {*/
cwidth = len.getValue();
}
- len = node.properties.get("content-height").getLength();
+ len = node.propertyList.get("content-height").getLength();
if (!len.isAuto()) {
/*if(len.scaleToFit()) {
if(bpd != -1) {
if (cheight == -1) {
cheight = (int)size.getY() * 1000;
}
- int scaling = node.properties.get("scaling").getEnum();
+ int scaling = node.propertyList.get("scaling").getEnum();
if (scaling == Scaling.UNIFORM) {
// adjust the larger
double rat1 = cwidth / (size.getX() * 1000f);
boolean clip = false;
if (cwidth > ipd || cheight > bpd) {
- int overflow = node.properties.get("overflow").getEnum();
+ int overflow = node.propertyList.get("overflow").getEnum();
if (overflow == Overflow.HIDDEN) {
clip = true;
} else if (overflow == Overflow.ERROR_IF_OVERFLOW) {
}
protected int getRotatedIPD() {
- PropertyList props = propManager.getProperties();
+ PropertyList props = propManager.getPropertyList();
int height = props.get("height").getLength().getValue();
height = props.get("inline-progression-dimension.optimum").getLength().getValue();
import org.apache.fop.area.BeforeFloat;
import org.apache.fop.area.Footnote;
import org.apache.fop.area.Resolveable;
-import org.apache.fop.area.Trait;
import org.apache.fop.datatypes.FODimension;
private PageViewport createPageAreas(SimplePageMaster spm) {
int pageWidth =
- spm.properties.get("page-width").getLength().getValue();
+ spm.propertyList.get("page-width").getLength().getValue();
int pageHeight =
- spm.properties.get("page-height").getLength().getValue();
+ spm.propertyList.get("page-height").getLength().getValue();
// Get absolute margin properties (top, left, bottom, right)
CommonMarginBlock mProps = spm.getPropertyManager().getMarginProps();
BodyRegion body = new BodyRegion();
setRegionPosition(r, body, absRegVPRect);
int columnCount =
- r.properties.get("column-count").getNumber().intValue();
+ r.propertyList.get("column-count").getNumber().intValue();
if ((columnCount > 1) && (r.overflow == Overflow.SCROLL)) {
// recover by setting 'column-count' to 1. This is allowed but
// not required by the spec.
body.setColumnCount(columnCount);
int columnGap =
- r.properties.get("column-gap").getLength().getValue();
+ r.propertyList.get("column-gap").getLength().getValue();
body.setColumnGap(columnGap);
return body;
}
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.FOTreeControl;
import org.apache.fop.fo.properties.BackgroundRepeat;
-import org.apache.fop.fonts.Typeface;
-import org.apache.fop.fonts.FontMetrics;
import org.apache.fop.image.FopImage;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.render.AbstractRenderer;
package org.apache.fop.render.ps;
//Java
-import java.awt.Graphics;
import java.awt.Color;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
//FOP
import org.apache.fop.apps.Document;
-import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontSetup;
/**
package org.apache.fop.render.ps;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Rectangle2D;
-
import java.awt.Color;
-import java.net.MalformedURLException;
-import java.net.URL;
-
import java.io.IOException;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.container.ContainerUtil;
import org.apache.batik.bridge.BridgeContext;
-import org.apache.batik.bridge.BridgeException;
-import org.apache.batik.bridge.GVTBuilder;
-import org.apache.batik.bridge.ViewBox;
-
-import org.apache.batik.dom.svg.SVGOMDocument;
-
-import org.apache.batik.gvt.GraphicsNode;
-
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderOutput;
-import org.apache.batik.transcoder.image.resources.Messages;
import org.apache.batik.transcoder.image.ImageTranscoder;
import org.apache.fop.svg.AbstractFOPTranscoder;
import org.w3c.dom.Document;
-import org.w3c.dom.svg.SVGDocument;
-import org.w3c.dom.svg.SVGSVGElement;
/**
* This class enables to transcode an input to a PostScript document.
public class ListAttributesConverter {
- static RtfAttributes convertAttributes(PropertyList properties)
+ static RtfAttributes convertAttributes(PropertyList propertyList)
throws FOPException {
RtfAttributes attrib = new RtfAttributes();
int iStartIndentInTwips = 0;
//start-indent
- if ((prop = properties.get("start-indent")) != null) {
+ if ((prop = propertyList.get("start-indent")) != null) {
LengthProperty lengthprop = (LengthProperty)prop;
Float f = new Float(lengthprop.getLength().getValue() / 1000f);
attrib.set(RtfListTable.LIST_INDENT, iStartIndentInTwips);
//end-indent
- if ((prop = properties.get("end-indent")) != null) {
+ if ((prop = propertyList.get("end-indent")) != null) {
LengthProperty lengthprop = (LengthProperty)prop;
Float f = new Float(lengthprop.getLength().getValue() / 1000f);
//read page size and margins, if specified
Property prop;
- if ((prop = pageSeq.properties.get("master-reference")) != null) {
+ if ((prop = pageSeq.propertyList.get("master-reference")) != null) {
String reference = prop.getString();
SimplePageMaster pagemaster
if (pagemaster != null) {
sect.getRtfAttributes().set(
PageAttributesConverter.convertPageAttributes(
- pagemaster.properties, null));
+ pagemaster.propertyList, null));
}
}
public void startBlock(Block bl) {
try {
RtfAttributes rtfAttr
- = TextAttributesConverter.convertAttributes(bl.properties, null);
+ = TextAttributesConverter.convertAttributes(bl.propertyList, null);
IRtfTextrunContainer container
= (IRtfTextrunContainer)builderContext.getContainer(
try {
RtfAttributes atts
- = TableAttributesConverter.convertTableAttributes(tbl.properties);
+ = TableAttributesConverter.convertTableAttributes(tbl.propertyList);
final IRtfTableContainer tc
= (IRtfTableContainer)builderContext.getContainer(
try {
RtfAttributes rtfAttr
- = TextAttributesConverter.convertCharacterAttributes(inl.properties, null);
+ = TextAttributesConverter.convertCharacterAttributes(inl.propertyList, null);
IRtfTextrunContainer container
= (IRtfTextrunContainer)builderContext.getContainer(
*/
public void startBody(TableBody tb) {
try {
- RtfAttributes atts = TableAttributesConverter.convertRowAttributes (tb.properties,
+ RtfAttributes atts = TableAttributesConverter.convertRowAttributes (tb.propertyList,
null);
RtfTable tbl = (RtfTable)builderContext.getContainer(RtfTable.class, true, this);
final RtfTable tbl = (RtfTable)builderContext.getContainer(RtfTable.class,
true, null);
- RtfAttributes atts = TableAttributesConverter.convertRowAttributes(tr.properties,
+ RtfAttributes atts = TableAttributesConverter.convertRowAttributes(tr.propertyList,
tbl.getHeaderAttribs());
if (tr.getParent() instanceof TableHeader) {
float width = tctx.getColumnWidth();
// create an RtfTableCell in the current RtfTableRow
- RtfAttributes atts = TableAttributesConverter.convertCellAttributes(tc.properties);
+ RtfAttributes atts = TableAttributesConverter.convertCellAttributes(tc.propertyList);
RtfTableCell cell = row.newTableCell((int)width, atts);
//process number-rows-spanned attribute
Property p = null;
- if ((p = tc.properties.get("number-rows-spanned")) != null) {
+ if ((p = tc.propertyList.get("number-rows-spanned")) != null) {
// Start vertical merge
cell.setVMerge(RtfTableCell.MERGE_START);
= (IRtfListContainer)builderContext.getContainer(
IRtfListContainer.class, true, this);
final RtfList newList = c.newList(
- ListAttributesConverter.convertAttributes(lb.properties));
+ ListAttributesConverter.convertAttributes(lb.propertyList));
builderContext.pushContainer(newList);
} catch (IOException ioe) {
log.error("startList: " + ioe.getMessage());
Property p = null;
//get source file
- if ((p = eg.properties.get("src")) != null) {
+ if ((p = eg.propertyList.get("src")) != null) {
newGraphic.setURL (p.getString());
} else {
log.error("The attribute 'src' of <fo:external-graphic> is required.");
}
//get scaling
- if ((p = eg.properties.get("scaling")) != null) {
+ if ((p = eg.propertyList.get("scaling")) != null) {
EnumProperty e = (EnumProperty)p;
if (p.getEnum() == Constants.UNIFORM) {
newGraphic.setScaling ("uniform");
}
//get width
- if ((p = eg.properties.get("width")) != null) {
+ if ((p = eg.propertyList.get("width")) != null) {
LengthProperty lengthProp = (LengthProperty)p;
if (lengthProp.getLength() instanceof FixedLength) {
Float f = new Float(lengthProp.getLength().getValue() / 1000f);
}
//get height
- if ((p = eg.properties.get("height")) != null) {
+ if ((p = eg.propertyList.get("height")) != null) {
LengthProperty lengthProp = (LengthProperty)p;
if (lengthProp.getLength() instanceof FixedLength) {
Float f = new Float(lengthProp.getLength().getValue() / 1000f);
try {
RtfAttributes rtfAttr
= TextAttributesConverter.convertCharacterAttributes(
- pagenum.properties, null);
+ pagenum.propertyList, null);
IRtfTextrunContainer container
= (IRtfTextrunContainer)builderContext.getContainer(
*
* @throws ConverterException On convertion error
*/
- static RtfAttributes convertTableAttributes(PropertyList properties)
+ static RtfAttributes convertTableAttributes(PropertyList propertyList)
throws FOPException {
RtfAttributes attrib = new RtfAttributes();
LengthProperty lengthProp = null;
// margin-left
- lengthProp = (LengthProperty)properties.get("margin-left");
+ lengthProp = (LengthProperty)propertyList.get("margin-left");
if (lengthProp != null) {
Float f = new Float(lengthProp.getLength().getValue() / 1000f);
final String sValue = f.toString() + "pt";
}
- private static void attrBlockFontFamily(PropertyList properties, RtfAttributes rtfAttr) {
- String fopValue = properties.get("font-family").getString();
+ private static void attrBlockFontFamily(PropertyList propertyList, RtfAttributes rtfAttr) {
+ String fopValue = propertyList.get("font-family").getString();
if (fopValue != null) {
rtfAttr.set(RtfText.ATTR_FONT_FAMILY,
}
}
- private static void attrBlockFontSize(PropertyList properties, RtfAttributes rtfAttr) {
- int fopValue = properties.get("font-size").getLength().getValue() / 500;
+ private static void attrBlockFontSize(PropertyList propertyList, RtfAttributes rtfAttr) {
+ int fopValue = propertyList.get("font-size").getLength().getValue() / 500;
rtfAttr.set("fs", fopValue);
}
- private static void attrBlockFontColor(PropertyList properties, RtfAttributes rtfAttr) {
+ private static void attrBlockFontColor(PropertyList propertyList, RtfAttributes rtfAttr) {
// Cell background color
- ColorTypeProperty colorTypeProp = (ColorTypeProperty)properties.get("color");
+ ColorTypeProperty colorTypeProp = (ColorTypeProperty)propertyList.get("color");
if (colorTypeProp != null) {
ColorType colorType = colorTypeProp.getColorType();
if (colorType != null) {
- private static void attrBlockFontWeight(PropertyList properties, RtfAttributes rtfAttr) {
- String fopValue = properties.get("font-weight").getString();
+ private static void attrBlockFontWeight(PropertyList propertyList, RtfAttributes rtfAttr) {
+ String fopValue = propertyList.get("font-weight").getString();
if (fopValue == "bold" || fopValue == "700") {
rtfAttr.set("b", 1);
} else {
}
}
- private static void attrBlockFontItalic(PropertyList properties, RtfAttributes rtfAttr) {
- String fopValue = properties.get("font-style").getString();
+ private static void attrBlockFontItalic(PropertyList propertyList, RtfAttributes rtfAttr) {
+ String fopValue = propertyList.get("font-style").getString();
if (fopValue.equals("italic")) {
rtfAttr.set(RtfText.ATTR_ITALIC, 1);
} else {
}
}
- private static void attrBlockFontUnderline(PropertyList properties, RtfAttributes rtfAttr) {
- EnumProperty enumProp = (EnumProperty)properties.get("text-decoration");
+ private static void attrBlockFontUnderline(PropertyList propertyList, RtfAttributes rtfAttr) {
+ EnumProperty enumProp = (EnumProperty)propertyList.get("text-decoration");
if (enumProp.getEnum() == Constants.UNDERLINE) {
rtfAttr.set(RtfText.ATTR_UNDERLINE, 1);
} else {
}
}
- private static void attrBlockSpaceBeforeAfter(PropertyList properties, RtfAttributes rtfAttr) {
+ private static void attrBlockSpaceBeforeAfter(PropertyList propertyList, RtfAttributes rtfAttr) {
SpaceProperty spaceProp = null;
//space-before
- spaceProp = (SpaceProperty)properties.get("space-before");
+ spaceProp = (SpaceProperty)propertyList.get("space-before");
if (spaceProp != null) {
Float f = new Float(
spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f);
}
//space-after
- spaceProp = (SpaceProperty)properties.get("space-after");
+ spaceProp = (SpaceProperty)propertyList.get("space-after");
if (spaceProp != null) {
Float f = new Float(
spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f);
}
}
- private static void attrBlockMargins(PropertyList properties, RtfAttributes rtfAttr) {
+ private static void attrBlockMargins(PropertyList propertyList, RtfAttributes rtfAttr) {
try {
LengthProperty lengthProp = null;
// margin-left
- lengthProp = (LengthProperty)properties.get("margin-left");
+ lengthProp = (LengthProperty)propertyList.get("margin-left");
if (lengthProp != null) {
Float f = new Float(lengthProp.getLength().getValue() / 1000f);
String sValue = f.toString() + "pt";
}
// margin-right
- lengthProp = (LengthProperty)properties.get("margin-right");
+ lengthProp = (LengthProperty)propertyList.get("margin-right");
if (lengthProp != null) {
Float f = new Float(lengthProp.getLength().getValue() / 1000f);
String sValue = f.toString() + "pt";
- private static void attrBlockTextAlign(PropertyList properties, RtfAttributes rtfAttr) {
- int fopValue = properties.get("text-align").getEnum();
+ private static void attrBlockTextAlign(PropertyList propertyList, RtfAttributes rtfAttr) {
+ int fopValue = propertyList.get("text-align").getEnum();
String rtfValue = null;
switch (fopValue) {
case Constants.CENTER:
* @param bl the Block object the properties are read from
* @param rtfAttr the RtfAttributes object the attributes are written to
*/
- private static void attrBlockBackgroundColor(PropertyList properties, RtfAttributes rtfAttr) {
- ColorType fopValue = properties.get("background-color").getColorType();
+ private static void attrBlockBackgroundColor(PropertyList propertyList, RtfAttributes rtfAttr) {
+ ColorType fopValue = propertyList.get("background-color").getColorType();
int rtfColor = 0;
/* FOP uses a default background color of "transparent", which is
actually a transparent black, which is generally not suitable as a