com.qoppa.pdf.annotations
Class Polyline

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

public class Polyline
extends ShapeAnnotation

Class representing a Polyline annotation in a PDF document. Polyline annotations are displayed as a series of connected vertices and can be double-clicked to display its note.

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
Polyline(String contents)
          Constructs and Ink annotation with no lines.
Polyline(String contents, Vector vertices)
          Constructs and Ink annotation.
 
Method Summary
 JComponent createComponent(Point2D cropOrigin, IPDFActionHandler actionHandler)
          Creates a JComponent object capable of displaying this annotation.
 int getLineEndStyle()
           
 int getLineStartStyle()
           
 String getSubtype()
          Returns this annotations subtype: "Ink"
 Vector getVertices()
           
 boolean isCloseShape()
           
 void revalidate()
          Revalidate the shape drawn by this annotation.
 void revalidateRectangle()
           
 void setBorderEffect(String name, int intensity)
           
 void setCloseShape(boolean closeShape)
           
 void setLineEndStyle(int lineEndStyle)
           
 void setLineEndStyle(String style)
           
 void setLineStartStyle(int lineStartStyle)
           
 void setLineStartStyle(String style)
           
 void shiftRectangle(double deltaX, double deltaY)
           
 
Methods inherited from class com.qoppa.pdf.annotations.ShapeAnnotation
getBorderWidth, getContents, getInternalColor, getStroke, paintImpl, setBorderWidth, setContents, setInternalColor, setRectangle, setStroke
 
Methods inherited from class com.qoppa.pdf.annotations.Annotation
getActions, getAppearStream, getBorderStyle, getColor, getComponent, getCreationDate, getCreator, getFlags, getLayer, getName, getOpacity, getPopup, getRectangle, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, print, setActions, setAppearStream, setBorderStyle, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPopup, setPrintable, setReadOnly, setTriggerActions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polyline

public Polyline(String contents)
Constructs and Ink annotation with no lines. The annotation will not be displayed as there is no lines to display.

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

Polyline

public Polyline(String contents,
                Vector vertices)
Constructs and Ink annotation.

Parameters:
contents - The text contents to display when the annotation is opened.
vertices - A Vector of polylines. Each element in the Vector is another Vector containing a list of points to compose a polyline.
Method Detail

revalidateRectangle

public void revalidateRectangle()

revalidate

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

Specified by:
revalidate in class ShapeAnnotation

getSubtype

public String getSubtype()
Returns this annotations subtype: "Ink"

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

getLineEndStyle

public int getLineEndStyle()

setLineEndStyle

public void setLineEndStyle(int lineEndStyle)

getLineStartStyle

public int getLineStartStyle()

setLineStartStyle

public void setLineStartStyle(int lineStartStyle)

setLineEndStyle

public void setLineEndStyle(String style)

setLineStartStyle

public void setLineStartStyle(String style)

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.

isCloseShape

public boolean isCloseShape()

setCloseShape

public void setCloseShape(boolean closeShape)

getVertices

public Vector getVertices()

setBorderEffect

public void setBorderEffect(String name,
                            int intensity)

shiftRectangle

public void shiftRectangle(double deltaX,
                           double deltaY)
Overrides:
shiftRectangle in class Annotation