ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class PDFLine

java.lang.Object
  extended bycom.elegantj.pdf.PDFObject
      extended bycom.elegantj.pdf.PDFGraphicsObject
          extended bycom.elegantj.pdf.PDFLine

public class PDFLine
extends PDFGraphicsObject

This class represents PDF Line object


Field Summary
 
Fields inherited from class com.elegantj.pdf.PDFGraphicsObject
BEVEL_JOINS, BUTT_CAPS, MITER_JOINS, ROUND_CAPS, ROUND_JOINS, SQUARE_CAPS
 
Constructor Summary
PDFLine()
          Constructs a PDFLine object with default start point, end point, line color and default width
PDFLine(int x1, int y1, int x2, int y2)
          Constructs a PDFLine object with default line color and default width
PDFLine(int x1, int y1, int x2, int y2, int w)
          Constructs a PDFLine object with specified width and default line color
PDFLine(int x1, int y1, int x2, int y2, int w, java.awt.Color lineColor)
          Constructs a PDFLine object with specified width and specified line color
 
Method Summary
 java.lang.Object clone()
          Returns the clone of this object
 int getCapStyle()
          Method which returns the value of cap style for line
 int getDashLength()
          Method which returns the value of dash length for line
 int getEndX()
          Method which returns the value of x coordinate of end point
 int getEndY()
          Method which returns the value of y coordinate of end point
 int getGapLength()
          Method which returns the value of gap length for line
 int getJoinStyle()
          Method which returns the value of join style for line
 int getLineWidth()
          Method which returns the value of width of the line
 int getStartX()
          Method which returns the value of x coordinate of start point
 int getStartY()
          Method which returns the value of y coordinate of start point
 void setCapStyle(int style)
          Method which sets the value of cap style for line
 void setDashPattern(int dashLen, int gapLen)
          Method which sets the dash pattern for line
 void setEndX(int x2)
          Method which sets the value of x coordinate of end point
 void setEndY(int y2)
          Method which sets the value of y coordinate of end point
 void setJoinStyle(int style)
          Method which sets the value of join style for line
 void setLineColor(java.awt.Color lineColor)
          Method which sets the line color
 void setLineWidth(int width)
          Method which sets the value of width of the line
 void setStartX(int x1)
          Method which sets the value of x coordinate of start point
 void setStartY(int y1)
          Method which sets the value of y coordinate of start point
 
Methods inherited from class com.elegantj.pdf.PDFObject
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFLine

public PDFLine()
Constructs a PDFLine object with default start point, end point, line color and default width


PDFLine

public PDFLine(int x1,
               int y1,
               int x2,
               int y2)
Constructs a PDFLine object with default line color and default width

Parameters:
x1 - The x coordinate value for start point
y1 - The y coordinate value for end point
x2 - The x coordinate value for start point
y2 - The y coordinate value for end point

PDFLine

public PDFLine(int x1,
               int y1,
               int x2,
               int y2,
               int w)
Constructs a PDFLine object with specified width and default line color

Parameters:
x1 - The x coordinate value for start point
y1 - The y coordinate value for end point
x2 - The x coordinate value for start point
y2 - The y coordinate value for end point
w - The width of the line

PDFLine

public PDFLine(int x1,
               int y1,
               int x2,
               int y2,
               int w,
               java.awt.Color lineColor)
Constructs a PDFLine object with specified width and specified line color

Parameters:
x1 - The x coordinate value for start point
y1 - The y coordinate value for end point
x2 - The x coordinate value for start point
y2 - The y coordinate value for end point
w - The width of the line
lineColor - The line color of the line
Method Detail

setStartX

public void setStartX(int x1)
Method which sets the value of x coordinate of start point

Parameters:
x1 - The value of x coordinate of start point

getStartX

public int getStartX()
Method which returns the value of x coordinate of start point

Returns:
The value of x coordinate of start point

setStartY

public void setStartY(int y1)
Method which sets the value of y coordinate of start point

Parameters:
y1 - The value of y coordinate of start point

getStartY

public int getStartY()
Method which returns the value of y coordinate of start point

Returns:
The value of y coordinate of start point

setEndX

public void setEndX(int x2)
Method which sets the value of x coordinate of end point


getEndX

public int getEndX()
Method which returns the value of x coordinate of end point

Returns:
The value of x coordinate of end point

setEndY

public void setEndY(int y2)
Method which sets the value of y coordinate of end point


getEndY

public int getEndY()
Method which returns the value of y coordinate of end point

Returns:
The value of y coordinate of end point

setLineWidth

public void setLineWidth(int width)
Method which sets the value of width of the line

Parameters:
width - The value of width of the line

getLineWidth

public int getLineWidth()
Method which returns the value of width of the line

Returns:
The value of width of the line

setCapStyle

public void setCapStyle(int style)
Method which sets the value of cap style for line

Parameters:
style - The value of cap style for line possible values are PDFGraphicsObject.BUTT_CAPS, PDFGraphicsObject.ROUND_CAPS, PDFGraphicsObject.SQUARE_CAPS

getCapStyle

public int getCapStyle()
Method which returns the value of cap style for line

Returns:
the value of cap style for line

setJoinStyle

public void setJoinStyle(int style)
Method which sets the value of join style for line

Parameters:
style - The value of join style for line possible values are PDFGraphicsObject.MITER_JOINS, PDFGraphicsObject.ROUND_JOINS, PDFGraphicsObject.BEVEL_JOINS

getJoinStyle

public int getJoinStyle()
Method which returns the value of join style for line

Returns:
the value of join style for line

setDashPattern

public void setDashPattern(int dashLen,
                           int gapLen)
Method which sets the dash pattern for line

Parameters:
dashLen - The length of dash
gapLen - The length of gap

getDashLength

public int getDashLength()
Method which returns the value of dash length for line

Returns:
The value of dash length for line

getGapLength

public int getGapLength()
Method which returns the value of gap length for line

Returns:
The value of gap length for line

setLineColor

public void setLineColor(java.awt.Color lineColor)
Method which sets the line color

Parameters:
lineColor - The line color

clone

public java.lang.Object clone()
Returns the clone of this object

Returns:
The clone of this object

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.