Package com.jgoodies.forms.factories
Class Borders
- java.lang.Object
-
- com.jgoodies.forms.factories.Borders
-
public final class Borders extends java.lang.ObjectProvides constants and factory methods forBorders that use instances ofConstantSizeto define the margins.Examples:
Borders.DLU2 Borders.createEmptyBorder(Sizes.DLUY4, Sizes.DLUX2, Sizes.DLUY4, Sizes.DLUX2); Borders.createEmptyBorder("4dlu, 2dlu, 4dlu, 2dlu");- Version:
- $Revision: 1.14 $
- See Also:
Border,Sizes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBorders.EmptyBorderAn empty border that uses 4 instances ofConstantSizeto define the top, left, bottom and right gap.
-
Field Summary
Fields Modifier and Type Field Description static javax.swing.border.BorderBUTTON_BAR_PADA standardized Border that describes the gap between a component and a button bar in its bottom.static javax.swing.border.BorderDIALOGA standardized Border that describes the border around a dialog content that has no tabs.static javax.swing.border.BorderDLU14A prepared Border with 14dlu on all sides.static javax.swing.border.BorderDLU2A prepared and reusable Border with 2dlu on all sides.static javax.swing.border.BorderDLU21A prepared Border with 21dlu on all sides.static javax.swing.border.BorderDLU4A prepared and reusable Border with 4dlu on all sides.static javax.swing.border.BorderDLU7A prepared and reusable Border with 7dlu on all sides.static javax.swing.border.BorderDLU9A prepared and reusable Border with 9dlu on all sides.static javax.swing.border.BorderEMPTYA prepared and reusable EmptyBorder without gaps.static javax.swing.border.BorderTABBED_DIALOGA standardized Border that describes the border around a dialog content that uses tabs.
-
Constructor Summary
Constructors Modifier Constructor Description privateBorders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.swing.border.BordercreateEmptyBorder(ConstantSize top, ConstantSize left, ConstantSize bottom, ConstantSize right)Creates and returns anEmptyBorderwith the specified gaps.static javax.swing.border.BordercreateEmptyBorder(java.lang.String encodedSizes)Creates and returns aBorderusing sizes as specified by the given string.
-
-
-
Field Detail
-
EMPTY
public static final javax.swing.border.Border EMPTY
A prepared and reusable EmptyBorder without gaps.
-
DLU2
public static final javax.swing.border.Border DLU2
A prepared and reusable Border with 2dlu on all sides.
-
DLU4
public static final javax.swing.border.Border DLU4
A prepared and reusable Border with 4dlu on all sides.
-
DLU7
public static final javax.swing.border.Border DLU7
A prepared and reusable Border with 7dlu on all sides.
-
DLU9
public static final javax.swing.border.Border DLU9
A prepared and reusable Border with 9dlu on all sides.- Since:
- 1.6
-
DLU14
public static final javax.swing.border.Border DLU14
A prepared Border with 14dlu on all sides.
-
DLU21
public static final javax.swing.border.Border DLU21
A prepared Border with 21dlu on all sides.- Since:
- 1.2
-
BUTTON_BAR_PAD
public static final javax.swing.border.Border BUTTON_BAR_PAD
A standardized Border that describes the gap between a component and a button bar in its bottom.
-
DIALOG
public static final javax.swing.border.Border DIALOG
A standardized Border that describes the border around a dialog content that has no tabs.- See Also:
TABBED_DIALOG
-
TABBED_DIALOG
public static final javax.swing.border.Border TABBED_DIALOG
A standardized Border that describes the border around a dialog content that uses tabs.- See Also:
DIALOG
-
-
Method Detail
-
createEmptyBorder
public static javax.swing.border.Border createEmptyBorder(ConstantSize top, ConstantSize left, ConstantSize bottom, ConstantSize right)
Creates and returns anEmptyBorderwith the specified gaps.- Parameters:
top- the top gapleft- the left-hand side gapbottom- the bottom gapright- the right-hand side gap- Returns:
- an
EmptyBorderwith the specified gaps - Throws:
java.lang.NullPointerException- if top, left, bottom, or right isnull- See Also:
createEmptyBorder(String)
-
createEmptyBorder
public static javax.swing.border.Border createEmptyBorder(java.lang.String encodedSizes)
Creates and returns aBorderusing sizes as specified by the given string. This string is a comma-separated encoding of 4ConstantSizes.- Parameters:
encodedSizes- top, left, bottom, right gap encoded as String- Returns:
- an
EmptyBorderwith the specified gaps - See Also:
createEmptyBorder(ConstantSize, ConstantSize, ConstantSize, ConstantSize)
-
-