Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

RegionStart.java 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001-2002 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.fo.pagination;
  8. import java.awt.Rectangle;
  9. // FOP
  10. import org.apache.fop.fo.*;
  11. import org.apache.fop.datatypes.FODimension;
  12. import org.apache.fop.apps.FOPException;
  13. import org.apache.fop.area.RegionReference;
  14. public class RegionStart extends RegionSE {
  15. public RegionStart(FONode parent) {
  16. super(parent);
  17. }
  18. protected Rectangle getViewportRectangle (FODimension reldims) {
  19. // Depends on extent and precedence
  20. // This is the rectangle relative to the page-reference area in
  21. // writing-mode relative coordinates
  22. Rectangle vpRect =
  23. new Rectangle(0, 0, getExtent(), reldims.bpd);
  24. adjustIPD(vpRect);
  25. return vpRect;
  26. }
  27. protected String getDefaultRegionName() {
  28. return "xsl-region-start";
  29. }
  30. public String getRegionClass() {
  31. return Region.START;
  32. }
  33. public int getRegionAreaClass() {
  34. return RegionReference.START;
  35. }
  36. }