public interface UnitConverter
Sizes
class
delegates all size conversions to an implementation of this interface.Sizes
,
ConstantSize
,
AbstractUnitConverter
,
DefaultUnitConverter
Modifier and Type | Method and Description |
---|---|
int |
centimeterAsPixel(double cm,
java.awt.Component component)
Converts Centimeters and returns pixels using the resolution of the
given component's graphics object.
|
int |
dialogUnitXAsPixel(int dluX,
java.awt.Component component)
Converts horizontal dialog units and returns pixels.
|
int |
dialogUnitYAsPixel(int dluY,
java.awt.Component component)
Converts vertical dialog units and returns pixels.
|
int |
inchAsPixel(double in,
java.awt.Component component)
Converts Inches and returns pixels using the specified resolution.
|
int |
millimeterAsPixel(double mm,
java.awt.Component component)
Converts Millimeters and returns pixels using the resolution of the
given component's graphics object.
|
int |
pointAsPixel(int pt,
java.awt.Component component)
Converts DTP Points and returns pixels using the resolution of the
given component's graphics object.
|
int inchAsPixel(double in, java.awt.Component component)
in
- the Inchescomponent
- the component that provides the graphics objectint millimeterAsPixel(double mm, java.awt.Component component)
mm
- Millimeterscomponent
- the component that provides the graphics objectint centimeterAsPixel(double cm, java.awt.Component component)
cm
- Centimeterscomponent
- the component that provides the graphics objectint pointAsPixel(int pt, java.awt.Component component)
pt
- DTP Pointscomponent
- the component that provides the graphics objectint dialogUnitXAsPixel(int dluX, java.awt.Component component)
dluX
- the horizontal dialog unitscomponent
- a component that provides the font and graphicsint dialogUnitYAsPixel(int dluY, java.awt.Component component)
dluY
- the vertical dialog unitscomponent
- a component that provides the font and graphics