Class DottedLine
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.draw.DottedLine
-
- All Implemented Interfaces:
ILineDrawer
public class DottedLine extends java.lang.Object implements ILineDrawer
Implementation ofILineDrawerwhich draws a dotted horizontal line along the bottom edge of the specified rectangle.
-
-
Constructor Summary
Constructors Constructor Description DottedLine()Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.DottedLine(float lineWidth)Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.DottedLine(float lineWidth, float gap)Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(PdfCanvas canvas, Rectangle drawArea)Performs configurable drawing operations related to specific region coordinates on a canvas.ColorgetColor()Gets the color of the linefloatgetGap()Getter for the gap between the center of the dots of the dotted line.floatgetLineWidth()Gets line width in pointsvoidsetColor(Color color)Sets line colorvoidsetGap(float gap)Setter for the gap between the center of the dots of the dotted line.voidsetLineWidth(float lineWidth)Sets line width in points
-
-
-
Field Detail
-
gap
protected float gap
the gap between the dots.
-
lineWidth
private float lineWidth
-
color
private Color color
-
-
Constructor Detail
-
DottedLine
public DottedLine()
Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.
-
DottedLine
public DottedLine(float lineWidth, float gap)Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.- Parameters:
lineWidth- the width of the linegap- the gap between the center of the dots of the dotted line.
-
DottedLine
public DottedLine(float lineWidth)
Constructs a dotted horizontal line which will be drawn along the bottom edge of the specified rectangle.- Parameters:
lineWidth- the width of the line
-
-
Method Detail
-
draw
public void draw(PdfCanvas canvas, Rectangle drawArea)
Description copied from interface:ILineDrawerPerforms configurable drawing operations related to specific region coordinates on a canvas.- Specified by:
drawin interfaceILineDrawer- Parameters:
canvas- the canvas to draw ondrawArea- the rectangle in relation to which to fulfill drawing instructions
-
getGap
public float getGap()
Getter for the gap between the center of the dots of the dotted line.- Returns:
- the gap between the center of the dots
-
setGap
public void setGap(float gap)
Setter for the gap between the center of the dots of the dotted line.- Parameters:
gap- the gap between the center of the dots
-
getLineWidth
public float getLineWidth()
Gets line width in points- Specified by:
getLineWidthin interfaceILineDrawer- Returns:
- line thickness
-
setLineWidth
public void setLineWidth(float lineWidth)
Sets line width in points- Specified by:
setLineWidthin interfaceILineDrawer- Parameters:
lineWidth- new line width
-
getColor
public Color getColor()
Description copied from interface:ILineDrawerGets the color of the line- Specified by:
getColorin interfaceILineDrawer- Returns:
- color of the line
-
setColor
public void setColor(Color color)
Description copied from interface:ILineDrawerSets line color- Specified by:
setColorin interfaceILineDrawer- Parameters:
color- new line color
-
-