public class CSSUtilities
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
| static void | applyBorderStyle(CSSStyles.Rules rules,
                javax.swing.JComponent comp)Apply the border-style property. | 
| static void | applyFont(CSSStyles.Rules rules,
         javax.swing.JComponent comp)Apply the CSS font. | 
| static java.awt.Insets | applyInsets(CSSStyles.Rules rules,
           javax.swing.JComponent comp)Apply the CSS insets. | 
| static void | applyTextAlign(CSSStyles.Rules rules,
              javax.swing.JComponent comp)Apply the text-align property. | 
| static boolean | applyVerticalAlign(CSSStyles.Rules rules,
                  javax.swing.JComponent comp)Apply the vertical-align property. | 
| static java.awt.Color | getColor(java.lang.String colorValue)Return the color using the CSS color. | 
| static float | getFontSize(int size)Return the point-size font size from an HTML font size. | 
| static int | getFontSizeFromCSS(java.lang.String fontSize,
                  int defaultSize)Return the point size from a CSS font size declaration. | 
| static java.awt.Image | getImage(java.net.URL baseDir,
        java.lang.String imageURI) | 
| static float | getWidthFromCSS(java.lang.String cssWidth,
               float pageWidth)Return the pixel width from a CSS width declaration. | 
public static java.awt.Insets applyInsets(CSSStyles.Rules rules, javax.swing.JComponent comp)
rules - the rulescomp - the componentpublic static void applyBorderStyle(CSSStyles.Rules rules, javax.swing.JComponent comp)
rules - the rulescomp - the componentpublic static boolean applyVerticalAlign(CSSStyles.Rules rules, javax.swing.JComponent comp)
rules - the rulescomp - the componentpublic static void applyTextAlign(CSSStyles.Rules rules, javax.swing.JComponent comp)
rules - the rulescomp - the componentpublic static void applyFont(CSSStyles.Rules rules, javax.swing.JComponent comp)
rules - the rulescomp - the componentpublic static java.awt.Image getImage(java.net.URL baseDir,
                                      java.lang.String imageURI)
public static java.awt.Color getColor(java.lang.String colorValue)
colorValue - the CSS color valuepublic static float getFontSize(int size)
size - the html font sizepublic static int getFontSizeFromCSS(java.lang.String fontSize,
                                     int defaultSize)
fontSize - the font size declarationdefaultSize - the default sizepublic static float getWidthFromCSS(java.lang.String cssWidth,
                                    float pageWidth)
cssWidth - the cssWidth declarationpageWidth - the page widthCopyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence