|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.util.Unit
public final class Unit
This class implements a converter e.g for dimen values.
| Method Summary | |
|---|---|
static Dimen |
createDimenFromCM(double cm)
Create a new Dimen from a CM-value |
static float |
getDimenAsBP(FixedDimen value)
Returns the Dimen-value as BP (big point) |
static double |
getDimenAsCM(FixedDimen value)
Returns the Dimen-value as CM (centimeter) |
static double |
getDimenAsIN(FixedDimen value)
Returns the Dimen-value as IN (inch) |
static double |
getDimenAsMM(FixedDimen value)
Returns the Dimen-value as MM (milimeter) |
static double |
getDimenAsPT(FixedDimen value)
Return the Dimen-value as PT (point) |
static java.lang.String |
getDimenAsPTString(FixedDimen value)
Return the Dimen-value (round) as PT (point) as String. |
static java.lang.String |
getDimenAsPTString(FixedDimen value,
int round)
Return the Dimen-value (round) as PT (point) as String. |
static double |
round(double value,
int round)
Round the double-value to a number of decimals. |
static void |
setDimenFromCM(Dimen d,
float bp)
Set the Dimen-value from a BP-value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static float getDimenAsBP(FixedDimen value)
Dimen-value as BP (big point)
value - the Dimen
Dimen-value as BPpublic static double getDimenAsPT(FixedDimen value)
Dimen-value as PT (point)
value - the Dimen
Dimen-value as PTpublic static java.lang.String getDimenAsPTString(FixedDimen value)
Dimen-value (round) as PT (point) as String.
value - the Dimen
Dimen-value (round) as PT as String
public static java.lang.String getDimenAsPTString(FixedDimen value,
int round)
Dimen-value (round) as PT (point) as String.
value - the Dimenround - the round position
Dimen-value (round) as PT as Stringpublic static double getDimenAsMM(FixedDimen value)
Dimen-value as MM (milimeter)
value - the Dimen
Dimen-value as MMpublic static double getDimenAsCM(FixedDimen value)
Dimen-value as CM (centimeter)
value - the Dimen
Dimen-value as CMpublic static double getDimenAsIN(FixedDimen value)
Dimen-value as IN (inch)
value - the Dimen
Dimen-value as INpublic static Dimen createDimenFromCM(double cm)
Dimen from a CM-value
cm - the cm-value
Dimne from cm-value.
public static void setDimenFromCM(Dimen d,
float bp)
Dimen-value from a BP-value
d - the dimenbp - the bp-value
public static double round(double value,
int round)
value - the double-valueround - the number of decimals to round (not round: negative value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||