Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone
Class PdfLineAnnot

java.lang.Object
  extended bycom.gnostice.pdfone.PdfAnnot
      extended bycom.gnostice.pdfone.PdfProAnnot
          extended bycom.gnostice.pdfone.PdfLineAnnot
All Implemented Interfaces:
Cloneable, Usable

public class PdfLineAnnot
extends com.gnostice.pdfone.PdfProAnnot

This class represents a line annotation. A line annotation is represented by a straight line. The line has a starting point and an ending point. A line annotation can have a popup dialog box.

A line annotation can have what are called "leader line" and "leader line extension" at its end points. These lines are perpendicular to the main line that identifies the annotation. If a positive length has been specified for the leader line, then it appears at the below the line anotation. If a negative length has been specified, then it appears above the line annotation.

The leader line extension is also a perpendicular line that appears at the other side of the leader line.

  // Create a pdf page
  PdfPage page = new PdfPage();

  // Create a PDF font
  PdfFont fontHelvetica = 
  PdfFont.create("Helvetica", 15,PdfEncodings.WINANSI);
  fontHelvetica.setColor(Color.BLUE);

  // Write text on the page
  page.writeText("Line Annotations", fontHelvetica, 80, 100);

  // Create an array of x-y coordinates for the starting and 
  // end points of the line annotation
  double endPts[] = { 80, 150, 250, 150 };

  // Create a line annotation and set its properties
  PdfLineAnnot lineAnnot1 = 
  new PdfLineAnnot(endPts, Color.BLUE);
  lineAnnot1.setTitle("Title");
  lineAnnot1.setSubject("Line Annotation");
  lineAnnot1.setContents("This is a Line Annotation");
  lineAnnot1.setInteriorColor(Color.red);
  lineAnnot1.setLineStartStyle(PdfLineAnnot.LINEENDSTYLE_DIAMOND);
  lineAnnot1.setLineEndStyle(PdfLineAnnot.LINEENDSTYLE_CLOSED_ARROW);
  lineAnnot1.setBorderStyle(PdfLineAnnot.BORDERSTYLE_INSET);
  lineAnnot1.setBorderWidth(3);

  // Add the line annotation to page
  page.addAnnotation(lineAnnot1);
 


Field Summary
static int LINEENDSTYLE_BUTT
          Constant for specifying a sharp perpendicular line at the end of a line.
static int LINEENDSTYLE_CIRCLE
          Constant for specifying a circle at the end of a line.
static int LINEENDSTYLE_CLOSED_ARROW
          Constant for specifying a triangular arrow at the end of a line.
static int LINEENDSTYLE_DIAMOND
          Constant for specifying a diamond shape at the end of a polyline.
static int LINEENDSTYLE_NONE
          Constant for specifying an abrupt end of a line.
static int LINEENDSTYLE_OPEN_ARROW
          Constant for specifying an open arrow at the end of a line.
static int LINEENDSTYLE_RCLOSED_ARROW
          Constant for specifying an closed arrow at the end of a line.
static int LINEENDSTYLE_ROPEN_ARROW
          Constant for specifying an open reversed arrow at the end of of a line.
static int LINEENDSTYLE_SLASH
          Constant for specifying a slanted line at the end of a polyline.
static int LINEENDSTYLE_SQUARE
          Constant for specifying a square at the end of a polyline.
 
Fields inherited from class com.gnostice.pdfone.PdfAnnot
ANNOT_TYPE_CARET, ANNOT_TYPE_CIRCLE, ANNOT_TYPE_FILE_ATTACHMENT, ANNOT_TYPE_FREE_TEXT, ANNOT_TYPE_INK, ANNOT_TYPE_LINE, ANNOT_TYPE_LINK, ANNOT_TYPE_MARKUP, ANNOT_TYPE_POLYGON, ANNOT_TYPE_POLYLINE, ANNOT_TYPE_POPUP, ANNOT_TYPE_SQUARE, ANNOT_TYPE_STAMP, ANNOT_TYPE_TEXT, ANNOT_TYPE_WATERMARK, BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSET, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINT, FLAG_READONLY, FLAG_TOGGLE_NO_VIEW
 
