Package org.lobobrowser.html.style
Class HtmlValues
- java.lang.Object
-
- org.lobobrowser.html.style.HtmlValues
-
public class HtmlValues extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intBORDER_STYLE_DASHEDstatic intBORDER_STYLE_DOTTEDstatic intBORDER_STYLE_DOUBLEstatic intBORDER_STYLE_GROOVEstatic intBORDER_STYLE_HIDDENstatic intBORDER_STYLE_INSETstatic intBORDER_STYLE_NONEstatic intBORDER_STYLE_OUTSETstatic intBORDER_STYLE_RIDGEstatic intBORDER_STYLE_SOLIDstatic intDEFAULT_BORDER_WIDTHstatic floatDEFAULT_FONT_SIZEstatic java.lang.FloatDEFAULT_FONT_SIZE_BOXstatic intDEFAULT_FONT_SIZE_INTstatic java.util.MapSYSTEM_FONTS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BorderInfogetBorderInfo(CSS2Properties properties, RenderState renderState)static HtmlInsetsgetBorderInsets(java.awt.Insets borderStyles, CSS2Properties cssProperties, RenderState renderState)static java.awt.InsetsgetBorderStyles(CSS2Properties properties)static java.lang.StringgetColorFromBackground(java.lang.String background)static intgetFontNumberOldStyle(java.lang.String oldHtmlSpec, RenderState renderState)Gets a number for 1 to 7.static floatgetFontSize(int fontNumber)static floatgetFontSize(java.lang.String spec, RenderState parentRenderState)static java.lang.StringgetFontSizeSpec(int fontNumber)static java.awt.InsetsgetInsets(java.lang.String insetsSpec, RenderState renderState, boolean negativeOK)static ListStylegetListStyle(java.lang.String listStyleText)static intgetListStylePosition(java.lang.String token)static intgetListStyleType(java.lang.String token)static intgetListStyleTypeDeprecated(java.lang.String token)static HtmlInsetsgetMarginInsets(CSS2Properties cssProperties, RenderState renderState)static intgetOldSyntaxPixelSize(java.lang.String spec, int availSize, int errorValue)static intgetOldSyntaxPixelSizeSimple(java.lang.String spec, int errorValue)static HtmlInsetsgetPaddingInsets(CSS2Properties cssProperties, RenderState renderState)static intgetPixelSize(java.lang.String spec, RenderState renderState, int errorValue)static intgetPixelSize(java.lang.String spec, RenderState renderState, int errorValue, int availSize)static java.net.URLgetURIFromStyleValue(java.lang.String fullURLStyleValue)static booleanisBackgroundPosition(java.lang.String token)static booleanisBackgroundRepeat(java.lang.String repeat)static booleanisBorderStyle(java.lang.String token)static booleanisFontStyle(java.lang.String token)static booleanisFontVariant(java.lang.String token)static booleanisFontWeight(java.lang.String token)static booleanisLength(java.lang.String token)static booleanisUrl(java.lang.String token)static voidpopulateBorderInsets(BorderInfo binfo, CSS2Properties cssProperties, RenderState renderState)PopulatesBorderInfo.insets.static java.lang.StringquoteAndEscape(java.lang.String text)static java.lang.String[]splitCssValue(java.lang.String cssValue)static java.lang.StringunquoteAndUnescape(java.lang.String text)
-
-
-
Field Detail
-
SYSTEM_FONTS
public static final java.util.Map SYSTEM_FONTS
-
DEFAULT_FONT_SIZE
public static final float DEFAULT_FONT_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_FONT_SIZE_INT
public static final int DEFAULT_FONT_SIZE_INT
- See Also:
- Constant Field Values
-
DEFAULT_FONT_SIZE_BOX
public static final java.lang.Float DEFAULT_FONT_SIZE_BOX
-
DEFAULT_BORDER_WIDTH
public static final int DEFAULT_BORDER_WIDTH
- See Also:
- Constant Field Values
-
BORDER_STYLE_NONE
public static final int BORDER_STYLE_NONE
- See Also:
- Constant Field Values
-
BORDER_STYLE_HIDDEN
public static final int BORDER_STYLE_HIDDEN
- See Also:
- Constant Field Values
-
BORDER_STYLE_DOTTED
public static final int BORDER_STYLE_DOTTED
- See Also:
- Constant Field Values
-
BORDER_STYLE_DASHED
public static final int BORDER_STYLE_DASHED
- See Also:
- Constant Field Values
-
BORDER_STYLE_SOLID
public static final int BORDER_STYLE_SOLID
- See Also:
- Constant Field Values
-
BORDER_STYLE_DOUBLE
public static final int BORDER_STYLE_DOUBLE
- See Also:
- Constant Field Values
-
BORDER_STYLE_GROOVE
public static final int BORDER_STYLE_GROOVE
- See Also:
- Constant Field Values
-
BORDER_STYLE_RIDGE
public static final int BORDER_STYLE_RIDGE
- See Also:
- Constant Field Values
-
BORDER_STYLE_INSET
public static final int BORDER_STYLE_INSET
- See Also:
- Constant Field Values
-
BORDER_STYLE_OUTSET
public static final int BORDER_STYLE_OUTSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
isBorderStyle
public static boolean isBorderStyle(java.lang.String token)
-
getMarginInsets
public static HtmlInsets getMarginInsets(CSS2Properties cssProperties, RenderState renderState)
-
getPaddingInsets
public static HtmlInsets getPaddingInsets(CSS2Properties cssProperties, RenderState renderState)
-
getBorderInsets
public static HtmlInsets getBorderInsets(java.awt.Insets borderStyles, CSS2Properties cssProperties, RenderState renderState)
-
populateBorderInsets
public static void populateBorderInsets(BorderInfo binfo, CSS2Properties cssProperties, RenderState renderState)
PopulatesBorderInfo.insets.- Parameters:
binfo- A BorderInfo with its styles already populated.cssProperties- The CSS properties object.renderState- The current render state.
-
getInsets
public static java.awt.Insets getInsets(java.lang.String insetsSpec, RenderState renderState, boolean negativeOK)
-
getFontNumberOldStyle
public static final int getFontNumberOldStyle(java.lang.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(int fontNumber)
-
getFontSizeSpec
public static final java.lang.String getFontSizeSpec(int fontNumber)
-
getFontSize
public static final float getFontSize(java.lang.String spec, RenderState parentRenderState)
-
getPixelSize
public static final int getPixelSize(java.lang.String spec, RenderState renderState, int errorValue, int availSize)
-
getPixelSize
public static final int getPixelSize(java.lang.String spec, RenderState renderState, int errorValue)
-
getOldSyntaxPixelSize
public static int getOldSyntaxPixelSize(java.lang.String spec, int availSize, int errorValue)
-
getOldSyntaxPixelSizeSimple
public static int getOldSyntaxPixelSizeSimple(java.lang.String spec, int errorValue)
-
getURIFromStyleValue
public static java.net.URL getURIFromStyleValue(java.lang.String fullURLStyleValue)
-
unquoteAndUnescape
public static java.lang.String unquoteAndUnescape(java.lang.String text)
-
quoteAndEscape
public static java.lang.String quoteAndEscape(java.lang.String text)
-
getColorFromBackground
public static java.lang.String getColorFromBackground(java.lang.String background)
-
isLength
public static boolean isLength(java.lang.String token)
-
splitCssValue
public static java.lang.String[] splitCssValue(java.lang.String cssValue)
-
isUrl
public static boolean isUrl(java.lang.String token)
-
getListStyleType
public static int getListStyleType(java.lang.String token)
-
getListStyleTypeDeprecated
public static int getListStyleTypeDeprecated(java.lang.String token)
-
getListStylePosition
public static int getListStylePosition(java.lang.String token)
-
getListStyle
public static ListStyle getListStyle(java.lang.String listStyleText)
-
isFontStyle
public static boolean isFontStyle(java.lang.String token)
-
isFontVariant
public static boolean isFontVariant(java.lang.String token)
-
isFontWeight
public static boolean isFontWeight(java.lang.String token)
-
getBorderInfo
public static BorderInfo getBorderInfo(CSS2Properties properties, RenderState renderState)
-
getBorderStyles
public static java.awt.Insets getBorderStyles(CSS2Properties properties)
-
isBackgroundRepeat
public static boolean isBackgroundRepeat(java.lang.String repeat)
-
isBackgroundPosition
public static boolean isBackgroundPosition(java.lang.String token)
-
-