|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.util.AbstractUnitConverter
public abstract class AbstractUnitConverter
An abstract implementation of the UnitConverter
that minimizes
the effort required to convert font-dependent sizes to pixels.
DefaultUnitConverter
,
Size
,
Sizes
Constructor Summary | |
---|---|
AbstractUnitConverter()
|
Method Summary | |
---|---|
int |
centimeterAsPixel(double cm,
java.awt.Component component)
Converts Centimeters and answers pixels using the resolution of the given component's graphics object. |
int |
dialogUnitXAsPixel(int dluX,
java.awt.Component c)
Converts horizontal dialog units and answers pixels. |
int |
dialogUnitYAsPixel(int dluY,
java.awt.Component c)
Converts vertical dialog units and answers pixels. |
int |
inchAsPixel(double in,
java.awt.Component component)
Converts Inches and answers pixels using the specified resolution. |
int |
millimeterAsPixel(double mm,
java.awt.Component component)
Converts Millimeters and answers pixels using the resolution of the given component's graphics object. |
int |
pointAsPixel(int pt,
java.awt.Component component)
Converts DTP Points and answers pixels using the resolution of the given component's graphics object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractUnitConverter()
Method Detail |
---|
public int inchAsPixel(double in, java.awt.Component component)
inchAsPixel
in interface UnitConverter
in
- the Inchescomponent
- the component that provides the graphics object
public int millimeterAsPixel(double mm, java.awt.Component component)
millimeterAsPixel
in interface UnitConverter
mm
- Millimeterscomponent
- the component that provides the graphics object
public int centimeterAsPixel(double cm, java.awt.Component component)
centimeterAsPixel
in interface UnitConverter
cm
- Centimeterscomponent
- the component that provides the graphics object
public int pointAsPixel(int pt, java.awt.Component component)
pointAsPixel
in interface UnitConverter
pt
- DTP Pointscomponent
- the component that provides the graphics object
public int dialogUnitXAsPixel(int dluX, java.awt.Component c)
dialogUnitXAsPixel
in interface UnitConverter
dluX
- the horizontal dialog unitsc
- a Component that provides the font and graphics
public int dialogUnitYAsPixel(int dluY, java.awt.Component c)
dialogUnitYAsPixel
in interface UnitConverter
dluY
- the vertical dialog unitsc
- a Component that provides the font and graphics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |