org.icepdf.core.pobjects.annotations
Class TextMarkupAnnotation

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.annotations.Annotation
          extended by org.icepdf.core.pobjects.annotations.MarkupAnnotation
              extended by org.icepdf.core.pobjects.annotations.TextMarkupAnnotation

public class TextMarkupAnnotation
extends MarkupAnnotation

Text markup annotations shall appear as highlights, underlines, strikeouts (all PDF 1.3), or jagged (“squiggly�) underlines (PDF 1.4) in the text of a document. When opened, they shall display a pop-up window containing the text of the associated note. Table 179 shows the annotation dictionary entries specific to these types of annotations.

Since:
5.0

Field Summary
static Name EXTGSTATE_NAME
          Named graphics state name used to store highlight transparency values.
static float HIGHLIGHT_ALPHA
          Highlight transparency default
static Name KEY_QUAD_POINTS
          (Required) An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.
static Name SUBTYPE_HIGHLIGHT
           
static Name SUBTYPE_SQUIGGLY
           
static Name SUBTYPE_STRIKE_OUT
           
static Name SUBTYPE_UNDERLINE
           
 
Fields inherited from class org.icepdf.core.pobjects.annotations.MarkupAnnotation
CA_KEY, CREATION_DATE_KEY, creationDate, EX_DATA_KEY, inReplyToAnnotation, intent, IRT_KEY, IT_KEY, opacity, POPUP_KEY, popupAnnotation, RC_KEY, replyToRelation, richText, RT_KEY, SUBJ_KEY, subject, T_KEY, titleText
 
Fields inherited from class org.icepdf.core.pobjects.annotations.Annotation
ACTION_KEY, APPEARANCE_STATE_KEY, APPEARANCE_STREAM_DOWN_KEY, APPEARANCE_STREAM_KEY, APPEARANCE_STREAM_NORMAL_KEY, APPEARANCE_STREAM_ROLLOVER_KEY, bbox, BBOX_VALUE, border, BORDER_DASH, BORDER_HORIZONTAL_CORNER_RADIUS, BORDER_KEY, BORDER_STYLE_KEY, BORDER_VERTICAL_CORNER_RADIUS, BORDER_WIDTH, borderStyle, canDrawBorder, color, COLOR_KEY, compressAppearanceStream, content, CONTENTS_KEY, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_KEY, FLAG_LOCKED, FLAG_LOCKED_CONTENTS, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINT, FLAG_READ_ONLY, FLAG_TOGGLE_NO_VIEW, hasBlendingMode, INVISIBLE_RECTANGLE, M_KEY, matrix, modifiedDate, NM_KEY, PARENT_KEY, PARENT_PAGE_KEY, RECTANGLE_KEY, RESOURCES_VALUE, securityManager, shapes, subtype, SUBTYPE_CIRCLE, SUBTYPE_FREE_TEXT, SUBTYPE_INK, SUBTYPE_LINE, SUBTYPE_LINK, SUBTYPE_POLYGON, SUBTYPE_POLYLINE, SUBTYPE_POPUP, SUBTYPE_SQUARE, SUBTYPE_TEXT, SUBTYPE_WIDGET, TYPE, TYPE_VALUE, userSpaceRectangle, VISIBLE_RECTANGLE
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
TextMarkupAnnotation(Library l, java.util.HashMap h)
          Creates a new instance of an TextMarkupAnnotation.
 
Method Summary
static TextMarkupAnnotation getInstance(Library library, java.awt.Rectangle rect, Name subType)
          Gets an instance of a TextMarkupAnnotation that has valid Object Reference.
 java.awt.Color getTextMarkupColor()
           
 void init()
          Initiate the Dictionary.
static boolean isTextMarkupAnnotation(Name subType)
           
protected  void renderAppearanceStream(java.awt.Graphics2D g)
           
 void resetAppearanceStream(double dx, double dy, java.awt.geom.AffineTransform pageTransform)
          Resets the annotations appearance stream.
 void setMarkupBounds(java.util.ArrayList<java.awt.Shape> markupBounds)
           
 void setMarkupPath(java.awt.geom.GeneralPath markupPath)
           
 void setTextMarkupColor(java.awt.Color textMarkupColor)
           
 
