Class ScalingUiBindingConfiguration

  • All Implemented Interfaces:
    IConfiguration

    public class ScalingUiBindingConfiguration
    extends AbstractUiBindingConfiguration
    Default configuration to add bindings to change the scaling / zoom level of a NatTable.
    Since:
    2.0
    • Constructor Detail

      • ScalingUiBindingConfiguration

        public ScalingUiBindingConfiguration​(NatTable natTable)
        Creates a new ZoomOutScalingAction without an updater.

        Note:
        Without an updater manually registered painters will not be updated and therefore won't reflect the udpated scaling. This only works in combination with theme styling, as the painter update is implemented in the themes internally.

        Parameters:
        natTable - The NatTable instance to which the scaling bindings should be added. Needed to attach the mouse scroll listener.
      • ScalingUiBindingConfiguration

        public ScalingUiBindingConfiguration​(NatTable natTable,
                                             Consumer<IConfigRegistry> updater)
        Creates a new ZoomOutScalingAction with the given updater.
        Parameters:
        updater - The updater that should be called on zoom operations. Needed to reflect the updated scaling. E.g. re-register ImagePainters like the CheckBoxPainter, otherwise the images will not be updated according to the scaling.
    • Method Detail

      • configureUiBindings

        public void configureUiBindings​(UiBindingRegistry uiBindingRegistry)
        Description copied from interface: IConfiguration
        Configure NatTable's UiBindingRegistry upon receiving this callback. A mechanism to customize key/mouse bindings.
        Parameters:
        uiBindingRegistry - The UiBindingRegistry instance to register ui bindings to.