Fields inherited from interface com.gnostice.pdfone.Usable
INCHES_TO_POINTS, MM_TO_INCHES, MM_TO_POINTS, PDF_A, PDF_AA, PDF_AC, PDF_ACROFORM, PDF_ACTION, PDF_ALTERNATEPRESENTATIONS, PDF_ANNOT, PDF_ANNOT_DEFAULT_TITLE, PDF_ANNOT_NAME, PDF_ANNOT_SUBJECT, PDF_ANNOTS, PDF_AP, PDF_ARRAYEND, PDF_ARRAYSTART, PDF_ARTBOX, PDF_AS, PDF_ASCENT, PDF_ASCII85, PDF_ASCII85_NEW, PDF_ASCIIHEX, PDF_ASCIIHEX_NEW, PDF_AuthEvent, PDF_AUTHOR, PDF_AVGWIDTH, PDF_B, PDF_BASEFONT, PDF_BBOX, PDF_BC, PDF_BE, PDF_BEFOREFORMAT, PDF_BEGINTEXT, PDF_BG, PDF_BINARYDATA, PDF_BITS_PER_COMPONENT, PDF_BL, PDF_BLEEDBOX, PDF_BLINDS, PDF_BMC, PDF_BORDER, PDF_BOX, PDF_BS, PDF_BTN, PDF_BYTERANGE, PDF_C, PDF_CA, PDF_CA_SMALL, PDF_CAPHEIGHT, PDF_CARETANNOT, PDF_CARRIAGE, PDF_CATALOG, PDF_CENTER_WINDOW, PDF_CF, PDF_CFM, PDF_CH, PDF_CID_TO_GID_MAP, PDF_CIDFONT_TYPE1, PDF_CIDFONT_TYPE2, PDF_CIDSYSTEM_INFO, PDF_CIRCLEANNOT, PDF_CL, PDF_CM, PDF_COLOMNS, PDF_COLOR, PDF_COLORSPACE, PDF_COLORSPACE_CALGRAY, PDF_COLORSPACE_CALRGB, PDF_COLORSPACE_DEVICEN, PDF_COLORSPACE_ICCBASED, PDF_COLORSPACE_LAB, PDF_COLORSPACE_SEPARATION, PDF_CONTACTINFO, PDF_CONTENTS, PDF_COUNT, PDF_COVER, PDF_CREATIONDATE, PDF_CREATOR, PDF_CROPBOX, PDF_CS, PDF_CSP, PDF_D, PDF_DA, PDF_DATE, PDF_DATE_FORMAT, PDF_DCTDECODE, PDF_DCTDECODE_NEW, PDF_DECODEPARMS, PDF_DESC, PDF_DESCENDANT, PDF_DESCENDANT_FONTS, PDF_DESCENDENTFONTS, PDF_DESCENT, PDF_DESTINATION, PDF_DESTS, PDF_DEVICE_CMYK, PDF_DEVICE_GRAY, PDF_DEVICE_RGB, PDF_DI, PDF_DICTEND, PDF_DICTSTART, PDF_DIFFERENCES, PDF_DIRECTION, PDF_DISPLAY_DOCTITLE, PDF_DISPLAY_DURATION, PDF_DISSOLVE, PDF_DM, PDF_DOC_SUBJECT, PDF_DOCMDP, PDF_DOS, PDF_DP, PDF_DR, PDF_DS, PDF_DV, PDF_DW, PDF_E, PDF_EF, PDF_EMBEDDEDFILE, PDF_EMBEDDEDFILES, PDF_EMC, PDF_ENCODING, PDF_ENCRYPT, PDF_ENCRYPTMETADATA, PDF_ENDOBJ, PDF_ENDPATH, PDF_ENDSTREAM, PDF_ENDTEXT, PDF_EOCLIP, PDF_EOF, PDF_EXTGSTATE, PDF_F, PDF_FADE, PDF_FALSE, PDF_FDESCRIPTOR, PDF_FIELD_FLAG, PDF_FIELDS, PDF_FILEATTACHMENTANNOT, PDF_FILESPEC, PDF_FILTER, PDF_FIRST, PDF_FIRST_PAGE, PDF_FIRSTCHAR, PDF_FIT, PDF_FIT_WINDOW, PDF_FITB, PDF_FITBH, PDF_FITBV, PDF_FITH, PDF_FITR, PDF_FITV, PDF_FIXEDPRINT, PDF_FLAGS, PDF_FLATE, PDF_FLATE_NEW, PDF_FLY, PDF_FO, PDF_FONT, PDF_FONTBBOX, PDF_FONTDESCRIPTOR, PDF_FONTFILE, PDF_FONTFILE_2, PDF_FontFile_3, PDF_FONTFILE2, PDF_FONTNAME, PDF_FONTNAMEPREFIX, PDF_FORM, PDF_FORMFEED, PDF_FORMFONTPREFIX, PDF_FREE_TEXT_CALLOUT, PDF_FREE_TEXT_TYPEWRITER, PDF_FREETEXTANNOT, PDF_FS, PDF_FT, PDF_FULLSCREEN, PDF_GLITTER, PDF_GOTO_ACTION, PDF_GROUP, PDF_GS, PDF_H, PDF_HEADER, PDF_HEIGHT, PDF_HEXSTRINGEND, PDF_HEXSTRINGSTART, PDF_HIDE_MENUBAR, PDF_HIDE_TOOLBAR, PDF_HIDE_WINDOWUI, PDF_HIGHLIGHT, PDF_HORIZ_STEM, PDF_HORIZONTAL, PDF_I, PDF_IC, PDF_ID, PDF_IDS, PDF_IF, PDF_IMAGE, PDF_IMAGEB, PDF_IMAGEC, PDF_IMAGEI, PDF_IMPORTDATA, PDF_INDEX, PDF_INDEXED, PDF_INFO, PDF_INK, PDF_INKLIST, PDF_INWARD, PDF_IT, PDF_ITALANGLE, PDF_IX, PDF_JAVASCRIPT, PDF_JAVASCRIPT_ACTION, PDF_JS, PDF_KEYSTROKE, PDF_KEYWORDS, PDF_KIDS, PDF_L, PDF_L2R, PDF_LANG, PDF_LAST, PDF_LAST_PAGE, PDF_LASTCHAR, PDF_LAUNCH_ACTION, PDF_LE, PDF_LEGAL, PDF_LENGTH, PDF_LENGTH_1, PDF_LENGTH_2, PDF_LENGTH_3, PDF_LF, PDF_LINEANNOT, PDF_LINKANNOT, PDF_LITERALSTRINGEND, PDF_LITERALSTRINGSTART, PDF_LOCATION, PDF_LZWDECODE, PDF_M, PDF_MAC, PDF_MARKINFO, PDF_MATRIX, PDF_MAXLEN, PDF_MAXWIDTH, PDF_MEDIABOX, PDF_METADATA, PDF_MISSINGWIDTH, PDF_MK, PDF_MODDATE, PDF_N, PDF_NAME, PDF_NAMED, PDF_NAMED_ACT_FIND, PDF_NAMED_ACT_OPEN, PDF_NAMED_ACT_PRINT, PDF_NAMED_ACT_SEARCH, PDF_NAMES, PDF_NAMESTART, PDF_NEEDAPPEARANCES, PDF_NEWLINE, PDF_NEWWINDOW, PDF_NEXT, PDF_NEXT_PAGE, PDF_NO_COMP_OBJ, PDF_NONFULLSCREEN_PAGEMODE, PDF_NULL, PDF_O, PDF_OBJ, PDF_OBJSTREAM, PDF_OCPROPERTIES, PDF_OFF, PDF_ONECOLUMN, PDF_OPEN, PDF_OPEN_ACTION, PDF_OPT, PDF_OUTLINES, PDF_OUTPUTINTENTS, PDF_OUTWARD, PDF_P, PDF_PAGE, PDF_PAGECLOSE, PDF_PAGEINVISIBLE, PDF_PAGELABELS, PDF_PAGELAYOUT, PDF_PAGEMODE, PDF_PAGEOPEN, PDF_PAGES, PDF_PAGEVISIBLE, PDF_PAINT_TYPE, PDF_PARAMS, PDF_PARENT, PDF_PATTERN, PDF_PATTERN_TYPE, PDF_PBD, PDF_PC, PDF_PDC, PDF_PDF, PDF_PERMS, PDF_PFD, PDF_PH, PDF_PIECEINFO, PDF_POLYGONANNOT, PDF_POLYLINEANNOT, PDF_POPUP, PDF_PREDICTOR, PDF_PREV, PDF_PREV_PAGE, PDF_PROCSET, PDF_PRODUCER, PDF_PROPERTIES, PDF_PUSH, PDF_PV, PDF_Q, PDF_QUADPOINTS, PDF_R, PDF_R2L, PDF_RC, PDF_RD, PDF_RE, PDF_REASON, PDF_RECALCULATE, PDF_RECT, PDF_REMOTEGOTO_ACTION, PDF_RENDITIONS, PDF_REPLACE, PDF_RESET_FORM, PDF_RESOURCES, PDF_RESTORE_GS, PDF_RI, PDF_ROOT, PDF_ROTATE, PDF_RUNLENGTH, PDF_RUNLENGTH_NEW, PDF_S, PDF_SCN, PDF_SHADING, PDF_SHOWIMG, PDF_SHOWTEXT, PDF_SHOWTEXT_TJ, PDF_SIG, PDF_SIG_FILTER_ADOBE_PPKLITE, PDF_SIG_FILTER_ADOBE_PPKMS, PDF_SIG_SUBFILTER_ADBE_PKCS7_DETACHED, PDF_SIG_SUBFILTER_ADBE_PKCS7_SHA1, PDF_SINGLE_QUOTES, PDF_SINGLEPAGE, PDF_SIZE, PDF_SP, PDF_SPIDERINFO, PDF_SPLIT, PDF_SQUAREANNOT, PDF_SQUIGGLY, PDF_SS, PDF_STAMPANNOT, PDF_STARTXREF, PDF_StmF, PDF_STORE_GS, PDF_STREAM, PDF_StrF, PDF_STRIKEOUT, PDF_STRUCT_TREE, PDF_SUBFILTER, PDF_SUBMIT_FORM, PDF_SUBTYPE, PDF_T, PDF_TAB, PDF_TEMPLATES, PDF_TEXT, PDF_TEXTANNOT, PDF_TEXTDIMENSION, PDF_TEXTFONT, PDF_TEXTLEAD, PDF_TEXTMATRIX, PDF_TEXTNEWLINESTART, PDF_TEXTRENDER, PDF_TEXTWIDTH, PDF_THREADS, PDF_THUMB, PDF_TILING_TYPE, PDF_TITLE, PDF_TJ_OPERAND_END, PDF_TJ_OPERAND_START, PDF_TM, PDF_TOUNICODE, PDF_TP, PDF_TRAILER, PDF_TRANSITION, PDF_TRIMBOX, PDF_TRUE, PDF_TRUETYPE, PDF_TU, PDF_TWOCOLUMN_LEFT, PDF_TWOCOLUMN_RIGHT, PDF_TWOPAGE_LEFT, PDF_TWOPAGE_RIGHT, PDF_TX, PDF_TYPE, PDF_TYPE0, PDF_TYPE1, PDF_U, PDF_UNCOVER, PDF_UNDERLINE, PDF_UNIX, PDF_URI_ACTION, PDF_URL, PDF_URLS, PDF_USEATTACHMENTS, PDF_USENONE, PDF_USEOC, PDF_USEOUTLINES, PDF_USETHUMBS, PDF_V, PDF_VALUECHANGE, PDF_VERSION, PDF_VERT_STEM, PDF_VERTICAL, PDF_VERTICES, PDF_VIEWER_PREFERENCES, PDF_W, PDF_WATERMARKANNOT, PDF_WIDGET, PDF_WIDTH, PDF_WIDTHS, PDF_WINANSIENCODING, PDF_WIPE, PDF_X, PDF_XOBJECT, PDF_XREF, PDF_XREFSTMOFFSET, PDF_XREFSTREAM, PDF_XSTEP, PDF_XYZ, PDF_YES, PDF_YSTEP, PIXEL_PER_INCH, RUBICON_EMBEDDED, SITE, TEXT, TWIPS_TO_POINTS
 
