File tree 1 file changed +20
-2
lines changed
src/io/sf/carte/doc/style/css/awt
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
- * Helper class for AWT rendering.
2
+ * Helper classes for AWT rendering.
3
+ * <h3><code>AWTHelper</code>: create AWT <code>Font</code> and
4
+ * <code>Color</code> objects</h3>
3
5
* <p>
4
- * See the Carte rendering project for more AWT implementation classes.
6
+ * Once you have a computed style, on systems where AWT is available you can
7
+ * create an AWT font with the <code>createFont</code> static method in the
8
+ * <code>AWTHelper</code> class:
9
+ * </p>
10
+ *
11
+ * <pre style="padding: 0.8em;background-color: #f8f5e1">
12
+ CSSComputedProperties style = ...
13
+ java.awt.Font font = AWTHelper.createFont(style);</pre>
14
+ * <p>
15
+ * And <code>AWTHelper.getAWTColor</code> method can create AWT colors from any
16
+ * value, regardless of it coming from computed or declared styles.
17
+ * <pre style="padding: 0.8em;background-color: #f8f5e1">
18
+ CSSPrimitiveValue cssColor = (CSSPrimitiveValue) style.getPropertyCSSValue("color");
19
+ java.awt.Color color = AWTHelper.getAWTColor(cssColor);</pre>
20
+ * </p>
21
+ * <h3><code>AWTStyleDatabase</code></h3>
22
+ * <p><code>AWTStyleDatabase</code> is a sample style database for AWT.</p>
5
23
*/
6
24
package io .sf .carte .doc .style .css .awt ;
You can’t perform that action at this time.
0 commit comments