Package com.inet.pdfc.generator.message
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:
java.awt.Shape
,java.io.Serializable
,java.lang.Cloneable
- Enclosing interface:
- HighlightData
@JsonData public static class HighlightData.Highlight extends java.awt.Rectangle
Represents a highlight area on a certain page. The coordinates are in pixels an relative to the unscaled page image coordinates- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HighlightData.Highlight.Appearance
Appearances of a highlight.
-
Constructor Summary
Constructors Constructor Description Highlight(int x, int y, int width, int height, java.lang.String caption, HighlightData.Highlight.Appearance appearance, java.awt.Color color)
Creates the highlight area
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(int x, int y)
HighlightData.Highlight.Appearance
getAppearance()
Returns the appearance.java.lang.String
getCaption()
Returns the caption to be displayed in the areajava.awt.Color
getColor()
The base color to draw this highlightjava.awt.Image
getImage()
Returns the image.java.lang.String
getRenderCacheKey()
Returns the key of the render cache entry for drawing this highlight.java.lang.String
getType()
Returns the type.boolean
isAnnotation()
Returns a flag indicating this highlight represents an annotation.void
setImage(java.awt.Image image)
Sets the image.void
setRenderCacheKey(java.lang.String renderCacheKey)
Sets the key of the render cache entry for drawing this highlight.void
setType(java.lang.String type)
Sets the type.-
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
-
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
-
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
-
-
-
Constructor Detail
-
Highlight
public Highlight(int x, int y, int width, int height, java.lang.String caption, HighlightData.Highlight.Appearance appearance, java.awt.Color color)
Creates the highlight area- Parameters:
x
- the x-offsety
- the y-offsetwidth
- the width in PXheight
- the height in PXcaption
- the caption to be displayed INSIDE the area, may benull
appearance
- indicates how to draw the highlightcolor
- the base color for this highlight. Note that the Alpha channel will be ignored an set by the painter
-
-
Method Detail
-
getCaption
public java.lang.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 java.awt.Color getColor()
The base color to draw this highlight- Returns:
- the base color to draw this highlight
-
getImage
public java.awt.Image getImage()
Returns the image.- Returns:
- the image.
-
setImage
public void setImage(java.awt.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(java.lang.String type)
Sets the type.- Parameters:
type
- the type.
-
getType
public java.lang.String getType()
Returns the type.- Returns:
- the type
-
getAppearance
public HighlightData.Highlight.Appearance getAppearance()
Returns the appearance.- Returns:
- the appearance.
-
getRenderCacheKey
public java.lang.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(java.lang.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 classjava.awt.Rectangle
-
-