public final class Borders
extends java.lang.Object
Borders that use
instances of ConstantSize to define the margins.
Examples:
Borders.DLU2
Borders.createEmptyBorder(Sizes.DLUY4, Sizes.DLUX2, Sizes.DLUY4, Sizes.DLUX2);
Borders.createEmptyBorder("4dlu, 2dlu, 4dlu, 2dlu");
Border,
Sizes| Modifier and Type | Class and Description |
|---|---|
static class |
Borders.EmptyBorder
An empty border that uses 4 instances of
ConstantSize
to define the top, left, bottom and right gap. |
| Modifier and Type | Field and Description |
|---|---|
static javax.swing.border.Border |
BUTTON_BAR_PAD
A standardized Border that describes the gap between a component
and a button bar in its bottom.
|
static javax.swing.border.Border |
DIALOG
A standardized Border that describes the border around
a dialog content that has no tabs.
|
static javax.swing.border.Border |
DLU14
A prepared Border with 14dlu on all sides.
|
static javax.swing.border.Border |
DLU2
A prepared and reusable Border with 2dlu on all sides.
|
static javax.swing.border.Border |
DLU21
A prepared Border with 21dlu on all sides.
|
static javax.swing.border.Border |
DLU4
A prepared and reusable Border with 4dlu on all sides.
|
static javax.swing.border.Border |
DLU7
A prepared and reusable Border with 7dlu on all sides.
|
static javax.swing.border.Border |
DLU9
A prepared and reusable Border with 9dlu on all sides.
|
static javax.swing.border.Border |
EMPTY
A prepared and reusable EmptyBorder without gaps.
|
static javax.swing.border.Border |
TABBED_DIALOG
A standardized Border that describes the border around
a dialog content that uses tabs.
|
| Modifier | Constructor and Description |
|---|---|
private |
Borders() |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.border.Border |
createEmptyBorder(ConstantSize top,
ConstantSize left,
ConstantSize bottom,
ConstantSize right)
Creates and returns an
EmptyBorder with the specified
gaps. |
static javax.swing.border.Border |
createEmptyBorder(java.lang.String encodedSizes)
Creates and returns a
Border using sizes as specified by
the given string. |
public static final javax.swing.border.Border EMPTY
public static final javax.swing.border.Border DLU2
public static final javax.swing.border.Border DLU4
public static final javax.swing.border.Border DLU7
public static final javax.swing.border.Border DLU9
public static final javax.swing.border.Border DLU14
public static final javax.swing.border.Border DLU21
public static final javax.swing.border.Border BUTTON_BAR_PAD
public static final javax.swing.border.Border DIALOG
TABBED_DIALOGpublic static final javax.swing.border.Border TABBED_DIALOG
DIALOGpublic static javax.swing.border.Border createEmptyBorder(ConstantSize top, ConstantSize left, ConstantSize bottom, ConstantSize right)
EmptyBorder with the specified
gaps.top - the top gapleft - the left-hand side gapbottom - the bottom gapright - the right-hand side gapEmptyBorder with the specified gapsjava.lang.NullPointerException - if top, left, bottom, or right is nullcreateEmptyBorder(String)public static javax.swing.border.Border createEmptyBorder(java.lang.String encodedSizes)
Border using sizes as specified by
the given string. This string is a comma-separated encoding of
4 ConstantSizes.encodedSizes - top, left, bottom, right gap encoded as StringEmptyBorder with the specified gapscreateEmptyBorder(ConstantSize, ConstantSize, ConstantSize, ConstantSize)