java.lang.Object
io.sf.carte.doc.style.css.awt.AWTHelper
AWT helper methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Font
createFont
(CSSComputedProperties computedStyle) Create an AWT Font object from a computed style.static Color
getAWTColor
(CSSTypedValue cssColor) Gets the AWT color as obtained from the given CSS primitive value.
-
Constructor Details
-
AWTHelper
public AWTHelper()
-
-
Method Details
-
createFont
Create an AWT Font object from a computed style.- Parameters:
computedStyle
- the computed style.- Returns:
- the font.
-
getAWTColor
Gets the AWT color as obtained from the given CSS primitive value.- Parameters:
cssColor
- the primitive color value, which can contain an RGB color, a number or an identifier.- Returns:
- the AWT color object, or null if the color was specified as an unknown identifier.
- Throws:
CSSPropertyValueException
- if a color cannot be derived from the CSS value.
-