-
Notifications
You must be signed in to change notification settings - Fork 4
Separator
greipadmin edited this page Feb 8, 2017
·
9 revisions
The Separator widget is composed of a line and optionally an text and an image.
- Separator(Composite parent, int style) or
- Separator(Composite parent, int style, LineStyle lineStyle)
- parent, the parent Composite
- style, the style flags SWT.VERTICAL or SWT.HORIZONTAL. The default is SWT.HORIZONTAL.
- lineStyle, the style of the line. Default is LineStyle.ShadowIn.
- setImage(Image)
- setText(String)
- Colors and font
- setBackground(Color) sets the background color.
- setForeground(Color) sets the text color.
- setLineColor(Color) sets the line color. This color is used for all line styles excluding ShowIn and ShadowOut. Default is the defined foreground color.
- setFont(Font) sets the text font.
- Margins and spacing
- setIndent(int) defines the distance between the left border and the image in pixels.
- setSpacing(int) defines the space beween image and text in pixels.
- setMarginWidth(int) and setMarginHeight(int) sets the widgets margins.