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.

Container.java 862B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.area.inline;
  8. import org.apache.fop.area.Area;
  9. import org.apache.fop.area.Block;
  10. import org.apache.fop.render.Renderer;
  11. import java.util.List;
  12. import java.util.ArrayList;
  13. // this is an inline area that can have blocks as children
  14. public class Container extends Area {
  15. ArrayList blocks = new ArrayList();
  16. int width;
  17. public Container() {
  18. }
  19. public void render(Renderer renderer) {
  20. renderer.renderContainer(this);
  21. }
  22. public void addBlock(Block block) {
  23. blocks.add(block);
  24. }
  25. public List getBlocks() {
  26. return blocks;
  27. }
  28. public int getWidth() {
  29. return width;
  30. }
  31. }