|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface that describes how to convert general sizes to pixel sizes.
For example, dialog units require a conversion that honors the font
and resolution. The
Sizes
class delegates
all size conversions to an implementation of this interface.
NOTE: This code is part of the JGoodies Forms port.
Method Summary | |
int |
centimeterAsPixel(double cm,
JQComponent component)
Converts Centimeters and returns pixels using the resolution of the given component's graphics object. |
int |
dialogUnitXAsPixel(int dluX,
JQComponent component)
Converts horizontal dialog units and returns pixels. |
int |
dialogUnitYAsPixel(int dluY,
JQComponent component)
Converts vertical dialog units and returns pixels. |
int |
inchAsPixel(double in,
JQComponent component)
Converts Inches and returns pixels using the specified resolution. |
int |
millimeterAsPixel(double mm,
JQComponent component)
Converts Millimeters and returns pixels using the resolution of the given component's graphics object. |
int |
pointAsPixel(int pt,
JQComponent component)
Converts DTP Points and returns pixels using the resolution of the given component's graphics object. |
Method Detail |
public int inchAsPixel(double in, JQComponent component)
in
- the Inchescomponent
- the component that provides the graphics object
public int millimeterAsPixel(double mm, JQComponent component)
mm
- Millimeterscomponent
- the component that provides the graphics object
public int centimeterAsPixel(double cm, JQComponent component)
cm
- Centimeterscomponent
- the component that provides the graphics object
public int pointAsPixel(int pt, JQComponent component)
pt
- DTP Pointscomponent
- the component that provides the graphics object
public int dialogUnitXAsPixel(int dluX, JQComponent component)
dluX
- the horizontal dialog unitscomponent
- a component that provides the font and graphics
public int dialogUnitYAsPixel(int dluY, JQComponent component)
dluY
- the vertical dialog unitscomponent
- a component that provides the font and graphics
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |