eclipse-nattable / nattable

High performance SWT data grid
https://eclipse.dev/nattable/
Eclipse Public License 2.0
15 stars 6 forks source link

[TextPainter] add option to disable word cutting #55

Closed fipro78 closed 7 months ago

fipro78 commented 8 months ago

Currently the AbstractTextPainter always applies the three dots at the end of a text in case there is not enough space to render the full text. The only way to avoid this is currently to enable the automatic length calculation, which ensures that for example the column width has the width to show the whole text. This is then even done by resizing the column if necessary.

There are use cases where users don't want the three dot behavior, but simply cut of the text without modification. This should be easily possible, as the GC clipping would simply cut the text. But it is currently not possible for a user to achieve this.

IIRC it was possible in the past, but probably got lost with the implementation of the automatic size calculation by text length.

To disable the text modification, we should introduce a new configuration parameter, that by default is true. Whether the text should be modified or not is then done dependent on that configuration.

fipro78 commented 7 months ago

Implemented and verified by user project