Closed tassadarius closed 3 years ago
From the commit message:
This newly added class works basically like a builder and helps in creating GridData objects which need properties such as widthHint, minimumWidth, or verticalIndent set.
Before you would had to create an own variable like so:
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.verticalIndent = 100; gd.heightHint = 60; myLabel.setLayoutData(gd);
But now it doesn't require a variable and looks IMHO nicer:
myLabel.setLayoutData(GridDataBuilder.with(SWT.FILL, SWT.FILL, true, true) .verticalIndent(100).heightHint(60).get());
Looks nice 👍🏻 Like the unit service, really well documented.
Add a convenience builder for GridData
From the commit message:
This newly added class works basically like a builder and helps in creating GridData objects which need properties such as widthHint, minimumWidth, or verticalIndent set.
Before you would had to create an own variable like so:
But now it doesn't require a variable and looks IMHO nicer: