Skip to content

Issues with GridLayout and GridData #35

@fipro78

Description

@fipro78

I tried to start the NatTable examples application as a plain SWT application using SWT Evolve instead of the native SWT implementation. There seem to be some layout issues for the GridLayout.

With native SWT it looks like this:

Image

When I exchange the native SWT fragment with the SWT Evolve fragment, it looks like this:

Image

You can see that there are some issues with the GridLayout.
The tree on the left side has GridData with widthHint set as you can see here
https://github.com/eclipse-nattable/nattable/blob/c10a168d763dfc6b461c9ab030625300fa19a1d5/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/runner/TabbedNatExampleRunner.java#L83

The widthHint seems to be ignored, as the width is smaller than it should.

On the right side you can see that the View Source link is misplaced. First it should be at the bottom, as the table is configured with new GridData(GridData.FILL_BOTH)
https://github.com/eclipse-nattable/nattable/blob/c10a168d763dfc6b461c9ab030625300fa19a1d5/org.eclipse.nebula.widgets.nattable.examples/src/org/eclipse/nebula/widgets/nattable/examples/runner/TabbedNatExampleRunner.java#L207

And the View Source link is cut. Actually the link control is missing a GridData. But in SWT it stretches so the whole control is visible. The Evolve implementation simply seems to cut it in such a case.

To test this you can simply download the NatTableExamples.jar from the link above, put it together with the SWT jar and the SWT Evolve jar in a folder and launch it via

java -cp * org.eclipse.nebula.widgets.nattable.examples.NatTableExamples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions