Package com.dynamicpdf.api.elements
Class RectangleElement
java.lang.Object
com.dynamicpdf.api.elements.Element
com.dynamicpdf.api.elements.RectangleElement
Represents a rectangle page element.
 
 
This class can be used to place rectangles of any size or color on a page.
- 
Constructor Summary
ConstructorsConstructorDescriptionRectangleElement(ElementPlacement placement, float width, float height)Initializes a new instance of theRectangleElementclass. - 
Method Summary
Modifier and TypeMethodDescriptionGets theColorobject to use for the border of the rectangle.Gets theLineStyleobject used to specify the border style of the rectangle.floatGets the border width of the rectangle.floatGets the corner radius of the rectangle.Gets theColorobject to use for the fill of the rectangle.floatGets the height of the rectangle.floatgetWidth()Gets the width of the rectangle.voidsetBorderColor(Color value)Sets theColorobject to use for the border of the rectangle.voidsetBorderStyle(LineStyle value)Sets theLineStyleobject used to specify the border style of the rectangle.voidsetBorderWidth(float value)Sets the border width of the rectangle.voidsetCornerRadius(float value)Sets the corner radius of the rectangle.voidsetFillColor(Color value)Sets theColorobject to use for the fill of the rectangle.voidsetHeight(float value)Sets the height of the rectangle.voidsetWidth(float value)Sets the width of the rectangle.Methods inherited from class com.dynamicpdf.api.elements.Element
getEvenPages, getOddPages, getPlacement, getResource, getTextFont, getXOffset, getYOffset, setEvenPages, setOddPages, setPlacement, setXOffset, setYOffset 
- 
Constructor Details
- 
RectangleElement
Initializes a new instance of theRectangleElementclass.- Parameters:
 placement- The placement of the rectangle on the page.width- Width of the rectangle.height- Height of the rectangle.
 
 - 
 - 
Method Details
- 
getWidth
public float getWidth()Gets the width of the rectangle.- Returns:
 - The width of the rectangle.
 
 - 
setWidth
public void setWidth(float value)Sets the width of the rectangle.- Parameters:
 value- The width of the rectangle.
 - 
getHeight
public float getHeight()Gets the height of the rectangle.- Returns:
 - The height of the rectangle.
 
 - 
setHeight
public void setHeight(float value)Sets the height of the rectangle.- Parameters:
 value- The height of the rectangle.
 - 
getBorderWidth
public float getBorderWidth()Gets the border width of the rectangle.To force the borders not to appear set the border width to any value 0 or less.
- Returns:
 - The border width of the rectangle.
 
 - 
setBorderWidth
public void setBorderWidth(float value)Sets the border width of the rectangle.To force the borders not to appear set the border width to any value 0 or less.
- Parameters:
 value- The border width of the rectangle.
 - 
getCornerRadius
public float getCornerRadius()Gets the corner radius of the rectangle.- Returns:
 - The corner radius of the rectangle.
 
 - 
setCornerRadius
public void setCornerRadius(float value)Sets the corner radius of the rectangle.- Parameters:
 value- The corner radius of the rectangle.
 - 
getFillColor
Gets theColorobject to use for the fill of the rectangle.To force no color to appear in the rectangle (only borders) set the fill color to null (Nothing in Visual Basic).
- Returns:
 - The 
Colorobject to use for the fill of the rectangle. 
 - 
setFillColor
Sets theColorobject to use for the fill of the rectangle.To force no color to appear in the rectangle (only borders) set the fill color to null (Nothing in Visual Basic).
- Parameters:
 value- TheColorobject to use for the fill of the rectangle.
 - 
getBorderColor
Gets theColorobject to use for the border of the rectangle.- Returns:
 - The 
Colorobject to use for the border of the rectangle. 
 - 
setBorderColor
Sets theColorobject to use for the border of the rectangle.- Parameters:
 value- TheColorobject to use for the border of the rectangle.
 - 
getBorderStyle
Gets theLineStyleobject used to specify the border style of the rectangle.- Returns:
 - The 
LineStyleobject used to specify the border style of the rectangle. 
 - 
setBorderStyle
Sets theLineStyleobject used to specify the border style of the rectangle.- Parameters:
 value- TheLineStyleobject used to specify the border style of the rectangle.
 
 -