Constructor Summary
PdfLineAnnot()
          Zero-argument default constructor.
PdfLineAnnot(double[] points, Color c)
          Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, and line-end style and fill color.
PdfLineAnnot(double[] points, int flags)
          Constructs a new line annotation with specified starting and end points, and flags.
PdfLineAnnot(double[] points, int flags, Color c)
          Constructs a new line annotation with specified starting and end points, flags, and line color.
PdfLineAnnot(double[] points, String subject, String contents, String title)
          Constructs a new line annotation with specified starting and end points, and popup subject, contents and title.
PdfLineAnnot(double[] points, String subject, String contents, String title, Color c)
          Constructs a new line annotation with specified starting and end points, popup subject, contents and title, and line color.
PdfLineAnnot(double[] points, String subject, String contents, String title, int flags)
          Constructs a new line annotation with specified starting and end points, popup subject, contents and title, and flags.
PdfLineAnnot(double[] points, String subject, String contents, String title, int flags, Color c)
          Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, line-end styles, and line-end fill color.
PdfLineAnnot(double[] points, String subject, String contents, String title, int flags, Color c, int lineStartStyle, int lineEndStyle, Color interior)
          Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, and line-end style and fill color.
PdfLineAnnot(PdfRect r, Color c)
          Deprecated. Instead, use PdfLineAnnot(double[], Color).
