Package com.dynamicpdf.api.elements
Class LineElement
java.lang.Object
com.dynamicpdf.api.elements.Element
com.dynamicpdf.api.elements.LineElement
Represents a line page element.
This class can be used to place lines of different length, width, color and patterns on a page.
-
Constructor Summary
ConstructorDescriptionLineElement(ElementPlacement placement, float x2Offset, float y2Offset)
Initializes a new instance of theLineElement
class. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Gets theColor
object to use for the line.Gets theLineStyle
object to use for the style of the line.float
getWidth()
Gets the width of the line.float
Gets the X2 coordinate of the line.float
Gets Y2 coordinate of the line.void
Sets theColor
object to use for the line.void
setLineStyle(LineStyle value)
Sets theLineStyle
object to use for the style of the line.void
setWidth(float value)
Sets the width of the line.void
setX2Offset(float value)
Sets the X2 coordinate of the line.void
setY2Offset(float value)
Sets the Y2 coordinate of the line.Methods inherited from class com.dynamicpdf.api.elements.Element
getEvenPages, getOddPages, getPlacement, getResource, getTextFont, getXOffset, getYOffset, setEvenPages, setOddPages, setPlacement, setXOffset, setYOffset
-
Constructor Details
-
LineElement
Initializes a new instance of theLineElement
class.- Parameters:
placement
- The placement of the line on the page.x2Offset
- X2 coordinate of the line.y2Offset
- Y2 coordinate of the line.
-
-
Method Details
-
getColor
Gets theColor
object to use for the line.- Returns:
- The
Color
object to use for the line.
-
setColor
Sets theColor
object to use for the line.- Parameters:
value
- TheColor
object to use for the line.
-
getX2Offset
public float getX2Offset()Gets the X2 coordinate of the line.- Returns:
- The X2 coordinate of the line.
-
setX2Offset
public void setX2Offset(float value)Sets the X2 coordinate of the line.- Parameters:
value
- The X2 coordinate of the line.
-
getY2Offset
public float getY2Offset()Gets Y2 coordinate of the line.- Returns:
- The Y2 coordinate of the line.
-
setY2Offset
public void setY2Offset(float value)Sets the Y2 coordinate of the line.- Parameters:
value
- The Y2 coordinate of the line.
-
getWidth
public float getWidth()Gets the width of the line.- Returns:
- The width of the line.
-
setWidth
public void setWidth(float value)Sets the width of the line.- Parameters:
value
- The width of the line.
-
getLineStyle
Gets theLineStyle
object to use for the style of the line.- Returns:
- The
LineStyle
object to use for the style of the line.
-
setLineStyle
Sets theLineStyle
object to use for the style of the line.- Parameters:
value
- TheLineStyle
object to use for the style of the line.
-