public class SwingSizeHandler extends Object implements UnitSizeHandler, Serializable
Swing specific implementation of the SizeHandler interface.
Note: This implementation performs some caching to optimize performance, but it is not synchronized. So it must be ensured that an instance is accessed by a single thread only or that manual synchronization is performed.
| Constructor and Description |
|---|
SwingSizeHandler()
Creates a new instance of
SwingSizeHandler. |
| Modifier and Type | Method and Description |
|---|---|
double |
getFontSize(Object component,
boolean y)
Calculates the desired font size for the given component.
|
int |
getScreenResolution()
Returns the current screen resolution.
|
public SwingSizeHandler()
SwingSizeHandler.public double getFontSize(Object component, boolean y)
Component instance.getFontSize in interface UnitSizeHandlercomponent - the component (must not be null)y - the orientation flagIllegalArgumentException - if the component is nullpublic int getScreenResolution()
getScreenResolution in interface UnitSizeHandlerCopyright © 2016 The JGUIraffe Team. All rights reserved.