PdfLineAnnot(PdfRect r, int flags)
          Deprecated. Instead, use PdfLineAnnot(double[], int).
PdfLineAnnot(PdfRect r, int flags, Color c)
          Deprecated. Instead, use PdfLineAnnot(double[], int, Color).
PdfLineAnnot(PdfRect r, String subject, String contents, String title)
          Deprecated. Instead, use PdfLineAnnot(double[], String, String, String).
PdfLineAnnot(PdfRect r, String subject, String contents, String title, Color c)
          Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, Color).
PdfLineAnnot(PdfRect r, String subject, String contents, String title, int flags)
          Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int).
PdfLineAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c)
          Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int, Color).
PdfLineAnnot(PdfRect r, String subject, String contents, String title, int flags, Color c, int lineStartStyle, int lineEndStyle, Color interior)
          Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int, Color, int, int, Color).
 
Method Summary
 Object clone()
           
 String getCaption()
           
 PdfAppearanceStream getDownAppearance()
          Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button.
 Color getInteriorColor()
          Returns color used to fill the interior of the line endings of the annotation.
 double[] getLeaderLineArray()
          Returns lengths of the leader line and leaderline extension of the line annotation.
 int getLineEndStyle()
          Returns line-end style of the end of the line annotation.
 int getLineStartStyle()
          Return line-end style of the starting point of the line annotation.
 PdfAppearanceStream getNormalAppearance()
          Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field).
 PdfPopUpAnnot getPopup()
          Returns a popup annotation that needs to be used by a viewer application to display the popup window for this annotation.
 PdfAppearanceStream getRolloverAppearance()
          Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button).
 float getTransparency()
           
 double getX1()
          Return x-coodinate of the starting point of the line annotation.
 double getX2()
          Return x-coordinate of the ending point of the line annotation.
 double getY1()
          Return y-coodinate of the starting point of the line annotation.
 double getY2()
          Return y-coordinate of the ending point of the line annotation.
 void setCaption(String caption)
           
 void setDownAppearance(PdfAppearanceStream downAppearance)
          Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button.
 void setInteriorColor(Color interiorColor)
          Specifies color that needs to be used to fill the interior of the line endings of the annotation.
 void setLeaderLineArray(double[] leaderLineArray)
          Specifies lengths of the leader line and leader extension line.
 void setLineEndStyle(int lineEndStyle)
          Specifies line-end style for the end of the line annotation.
 void setLineStartStyle(int lineStartStyle)
          Specifies line-end style of the starting point of the line annotation.
 void setNormalAppearance(PdfAppearanceStream normalAppearance)
          Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field).
 void setPoints(double[] points)
          Specifies (x, y) coordinates of the starting and ending points of the line annotation.
 void setPoints(double[] points, int measurementUnit)
          Specifies (x, y) coordinates of the starting and ending points of the line annotation in specified measurement units.
 void setPopup(PdfPopUpAnnot popup, boolean overridePopUpProperties)
          Specifies a popup annotation that needs to be used by a viewer application to display the popup window for this annotation.
 void setRect(double x, double y, double width, double height)
          Specifies annotation rectangle for this annotation at (x, y) with specified width and height.
 void setRect(double x, double y, double width, double height, int mu)
          Specifies annotation rectangle for this annotation in specified measurement unit.
 void setRect(PdfRect r)
          Specifies PdfRect object as annotation rectangle for this annotation.
 void setRect(PdfRect r, int mu)
          Specifies PdfRect object as annotation rectangle for this annotation in specified measurement unit.
 void setRect(Rectangle r)
          Specifies Rectangle object as annotation rectangle for this annotation.
 void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
          Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button).
 void setTransparency(float transparecyLevel)
           
 void setX1(double x1)
          Specifies x-coodinate of the starting point of the line annotation.
 void setX2(double x2)
          Specifies x-coordinate of the ending point of the line annotation.
 void setY1(double y1)
          Specifies y-coodinate of the starting point of the line annotation.
 void setY2(double y2)
          Specifies y-coordinate of the ending point of the line annotation.
 
