net.sf.ecl.datepicker.util
Class LayoutHelper

java.lang.Object
  extended by net.sf.ecl.datepicker.util.LayoutHelper

public final class LayoutHelper
extends Object

The utility-class that helps to create layouts.


Method Summary
static FillLayout createFillLayout(int marginWidth, int marginHeight)
          Constructs a new instance of the row layout class given the type.
static FillLayout createFillLayout(int type, int marginWidth, int marginHeight)
          Constructs a new instance of the row layout class given the type.
static GridLayout createGridLayout(int numColumns, boolean makeColumnsEqualWidth, int marginWidth, int marginHeight, int horizontalSpacing, int verticalSpacing)
          Constructs a new instance of the grid layout class given the number of columns, and whether or not the columns should be forced to have the same width.
static GridLayout createGridLayout(int marginWidth, int marginHeight, int horizontalSpacing, int verticalSpacing)
          Constructs a new instance of the grid layout class.
static RowLayout createRowLayout(int type, int marginLeft, int marginTop, int marginRight, int marginBottom)
          Constructs a new instance of the row layout class given the type.
static RowLayout createRowLayout(int type, int marginWidth, int marginHeight, int marginLeft, int marginTop, int marginRight, int marginBottom)
          Constructs a new instance of the row layout class given the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFillLayout

public static FillLayout createFillLayout(int marginWidth,
                                          int marginHeight)
Constructs a new instance of the row layout class given the type.

Parameters:
marginWidth - specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the layout
marginHeight - specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout.

createFillLayout

public static FillLayout createFillLayout(int type,
                                          int marginWidth,
                                          int marginHeight)
Constructs a new instance of the row layout class given the type.

Parameters:
type - the type of row layout
marginWidth - specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the layout
marginHeight - specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout.

createGridLayout

public static GridLayout createGridLayout(int numColumns,
                                          boolean makeColumnsEqualWidth,
                                          int marginWidth,
                                          int marginHeight,
                                          int horizontalSpacing,
                                          int verticalSpacing)
Constructs a new instance of the grid layout class given the number of columns, and whether or not the columns should be forced to have the same width.

Parameters:
numColumns - the number of columns in the grid
makeColumnsEqualWidth - whether or not the columns will have equal width
marginWidth - the number of pixels of horizontal margin that will be placed along the left and right edges of the layout
marginHeight - the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout
horizontalSpacing - the number of pixels between the right dock of one cell and the left dock of its neighbouring cell to the right
verticalSpacing - the number of pixels between the bottom dock of one cell and the top dock of its neighbouring cell underneath
Returns:
the grid layout

createGridLayout

public static GridLayout createGridLayout(int marginWidth,
                                          int marginHeight,
                                          int horizontalSpacing,
                                          int verticalSpacing)
Constructs a new instance of the grid layout class.

Parameters:
marginWidth - the number of pixels of horizontal margin that will be placed along the left and right edges of the layout
marginHeight - the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout
horizontalSpacing - the number of pixels between the right dock of one cell and the left dock of its neighbouring cell to the right
verticalSpacing - the number of pixels between the bottom dock of one cell and the top dock of its neighbouring cell underneath
Returns:
the grid layout

createRowLayout

public static RowLayout createRowLayout(int type,
                                        int marginLeft,
                                        int marginTop,
                                        int marginRight,
                                        int marginBottom)
Constructs a new instance of the row layout class given the type.

Parameters:
type - the type of row layout
marginLeft - specifies the number of pixels of horizontal margin that will be placed along the left dock of the layout.
marginTop - specifies the number of pixels of vertical margin that will be placed along the top dock of the layout.
marginRight - specifies the number of pixels of horizontal margin that will be placed along the right dock of the layout.
marginBottom - specifies the number of pixels of vertical margin that will be placed along the bottom dock of the layout.
Returns:
the row layout
See Also:
RowLayout

createRowLayout

public static RowLayout createRowLayout(int type,
                                        int marginWidth,
                                        int marginHeight,
                                        int marginLeft,
                                        int marginTop,
                                        int marginRight,
                                        int marginBottom)
Constructs a new instance of the row layout class given the type.

Parameters:
type - the type of row layout
marginWidth - specifies the number of pixels of horizontal margin that will be placed along the left and right edges of the layout
marginHeight - specifies the number of pixels of vertical margin that will be placed along the top and bottom edges of the layout.
marginLeft - specifies the number of pixels of horizontal margin that will be placed along the left dock of the layout.
marginTop - specifies the number of pixels of vertical margin that will be placed along the top dock of the layout.
marginRight - specifies the number of pixels of horizontal margin that will be placed along the right dock of the layout.
marginBottom - specifies the number of pixels of vertical margin that will be placed along the bottom dock of the layout.
Returns:
the row layout
See Also:
RowLayout