public class BorderType
Example:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Border topBorder = builder.getParagraphFormat().getBorders().getByBorderType(BorderType.TOP);
topBorder.setColor(Color.RED);
topBorder.setLineWidth(4.0d);
topBorder.setLineStyle(LineStyle.DASH_SMALL_GAP);
builder.writeln("Text with a red top border.");
doc.save(getArtifactsDir() + "Border.ParagraphTopBorder.docx");
Field Summary | ||
---|---|---|
static final int | NONE | |
Default value.
|
||
static final int | BOTTOM | |
Specifies the bottom border of a paragraph or a table cell.
|
||
static final int | LEFT | |
Specifies the left border of a paragraph or a table cell.
|
||
static final int | RIGHT | |
Specifies the right border of a paragraph or a table cell.
|
||
static final int | TOP | |
Specifies the top border of a paragraph or a table cell.
|
||
static final int | HORIZONTAL | |
Specifies the horizontal border between cells in a table or between conforming paragraphs.
|
||
static final int | VERTICAL | |
Specifies the vertical border between cells in a table.
|
||
static final int | DIAGONAL_DOWN | |
Specifies the diagonal border in a table cell.
|
||
static final int | DIAGONAL_UP | |
Specifies the diagonal border in a table cell.
|
public static final int NONE
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int HORIZONTAL
public static final int VERTICAL
public static final int DIAGONAL_DOWN
public static final int DIAGONAL_UP