Package de.xima.fc.css.builder
Enum ECssUnit
- java.lang.Object
-
- java.lang.Enum<ECssUnit>
-
- de.xima.fc.css.builder.ECssUnit
-
- All Implemented Interfaces:
Serializable
,Comparable<ECssUnit>
public enum ECssUnit extends Enum<ECssUnit>
Enumeration of CSS units.- Author:
- XIMA MEDIA GmbH
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CAP
Shortcut forCAPITAL_HEIGHT
.CAPITAL_HEIGHT
CSS unit for the cap-height in the element's font, approximately equal to the height of a capital Latin letter.CENTIMETERS
CSS unit centimeters. 1cm = 96px/2.54CH
Shortcut forCHARACTER_UNIT
.CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the element's font.CM
Shortcut forCENTIMETERS
.DEG
Shortcut forDEGREES
.DEGREES
CSS unit degree.DOTS_PER_CENTIMETER
CSS unit dots per centimeter.DOTS_PER_INCH
CSS unit dots per inch.DOTS_PER_PIXEL
CSS unit dots per pixel.DPCM
Shortcut forDOTS_PER_CENTIMETER
.DPI
Shortcut forDOTS_PER_INCH
.DPPX
Shortcut forDOTS_PER_PIXEL
.DVH
Shortcut forDYNAMIC_VIEWPORT_HEIGHT
.DVW
Shortcut forDYNAMIC_VIEWPORT_WIDTH
.DYNAMIC_VIEWPORT_HEIGHT
CSS unit for 1% of the dynamic viewport's height.DYNAMIC_VIEWPORT_WIDTH
CSS unit for 1% of the dynamic viewport's width.EM
Shortcut forFONT_SIZE
.EX
Shortcut forX_HEIGHT
.FONT_SIZE
CSS unit for the font size of the parent.GRAD
Shortcut forGRADIANS
.GRADIANS
CSS unit gradians.HERTZ
CSS unit for Hertz (1/second).HZ
Shortcut forHERTZ
.IC
Shortcut forINTERNATIONAL_CHARACTER_UNIT
.IN
Shortcut forINCHES
.INCHES
CSS unit inches. 1in = 2.54cm = 96pxINTERNATIONAL_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the element's font.KHZ
Shortcut forKILOHERTZ
.KILOHERTZ
CSS unit for Kilohertz (1000/second).LARGE_VIEWPORT_HEIGHT
CSS unit for 1% of the large viewport's height.LARGE_VIEWPORT_WIDTH
CSS unit for 1% of the large viewport's width.LH
Shortcut forLINE_HEIGHT
.LINE_HEIGHT
CSS unit for the Line height of the element.LVH
Shortcut forLARGE_VIEWPORT_HEIGHT
.LVW
Shortcut forLARGE_VIEWPORT_WIDTH
.MILLIMETERS
CSS unit millimeters. 1mm = 1/10th of 1cm.MILLISECONDS
CSS unit milliseconds.MM
Shortcut forMILLIMETERS
.MS
Shortcut forMILLISECONDS
.PC
Shortcut forPICAS
.PERCENT
CSS unit percent.PICAS
CSS unit picas. 1pc = 1/6th of 1in.PIXELS
CSS unit pixels. 1px = 1/96th of 1in.POINTS
CSS unit points. 1pt = 1/72th of 1in.PT
Shortcut forPOINTS
.PX
Shortcut forPIXELS
.Q
Shortcut forQUARTER_MILLIMETERS
.QUARTER_MILLIMETERS
CSS unit quarter millimeters. 1Q = 1/40th of 1cm.RAD
Shortcut forRADIANS
.RADIANS
CSS unit radians.RCH
Shortcut forROOT_CHARACTER_UNIT
.REM
Shortcut forROOT_FONT_SIZE
.REX
Shortcut forROOT_X_HEIGHT
.RIC
Shortcut forROOT_INTERNATIONAL_CHARACTER_UNIT
.RLH
Shortcut forROOT_LINE_HEIGHT
.ROOT_CAP
Shortcut forROOT_CAPITAL_HEIGHT
.ROOT_CAPITAL_HEIGHT
CSS unit for the cap-height in the root element's font, approximately equal to the height of a capital Latin letter.ROOT_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the root element's font.ROOT_FONT_SIZE
CSS unit for the font size of the root element.ROOT_INTERNATIONAL_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the root element's font.ROOT_LINE_HEIGHT
CSS unit for the Line height of the element of the root element.ROOT_X_HEIGHT
CSS unit for the x-height of the root element's font.S
Shortcut forSECONDS
.SECONDS
CSS unit seconds.SMALL_VIEWPORT_HEIGHT
CSS unit for 1% of the small viewport's height.SMALL_VIEWPORT_WIDTH
CSS unit for 1% of the small viewport's width.SVH
Shortcut forSMALL_VIEWPORT_HEIGHT
.SVW
Shortcut forSMALL_VIEWPORT_WIDTH
.TURN
Shortcut forTURNS
.TURNS
CSS unit turns (1 turn = 360 degrees).VB
Shortcut forVIEWPORT_BLOCK_AXIS
.VH
Shortcut forVIEWPORT_HEIGHT
.VI
Shortcut forVIEWPORT_INLINE_AXIS
.VIEWPORT_BLOCK_AXIS
CSS unit for 1% of the size of the initial containing block in the direction of the root element's block axis.VIEWPORT_HEIGHT
CSS unit 1% of the viewport's height.VIEWPORT_INLINE_AXIS
CSS unit for 1% of the size of the initial containing block in the direction of the root element's inline axis.VIEWPORT_MAX
CSS unit for 1% of the viewport's large dimensionVIEWPORT_MIN
CSS unit for 1% of the viewport's smaller dimensionVIEWPORT_WIDTH
CSS unit for 1% of the viewport's width..VMAX
Shortcut forVIEWPORT_MAX
.VMIN
Shortcut forVIEWPORT_MIN
.VW
Shortcut forVIEWPORT_WIDTH
.X_HEIGHT
CSS unit for the x-height of the element's font.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
amount(double value)
String
amount(long value)
String
toString()
String
value()
static ECssUnit
valueOf(String name)
Returns the enum constant of this type with the specified name.static ECssUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CAPITAL_HEIGHT
public static final ECssUnit CAPITAL_HEIGHT
CSS unit for the cap-height in the element's font, approximately equal to the height of a capital Latin letter.
-
CAP
public static final ECssUnit CAP
Shortcut forCAPITAL_HEIGHT
.
-
CENTIMETERS
public static final ECssUnit CENTIMETERS
CSS unit centimeters. 1cm = 96px/2.54
-
CM
public static final ECssUnit CM
Shortcut forCENTIMETERS
.
-
CHARACTER_UNIT
public static final ECssUnit CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the element's font.
-
CH
public static final ECssUnit CH
Shortcut forCHARACTER_UNIT
.
-
DEGREES
public static final ECssUnit DEGREES
CSS unit degree.
-
DOTS_PER_CENTIMETER
public static final ECssUnit DOTS_PER_CENTIMETER
CSS unit dots per centimeter.
-
DPCM
public static final ECssUnit DPCM
Shortcut forDOTS_PER_CENTIMETER
.
-
DOTS_PER_INCH
public static final ECssUnit DOTS_PER_INCH
CSS unit dots per inch.
-
DPI
public static final ECssUnit DPI
Shortcut forDOTS_PER_INCH
.
-
DOTS_PER_PIXEL
public static final ECssUnit DOTS_PER_PIXEL
CSS unit dots per pixel.
-
DPPX
public static final ECssUnit DPPX
Shortcut forDOTS_PER_PIXEL
.
-
DYNAMIC_VIEWPORT_HEIGHT
public static final ECssUnit DYNAMIC_VIEWPORT_HEIGHT
CSS unit for 1% of the dynamic viewport's height.
-
DVH
public static final ECssUnit DVH
Shortcut forDYNAMIC_VIEWPORT_HEIGHT
.
-
DYNAMIC_VIEWPORT_WIDTH
public static final ECssUnit DYNAMIC_VIEWPORT_WIDTH
CSS unit for 1% of the dynamic viewport's width.
-
DVW
public static final ECssUnit DVW
Shortcut forDYNAMIC_VIEWPORT_WIDTH
.
-
FONT_SIZE
public static final ECssUnit FONT_SIZE
CSS unit for the font size of the parent.
-
GRADIANS
public static final ECssUnit GRADIANS
CSS unit gradians.
-
HERTZ
public static final ECssUnit HERTZ
CSS unit for Hertz (1/second).
-
INCHES
public static final ECssUnit INCHES
CSS unit inches. 1in = 2.54cm = 96px
-
INTERNATIONAL_CHARACTER_UNIT
public static final ECssUnit INTERNATIONAL_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the element's font.
-
IC
public static final ECssUnit IC
Shortcut forINTERNATIONAL_CHARACTER_UNIT
.
-
KILOHERTZ
public static final ECssUnit KILOHERTZ
CSS unit for Kilohertz (1000/second).
-
LARGE_VIEWPORT_HEIGHT
public static final ECssUnit LARGE_VIEWPORT_HEIGHT
CSS unit for 1% of the large viewport's height.
-
LVH
public static final ECssUnit LVH
Shortcut forLARGE_VIEWPORT_HEIGHT
.
-
LARGE_VIEWPORT_WIDTH
public static final ECssUnit LARGE_VIEWPORT_WIDTH
CSS unit for 1% of the large viewport's width.
-
LVW
public static final ECssUnit LVW
Shortcut forLARGE_VIEWPORT_WIDTH
.
-
LINE_HEIGHT
public static final ECssUnit LINE_HEIGHT
CSS unit for the Line height of the element.
-
LH
public static final ECssUnit LH
Shortcut forLINE_HEIGHT
.
-
MILLIMETERS
public static final ECssUnit MILLIMETERS
CSS unit millimeters. 1mm = 1/10th of 1cm.
-
MM
public static final ECssUnit MM
Shortcut forMILLIMETERS
.
-
MILLISECONDS
public static final ECssUnit MILLISECONDS
CSS unit milliseconds. There are 1000 milliseconds in a second.
-
MS
public static final ECssUnit MS
Shortcut forMILLISECONDS
.
-
PERCENT
public static final ECssUnit PERCENT
CSS unit percent.
-
PICAS
public static final ECssUnit PICAS
CSS unit picas. 1pc = 1/6th of 1in.
-
PIXELS
public static final ECssUnit PIXELS
CSS unit pixels. 1px = 1/96th of 1in.
-
POINTS
public static final ECssUnit POINTS
CSS unit points. 1pt = 1/72th of 1in.
-
QUARTER_MILLIMETERS
public static final ECssUnit QUARTER_MILLIMETERS
CSS unit quarter millimeters. 1Q = 1/40th of 1cm.
-
Q
public static final ECssUnit Q
Shortcut forQUARTER_MILLIMETERS
.
-
RADIANS
public static final ECssUnit RADIANS
CSS unit radians.
-
ROOT_CAPITAL_HEIGHT
public static final ECssUnit ROOT_CAPITAL_HEIGHT
CSS unit for the cap-height in the root element's font, approximately equal to the height of a capital Latin letter.
-
ROOT_CAP
public static final ECssUnit ROOT_CAP
Shortcut forROOT_CAPITAL_HEIGHT
.
-
ROOT_CHARACTER_UNIT
public static final ECssUnit ROOT_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "0" of the root element's font.
-
RCH
public static final ECssUnit RCH
Shortcut forROOT_CHARACTER_UNIT
.
-
ROOT_FONT_SIZE
public static final ECssUnit ROOT_FONT_SIZE
CSS unit for the font size of the root element.
-
REM
public static final ECssUnit REM
Shortcut forROOT_FONT_SIZE
.
-
ROOT_INTERNATIONAL_CHARACTER_UNIT
public static final ECssUnit ROOT_INTERNATIONAL_CHARACTER_UNIT
CSS unit for the advance measure (advance width or height, whichever is in the inline axis of the element) of the glyph "水" of the root element's font.
-
RIC
public static final ECssUnit RIC
Shortcut forROOT_INTERNATIONAL_CHARACTER_UNIT
.
-
ROOT_LINE_HEIGHT
public static final ECssUnit ROOT_LINE_HEIGHT
CSS unit for the Line height of the element of the root element.
-
RLH
public static final ECssUnit RLH
Shortcut forROOT_LINE_HEIGHT
.
-
ROOT_X_HEIGHT
public static final ECssUnit ROOT_X_HEIGHT
CSS unit for the x-height of the root element's font.
-
REX
public static final ECssUnit REX
Shortcut forROOT_X_HEIGHT
.
-
SECONDS
public static final ECssUnit SECONDS
CSS unit seconds.
-
SMALL_VIEWPORT_HEIGHT
public static final ECssUnit SMALL_VIEWPORT_HEIGHT
CSS unit for 1% of the small viewport's height.
-
SVH
public static final ECssUnit SVH
Shortcut forSMALL_VIEWPORT_HEIGHT
.
-
SMALL_VIEWPORT_WIDTH
public static final ECssUnit SMALL_VIEWPORT_WIDTH
CSS unit for 1% of the small viewport's width.
-
SVW
public static final ECssUnit SVW
Shortcut forSMALL_VIEWPORT_WIDTH
.
-
TURNS
public static final ECssUnit TURNS
CSS unit turns (1 turn = 360 degrees).
-
VIEWPORT_BLOCK_AXIS
public static final ECssUnit VIEWPORT_BLOCK_AXIS
CSS unit for 1% of the size of the initial containing block in the direction of the root element's block axis.
-
VB
public static final ECssUnit VB
Shortcut forVIEWPORT_BLOCK_AXIS
.
-
VIEWPORT_INLINE_AXIS
public static final ECssUnit VIEWPORT_INLINE_AXIS
CSS unit for 1% of the size of the initial containing block in the direction of the root element's inline axis.
-
VI
public static final ECssUnit VI
Shortcut forVIEWPORT_INLINE_AXIS
.
-
VIEWPORT_HEIGHT
public static final ECssUnit VIEWPORT_HEIGHT
CSS unit 1% of the viewport's height.
-
VH
public static final ECssUnit VH
Shortcut forVIEWPORT_HEIGHT
.
-
VIEWPORT_MAX
public static final ECssUnit VIEWPORT_MAX
CSS unit for 1% of the viewport's large dimension
-
VMAX
public static final ECssUnit VMAX
Shortcut forVIEWPORT_MAX
.
-
VIEWPORT_MIN
public static final ECssUnit VIEWPORT_MIN
CSS unit for 1% of the viewport's smaller dimension
-
VMIN
public static final ECssUnit VMIN
Shortcut forVIEWPORT_MIN
.
-
VIEWPORT_WIDTH
public static final ECssUnit VIEWPORT_WIDTH
CSS unit for 1% of the viewport's width..
-
VW
public static final ECssUnit VW
Shortcut forVIEWPORT_WIDTH
.
-
X_HEIGHT
public static final ECssUnit X_HEIGHT
CSS unit for the x-height of the element's font.
-
-
Method Detail
-
values
public static ECssUnit[] 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 (ECssUnit c : ECssUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECssUnit valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
value
public String value()
- Returns:
- The value that can be used for building CSS strings with this unit.
-
amount
public String amount(double value)
- Parameters:
value
- Numerical value.- Returns:
- The value together with the unit, e.g.
10px
or5%
.
-
amount
public String amount(long value)
- Parameters:
value
- Numerical value.- Returns:
- The value together with the unit, e.g.
10px
or5%
.
-
-