@OpenApi
public class ZoomHelper
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
static int | 
getOriginalSize(int scaledSize,
               float zoomFactor)
Opposite method to  
getScaledSize(int, float). | 
static java.awt.Font | 
getScaledFont(java.awt.Font font,
             float zoomFactor)
Takes the provided font and scales it's size by the given zoomFactor. 
 | 
static javax.swing.Icon | 
getScaledIcon(javax.swing.Icon icon,
             float zoomFactor)
Takes the provided icon and scales it's size by the given zoomFactor. 
 | 
static int | 
getScaledSize(int size,
             float zoomFactor)
Takes the provided integer and scales (multiplies) it by the given zoomFactor. 
 | 
static boolean | 
zoomComponent(java.awt.Component component,
             float zoomFactor)
If component implements  
Zoomable interface, zooms the component by the given factor. | 
static boolean | 
zoomComponents(java.awt.Container container,
              float zoomFactor)
Iterates through inner components recursively and zooms all components that implement  
Zoomable interface. | 
@OpenApi
public static int getScaledSize(int size,
                                         float zoomFactor)
@OpenApi
public static int getOriginalSize(int scaledSize,
                                           float zoomFactor)
getScaledSize(int, float).
 Takes the provided scaledSize, which is already scaled by the given zoomFactor and returns the original not scaled size,
 by dividing the scaledSize from zoomFactor.@OpenApi
 @CheckForNull
public static java.awt.Font getScaledFont(@CheckForNull
                                                                  java.awt.Font font,
                                                                  float zoomFactor)
@OpenApi
 @CheckForNull
public static javax.swing.Icon getScaledIcon(@CheckForNull
                                                                     javax.swing.Icon icon,
                                                                     float zoomFactor)
@OpenApi
public static boolean zoomComponent(java.awt.Component component,
                                             float zoomFactor)
Zoomable interface, zooms the component by the given factor.
 If component does not implement Zoomable, but it is a Container, then looks for Zoomable inner components recursively and zooms each of them.zoomComponents(java.awt.Container, float)@OpenApi
public static boolean zoomComponents(java.awt.Container container,
                                              float zoomFactor)
Zoomable interface.