Methods inherited from class com.gnostice.pdfone.PdfAnnot
delete, getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, getType, hashCode, isDeleted, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setShowRect, setSubject, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEENDSTYLE_SQUARE

public static final int LINEENDSTYLE_SQUARE
Constant for specifying a square at the end of a polyline.

See Also:
Constant Field Values

LINEENDSTYLE_CIRCLE

public static final int LINEENDSTYLE_CIRCLE
Constant for specifying a circle at the end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_DIAMOND

public static final int LINEENDSTYLE_DIAMOND
Constant for specifying a diamond shape at the end of a polyline.

See Also:
Constant Field Values

LINEENDSTYLE_OPEN_ARROW

public static final int LINEENDSTYLE_OPEN_ARROW
Constant for specifying an open arrow at the end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_CLOSED_ARROW

public static final int LINEENDSTYLE_CLOSED_ARROW
Constant for specifying a triangular arrow at the end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_NONE

public static final int LINEENDSTYLE_NONE
Constant for specifying an abrupt end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_BUTT

public static final int LINEENDSTYLE_BUTT
Constant for specifying a sharp perpendicular line at the end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_ROPEN_ARROW

public static final int LINEENDSTYLE_ROPEN_ARROW
Constant for specifying an open reversed arrow at the end of of a line.

