1 51 package org.apache.fop.layout; 52 53 import org.apache.fop.render.Renderer; 55 56 public class AreaContainer extends Area { 57 58 private int xPosition; private int yPosition; private int position; 61 private boolean isRegionArea = false; 62 63 private String areaName; 66 67 public AreaContainer(FontState fontState, int xPosition, int yPosition, 68 int allocationWidth, int maxHeight, int position) { 69 super(fontState, allocationWidth, maxHeight); 70 this.xPosition = xPosition; 71 this.yPosition = yPosition; 72 this.position = position; 73 } 75 76 public AreaContainer(FontState fontState, int xPosition, int yPosition, 77 int allocationWidth, int maxHeight, int position, 78 boolean isRegionArea) { 79 this(fontState, xPosition, yPosition, allocationWidth, maxHeight, 80 position); 81 this.isRegionArea = isRegionArea; 82 } 83 84 public void render(Renderer renderer) { 85 if (isRegionArea) 86 renderer.renderRegionAreaContainer(this); 87 else 88 renderer.renderAreaContainer(this); 89 } 90 91 public int getPosition() { 92 return position; 93 } 94 95 public int getXPosition() { 96 return xPosition; 98 } 99 100 public void setXPosition(int value) { 101 xPosition = value; 102 } 103 104 public int getYPosition() { 105 return yPosition; 107 } 108 109 public int getCurrentYPosition() { 110 return yPosition; 111 } 112 113 public void setYPosition(int value) { 114 yPosition = value; 115 } 116 117 public void shiftYPosition(int value) { 118 yPosition += value; 119 } 120 121 public String getAreaName() { 122 return areaName; 123 } 124 125 public void setAreaName(String areaName) { 126 this.areaName = areaName; 127 } 128 129 } 130 | Popular Tags |