DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class Rectangle

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.RotatingPageElement
              extended by com.cete.dynamicpdf.pageelements.Rectangle
All Implemented Interfaces:
IArea, ICoordinate

public class Rectangle
extends RotatingPageElement
implements IArea, ICoordinate

This class can be used to place rectangles of any size or color on a page.

Licensing:
This class is a DynamicPDF Generator Community Edition feature.

View Example


Constructor Summary
Rectangle(float x, float y, float width, float height)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor, Color fillColor)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor, Color fillColor, float borderWidth)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor, Color fillColor, float borderWidth, LineStyle borderStyle)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor, float borderWidth)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, Color borderColor, float borderWidth, LineStyle borderStyle)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, float borderWidth)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, float borderWidth, Color fillColor)
          Initializes a new instance of the Rectangle class.
Rectangle(float x, float y, float width, float height, float borderWidth, LineStyle borderStyle)
          Initializes a new instance of the Rectangle class.
 
Method Summary
protected  void drawRotated(PageWriter writer)
          Draws the rotated page element to the given PageWriterobject.
 Color getBorderColor()
          Gets the Colorobject to use for the border of the rectangle.
 LineStyle getBorderStyle()
          Gets the LineStyle object specifying the border style of the rectangle.
 float getBorderWidth()
          Gets the border width of the rectangle.
 float getCornerRadius()
          Gets the corner radius of the rectangle.
 Color getFillColor()
          Gets the Color object to use for the fill of the rectangle.
 float getWidth()
          Gets the width of the rectangle.
 void setBorderColor(Color borderColor)
          Sets the Colorobject to use for the border of the rectangle.
 void setBorderStyle(LineStyle borderStyle)
          Sets the LineStyle object used to specify the border style of the rectangle.
 void setBorderWidth(float borderWidth)
          Sets the border width of the rectangle.
 void setCornerRadius(float cornerRadius)
          Sets the corner radius of the rectangle.
 void setFillColor(Color fillColor)
          Sets the Color object to use for the fill of the rectangle.
 void setWidth(float width)
          Sets the width of the rectangle.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.RotatingPageElement
draw, getAngle, getHeight, getX, getY, setAngle, setHeight, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTag, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cete.dynamicpdf.pageelements.IArea
getHeight, setHeight
 
Methods inherited from interface com.cete.dynamicpdf.pageelements.ICoordinate
getX, getY, setX, setY
 

Constructor Detail

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 float borderWidth)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderWidth - float value width of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 float borderWidth,
                 Color fillColor)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderWidth - float value width of the border of the rectangle.
fillColor - Color of the fill of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor,
                 float borderWidth)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.
borderWidth - float value width of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 float borderWidth,
                 LineStyle borderStyle)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderWidth - float value width of the border of the rectangle.
borderStyle - LineStyle of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor,
                 float borderWidth,
                 LineStyle borderStyle)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.
borderWidth - float value width of the border of the rectangle.
borderStyle - LineStyle of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor,
                 Color fillColor,
                 float borderWidth)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.
fillColor - Color of the fill of the rectangle.
borderWidth - float value width of the border of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor,
                 Color fillColor)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.
fillColor - Color of the fill of the rectangle.

Rectangle

public Rectangle(float x,
                 float y,
                 float width,
                 float height,
                 Color borderColor,
                 Color fillColor,
                 float borderWidth,
                 LineStyle borderStyle)
Initializes a new instance of the Rectangle class.

Parameters:
x - float value indicating X coordinate of the rectangle.
y - float value indicating Y coordinate of the rectangle.
width - float value indicating width of the rectangle.
height - float value indicating height of the rectangle.
borderColor - Color of the border of the rectangle.
fillColor - Color of the fill of the rectangle.
borderWidth - float value width of the border of the rectangle.
borderStyle - LineStyle of the border of the rectangle.
Method Detail

setBorderStyle

public void setBorderStyle(LineStyle borderStyle)
Sets the LineStyle object used to specify the border style of the rectangle.

Parameters:
borderStyle - LineStyle object used to set the border style of the rectangle.
See Also:
LineStyle

getBorderStyle

public LineStyle getBorderStyle()
Gets the LineStyle object specifying the border style of the rectangle.

Returns:
LineStyle object specifying the border style of the rectangle.
See Also:
LineStyle

setCornerRadius

public void setCornerRadius(float cornerRadius)
Sets the corner radius of the rectangle.

Parameters:
cornerRadius - the float value corner radius to be set.

getCornerRadius

public float getCornerRadius()
Gets the corner radius of the rectangle.

Returns:
the float value specifying corner radius of the rectangle.

setBorderWidth

public void setBorderWidth(float borderWidth)
Sets the border width of the rectangle.

Parameters:
borderWidth - the float value border width of the rectangle to be set.

getBorderWidth

public float getBorderWidth()
Gets the border width of the rectangle.

Returns:
the float value specifying border width of the rectangle.

setBorderColor

public void setBorderColor(Color borderColor)
Sets the Colorobject to use for the border of the rectangle.

Parameters:
borderColor - the Color object used to set the border of the rectangle.
See Also:
Color

getBorderColor

public Color getBorderColor()
Gets the Colorobject to use for the border of the rectangle.

Returns:
the Color object specifying the border color of the rectangle.
See Also:
Color

setFillColor

public void setFillColor(Color fillColor)
Sets the Color object to use for the fill of the rectangle.

Parameters:
fillColor - the Color object to use for the fill of the rectangle.
See Also:
Color

getFillColor

public Color getFillColor()
Gets the Color object to use for the fill of the rectangle.

Returns:
the Color object used for the fill of the rectangle.
See Also:
Color

setWidth

public void setWidth(float width)
Sets the width of the rectangle.

Specified by:
setWidth in interface IArea
Parameters:
width - the float width of the rectangle.

getWidth

public float getWidth()
Gets the width of the rectangle.

Specified by:
getWidth in interface IArea
Returns:
the float width of the rectangle.

drawRotated

protected void drawRotated(PageWriter writer)
Draws the rotated page element to the given PageWriterobject.

Specified by:
drawRotated in class RotatingPageElement
Parameters:
writer - PageWriter object to receive the page element's output.
See Also:
PageWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software