See Also:
Constant Field Values

LINEENDSTYLE_RCLOSED_ARROW

public static final int LINEENDSTYLE_RCLOSED_ARROW
Constant for specifying an closed arrow at the end of a line.

See Also:
Constant Field Values

LINEENDSTYLE_SLASH

public static final int LINEENDSTYLE_SLASH
Constant for specifying a slanted line at the end of a polyline.

See Also:
Constant Field Values
Constructor Detail

PdfLineAnnot

public PdfLineAnnot()
Zero-argument default constructor.


PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c,
                    int lineStartStyle,
                    int lineEndStyle,
                    Color interior)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int, Color, int, int, Color).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c,
                    int lineStartStyle,
                    int lineEndStyle,
                    Color interior)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, and line-end style and fill color.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
subject - text that needs to be displayed in the title bar of the annotation's popup window
contents - text that needs to be used as the contents of the annotation's popup window
title - text that needs to be used as the subject of the annotation's popup window
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the line
lineStartStyle - constant specifying line-end style of the annotation's starting point
lineEndStyle - constant specifying line-end style of the annotation's end point
interior - color used to fill the interior of the line endings
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], String, String, String).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    String subject,
                    String contents,
                    String title)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, and popup subject, contents and title.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
subject - text that needs to be displayed in the title bar of the annotation's popup window
contents - text that needs to be used as the contents of the annotation's popup window
title - text that needs to be used as the subject of the annotation's popup window
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    Color c)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, Color).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    String subject,
                    String contents,
                    String title,
                    Color c)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, popup subject, contents and title, and line color.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
subject - text that needs to be displayed in the title bar of the annotation's popup window
contents - text that needs to be used as the contents of the annotation's popup window
title - text that needs to be used as the subject of the annotation's popup window
c - color of the line
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    String subject,
                    String contents,
                    String title,
                    int flags)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, popup subject, contents and title, and flags.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
subject - text that needs to be displayed in the title bar of the annotation's popup window
contents - text that needs to be used as the contents of the annotation's popup window
title - text that needs to be used as the subject of the annotation's popup window
flags - flag or combined value of flags representing characteristics of the annotation
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], String, String, String, int, Color).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    String subject,
                    String contents,
                    String title,
                    int flags,
                    Color c)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, line-end styles, and line-end fill color.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
subject - text that needs to be displayed in the title bar of the annotation's popup window
contents - text that needs to be used as the contents of the annotation's popup window
title - text that needs to be used as the subject of the annotation's popup window
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the line
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    int flags)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], int).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    int flags)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, and flags.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
flags - flag or combined value of flags representing characteristics of the annotation
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    int flags,
                    Color c)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], int, Color).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    int flags,
                    Color c)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, flags, and line color.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
flags - flag or combined value of flags representing characteristics of the annotation
c - color of the line
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.

PdfLineAnnot

public PdfLineAnnot(PdfRect r,
                    Color c)
             throws IOException,
                    PdfException
Deprecated. Instead, use PdfLineAnnot(double[], Color).


PdfLineAnnot

public PdfLineAnnot(double[] points,
                    Color c)
             throws IOException,
                    PdfException
Constructs a new line annotation with specified starting and end points, popup subject, contents and title, flags, line color, and line-end style and fill color.

Parameters:
points - x1, y1, x2, and y2, which are coordinates of the starting point (x1, y1) and end point (x2, y2) of the line
c - color of the line
Throws:
IOException - if an I/O error occurs.
PdfException - if an illegal argument is supplied.
Method Detail

clone

public Object clone()

setPoints

public void setPoints(double[] points)
               throws PdfException
Specifies (x, y) coordinates of the starting and ending points of the line annotation. The starting point will be (points[0], points[1]) and the ending point will be (points[2], points[3]).

Parameters:
points - (x, y) coordinates of the starting and ending points
Throws:
PdfException - if an illegal argument is supplied.

