com.jgoodies.forms.factories
Class Borders

java.lang.Object
  extended by com.jgoodies.forms.factories.Borders

public final class Borders
extends Object

Provides constants and factory methods for 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");
 

Version:
$Revision: 1.14 $
Author:
Karsten Lentzsch
See Also:
Borders.EmptyBorder, Sizes

Nested Class Summary
static class Borders.EmptyBorder
          An empty border that uses 4 instances of ConstantSize to define the top, left, bottom and right gap.
 
Field Summary
static Border BUTTON_BAR_GAP_BORDER
          Deprecated. Replaced by BUTTON_BAR_PAD
static Border BUTTON_BAR_PAD
          A standardized Border that describes the gap between a component and a button bar in its bottom.
static Border DIALOG
          A standardized Border that describes the border around a dialog content that has no tabs.
static Border DIALOG_BORDER
          Deprecated. Replaced by DIALOG
static Border DLU14
          A prepared Border with 14dlu on all sides.
static Border DLU14_BORDER
          Deprecated. Replaced by DLU14
static Border DLU2
          A prepared and reusable Border with 2dlu on all sides.
static Border DLU2_BORDER
          Deprecated. Replaced by DLU2
static Border DLU21
          A prepared Border with 21dlu on all sides.
static Border DLU21_BORDER
          Deprecated. Replaced by DLU21
static Border DLU4
          A prepared and reusable Border with 4dlu on all sides.
static Border DLU4_BORDER
          Deprecated. Replaced by DLU4
static Border DLU7
          A prepared and reusable Border with 7dlu on all sides.
static Border DLU7_BORDER
          Deprecated. Replaced by DLU7
static Border DLU9
          A prepared and reusable Border with 9dlu on all sides.
static Border EMPTY
          A prepared and reusable EmptyBorder without gaps.
static Border EMPTY_BORDER
          Deprecated. Replaced by EMPTY
static Border TABBED_DIALOG
          A standardized Border that describes the border around a dialog content that uses tabs.
static Border TABBED_DIALOG_BORDER
          Deprecated. Replaced by TABBED_DIALOG
 
Method Summary
static Border createEmptyBorder(ConstantSize top, ConstantSize left, ConstantSize bottom, ConstantSize right)
          Creates and returns an EmptyBorder with the specified gaps.
static Border createEmptyBorder(String encodedSizes)
          Creates and returns a Border using sizes as specified by the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final Border EMPTY
A prepared and reusable EmptyBorder without gaps.


DLU2

public static final Border DLU2
A prepared and reusable Border with 2dlu on all sides.


DLU4

public static final Border DLU4
A prepared and reusable Border with 4dlu on all sides.


DLU7

public static final Border DLU7
A prepared and reusable Border with 7dlu on all sides.


DLU9

public static final Border DLU9
A prepared and reusable Border with 9dlu on all sides.

Since:
1.6

DLU14

public static final Border DLU14
A prepared Border with 14dlu on all sides.


DLU21

public static final Border DLU21
A prepared Border with 21dlu on all sides.

Since:
1.2

BUTTON_BAR_PAD

public static final 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 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 Border TABBED_DIALOG
A standardized Border that describes the border around a dialog content that uses tabs.

See Also:
DIALOG

EMPTY_BORDER

@Deprecated
public static final Border EMPTY_BORDER
Deprecated. Replaced by EMPTY
A prepared and reusable EmptyBorder without gaps.


DLU2_BORDER

@Deprecated
public static final Border DLU2_BORDER
Deprecated. Replaced by DLU2
A prepared and reusable Border with 2dlu on all sides.


DLU4_BORDER

@Deprecated
public static final Border DLU4_BORDER
Deprecated. Replaced by DLU4
A prepared and reusable Border with 4dlu on all sides.


DLU7_BORDER

@Deprecated
public static final Border DLU7_BORDER
Deprecated. Replaced by DLU7
A prepared and reusable Border with 7dlu on all sides.


DLU14_BORDER

@Deprecated
public static final Border DLU14_BORDER
Deprecated. Replaced by DLU14
A prepared Border with 14dlu on all sides.


DLU21_BORDER

@Deprecated
public static final Border DLU21_BORDER
Deprecated. Replaced by DLU21
A prepared Border with 21dlu on all sides.

Since:
1.2

BUTTON_BAR_GAP_BORDER

@Deprecated
public static final Border BUTTON_BAR_GAP_BORDER
Deprecated. Replaced by BUTTON_BAR_PAD
A standardized Border that describes the gap between a component and a button bar in its bottom.


DIALOG_BORDER

@Deprecated
public static final Border DIALOG_BORDER
Deprecated. Replaced by DIALOG
A standardized Border that describes the border around a dialog content that has no tabs.

See Also:
TABBED_DIALOG

TABBED_DIALOG_BORDER

@Deprecated
public static final Border TABBED_DIALOG_BORDER
Deprecated. Replaced by TABBED_DIALOG
A standardized Border that describes the border around a dialog content that uses tabs.

See Also:
DIALOG
Method Detail

createEmptyBorder

public static Border createEmptyBorder(ConstantSize top,
                                       ConstantSize left,
                                       ConstantSize bottom,
                                       ConstantSize right)
Creates and returns an EmptyBorder with the specified gaps.

Parameters:
top - the top gap
left - the left-hand side gap
bottom - the bottom gap
right - the right-hand side gap
Returns:
an EmptyBorder with the specified gaps
Throws:
NullPointerException - if top, left, bottom, or right is null
See Also:
createEmptyBorder(String)

createEmptyBorder

public static Border createEmptyBorder(String encodedSizes)
Creates and returns a Border using sizes as specified by the given string. This string is a comma-separated encoding of 4 ConstantSizes.

Parameters:
encodedSizes - top, left, bottom, right gap encoded as String
Returns:
an EmptyBorder with the specified gaps
See Also:
createEmptyBorder(ConstantSize, ConstantSize, ConstantSize, ConstantSize)


Copyright © 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.