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:
Shape
,Serializable
,Cloneable
- Enclosing interface:
- HighlightData
Represents a highlight area on a certain page. The coordinates are in pixels an relative to the unscaled page
image coordinates
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Appearances of a highlight.Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
-
Field Summary
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
-
Constructor Summary
ConstructorDescriptionHighlight
(int x, int y, int width, int height, String caption, HighlightData.Highlight.Appearance appearance, Color color) Creates the highlight area -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int x, int y) Returns the appearance.Returns the caption to be displayed in the areagetColor()
The base color to draw this highlightgetImage()
Returns the image.Returns the key of the render cache entry for drawing this highlight.getType()
Returns the type.boolean
Returns a flag indicating this highlight represents an annotation.void
Sets the image.void
setRenderCacheKey
(String renderCacheKey) Sets the key of the render cache entry for drawing this highlight.void
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
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
-
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-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 Details
-
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
The base color to draw this highlight- Returns:
- the base color to draw this highlight
-
getImage
Returns the image.- Returns:
- the image.
-
setImage
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
Sets the type.- Parameters:
type
- the type.
-
getType
Returns the type.- Returns:
- the type
-
getAppearance
Returns the appearance.- Returns:
- the appearance.
-
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
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)
-