1 51 package org.apache.fop.layout; 52 53 import org.apache.fop.render.Renderer; 55 import org.apache.fop.fo.properties.Position; 56 57 public class ColumnArea extends AreaContainer { 58 59 private int columnIndex; 60 private int maxColumns; 61 62 public ColumnArea(FontState fontState, int xPosition, int yPosition, 63 int allocationWidth, int maxHeight, int columnCount) { 64 super(fontState, xPosition, yPosition, allocationWidth, maxHeight, 65 Position.ABSOLUTE); 66 this.maxColumns = columnCount; 67 this.setAreaName("normal-flow-ref.-area"); 68 } 69 70 public void render(Renderer renderer) { 71 renderer.renderAreaContainer(this); 72 } 73 74 public void end() {} 75 76 public void start() {} 77 78 public int spaceLeft() { 79 return maxHeight - currentHeight; 80 } 81 82 public int getColumnIndex() { 83 return columnIndex; 84 } 85 86 public void setColumnIndex(int columnIndex) { 87 this.columnIndex = columnIndex; 88 } 89 90 public void incrementSpanIndex() { 91 SpanArea span = (SpanArea)this.parent; 92 span.setCurrentColumn(span.getCurrentColumn() + 1); 93 } 94 95 } 96 | Popular Tags |