Package com.diffplug.common.swt
Class LayoutsRowLayout
- java.lang.Object
-
- com.diffplug.common.swt.LayoutWrapper<RowLayout>
-
- com.diffplug.common.swt.LayoutsRowLayout
-
public class LayoutsRowLayout extends LayoutWrapper<RowLayout>
A fluent api for setting and modifying aRowLayout
, created byLayouts
. Inspired by Moritz Post's blog post..
-
-
Field Summary
-
Fields inherited from class com.diffplug.common.swt.LayoutWrapper
wrapped
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayoutsRowLayout
center(boolean center)
center specifies whether the controls in a row should be centered vertically in each cell for horizontal layouts, or centered horizontally in each cell for vertical layouts.LayoutsRowLayout
fill(boolean fill)
fill specifies whether the controls in a row should be all the same height for horizontal layouts, or the same width for vertical layouts.LayoutsRowLayout
horizontal()
Makes this a horizontal layout.LayoutsRowLayout
justify(boolean justify)
justify specifies whether the controls in a row should be fully justified, with any extra space placed between the controls.LayoutsRowLayout
margin(int margin)
Sets marginWidth and marginHeight to the given value, and left/right/top/bottom to 0.LayoutsRowLayout
marginBottom(int marginBottom)
LayoutsRowLayout
marginHeight(int marginHeight)
LayoutsRowLayout
marginLeft(int marginLeft)
LayoutsRowLayout
marginLeftRight(int left, int right)
Sets marginWidth to 0, and left / right to the given values.LayoutsRowLayout
marginRight(int marginRight)
LayoutsRowLayout
marginTop(int marginTop)
LayoutsRowLayout
marginTopBottom(int top, int bottom)
Sets marginHeight to 0, and top / bottom to the given values.LayoutsRowLayout
marginWidth(int marginWidth)
LayoutsRowLayout
pack(boolean pack)
pack specifies whether all controls in the layout take their preferred size.LayoutsRowLayout
spacing(int spacing)
Sets the spacing to zero.LayoutsRowLayout
vertical()
Makes this a vertical layout.LayoutsRowLayout
wrap(boolean wrap)
wrap specifies whether a control will be wrapped to the next row if there is insufficient space on the current row.-
Methods inherited from class com.diffplug.common.swt.LayoutWrapper
getRaw, setMarginAndSpacingToDefault
-
-
-
-
Method Detail
-
margin
public LayoutsRowLayout margin(int margin)
Sets marginWidth and marginHeight to the given value, and left/right/top/bottom to 0.- Specified by:
margin
in classLayoutWrapper<RowLayout>
-
marginTopBottom
public LayoutsRowLayout marginTopBottom(int top, int bottom)
Sets marginHeight to 0, and top / bottom to the given values.
-
marginLeftRight
public LayoutsRowLayout marginLeftRight(int left, int right)
Sets marginWidth to 0, and left / right to the given values.
-
spacing
public LayoutsRowLayout spacing(int spacing)
Sets the spacing to zero.- Specified by:
spacing
in classLayoutWrapper<RowLayout>
-
vertical
public LayoutsRowLayout vertical()
Makes this a vertical layout.
-
horizontal
public LayoutsRowLayout horizontal()
Makes this a horizontal layout.
-
marginWidth
public LayoutsRowLayout marginWidth(int marginWidth)
-
marginHeight
public LayoutsRowLayout marginHeight(int marginHeight)
-
marginLeft
public LayoutsRowLayout marginLeft(int marginLeft)
-
marginTop
public LayoutsRowLayout marginTop(int marginTop)
-
marginRight
public LayoutsRowLayout marginRight(int marginRight)
-
marginBottom
public LayoutsRowLayout marginBottom(int marginBottom)
-
wrap
public LayoutsRowLayout wrap(boolean wrap)
wrap specifies whether a control will be wrapped to the next row if there is insufficient space on the current row.The default value is true.
-
pack
public LayoutsRowLayout pack(boolean pack)
pack specifies whether all controls in the layout take their preferred size. If pack is false, all controls will have the same size which is the size required to accommodate the largest preferred height and the largest preferred width of all the controls in the layout.The default value is true.
-
fill
public LayoutsRowLayout fill(boolean fill)
fill specifies whether the controls in a row should be all the same height for horizontal layouts, or the same width for vertical layouts.The default value is false.
-
center
public LayoutsRowLayout center(boolean center)
center specifies whether the controls in a row should be centered vertically in each cell for horizontal layouts, or centered horizontally in each cell for vertical layouts.The default value is false.
-
justify
public LayoutsRowLayout justify(boolean justify)
justify specifies whether the controls in a row should be fully justified, with any extra space placed between the controls.The default value is false.
-
-