Class InlineViewport

All Implemented Interfaces:
Serializable, 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:
  • Constructor Details

    • 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 Details

    • 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 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(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 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
    • getEffectiveIPD

      public int getEffectiveIPD()
      Overrides:
      getEffectiveIPD in class Area