Skip to content

Commit b770e16

Browse files
committed
More informative package-info.
1 parent 00ee3fa commit b770e16

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
/**
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>
35
* <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>
523
*/
624
package io.sf.carte.doc.style.css.awt;

0 commit comments

Comments
 (0)