setPoints

public void setPoints(double[] points,
                      int measurementUnit)
               throws PdfException
Specifies (x, y) coordinates of the starting and ending points of the line annotation in specified measurement units. The starting point will be (points[0], points[1]) and the ending point will be (points[2], points[3]).

Parameters:
points - (x, y) coordinates of the starting and ending points
measurementUnit - measurement unit with which the coordinates are specified
Throws:
PdfException - if an illegal argument is supplied.

setRect

public void setRect(double x,
                    double y,
                    double width,
                    double height)
Deprecated.  

Description copied from class: PdfAnnot
Specifies annotation rectangle for this annotation at (x, y) with specified width and height.

The position (x, y), and dimensions width and height are applied in the default measurement unit of the page to which the annotation is added.

Overrides:
setRect in class PdfAnnot
Parameters:
x - x-coordinate of the annotation rectangle
y - y-coordinate of the annotation rectangle
width - width of the annotation rectangle
height - height of the annotation rectangle
See Also:
PdfAnnot.getRect()

setRect

public void setRect(double x,
                    double y,
                    double width,
                    double height,
                    int mu)
Deprecated.  

Description copied from class: PdfAnnot
Specifies annotation rectangle for this annotation in specified measurement unit.

Overrides:
setRect in class PdfAnnot
Parameters:
x - x-coordinate of the annotation rectangle
y - y-coordinate of the annotation rectangle
width - width of the annotation rectangle
height - height of the annotation rectangle
mu - measurement unit with which the annotation rectangle is specified
See Also:
PdfAnnot.getRect()

setRect

public void setRect(PdfRect r)
Deprecated.  

Description copied from class: PdfAnnot
Specifies PdfRect object as annotation rectangle for this annotation.

The position and size of the rectangle are applied in the default measurement unit of the page to which the annotation is added.

Overrides:
setRect in class PdfAnnot
Parameters:
r - annotation rectangle for this annotation
See Also:
PdfAnnot.getRect()

setRect

public void setRect(PdfRect r,
                    int mu)
Deprecated.  

Description copied from class: PdfAnnot
Specifies PdfRect object as annotation rectangle for this annotation in specified measurement unit.

Overrides:
setRect in class PdfAnnot
Parameters:
r - annotation rectangle for this annotation
mu - measurement unit with which the annotation rectangle is specified
See Also:
PdfAnnot.getRect()

setRect

public void setRect(Rectangle r)
Deprecated.  

Description copied from class: PdfAnnot
Specifies Rectangle object as annotation rectangle for this annotation.

Overrides:
setRect in class PdfAnnot
Parameters:
r - annotation rectangle for this annotation
See Also:
PdfAnnot.getRect()

getLineStartStyle

public int getLineStartStyle()
Return line-end style of the starting point of the line annotation.

Returns:
constant specifying the line-end style
See Also:
setLineStartStyle(int)

setLineStartStyle

public void setLineStartStyle(int lineStartStyle)
Specifies line-end style of the starting point of the line annotation.

Parameters:
lineStartStyle - constant specifying line-end style
See Also:
getLineStartStyle()

setTransparency

public void setTransparency(float transparecyLevel)

getTransparency

public float getTransparency()

getLineEndStyle

public int getLineEndStyle()
Returns line-end style of the end of the line annotation.

Returns:
constant specifying line-end style
See Also:
setLineEndStyle(int)

setLineEndStyle

public void setLineEndStyle(int lineEndStyle)
Specifies line-end style for the end of the line annotation.

Parameters:
lineEndStyle - constant specifying line-end style
See Also:
getLineEndStyle()

getX1

public double getX1()
Return x-coodinate of the starting point of the line annotation.

Returns:
x-coodinate of the starting point
See Also:
getY1()

setX1

public void setX1(double x1)
Specifies x-coodinate of the starting point of the line annotation.

Parameters:
x1 - x-coodinate of the starting point
See Also:
getX1()

getX2

public double getX2()
Return x-coordinate of the ending point of the line annotation.

Returns:
x-coordinate of the ending point
See Also:
getX2()

setX2

public void setX2(double x2)
Specifies x-coordinate of the ending point of the line annotation.

Parameters:
x2 - x-coordinate of the ending point

getY1

public double getY1()
Return y-coodinate of the starting point of the line annotation.

Returns:
y-coodinate of the starting point
See Also:
getX1()

setY1

public void setY1(double y1)
Specifies y-coodinate of the starting point of the line annotation.

Parameters:
y1 - y-coodinate of the starting point

