Search code examples
javaeclipse-rcpnattable

How to add zoom in and zoom out buttons in Nattable


There is way to zoom in and zoom out in Nattable 2.0 onwards.

(http://blog.vogella.com/2020/03/05/nattable-dynamic-scaling-enhancements/)

But how to make this functionality work on button clicks similar to browser.

Expected zoom in and zoom out view


Solution

  • The blog post says:

    The dynamic scaling can be triggered programmatically by executing the ConfigureScalingCommand on the NatTable instance.

    So you need to implement such buttons in your UI that execute the ConfigureScalingCommand with the according parameters.