1 17 18 19 20 package org.apache.fop.area; 21 22 import java.util.ArrayList ; 23 24 31 35 public class Block extends BlockParent { 36 39 public static final int STACK = 0; 40 41 45 public static final int RELATIVE = 1; 46 47 51 public static final int ABSOLUTE = 2; 52 53 57 public static final int FIXED = 3; 58 59 private int stacking = TB; 60 private int positioning = STACK; 61 62 65 70 public void addBlock(Block block) { 71 addBlock(block, true); 72 } 73 74 80 public void addBlock(Block block, boolean autoHeight) { 81 if (autoHeight) { 82 bpd += block.getAllocBPD(); 83 } 84 addChildArea(block); 85 } 86 87 92 public void addLineArea(LineArea line) { 93 bpd += line.getAllocBPD(); 94 addChildArea(line); 95 } 96 97 102 public void setPositioning(int pos) { 103 positioning = pos; 104 } 105 106 111 public int getPositioning() { 112 return positioning; 113 } 114 115 118 public int getStartIndent() { 119 Integer startIndent = (Integer )getTrait(Trait.START_INDENT); 120 return (startIndent != null ? startIndent.intValue() : 0); 121 } 122 123 } 124 125 | Popular Tags |