Class RegionViewport

All Implemented Interfaces:
Serializable, Cloneable, Viewport

public class RegionViewport extends Area implements Viewport
Region Viewport area. This object represents the region-viewport-area. It has a region-reference-area as its child. These areas are described in the fo:region-body description in the XSL Recommendation.
See Also:
  • Constructor Details

    • RegionViewport

      public RegionViewport(Rectangle2D viewArea)
      Create a new region-viewport-area
      Parameters:
      viewArea - the view area of this viewport
  • Method Details

    • setRegionReference

      public void setRegionReference(RegionReference reg)
      Set the region-reference-area for this region viewport.
      Parameters:
      reg - the child region-reference-area inside this viewport
    • getRegionReference

      public RegionReference getRegionReference()
      Get the region-reference-area for this region viewport.
      Returns:
      the child region-reference-area inside this viewport
    • setClip

      public void setClip(boolean c)
      Set the clipping for this region viewport.
      Parameters:
      c - the clipping value
    • hasClip

      public boolean hasClip()
      Returns true if this area will clip overflowing content.
      Specified by:
      hasClip in interface Viewport
      Returns:
      true if the overflow trait has the value "hidden", "scroll" or "error-if-overflow"
    • getClipRectangle

      public Rectangle getClipRectangle()
      Returns the clipping rectangle of this viewport area.
      Specified by:
      getClipRectangle in interface Viewport
      Returns:
      the clipping rectangle expressed in the viewport's coordinate system, or null if clipping is disabled
    • getViewArea

      public Rectangle2D getViewArea()
      Get the view area of this viewport.
      Returns:
      the viewport rectangle area
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Area
      Throws:
      CloneNotSupportedException
    • setWritingModeTraits

      public void setWritingModeTraits(WritingModeTraitsGetter wmtg)
      Sets the writing mode traits for the region reference of this region viewport
      Overrides:
      setWritingModeTraits in class Area
      Parameters:
      wmtg - a WM traits getter