Methods inherited from class org.icepdf.core.pobjects.annotations.MarkupAnnotation
getCreationDate, getInReplyToAnnotation, getIntent, getOpacity, getPopupAnnotation, getReplyToRelation, getRichText, getSubject, getTitleText, setCreationDate, setInReplyToAnnotation, setPopupAnnotation, setRichText, setSubject, setTitleText, toString
 
Methods inherited from class org.icepdf.core.pobjects.annotations.Annotation
addAction, allowAlterProperties, allowPrintNormalMode, allowScreenDownMode, allowScreenNormalMode, allowScreenOrPrintRenderingOrInteraction, allowScreenRolloverMode, buildAnnotation, deleteAction, deriveDrawingRectangle, getAction, getAppearanceStream, getBbox, getBorder, getBorderStyle, getBorderStyleStroke, getBorderType, getColor, getContents, getFlagHidden, getFlagInvisible, getFlagLocked, getFlagLockedContents, getFlagNoRotate, getFlagNoView, getFlagNoZoom, getFlagPrint, getFlagReadOnly, getFlagToggleNoView, getLineStyle, getLineThickness, getPage, getParentAnnotation, getShapes, getSubType, getUserSpaceRectangle, hasAppearanceStream, isBorder, isSupportedAnnotationType, render, renderBorder, renderBorderTabSelected, resetAppearanceStream, setBBox, setBorderStyle, setColor, setCompressAppearanceStream, setContents, setFlag, setModifiedDate, setSubtype, setUserSpaceRectangle, syncBBoxToUserSpaceRectangle, updateAction
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBTYPE_HIGHLIGHT

public static final Name SUBTYPE_HIGHLIGHT

SUBTYPE_UNDERLINE

public static final Name SUBTYPE_UNDERLINE

SUBTYPE_SQUIGGLY

public static final Name SUBTYPE_SQUIGGLY

SUBTYPE_STRIKE_OUT

public static final Name SUBTYPE_STRIKE_OUT

KEY_QUAD_POINTS

public static final Name KEY_QUAD_POINTS
(Required) An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order x1 y1 x2 y2 x3 y3 x4 y4 specifying the quadrilateral’s four vertices in counterclockwise order (see Figure 64). The text shall be oriented with respect to the edge connecting points (x1, y1) and (x2, y2).

The annotation dictionary’s AP entry, if present, shall take precedence over QuadPoints; see Table 168 and 12.5.5, “Appearance Streams.�


EXTGSTATE_NAME

public static final Name EXTGSTATE_NAME
Named graphics state name used to store highlight transparency values.


HIGHLIGHT_ALPHA

public static final float HIGHLIGHT_ALPHA
Highlight transparency default

See Also:
Constant Field Values
Constructor Detail

TextMarkupAnnotation

public TextMarkupAnnotation(Library l,
                            java.util.HashMap h)
Creates a new instance of an TextMarkupAnnotation.

Parameters:
l - document library.
h - dictionary entries.
Method Detail

init

public void init()
Description copied from class: Dictionary
Initiate the Dictionary. Retrieve any needed attributes.

Overrides:
init in class MarkupAnnotation

getInstance

public static TextMarkupAnnotation getInstance(Library library,
                                               java.awt.Rectangle rect,
                                               Name subType)
Gets an instance of a TextMarkupAnnotation that has valid Object Reference.

Parameters:
library - document library
rect - bounding rectangle in user space
Returns:
new TextMarkupAnnotation Instance.

isTextMarkupAnnotation

public static boolean isTextMarkupAnnotation(Name subType)

resetAppearanceStream

public void resetAppearanceStream(double dx,
                                  double dy,
                                  java.awt.geom.AffineTransform pageTransform)
Resets the annotations appearance stream.

Specified by:
resetAppearanceStream in class Annotation

renderAppearanceStream

protected void renderAppearanceStream(java.awt.Graphics2D g)
Overrides:
renderAppearanceStream in class Annotation

setMarkupPath

public void setMarkupPath(java.awt.geom.GeneralPath markupPath)

setMarkupBounds

public void setMarkupBounds(java.util.ArrayList<java.awt.Shape> markupBounds)

getTextMarkupColor

public java.awt.Color getTextMarkupColor()

setTextMarkupColor

public void setTextMarkupColor(java.awt.Color textMarkupColor)