Package org.eclipse.jface.layout
Class FillLayoutFactory
java.lang.Object
org.eclipse.jface.layout.FillLayoutFactory
FillLayoutFactory creates and initializes
fill layouts
. It
is used as a shorthand for writing "new FillLayout()
" and
initializing some fields. In this case the main benefit is a more concise
syntax and the ability to create more than one identical FillLayout
from the same factory. Changing a property of the factory will affect future
layouts created by the factory, but has no effect on layouts that have
already been created.- Since:
- 3.26
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates a newFillLayout
and attaches it to the given composite.copy()
Creates a copy of the receiver.static FillLayout
Copies the givenFillLayout
instancecreate()
Creates a newFillLayout
, and initializes it with values from the factory.static FillLayoutFactory
Creates a factory that creates copies of the given layout.extendedMargins
(int width, int height) Sets the margins for layouts created with this factory.static FillLayoutFactory
Creates a factory that creates copies of the given layout.margins
(int width, int height) Sets the margins for layouts created with this factory.Sets the margins for layouts created with this factory.toString()
-
Method Details
-
fillDefaults
Creates a factory that creates copies of the given layout.- Returns:
- a new FillLayoutFactory instance with a new FillLayout
-
createFrom
Creates a factory that creates copies of the given layout.- Parameters:
l
- layout to copy- Returns:
- a new FillLayoutFactory instance that creates copies of the given layout
-
copy
Creates a copy of the receiver.- Returns:
- a copy of the receiver
-
margins
Sets the margins for layouts created with this factory. The margins are the distance between the outer cells and the edge of the layout.- Parameters:
margins
- margin size (pixels)- Returns:
- this
-
margins
Sets the margins for layouts created with this factory. The margins are the distance between the outer cells and the edge of the layout.- 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 width and height of the layout. Note that these margins will be added to the ones specified bymargins(int, int)
.- Parameters:
width
- width margin size (pixels)height
- height margin size (pixels)- Returns:
- this
- Since:
- 3.3
-
create
Creates a newFillLayout
, and initializes it with values from the factory.- Returns:
- a new initialized
FillLayout
. - See Also:
-
applyTo
Creates a newFillLayout
and attaches it to the given composite. Does not create the layout data of any of the controls in the composite.- Parameters:
c
- composite whose layout will be set- See Also:
-
copyLayout
Copies the givenFillLayout
instance- Parameters:
l
- layout to copy- Returns:
- a new FillLayout
-
toString
-