Class FitObject

java.lang.Object
com.itextpdf.forms.xfdf.FitObject

public class FitObject extends Object
Represent Fit, a child of the Dest element. Content model: none. Attributes: depends of type of Fit (FitH, FitB, FitV etc.). For more details see paragraphs 6.5.13-6.5.19, 6.6.23 in Xfdf specification.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float
    Vertical coordinate positioned at the bottom edge of the window.
    private float
    Horizontal coordinate positioned at the left edge of the window.
    private final PdfObject
    Represents the page displayed by current Fit element.
    private float
    Horizontal coordinate positioned at the right edge of the window.
    private float
    Vertical coordinate positioned at the top edge of the window.
    private float
    Corresponds to the zoom object in the destination syntax.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of FitObject.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Gets a float vertical coordinate positioned at the bottom edge of the window.
    float
    Gets a float horizontal coordinate positioned at the left edge of the window.
    Gets the PdfObject representing the page displayed by current Fit element.
    float
    Gets a float horizontal coordinate positioned at the right edge of the window.
    float
    Gets a float vertical coordinate positioned at the top edge of the window.
    float
    Gets a float representing the zoom ratio.
    setBottom(float bottom)
    Sets a float vertical coordinate positioned at the bottom edge of the window.
    setLeft(float left)
    Sets a float horizontal coordinate positioned at the left edge of the window.
    setRight(float right)
    Sets a float horizontal coordinate positioned at the right edge of the window.
    setTop(float top)
    Sets a float vertical coordinate positioned at the top edge of the window.
    setZoom(float zoom)
    Sets a float representing the zoom ratio.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • page

      private final PdfObject page
      Represents the page displayed by current Fit element. Attribute of Fit, FitB, FitBH, FitBV, FitH, FitR, FitV, XYZ elements.
    • top

      private float top
      Vertical coordinate positioned at the top edge of the window.
    • bottom

      private float bottom
      Vertical coordinate positioned at the bottom edge of the window.
    • left

      private float left
      Horizontal coordinate positioned at the left edge of the window.
    • zoom

      private float zoom
      Corresponds to the zoom object in the destination syntax. Attribute of XYZ object.
  • Constructor Details

    • FitObject

      public FitObject(PdfObject page)
      Creates an instance of FitObject.
      Parameters:
      page - the page displayed by current Fit element
  • Method Details

    • getPage

      public PdfObject getPage()
      Gets the PdfObject representing the page displayed by current Fit element. Attribute of Fit, FitB, FitBH, FitBV, FitH, FitR, FitV, XYZ elements.
      Returns:
      page of the current Fit element.
    • getTop

      public float getTop()
      Gets a float vertical coordinate positioned at the top edge of the window.
      Returns:
      top vertical coordinate.
    • setTop

      public FitObject setTop(float top)
      Sets a float vertical coordinate positioned at the top edge of the window.
      Parameters:
      top - vertical coordinate value
      Returns:
      current fit object.
    • getLeft

      public float getLeft()
      Gets a float horizontal coordinate positioned at the left edge of the window.
      Returns:
      left horizontal coordinate.
    • setLeft

      public FitObject setLeft(float left)
      Sets a float horizontal coordinate positioned at the left edge of the window.
      Parameters:
      left - horizontal coordinate value
      Returns:
      current fit object.
    • getBottom

      public float getBottom()
      Gets a float vertical coordinate positioned at the bottom edge of the window.
      Returns:
      bottom vertical coordinate.
    • setBottom

      public FitObject setBottom(float bottom)
      Sets a float vertical coordinate positioned at the bottom edge of the window.
      Parameters:
      bottom - vertical coordinate value
      Returns:
      current fit object.
    • getRight

      public float getRight()
      Gets a float horizontal coordinate positioned at the right edge of the window.
      Returns:
      right horizontal coordinate.
    • setRight

      public FitObject setRight(float right)
      Sets a float horizontal coordinate positioned at the right edge of the window.
      Parameters:
      right - horizontal coordinate
      Returns:
      current fit object.
    • getZoom

      public float getZoom()
      Gets a float representing the zoom ratio. Attribute of XYZ object.
      Returns:
      zoom ratio value.
    • setZoom

      public FitObject setZoom(float zoom)
      Sets a float representing the zoom ratio. Attribute of XYZ object.
      Parameters:
      zoom - ratio value
      Returns:
      current fit object.