You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ColumnArea.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.layout;
  8. // FOP
  9. import org.apache.fop.render.Renderer;
  10. import org.apache.fop.fo.properties.Position;
  11. import org.apache.fop.datatypes.IDReferences;
  12. // Java
  13. import java.util.Vector;
  14. import java.util.Enumeration;
  15. public class ColumnArea extends AreaContainer {
  16. private int columnIndex;
  17. private int maxColumns;
  18. public ColumnArea(FontState fontState, int xPosition, int yPosition,
  19. int allocationWidth, int maxHeight, int columnCount) {
  20. super(fontState, xPosition, yPosition, allocationWidth, maxHeight,
  21. Position.ABSOLUTE);
  22. this.maxColumns = columnCount;
  23. this.setAreaName("normal-flow-ref.-area");
  24. }
  25. public void end() {}
  26. public void start() {}
  27. public int spaceLeft() {
  28. return maxHeight - currentHeight;
  29. }
  30. public int getColumnIndex() {
  31. return columnIndex;
  32. }
  33. public void setColumnIndex(int columnIndex) {
  34. this.columnIndex = columnIndex;
  35. }
  36. public void incrementSpanIndex() {
  37. SpanArea span = (SpanArea)this.parent;
  38. span.setCurrentColumn(span.getCurrentColumn() + 1);
  39. }
  40. }