org.lobobrowser.html.style

Class HtmlValues


public class HtmlValues
extends java.lang.Object

Field Summary

static int
BORDER_STYLE_DASHED
static int
BORDER_STYLE_DOTTED
static int
BORDER_STYLE_DOUBLE
static int
BORDER_STYLE_GROOVE
static int
BORDER_STYLE_HIDDEN
static int
BORDER_STYLE_INSET
static int
BORDER_STYLE_NONE
static int
BORDER_STYLE_OUTSET
static int
BORDER_STYLE_RIDGE
static int
BORDER_STYLE_SOLID
static int
DEFAULT_BORDER_WIDTH
static float
DEFAULT_FONT_SIZE
static Float
DEFAULT_FONT_SIZE_BOX
static int
DEFAULT_FONT_SIZE_INT
static Map
SYSTEM_FONTS

Method Summary

static Insets
getBorderInsets(Insets borderStyles, CSS2Properties cssProperties, RenderState renderState)
static Insets
getBorderStyles(CSS2Properties properties)
static String
getColorFromBackground(String background)
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 fullURLStyleValue)
static boolean
isBackgroundPosition(String token)
static boolean
isBackgroundRepeat(String repeat)
static boolean
isBorderStyle(String token)
static boolean
isFontStyle(String token)
static boolean
isFontVariant(String token)
static boolean
isFontWeight(String token)
static boolean
isLength(String token)
static boolean
isUrl(String token)
static String
quoteAndEscape(String text)
static String[]
splitCssValue(String cssValue)
static String
unquoteAndUnescape(String text)

Field Details

BORDER_STYLE_DASHED

public static final int BORDER_STYLE_DASHED
Field Value:
3

BORDER_STYLE_DOTTED

public static final int BORDER_STYLE_DOTTED
Field Value:
2

BORDER_STYLE_DOUBLE

public static final int BORDER_STYLE_DOUBLE
Field Value:
5

BORDER_STYLE_GROOVE

public static final int BORDER_STYLE_GROOVE
Field Value:
6

BORDER_STYLE_HIDDEN

public static final int BORDER_STYLE_HIDDEN
Field Value:
1

BORDER_STYLE_INSET

public static final int BORDER_STYLE_INSET
Field Value:
8

BORDER_STYLE_NONE

public static final int BORDER_STYLE_NONE
Field Value:
0

BORDER_STYLE_OUTSET

public static final int BORDER_STYLE_OUTSET
Field Value:
9

BORDER_STYLE_RIDGE

public static final int BORDER_STYLE_RIDGE
Field Value:
7

BORDER_STYLE_SOLID

public static final int BORDER_STYLE_SOLID
Field Value:
4

DEFAULT_BORDER_WIDTH

public static final int DEFAULT_BORDER_WIDTH
Field Value:
2

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

SYSTEM_FONTS

public static final Map SYSTEM_FONTS

Method Details

getBorderInsets

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

getBorderStyles

public static Insets getBorderStyles(CSS2Properties properties)

getColorFromBackground

public static String getColorFromBackground(String background)

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 fullURLStyleValue)

isBackgroundPosition

public static boolean isBackgroundPosition(String token)

isBackgroundRepeat

public static boolean isBackgroundRepeat(String repeat)

isBorderStyle

public static boolean isBorderStyle(String token)

isFontStyle

public static boolean isFontStyle(String token)

isFontVariant

public static boolean isFontVariant(String token)

isFontWeight

public static boolean isFontWeight(String token)

isLength

public static boolean isLength(String token)

isUrl

public static boolean isUrl(String token)

quoteAndEscape

public static String quoteAndEscape(String text)

splitCssValue

public static String[] splitCssValue(String cssValue)

unquoteAndUnescape

public static String unquoteAndUnescape(String text)