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 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 java.lang.Float
DEFAULT_FONT_SIZE_BOX
static int
DEFAULT_FONT_SIZE_INT
static java.util.Map
SYSTEM_FONTS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BorderInfo
getBorderInfo(CSS2Properties properties, RenderState renderState)
static HtmlInsets
getBorderInsets(java.awt.Insets borderStyles, CSS2Properties cssProperties, RenderState renderState)
static java.awt.Insets
getBorderStyles(CSS2Properties properties)
static java.lang.String
getColorFromBackground(java.lang.String background)
static int
getFontNumberOldStyle(java.lang.String oldHtmlSpec, RenderState renderState)
Gets a number for 1 to 7.static float
getFontSize(int fontNumber)
static float
getFontSize(java.lang.String spec, RenderState parentRenderState)
static java.lang.String
getFontSizeSpec(int fontNumber)
static java.awt.Insets
getInsets(java.lang.String insetsSpec, RenderState renderState, boolean negativeOK)
static ListStyle
getListStyle(java.lang.String listStyleText)
static int
getListStylePosition(java.lang.String token)
static int
getListStyleType(java.lang.String token)
static int
getListStyleTypeDeprecated(java.lang.String token)
static HtmlInsets
getMarginInsets(CSS2Properties cssProperties, RenderState renderState)
static int
getOldSyntaxPixelSize(java.lang.String spec, int availSize, int errorValue)
static int
getOldSyntaxPixelSizeSimple(java.lang.String spec, int errorValue)
static HtmlInsets
getPaddingInsets(CSS2Properties cssProperties, RenderState renderState)
static int
getPixelSize(java.lang.String spec, RenderState renderState, int errorValue)
static int
getPixelSize(java.lang.String spec, RenderState renderState, int errorValue, int availSize)
static java.net.URL
getURIFromStyleValue(java.lang.String fullURLStyleValue)
static boolean
isBackgroundPosition(java.lang.String token)
static boolean
isBackgroundRepeat(java.lang.String repeat)
static boolean
isBorderStyle(java.lang.String token)
static boolean
isFontStyle(java.lang.String token)
static boolean
isFontVariant(java.lang.String token)
static boolean
isFontWeight(java.lang.String token)
static boolean
isLength(java.lang.String token)
static boolean
isUrl(java.lang.String token)
static void
populateBorderInsets(BorderInfo binfo, CSS2Properties cssProperties, RenderState renderState)
PopulatesBorderInfo.insets
.static java.lang.String
quoteAndEscape(java.lang.String text)
static java.lang.String[]
splitCssValue(java.lang.String cssValue)
static java.lang.String
unquoteAndUnescape(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)
-
-