Package com.oorian.css.units
Class Mm
java.lang.Object
com.oorian.css.units.Units
com.oorian.css.units.Mm
CSS mm (millimeter) unit value.
The mm unit is an absolute-length unit equal to one millimeter. In CSS, 1mm equals 1/10th of a centimeter or approximately 3.78px. Millimeters are primarily useful for print stylesheets where precise physical measurements are needed.
Usage:
Units size = new Mm(50);
element.setWidth(new Mm(210)); // A4 width
element.setBorderWidth(new Mm(1));
- Since:
- 2016
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the CSS string representation of this mm value.
-
Constructor Details
-
Mm
public Mm(float value) Constructs an Mm unit with the specified value.- Parameters:
value- the millimeter value
-
-
Method Details
-
sizeToString
Returns the CSS string representation of this mm value.- Specified by:
sizeToStringin classUnits- Returns:
- the CSS value string (e.g., "50mm")
-