Package com._1c.g5.aef2.standard.layout
Class AefGridLayoutFactory
- java.lang.Object
- 
- com._1c.g5.aef2.standard.layout.AefGridLayoutFactory
 
- 
 public class AefGridLayoutFactory extends Object Aef grid layout factory. Helps to buildAefGridLayoutobjects.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyTo(CompositeViewModel c)Creates a new AefGridLayout and attaches it to the given composite.AefGridLayoutFactorycopy()Creates a copy of the reciever.static AefGridLayoutcopyLayout(AefGridLayout l)Copies the given AefGridLayout instanceAefGridLayoutcreate()Creates a new AefGridLayout, and initializes it with values from the factory.static AefGridLayoutFactorycreateFrom(AefGridLayout l)Creates a factory that creates copies of the given layout.AefGridLayoutFactoryequalWidth(boolean equal)Sets whether the columns should be forced to be equal widthAefGridLayoutFactoryextendedMargins(int left, int right, int top, int bottom)Sets the margins for layouts created with this factory.static AefGridLayoutFactoryfillDefaults()Creates a AefGridLayoutFactory that creates AefGridLayouts with no margins and default dialog spacing.AefGridLayoutFactorymargins(int width, int height)Sets the margins for layouts created with this factory.AefGridLayoutFactorynumColumns(int numColumns)Sets the number of columns in the layoutAefGridLayoutFactoryoptimizedFirstColumnWidth(int width)Sets the width of the first column for special optimized mode for layouts created with this factory.AefGridLayoutFactoryspacing(int hSpacing, int vSpacing)Sets the spacing for layouts created with this factory.AefGridLayoutFactoryuseOptimized(boolean use)Sets the special optimized mode for layouts created with this factory.
 
- 
- 
- 
Method Detail- 
createFrompublic static AefGridLayoutFactory createFrom(AefGridLayout l) 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
 
 - 
copypublic AefGridLayoutFactory copy() Creates a copy of the reciever.- Returns:
- a copy of the reciever
 
 - 
useOptimizedpublic AefGridLayoutFactory useOptimized(boolean use) Sets the special optimized mode for layouts created with this factory. It works only with two column layouts.- Parameters:
- use- the value
- Returns:
- this
 
 - 
optimizedFirstColumnWidthpublic AefGridLayoutFactory optimizedFirstColumnWidth(int width) 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
 
 - 
fillDefaultspublic static AefGridLayoutFactory 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
 
 - 
equalWidthpublic AefGridLayoutFactory equalWidth(boolean equal) 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
 
 - 
spacingpublic AefGridLayoutFactory spacing(int hSpacing, int vSpacing) 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
 
 - 
marginspublic AefGridLayoutFactory margins(int width, int height) 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
 
 - 
extendedMarginspublic AefGridLayoutFactory extendedMargins(int left, int right, int top, int bottom) 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
 
 - 
numColumnspublic AefGridLayoutFactory numColumns(int numColumns) Sets the number of columns in the layout- Parameters:
- numColumns- number of columns in the layout
- Returns:
- this
 
 - 
createpublic AefGridLayout create() Creates a new AefGridLayout, and initializes it with values from the factory.- Returns:
- a new initialized AefGridLayout.
- See Also:
- applyTo(com._1c.g5.aef2.standard.viewModels.CompositeViewModel)
 
 - 
applyTopublic void applyTo(CompositeViewModel c) 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
 
 - 
copyLayoutpublic static AefGridLayout copyLayout(AefGridLayout l) Copies the given AefGridLayout instance- Parameters:
- l- layout to copy
- Returns:
- a new AefGridLayout
 
 
- 
 
-