1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.datatypes.Length; 23 import org.apache.fop.fo.Constants; 24 import org.apache.fop.fo.PropertyList; 25 import org.apache.fop.fo.expr.PropertyException; 26 27 32 public class CommonMarginBlock { 33 36 public Length marginTop; 37 38 41 public Length marginBottom; 42 43 46 public Length marginLeft; 47 48 51 public Length marginRight; 52 53 56 public SpaceProperty spaceBefore; 57 58 61 public SpaceProperty spaceAfter; 62 63 66 public Length startIndent; 67 68 71 public Length endIndent; 72 73 77 public CommonMarginBlock(PropertyList pList) throws PropertyException { 78 marginTop = pList.get(Constants.PR_MARGIN_TOP).getLength(); 79 marginBottom = pList.get(Constants.PR_MARGIN_BOTTOM).getLength(); 80 marginLeft = pList.get(Constants.PR_MARGIN_LEFT).getLength(); 81 marginRight = pList.get(Constants.PR_MARGIN_RIGHT).getLength(); 82 83 spaceBefore = pList.get(Constants.PR_SPACE_BEFORE).getSpace(); 84 spaceAfter = pList.get(Constants.PR_SPACE_AFTER).getSpace(); 85 86 startIndent = pList.get(Constants.PR_START_INDENT).getLength(); 87 endIndent = pList.get(Constants.PR_END_INDENT).getLength(); 88 } 89 90 91 public String toString() { 92 return "CommonMarginBlock:\n" 93 + "Margins (top, bottom, left, right): (" 94 + marginTop + ", " + marginBottom + ", " 95 + marginLeft + ", " + marginRight + ")\n" 96 + "Space (before, after): (" 97 + spaceBefore + ", " + spaceAfter + ")\n" 98 + "Indents (start, end): (" 99 + startIndent + ", " + endIndent + ")\n"; 100 } 101 102 } 103 | Popular Tags |