Package org.eclipse.swt.internal

# Class DPIZoomChangeRegistry

java.lang.Object
org.eclipse.swt.internal.DPIZoomChangeRegistry

public class DPIZoomChangeRegistry extends Object

## Constructor Summary

Constructors
Constructor
Description
`DPIZoomChangeRegistry()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`applyChange(Widget widget, int newZoom, float scalingFactor)`
Calling this method will propagate the zoom change to all registered handlers that are responsible for the class of the provided widget or one of its super classes or interfaces.
`static void`
`registerHandler(DPIZoomChangeHandler zoomChangeVisitor, Class<? extends Widget> clazzToRegisterFor)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DPIZoomChangeRegistry

public DPIZoomChangeRegistry()

## Method Details

### applyChange

public static void applyChange(Widget widget, int newZoom, float scalingFactor)
Calling this method will propagate the zoom change to all registered handlers that are responsible for the class of the provided widget or one of its super classes or interfaces. Usually there will be multiple handlers called per widget. To have a reliable and consistent execution order, the handler responsible for the most general class in the class hierarchy is called first, e.g. if a `Composite` is updated, the handlers are executed like (`Widget` -> `Control` -> `Scrollable` -> `Composite`). Each handler should only take care to update the attributes the class, it is registered for, adds to the hierarchy.

Parameters:
  `widget` - widget the zoom change shall be applied to
  `newZoom` - zoom in % of the standard resolution to be applied to the widget
  `scalingFactor` - factor as division between new zoom and old zoom, e.g. 1.5 for a scaling from 100% to 150%

### registerHandler

public static void registerHandler(DPIZoomChangeHandler zoomChangeVisitor, Class<? extends Widget> clazzToRegisterFor)