public interface UnitSizeHandler
Definition of an interface for performing size calculations in a manner independent of a certain component model.
This interface is used by the Unit
class to perform unit to pixel
calculations. For some unit types access to certain internal details of the
affected components is needed, e.g. to the font for determining the font
size. This interface has the purpose of abstracting such direct accesses, so
that there can be multiple implementations for different GUI libraries (e.g.
Swing and SWT).
Modifier and Type | Method and Description |
---|---|
double |
getFontSize(Object component,
boolean y)
Determines the font size of the given component for the specified
orientation.
|
int |
getScreenResolution()
Returns the screen resolution in dots per inch (dpi).
|
double getFontSize(Object component, boolean y)
component
- the componenty
- the orientation flag ( true for Y or vertical,
false for X or horizontalint getScreenResolution()
Copyright © 2016 The JGUIraffe Team. All rights reserved.