com.qoppa.pdf.annotations
Class MarkUpText

java.lang.Object
  extended bycom.qoppa.pdf.annotations.Annotation
      extended bycom.qoppa.pdf.annotations.MarkUpText

public class MarkUpText
extends Annotation

Class representing a Text Markup annotation in a PDF document. Text markup annotations are a way to mark text in a document by highlighting, crossing out, or underlining.

Author:
Qoppa Software

Field Summary
static int TYPE_HIGHLIGHT
           
static int TYPE_SQUIGGLY
           
static int TYPE_STRIKEOUT
           
static int TYPE_UNDERLINE
           
 
Fields inherited from class com.qoppa.pdf.annotations.Annotation
BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
 
Constructor Summary
MarkUpText(String contents, Vector quadList, String subtype)
           
 
Method Summary
 JComponent createComponent(Point2D cropOrigin, IPDFActionHandler actionHandler)
          Creates a JComponent object capable of displaying this annotation.
 String getContents()
          Returns the annotation's contents.
 Vector getQuadList()
          Returns a list of the quadrilaterals that compose this annotation.
 String getSubtype()
          Gets the annotation's subtype string.
 int getType()
           
 void paintImpl(Graphics g, boolean hasFocus)
           
 void revalidate()
          Revalidates this annotation.
 void setContents(String contents)
           
 void setQuadList(Vector quadList)
          Sets the list of quadrilaterals that compose this annotation.
 void setRectangleFromQuads()
          Convenience method to set the annotation rectangle from the quadrilaterals.
 void setSubtype(String subtype)
           
 
Methods inherited from class com.qoppa.pdf.annotations.Annotation
getActions, getAppearStream, getBorderStyle, getBorderWidth, getColor, getComponent, getCreationDate, getCreator, getFlags, getLayer, getName, getOpacity, getPopup, getRectangle, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, print, setActions, setAppearStream, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPopup, setPrintable, setReadOnly, setRectangle, setTriggerActions, shiftRectangle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_HIGHLIGHT

public static final int TYPE_HIGHLIGHT
See Also:
Constant Field Values

TYPE_UNDERLINE

public static final int TYPE_UNDERLINE
See Also:
Constant Field Values

TYPE_SQUIGGLY

public static final int TYPE_SQUIGGLY
See Also:
Constant Field Values

TYPE_STRIKEOUT

public static final int TYPE_STRIKEOUT
See Also:
Constant Field Values
Constructor Detail

MarkUpText

public MarkUpText(String contents,
                  Vector quadList,
                  String subtype)
Method Detail

createComponent

public JComponent createComponent(Point2D cropOrigin,
                                  IPDFActionHandler actionHandler)
Description copied from class: Annotation
Creates a JComponent object capable of displaying this annotation.

Specified by:
createComponent in class Annotation
Returns:
JComponent do display this annotation.

getSubtype

public String getSubtype()
Description copied from class: Annotation
Gets the annotation's subtype string.

Specified by:
getSubtype in class Annotation
Returns:
The annotation subtype.

getType

public int getType()

setSubtype

public void setSubtype(String subtype)

getContents

public String getContents()
Description copied from class: Annotation
Returns the annotation's contents.

Overrides:
getContents in class Annotation
Returns:
The annotation's contents.

setContents

public void setContents(String contents)

paintImpl

public void paintImpl(Graphics g,
                      boolean hasFocus)

revalidate

public void revalidate()
Description copied from class: Annotation
Revalidates this annotation.

Specified by:
revalidate in class Annotation

getQuadList

public Vector getQuadList()
Returns a list of the quadrilaterals that compose this annotation. Each item in the list is an array of 4 Point.Double objects that contains the 4 points needed for that quadrilateral.

Returns:
List of quadrilaterals.

setQuadList

public void setQuadList(Vector quadList)
Sets the list of quadrilaterals that compose this annotation. Each item in the list should be an array of 4 Point.Double objects.

Parameters:
quadList - The new list of quadrilaterals.

setRectangleFromQuads

public void setRectangleFromQuads()
Convenience method to set the annotation rectangle from the quadrilaterals.