Class RegionViewport

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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:
    Serialized Form
    • Field Detail

      • viewArea

        private java.awt.geom.Rectangle2D viewArea
      • clip

        private boolean clip
    • Constructor Detail

      • RegionViewport

        public RegionViewport​(java.awt.geom.Rectangle2D viewArea)
        Create a new region-viewport-area
        Parameters:
        viewArea - the view area of this viewport
    • Method Detail

      • 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 java.awt.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 java.awt.geom.Rectangle2D getViewArea()
        Get the view area of this viewport.
        Returns:
        the viewport rectangle area
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class Area
        Throws:
        java.lang.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