Package eu.webtoolkit.jwt
Enum LengthUnit
- java.lang.Object
-
- java.lang.Enum<LengthUnit>
-
- eu.webtoolkit.jwt.LengthUnit
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LengthUnit>
public enum LengthUnit extends java.lang.Enum<LengthUnit>
CSS length unit type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CentimeterCentimeter (cm)FontEmThe relative font size (em)FontExThe height of an 'x' in the font (ex)InchInch (in)MillimeterMillimeter (mm)PercentagePercentage (meaning context-sensitive) (%)PicaPica (12 Point) (pc)PixelPixel, relative to canvas resolution (px)PointPoint (1/72 Inch) (pt)ViewportHeightA percentage of the viewport's height (vh)ViewportMaxA percentage of the viewport's larger dimension (vmax)ViewportMinA percentage of the viewport's smaller dimension (vmin)ViewportWidthA percentage of the viewport's width (vw)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()Returns the numerical representation of this enum.static LengthUnitvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static LengthUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FontEm
public static final LengthUnit FontEm
The relative font size (em)
-
FontEx
public static final LengthUnit FontEx
The height of an 'x' in the font (ex)
-
Pixel
public static final LengthUnit Pixel
Pixel, relative to canvas resolution (px)
-
Inch
public static final LengthUnit Inch
Inch (in)
-
Centimeter
public static final LengthUnit Centimeter
Centimeter (cm)
-
Millimeter
public static final LengthUnit Millimeter
Millimeter (mm)
-
Point
public static final LengthUnit Point
Point (1/72 Inch) (pt)
-
Pica
public static final LengthUnit Pica
Pica (12 Point) (pc)
-
Percentage
public static final LengthUnit Percentage
Percentage (meaning context-sensitive) (%)
-
ViewportWidth
public static final LengthUnit ViewportWidth
A percentage of the viewport's width (vw)Note: Internet Explorer only supports vw since version 9
-
ViewportHeight
public static final LengthUnit ViewportHeight
A percentage of the viewport's height (vh)Note: Internet Explorer only supports vh since version 9
-
ViewportMin
public static final LengthUnit ViewportMin
A percentage of the viewport's smaller dimension (vmin)Note: Internet Explorer only supports vmin since version 9
-
ViewportMax
public static final LengthUnit ViewportMax
A percentage of the viewport's larger dimension (vmax)Note: Not supported on Internet Explorer
-
-
Method Detail
-
values
public static LengthUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LengthUnit c : LengthUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LengthUnit valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
public int getValue()
Returns the numerical representation of this enum.
-
-