Class DefaultZoomDpiConverter
java.lang.Object
org.eclipse.nebula.widgets.nattable.layer.AbstractDpiConverter
org.eclipse.nebula.widgets.nattable.layer.DefaultZoomDpiConverter
- All Implemented Interfaces:
IDpiConverter
Default implementation of an
IDpiConverter that provides the DPI and
scale factor based on the given zoom level and autoscale property.- Since:
- 2.7
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractDpiConverter
dpi, scaleFactor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatintgetDpi()Returns the dots per inch of the display.protected voidSets the value for the dpi member variable.Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractDpiConverter
convertDpiToPixel, convertPixelToDpi
-
Constructor Details
-
DefaultZoomDpiConverter
public DefaultZoomDpiConverter(org.eclipse.swt.widgets.Composite parent)
-
-
Method Details
-
readDpiFromDisplay
protected void readDpiFromDisplay()Description copied from class:AbstractDpiConverterSets the value for the dpi member variable.IMPORTANT:
Ensure the load operation is done in the UI thread!- Specified by:
readDpiFromDisplayin classAbstractDpiConverter
-
getDpi
public int getDpi()Description copied from interface:IDpiConverterReturns the dots per inch of the display.- Specified by:
getDpiin interfaceIDpiConverter- Overrides:
getDpiin classAbstractDpiConverter- Returns:
- the horizontal and vertical DPI
-
getCurrentDpiFactor
public float getCurrentDpiFactor()- Specified by:
getCurrentDpiFactorin interfaceIDpiConverter- Overrides:
getCurrentDpiFactorin classAbstractDpiConverter- Returns:
- The factor that will be used for the current DPI.
-