org.lobobrowser.html.style

Class HtmlValues


public class HtmlValues
extends java.lang.Object

Field Summary

static float
DEFAULT_FONT_SIZE
static Float
DEFAULT_FONT_SIZE_BOX
static int
DEFAULT_FONT_SIZE_INT

Method Summary

static org.lobobrowser.html.style.FontInfo
createFontInfo(String fontSpec, RenderState parentRenderState)
static Insets
getBorderInsets(Insets insets, CSS2Properties cssProperties, RenderState renderState)
static String
getColorFromBackground(String background)
static Color[]
getColors(String colorsSpec)
Gets an array of top-left-bottom-right colors given a spec.
static int
getFontNumberOldStyle(String oldHtmlSpec, RenderState renderState)
Gets a number for 1 to 7.
static float
getFontSize(String spec, RenderState parentRenderState)
static float
getFontSize(int fontNumber)
static Insets
getInsets(String insetsSpec, RenderState renderState, boolean negativeOK)
static ListStyle
getListStyle(String listStyleText)
static int
getListStylePosition(String token)
static int
getListStyleType(String token)
static int
getListStyleTypeDeprecated(String token)
static Insets
getMarginInsets(CSS2Properties cssProperties, RenderState renderState)
static int
getOldSyntaxPixelSize(String spec, int availSize, int errorValue)
static Insets
getPaddingInsets(CSS2Properties cssProperties, RenderState renderState)
static int
getPixelSize(String spec, RenderState renderState, int errorValue)
static int
getPixelSize(String spec, RenderState renderState, int errorValue, int availSize)
static java.net.URL
getURIFromStyleValue(String styleValue, CSSStyleDeclaration declaration, HTMLDocumentImpl document)
static boolean
isBorderStyle(String token)
static boolean
isLength(String token)
static boolean
isUrl(String token)
static String[]
splitCssValue(String cssValue)
static String
unquoteAndUnescape(String text)

Field Details

DEFAULT_FONT_SIZE

public static final float DEFAULT_FONT_SIZE
Field Value:
14.0f

DEFAULT_FONT_SIZE_BOX

public static final Float DEFAULT_FONT_SIZE_BOX

DEFAULT_FONT_SIZE_INT

public static final int DEFAULT_FONT_SIZE_INT
Field Value:
14

Method Details

createFontInfo

public static org.lobobrowser.html.style.FontInfo createFontInfo(String fontSpec,
                                                                 RenderState parentRenderState)

getBorderInsets

public static Insets getBorderInsets(Insets insets,
                                     CSS2Properties cssProperties,
                                     RenderState renderState)

getColorFromBackground

public static String getColorFromBackground(String background)

getColors

public static Color[] getColors(String colorsSpec)
Gets an array of top-left-bottom-right colors given a spec.

getFontNumberOldStyle

public static final int getFontNumberOldStyle(String oldHtmlSpec,
                                              RenderState renderState)
Gets a number for 1 to 7.
Parameters:
oldHtmlSpec - A number from 1 to 7 or +1, etc.

getFontSize

public static final float getFontSize(String spec,
                                      RenderState parentRenderState)

getFontSize

public static final float getFontSize(int fontNumber)

getInsets

public static Insets getInsets(String insetsSpec,
                               RenderState renderState,
                               boolean negativeOK)

getListStyle

public static ListStyle getListStyle(String listStyleText)

getListStylePosition

public static int getListStylePosition(String token)

getListStyleType

public static int getListStyleType(String token)

getListStyleTypeDeprecated

public static int getListStyleTypeDeprecated(String token)

getMarginInsets

public static Insets getMarginInsets(CSS2Properties cssProperties,
                                     RenderState renderState)

getOldSyntaxPixelSize

public static int getOldSyntaxPixelSize(String spec,
                                        int availSize,
                                        int errorValue)

getPaddingInsets

public static Insets getPaddingInsets(CSS2Properties cssProperties,
                                      RenderState renderState)

getPixelSize

public static final int getPixelSize(String spec,
                                     RenderState renderState,
                                     int errorValue)

getPixelSize

public static final int getPixelSize(String spec,
                                     RenderState renderState,
                                     int errorValue,
                                     int availSize)

getURIFromStyleValue

public static java.net.URL getURIFromStyleValue(String styleValue,
                                                CSSStyleDeclaration declaration,
                                                HTMLDocumentImpl document)

isBorderStyle

public static boolean isBorderStyle(String token)

isLength

public static boolean isLength(String token)

isUrl

public static boolean isUrl(String token)

splitCssValue

public static String[] splitCssValue(String cssValue)

unquoteAndUnescape

public static String unquoteAndUnescape(String text)