Package com._1c.g5.aef2.standard.layout
Class AefGridLayoutFactory
java.lang.Object
com._1c.g5.aef2.standard.layout.AefGridLayoutFactory
Aef grid layout factory. Helps to build
AefGridLayout
objects.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates a new AefGridLayout and attaches it to the given composite.copy()
Creates a copy of the reciever.static AefGridLayout
Copies the given AefGridLayout instancecreate()
Creates a new AefGridLayout, and initializes it with values from the factory.static AefGridLayoutFactory
Creates a factory that creates copies of the given layout.equalWidth
(boolean equal) Sets whether the columns should be forced to be equal widthextendedMargins
(int left, int right, int top, int bottom) Sets the margins for layouts created with this factory.static AefGridLayoutFactory
Creates a AefGridLayoutFactory that creates AefGridLayouts with no margins and default dialog spacing.margins
(int width, int height) Sets the margins for layouts created with this factory.numColumns
(int numColumns) Sets the number of columns in the layoutoptimizedFirstColumnWidth
(int width) Sets the width of the first column for special optimized mode for layouts created with this factory.spacing
(int hSpacing, int vSpacing) Sets the spacing for layouts created with this factory.useOptimized
(boolean use) Sets the special optimized mode for layouts created with this factory.
-
Method Details
-
createFrom
Creates a factory that creates copies of the given layout.- Parameters:
l
- layout to copy- Returns:
- a new AefGridLayoutFactory instance that creates copies of the given layout
-
copy
Creates a copy of the reciever.- Returns:
- a copy of the reciever
-
useOptimized
Sets the special optimized mode for layouts created with this factory. It works only with two column layouts.- Parameters:
use
- the value- Returns:
- this
-
optimizedFirstColumnWidth
Sets the width of the first column for special optimized mode for layouts created with this factory. It works only with two column layouts.- Parameters:
width
- the width- Returns:
- this
-
fillDefaults
Creates a AefGridLayoutFactory that creates AefGridLayouts with no margins and default dialog spacing.Initial values are:
- numColumns(1)
- margins(0,0)
- extendedMargins(0,0,0,0)
- spacing(LayoutConstants.getSpacing())
- equalWidth(false)
- Returns:
- a AefGridLayoutFactory that creates AefGridLayouts as though created with their default constructor
-
equalWidth
Sets whether the columns should be forced to be equal width- Parameters:
equal
- true iff the columns should be forced to be equal width- Returns:
- this
-
spacing
Sets the spacing for layouts created with this factory. The spacing is the distance between cells within the layout.- Parameters:
hSpacing
- horizontal spacing (pixels)vSpacing
- vertical spacing (pixels)- Returns:
- this
-
margins
Sets the margins for layouts created with this factory. The margins specify the number of pixels of horizontal and vertical margin that will be placed along the left/right and top/bottom edges of the layout. Note that thes margins will be added to the ones specified byextendedMargins(int, int, int, int)
.- Parameters:
width
- margin width (pixels)height
- margin height (pixels)- Returns:
- this
-
extendedMargins
Sets the margins for layouts created with this factory. The margins specify the number of pixels of horizontal and vertical margin that will be placed along the left, right, top, and bottom edges of the layout. Note that thes margins will be added to the ones specified bymargins(int, int)
.- Parameters:
left
- left margin size (pixels)right
- right margin size (pixels)top
- top margin size (pixels)bottom
- bottom margin size (pixels)- Returns:
- this
-
numColumns
Sets the number of columns in the layout- Parameters:
numColumns
- number of columns in the layout- Returns:
- this
-
create
Creates a new AefGridLayout, and initializes it with values from the factory.- Returns:
- a new initialized AefGridLayout.
- See Also:
-
applyTo
Creates a new AefGridLayout and attaches it to the given composite. Does not create the GridData of any of the controls in the composite.- Parameters:
c
- composite whose layout will be set- See Also:
-
#generateLayout
create()
AefGridLayoutFactory
-
copyLayout
Copies the given AefGridLayout instance- Parameters:
l
- layout to copy- Returns:
- a new AefGridLayout
-