ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class PDFRectangle

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

public class PDFRectangle
extends PDFGraphicsObject

This class represents PDF Rectangle 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
PDFRectangle(int x, int y, int width, int height)
          Constructs a PDFRectangle object with default outline width, default outline color and fill color
PDFRectangle(int x, int y, int width, int height, int outlineWidth, java.awt.Color outLineColor, java.awt.Color fillColor)
          Constructs a PDFRectangle object with specified outline color, outline width and fill color
 
Method Summary
 java.lang.Object clone()
          Returns the clone of this object, here is PDFRectangle
 boolean getFillMode()
          Method which returns the state of fill mode
 int getHeight()
          Method which returns the value of height of the rectangle
 int getJoinStyle()
          Method which returns the value of join style for lines of rectangle
 int getOutlineWidth()
          Method which returns the outline width of rectangle
 PDFPattern getPattern()
          Returns the PDFPattern which is used to fill to this object
 int getWidth()
          Method which returns the value of width of the rectangle
 int getX()
          Method which returns the value of x coordinate
 int getY()
          Method which returns the value of y coordinate
 void setFillColor(java.awt.Color fillColor)
          Method which sets the fill color of PDFRectangle
 void setFillMode(boolean flag)
          Method which sets the state of fill mode
 void setHeight(int height)
          Method which sets the value of height of the rectangle
 void setJoinStyle(int style)
          Method which sets the value of join style for lines of rectangle
 void setOutlineColor(java.awt.Color outLineColor)
          Method which sets the outline color of rectangle
 void setOutlineWidth(int width)
          Method which sets the outline width of rectangle
 void setPattern(PDFPattern pattern)
          Sets the PDFPattern to fill this object
 void setWidth(int width)
          Method which sets the value of width of the rectangle
 void setX(int x)
          Method which sets the value of x coordinate
 void setY(int y)
          Method which sets the value of y coordinate
 
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

PDFRectangle

public PDFRectangle(int x,
                    int y,
                    int width,
                    int height)
Constructs a PDFRectangle object with default outline width, default outline color and fill color

Parameters:
x - The x coordinate value
y - The y coordinate value
width - The width of the rectangle
height - The height of the rectangle

PDFRectangle

public PDFRectangle(int x,
                    int y,
                    int width,
                    int height,
                    int outlineWidth,
                    java.awt.Color outLineColor,
                    java.awt.Color fillColor)
Constructs a PDFRectangle object with specified outline color, outline width and fill color

Parameters:
x - The x coordinate value
y - The y coordinate value
width - The width of the rectangle
height - The height of the rectangle
outlineWidth - The out line width of the rectangle
outLineColor - The outline color of the rectangle
fillColor - The fill color of the rectangle
Method Detail

setX

public void setX(int x)
Method which sets the value of x coordinate

Parameters:
x - The value of x coordinate

getX

public int getX()
Method which returns the value of x coordinate

Returns:
the value of x coordinate

setY

public void setY(int y)
Method which sets the value of y coordinate

Parameters:
y - The value of y coordinate

getY

public int getY()
Method which returns the value of y coordinate

Returns:
the value of y coordinate

setWidth

public void setWidth(int width)
Method which sets the value of width of the rectangle

Parameters:
width - The value of width of the rectangle

getWidth

public int getWidth()
Method which returns the value of width of the rectangle

Returns:
The value of width of the rectangle

setHeight

public void setHeight(int height)
Method which sets the value of height of the rectangle

Parameters:
height - The value of height of the rectangle

getHeight

public int getHeight()
Method which returns the value of height of the rectangle

Returns:
The value of height of the rectangle

setOutlineWidth

public void setOutlineWidth(int width)
Method which sets the outline width of rectangle

Parameters:
width - the outline width of rectangle

getOutlineWidth

public int getOutlineWidth()
Method which returns the outline width of rectangle

Returns:
the outline width of rectangle

setJoinStyle

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

Parameters:
style - The value of join style for lines of rectangle 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 lines of rectangle

Returns:
the value of join style of lines of rectangle

setFillMode

public void setFillMode(boolean flag)
Method which sets the state of fill mode

Parameters:
flag - the state of fill mode if true, rectangle will be filled with fill color

getFillMode

public boolean getFillMode()
Method which returns the state of fill mode

Returns:
the state of fill mode if true, rectangle will be filled with fill color

setFillColor

public void setFillColor(java.awt.Color fillColor)
Method which sets the fill color of PDFRectangle

Parameters:
fillColor - The specified fill color for the PDFRectangle

setOutlineColor

public void setOutlineColor(java.awt.Color outLineColor)
Method which sets the outline color of rectangle

Parameters:
outLineColor - The specified outline color for the PDFRectangle

setPattern

public void setPattern(PDFPattern pattern)
Sets the PDFPattern to fill this object


getPattern

public PDFPattern getPattern()
Returns the PDFPattern which is used to fill to this object

Returns:
The PDFPattern which is used to fill to this object

clone

public java.lang.Object clone()
Returns the clone of this object, here is PDFRectangle

Returns:
The clone of this object, here is PDFRectangle

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.