1 18 package org.apache.batik.gvt.flow; 19 20 public class MarginInfo { 21 public final static int ALIGN_START = 0; 22 public final static int ALIGN_MIDDLE = 1; 23 public final static int ALIGN_END = 2; 24 public final static int ALIGN_FULL = 3; 25 26 protected float top; 27 protected float right; 28 protected float bottom; 29 protected float left; 30 31 protected float indent; 32 33 protected int alignment; 34 35 protected float lineHeight; 36 protected boolean fontSizeRelative; 37 38 protected boolean flowRegionBreak; 39 40 41 public MarginInfo(float top, float right, float bottom, float left, 42 float indent, int alignment, float lineHeight, 43 boolean fontSizeRelative, boolean flowRegionBreak) { 44 this.top = top; 45 this.right = right; 46 this.bottom = bottom; 47 this.left = left; 48 49 this.indent = indent; 50 51 this.alignment = alignment; 52 53 this.lineHeight = lineHeight; 54 this.fontSizeRelative = fontSizeRelative; 55 56 this.flowRegionBreak = flowRegionBreak; 57 } 58 59 public MarginInfo(float margin, int alignment) { 60 setMargin(margin); 61 this.indent = 0; 62 this.alignment = alignment; 63 this.flowRegionBreak = false; 64 } 65 66 public void setMargin(float margin) { 67 this.top = margin; 68 this.right = margin; 69 this.bottom = margin; 70 this.left = margin; 71 } 72 73 public float getTopMargin() { return top; } 74 public float getRightMargin() { return right; } 75 public float getBottomMargin() { return bottom; } 76 public float getLeftMargin() { return left; } 77 78 public float getIndent() { return indent; } 79 80 public int getTextAlignment() { return alignment; } 81 82 83 public float getLineHeight() { return lineHeight; } 84 public boolean isFontSizeRelative() { return fontSizeRelative; } 85 86 public boolean isFlowRegionBreak() { return flowRegionBreak; } 87 } 88 | Popular Tags |