modules/graphics/src/main/java/javafx/css/Size.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
*** 21,36 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package com.sun.javafx.css;
import javafx.scene.text.Font;
/**
* Represents a size specified in a particular unit, such as 14px or 0.2em.
*/
final public class Size {
final private double value;
final private SizeUnits units;
--- 21,39 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! package javafx.css;
import javafx.scene.text.Font;
+
/**
* Represents a size specified in a particular unit, such as 14px or 0.2em.
+ *
+ * @since 9
*/
final public class Size {
final private double value;
final private SizeUnits units;
*** 55,75 ****
public boolean isAbsolute() {
return units.isAbsolute();
}
/** Convert this size into Points units, a Point is 1/72 of a inch */
! public double points(Font font) {
return points(1.0, font);
}
/**
* Convert this size into points
*
* @param multiplier The multiplier for PERCENTAGE sizes
* @param font The font for EM sizes
*/
! public double points(double multiplier, Font font) {
return units.points(value, multiplier, font);
}
/**
* Convert this size into pixels
--- 58,78 ----
public boolean isAbsolute() {
return units.isAbsolute();
}
/** Convert this size into Points units, a Point is 1/72 of a inch */
! double points(Font font) {
return points(1.0, font);
}
/**
* Convert this size into points
*
* @param multiplier The multiplier for PERCENTAGE sizes
* @param font The font for EM sizes
*/
! double points(double multiplier, Font font) {
return units.points(value, multiplier, font);
}
/**
* Convert this size into pixels
*** 91,101 ****
/**
* If size is not an absolute size, return the product of multiplier
* and value. Otherwise, return the absolute value.
*/
! public double pixels(double multiplier) {
return pixels(multiplier, null);
}
/**
* A convenience method for calling <code>pixels(1)</code>
--- 94,104 ----
/**
* If size is not an absolute size, return the product of multiplier
* and value. Otherwise, return the absolute value.
*/
! double pixels(double multiplier) {
return pixels(multiplier, null);
}
/**
* A convenience method for calling <code>pixels(1)</code>