Class InlineViewport

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Viewport

    public class InlineViewport
    extends InlineArea
    implements Viewport
    Inline viewport area. This is an inline-level viewport area for inline container, external graphic and instream foreign object. This viewport holds the area and positions it.
    See Also:
    Serialized Form
    • Field Detail

      • content

        private Area content
      • clip

        private boolean clip
      • contentPosition

        private java.awt.geom.Rectangle2D contentPosition
    • Constructor Detail

      • InlineViewport

        public InlineViewport​(Area child)
        Create a new viewport area with the content area.
        Parameters:
        child - the child content area of this viewport
      • InlineViewport

        public InlineViewport​(Area child,
                              int bidiLevel)
        Create a new viewport area with the content area.
        Parameters:
        child - the child content area of this viewport
        bidiLevel - the bidirectional embedding level (or -1 if not defined)
    • Method Detail

      • setClip

        public void setClip​(boolean c)
        Set the clip of this viewport.
        Parameters:
        c - true if this viewport should clip
      • 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
      • setContentPosition

        public void setContentPosition​(java.awt.geom.Rectangle2D cp)
        Set the position and size of the content of this viewport.
        Parameters:
        cp - the position and size to place the content
      • getContentPosition

        public java.awt.geom.Rectangle2D getContentPosition()
        Get the position and size of the content of this viewport.
        Returns:
        the position and size to place the content
      • setContent

        public void setContent​(Area content)
        Sets the content area.
        Parameters:
        content - the content area
      • getContent

        public Area getContent()
        Get the content area for this viewport.
        Returns:
        the content 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