Class HighlightData.Highlight

java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
com.inet.pdfc.generator.message.HighlightData.Highlight
All Implemented Interfaces:
Shape, Serializable, Cloneable
Enclosing interface:
HighlightData

@JsonData public static class HighlightData.Highlight extends Rectangle
Represents a highlight area on a certain page. The coordinates are in pixels an relative to the unscaled page image coordinates
See Also:
  • Constructor Details

    • Highlight

      public Highlight(int x, int y, int width, int height, String caption, HighlightData.Highlight.Appearance appearance, Color color)
      Creates the highlight area
      Parameters:
      x - the x-offset
      y - the y-offset
      width - the width in PX
      height - the height in PX
      caption - the caption to be displayed INSIDE the area, may be null
      appearance - indicates how to draw the highlight
      color - the base color for this highlight. Note that the Alpha channel will be ignored an set by the painter
  • Method Details

    • getCaption

      public String getCaption()
      Returns the caption to be displayed in the area
      Returns:
      the caption to be displayed in the area, null if there is none
    • getColor

      public Color getColor()
      The base color to draw this highlight
      Returns:
      the base color to draw this highlight
    • getImage

      public Image getImage()
      Returns the image.
      Returns:
      the image.
    • setImage

      public void setImage(Image image)
      Sets the image.
      Parameters:
      image - the image
    • isAnnotation

      public boolean isAnnotation()
      Returns a flag indicating this highlight represents an annotation.
      Returns:
      true if this highlight represents an annotation
    • setType

      public void setType(String type)
      Sets the type.
      Parameters:
      type - the type.
    • getType

      public String getType()
      Returns the type.
      Returns:
      the type
    • getAppearance

      public HighlightData.Highlight.Appearance getAppearance()
      Returns the appearance.
      Returns:
      the appearance.
    • getRenderCacheKey

      public String getRenderCacheKey()
      Returns the key of the render cache entry for drawing this highlight.
      Returns:
      the key of the render cache entry for drawing this highlight
    • setRenderCacheKey

      public void setRenderCacheKey(String renderCacheKey)
      Sets the key of the render cache entry for drawing this highlight.
      Parameters:
      renderCacheKey - the key of the render cache entry for drawing this highlight
    • contains

      public boolean contains(int x, int y)
      Overrides:
      contains in class Rectangle