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.

AreaContainer.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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.*;
  11. // Java
  12. import java.util.Vector;
  13. import java.util.Enumeration;
  14. public class AreaContainer extends Area {
  15. private int xPosition; // should be able to take value 'left' and 'right' too
  16. private int yPosition; // should be able to take value 'top' and 'bottom' too
  17. private int position;
  18. // use this for identifying the general usage of the area,
  19. // like 'main-reference-area' or 'region-before'
  20. private String areaName;
  21. public AreaContainer(FontState fontState, int xPosition, int yPosition,
  22. int allocationWidth, int maxHeight, int position) {
  23. super(fontState, allocationWidth, maxHeight);
  24. this.xPosition = xPosition;
  25. this.yPosition = yPosition;
  26. this.position = position;
  27. // setIsReferenceArea(true); // Should always be true!
  28. }
  29. public int getPosition() {
  30. return position;
  31. }
  32. public int getXPosition() {
  33. // return xPosition + getPaddingLeft() + getBorderLeftWidth();
  34. return xPosition;
  35. }
  36. public void setXPosition(int value) {
  37. xPosition = value;
  38. }
  39. public int getYPosition() {
  40. // return yPosition + getPaddingTop() + getBorderTopWidth();
  41. return yPosition;
  42. }
  43. public int getCurrentYPosition() {
  44. return yPosition;
  45. }
  46. public void setYPosition(int value) {
  47. yPosition = value;
  48. }
  49. public void shiftYPosition(int value) {
  50. yPosition += value;
  51. }
  52. public String getAreaName() {
  53. return areaName;
  54. }
  55. public void setAreaName(String areaName) {
  56. this.areaName = areaName;
  57. }
  58. }