public enum Unit extends Enum<Unit>
Modifier and Type | Method and Description |
---|---|
double |
convertFromPoints(double points) |
double |
convertToPoints(double unit) |
double |
getDotsPerUnit() |
double |
getTickSize(double sf) |
static Unit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Unit POINTS
public static final Unit PICA
public static final Unit MM
public static final Unit CM
public static final Unit INCH
public static Unit[] values()
for (Unit c : Unit.values()) System.out.println(c);
public static Unit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic double getDotsPerUnit()
public double convertFromPoints(double points)
public double convertToPoints(double unit)
public double getTickSize(double sf)
Copyright © 2017 Hitachi Vantara. All rights reserved.