public class BorderType
extends java.lang.Object
To learn more, visit the Programming with Documents documentation article.
Examples:
Shows how to insert a paragraph with a top border.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Border topBorder = builder.getParagraphFormat().getBorders().getByBorderType(BorderType.TOP);
topBorder.setLineWidth(4.0d);
topBorder.setLineStyle(LineStyle.DASH_SMALL_GAP);
// Set ThemeColor only when LineWidth or LineStyle setted.
topBorder.setThemeColor(ThemeColor.ACCENT_1);
topBorder.setTintAndShade(0.25d);
builder.writeln("Text with a top border.");
doc.save(getArtifactsDir() + "Border.ParagraphTopBorder.docx");
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM
Specifies the bottom border of a paragraph or a table cell.
|
static int |
DIAGONAL_DOWN
Specifies the diagonal border in a table cell.
|
static int |
DIAGONAL_UP
Specifies the diagonal border in a table cell.
|
static int |
HORIZONTAL
Specifies the horizontal border between cells in a table or between conforming paragraphs.
|
static int |
LEFT
Specifies the left border of a paragraph or a table cell.
|
static int |
length |
static int |
NONE
Default value.
|
static int |
RIGHT
Specifies the right border of a paragraph or a table cell.
|
static int |
TOP
Specifies the top border of a paragraph or a table cell.
|
static int |
VERTICAL
Specifies the vertical border between cells in a table.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String borderTypeName) |
static java.lang.String |
getName(int borderType) |
static int[] |
getValues() |
static java.lang.String |
toString(int borderType) |
public static int NONE
public static int BOTTOM
public static int LEFT
public static int RIGHT
public static int TOP
public static int HORIZONTAL
public static int VERTICAL
public static int DIAGONAL_DOWN
public static int DIAGONAL_UP
public static int length