Package com.diffplug.common.swt
Class LayoutsRowLayout
A fluent api for setting and modifying a
RowLayout, created by Layouts.
Inspired by Moritz Post's blog post..-
Field Summary
Fields inherited from class com.diffplug.common.swt.LayoutWrapper
wrapped -
Method Summary
Modifier and TypeMethodDescriptioncenter(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.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.Makes this a horizontal layout.justify(boolean justify) justify specifies whether the controls in a row should be fully justified, with any extra space placed between the controls.margin(int margin) Sets marginWidth and marginHeight to the given value, and left/right/top/bottom to 0.marginBottom(int marginBottom) marginHeight(int marginHeight) marginLeft(int marginLeft) marginLeftRight(int left, int right) Sets marginWidth to 0, and left / right to the given values.marginRight(int marginRight) marginTop(int marginTop) marginTopBottom(int top, int bottom) Sets marginHeight to 0, and top / bottom to the given values.marginWidth(int marginWidth) pack(boolean pack) pack specifies whether all controls in the layout take their preferred size.spacing(int spacing) Sets the spacing to zero.vertical()Makes this a vertical layout.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 Details
-
margin
Sets marginWidth and marginHeight to the given value, and left/right/top/bottom to 0.- Specified by:
marginin classLayoutWrapper<RowLayout>
-
marginTopBottom
Sets marginHeight to 0, and top / bottom to the given values. -
marginLeftRight
Sets marginWidth to 0, and left / right to the given values. -
spacing
Sets the spacing to zero.- Specified by:
spacingin classLayoutWrapper<RowLayout>
-
vertical
Makes this a vertical layout. -
horizontal
Makes this a horizontal layout. -
marginWidth
-
marginHeight
-
marginLeft
-
marginTop
-
marginRight
-
marginBottom
-
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
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
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
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
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.
-