1 18 package org.apache.batik.extension.svg; 19 20 public class MarginInfo { 21 public final static int JUSTIFY_START = 0; 22 public final static int JUSTIFY_MIDDLE = 1; 23 public final static int JUSTIFY_END = 2; 24 public final static int JUSTIFY_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 justification; 34 protected boolean flowRegionBreak; 35 36 37 public MarginInfo(float top, float right, float bottom, float left, 38 float indent, int justification, 39 boolean flowRegionBreak) { 40 this.top = top; 41 this.right = right; 42 this.bottom = bottom; 43 this.left = left; 44 45 this.indent = indent; 46 47 this.justification = justification; 48 this.flowRegionBreak = flowRegionBreak; 49 } 50 51 public MarginInfo(float margin, int justification) { 52 setMargin(margin); 53 this.indent = 0; 54 this.justification = justification; 55 this.flowRegionBreak = false; 56 } 57 58 public void setMargin(float margin) { 59 this.top = margin; 60 this.right = margin; 61 this.bottom = margin; 62 this.left = margin; 63 } 64 65 public float getTopMargin() { return top; } 66 public float getRightMargin() { return right; } 67 public float getBottomMargin() { return bottom; } 68 public float getLeftMargin() { return left; } 69 70 public float getIndent() { return indent; } 71 72 public int getJustification() { return justification; } 73 public boolean isFlowRegionBreak() { return flowRegionBreak; } 74 } 75 | Popular Tags |