getY2

public double getY2()
Return y-coordinate of the ending point of the line annotation.

Returns:
y-coordinate of the ending point
See Also:
getX2()

setY2

public void setY2(double y2)
Specifies y-coordinate of the ending point of the line annotation.

Parameters:
y2 - y-coordinate of the ending point

getLeaderLineArray

public double[] getLeaderLineArray()
Returns lengths of the leader line and leaderline extension of the line annotation.

Returns:
two-member array containing lengths of the leader line and leader line extension
See Also:
setLeaderLineArray(double[])

setLeaderLineArray

public void setLeaderLineArray(double[] leaderLineArray)
                        throws PdfException
Specifies lengths of the leader line and leader extension line. leaderLineArray[0] should specify the length of the leader line. leaderLineArray[1] should specify the length of the leader line extension.

Parameters:
leaderLineArray - two-member array containing the lengths of the leader line and leader extension line
Throws:
PdfException - if an illegal argument is supplied.

getCaption

public String getCaption()

setCaption

public void setCaption(String caption)

getInteriorColor

public Color getInteriorColor()
Returns color used to fill the interior of the line endings of the annotation.

Returns:
color used to fill the interior of the line endings
See Also:
setInteriorColor(Color)

setInteriorColor

public void setInteriorColor(Color interiorColor)
Specifies color that needs to be used to fill the interior of the line endings of the annotation.

Parameters:
interiorColor - color that needs to be used to fill the interior of the line endings
See Also:
getInteriorColor()

getPopup

public PdfPopUpAnnot getPopup()
Returns a popup annotation that needs to be used by a viewer application to display the popup window for this annotation.

Returns:
popup annotation that needs to be used as the popup window

setPopup

public void setPopup(PdfPopUpAnnot popup,
                     boolean overridePopUpProperties)
Specifies a popup annotation that needs to be used by a viewer application to display the popup window for this annotation.

Parameters:
popup - popup annotation that needs to be used as the popup window
overridePopUpProperties - whether a viewer application should override the properties of the popup annotation with those of this annotation
See Also:
PdfProAnnot.getPopup()

getDownAppearance

public PdfAppearanceStream getDownAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button.

See Also:
PdfProAnnot.getNormalAppearance(), PdfProAnnot.getDownAppearance(), PdfProAnnot.setNormalAppearance(PdfAppearanceStream), PdfProAnnot.setRolloverAppearance(PdfAppearanceStream), PdfProAnnot.setDownAppearance(PdfAppearanceStream)

setDownAppearance

public void setDownAppearance(PdfAppearanceStream downAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button.

See Also:
PdfProAnnot.getNormalAppearance(), PdfProAnnot.getDownAppearance(), PdfProAnnot.getRolloverAppearance(), PdfProAnnot.setNormalAppearance(PdfAppearanceStream), PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)

getNormalAppearance

public PdfAppearanceStream getNormalAppearance()
Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field).

See Also:
PdfProAnnot.getDownAppearance(), PdfProAnnot.getRolloverAppearance(), PdfProAnnot.setNormalAppearance(PdfAppearanceStream), PdfProAnnot.setDownAppearance(PdfAppearanceStream), PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)

setNormalAppearance

public void setNormalAppearance(PdfAppearanceStream normalAppearance)
Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field).

Parameters:
normalAppearance - the specified appearance stream
See Also:
PdfProAnnot.setDownAppearance(PdfAppearanceStream), PdfProAnnot.setRolloverAppearance(PdfAppearanceStream), PdfProAnnot.getNormalAppearance(), PdfProAnnot.getDownAppearance(), PdfProAnnot.getRolloverAppearance()

getRolloverAppearance

public PdfAppearanceStream getRolloverAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button).

See Also:
PdfProAnnot.getNormalAppearance(), PdfProAnnot.getDownAppearance(), PdfProAnnot.setNormalAppearance(PdfAppearanceStream), PdfProAnnot.setDownAppearance(PdfAppearanceStream), PdfProAnnot.setRolloverAppearance(PdfAppearanceStream)

setRolloverAppearance

public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button).

Parameters:
rolloverAppearance - the specified appearance stream
See Also:
PdfProAnnot.setNormalAppearance(PdfAppearanceStream), PdfProAnnot.setDownAppearance(PdfAppearanceStream), PdfProAnnot.getNormalAppearance(), PdfProAnnot.getDownAppearance(), PdfProAnnot.getRolloverAppearance()

Gnostice PDFOne
Pro. Ed. v5.0.0

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2010 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com