com.qoppa.pdf.annotations
Class Circle

java.lang.Object
  extended bycom.qoppa.pdf.annotations.Annotation
      extended bycom.qoppa.pdf.annotations.ShapeAnnotation
          extended bycom.qoppa.pdf.annotations.Circle

public class Circle
extends ShapeAnnotation

Class representing a Circle annotation in a PDF document. Circle annotations are displayed as a circle on a page and can be double-clicked to display their textual content.

Author:
Qoppa Software

Field Summary
 
Fields inherited from class com.qoppa.pdf.annotations.ShapeAnnotation
LE_CIRCLE, LE_CIRCLE_STR, LE_CLOSEDARROW, LE_CLOSEDARROW_STR, LE_DIAMOND, LE_DIAMOND_STR, LE_NONE, LE_NONE_STR, LE_OPENARROW, LE_OPENARROW_STR, LE_SQUARE, LE_SQUARE_STR
 
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
Circle(String contents)
          Constructs a circle annotation with the given content.
 
Method Summary
 JComponent createComponent(Point2D cropOrigin, IPDFActionHandler actionHandler)
          Creates a JComponent object capable of displaying this annotation.
 String getSubtype()
          Returns this annotation's subtype: "Circle"
 void revalidate()
          Revalidate the shape drawn by this annotation.
 void setRectangle(Rectangle2D rectangle)
          Sets the annotation's rectangle.
 
Methods inherited from class com.qoppa.pdf.annotations.ShapeAnnotation
getBorderWidth, getContents, getInternalColor, getStroke, paintImpl, setBorderWidth, setContents, setInternalColor, setStroke
 
Methods inherited from class com.qoppa.pdf.annotations.Annotation
getActions, getAppearStream, getBorderStyle, getColor, getComponent, getCreationDate, getCreator, getFlags, getName, getOpacity, getPopup, getRectangle, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, paintAppearStream, print, setActions, setAppearStream, setBorderStyle, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPopup, setPrintable, setReadOnly, setTriggerActions, shiftRectangle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Circle

public Circle(String contents)
Constructs a circle annotation with the given content. Call Circle.setBounds() to set the bounds of the circle, the circle will be drawn so that it fits entirely within the bounds..

Parameters:
contents - The text contents to display when the annotation is opened.
Method Detail

getSubtype

public String getSubtype()
Returns this annotation's subtype: "Circle"

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

createComponent

public JComponent createComponent(Point2D cropOrigin,
                                  IPDFActionHandler actionHandler)
Creates a JComponent object capable of displaying this annotation.

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

revalidate

public void revalidate()
Description copied from class: ShapeAnnotation
Revalidate the shape drawn by this annotation.

Specified by:
revalidate in class ShapeAnnotation

setRectangle

public void setRectangle(Rectangle2D rectangle)
Description copied from class: Annotation
Sets the annotation's rectangle. The annotation's rectangle is in MediaBox coordinates.

Overrides:
setRectangle in class Annotation
Parameters:
rectangle - The new location of the annotation on the page.