Package com.oorian.css.units
Class In
java.lang.Object
com.oorian.css.units.Units
com.oorian.css.units.In
CSS in (inch) unit value.
The in unit is an absolute-length unit equal to one inch. In CSS, 1in equals 96px or 2.54cm. Inches are primarily useful for print stylesheets where physical measurements corresponding to real-world dimensions are important.
Usage:
Units size = new In(2);
element.setWidth(new In(8.5f)); // US Letter width
element.setMargin(new In(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 inch value.
-
Constructor Details
-
In
public In(float value) Constructs an In unit with the specified value.- Parameters:
value- the inch value
-
-
Method Details
-
sizeToString
Returns the CSS string representation of this inch value.- Specified by:
sizeToStringin classUnits- Returns:
- the CSS value string (e.g., "2in")
-