net.sf.cssbean
Class CSSBean

java.lang.Object
  extended by net.sf.cssbean.CSSBean

public class CSSBean
extends java.lang.Object

Author:
Mike Heath TODO Add BSD license to Maven build. TODO Add cursor field TODO Add List and Marker styles TODO Add Margin styles TODO Add Outlines styles TODO Add Padding styles TODO Add Positioning styles TODO Add Table styles

Field Summary
static java.lang.String COLOR_TRANSPARENT
           
static java.lang.String FONT_SIZE_ADJUST_NONE
           
static java.lang.String FONT_SIZE_LARGE
           
static java.lang.String FONT_SIZE_LARGER
           
static java.lang.String FONT_SIZE_MEDIUM
           
static java.lang.String FONT_SIZE_SMALL
           
static java.lang.String FONT_SIZE_SMALLER
           
static java.lang.String FONT_SIZE_X_LARGE
           
static java.lang.String FONT_SIZE_X_SMALL
           
static java.lang.String FONT_SIZE_XX_LARGE
           
static java.lang.String FONT_SIZE_XX_SMALL
           
static java.lang.String LENGTH_AUTO
           
static java.lang.String LENGTH_NONE
           
static java.lang.String LENGTH_NORMAL
           
static java.util.Set<java.lang.String> LENGTH_UNITS
           
static java.lang.String POSITION_BOTTOM_CENTER
           
static java.lang.String POSITION_BOTTOM_LEFT
           
static java.lang.String POSITION_BOTTOM_RIGHT
           
static java.lang.String POSITION_CENTER_CENTER
           
static java.lang.String POSITION_CENTER_LEFT
           
static java.lang.String POSITION_CENTER_RIGHT
           
static java.lang.String POSITION_TOP_CENTER
           
static java.lang.String POSITION_TOP_LEFT
           
static java.lang.String POSITION_TOP_RIGHT
           
static java.lang.String STYLE_BACKGROUND
           
static java.lang.String STYLE_BACKGROUND_ATTACHMENT
           
static java.lang.String STYLE_BACKGROUND_COLOR
           
static java.lang.String STYLE_BACKGROUND_IMAGE
           
static java.lang.String STYLE_BACKGROUND_POSITION
           
static java.lang.String STYLE_BACKGROUND_REPEAT
           
static java.lang.String STYLE_BORDER
           
static java.lang.String STYLE_BORDER_BOTTOM
           
static java.lang.String STYLE_BORDER_BOTTOM_COLOR
           
static java.lang.String STYLE_BORDER_BOTTOM_STYLE
           
static java.lang.String STYLE_BORDER_BOTTOM_WIDTH
           
static java.lang.String STYLE_BORDER_COLOR
           
static java.lang.String STYLE_BORDER_LEFT
           
static java.lang.String STYLE_BORDER_LEFT_COLOR
           
static java.lang.String STYLE_BORDER_LEFT_STYLE
           
static java.lang.String STYLE_BORDER_LEFT_WIDTH
           
static java.lang.String STYLE_BORDER_RIGHT
           
static java.lang.String STYLE_BORDER_RIGHT_COLOR
           
static java.lang.String STYLE_BORDER_RIGHT_STYLE
           
static java.lang.String STYLE_BORDER_RIGHT_WIDTH
           
static java.lang.String STYLE_BORDER_STYLE
           
static java.lang.String STYLE_BORDER_TOP
           
static java.lang.String STYLE_BORDER_TOP_COLOR
           
static java.lang.String STYLE_BORDER_TOP_STYLE
           
static java.lang.String STYLE_BORDER_TOP_WIDTH
           
static java.lang.String STYLE_BORDER_WIDTH
           
static java.lang.String STYLE_CLEAR
           
static java.lang.String STYLE_COLOR
           
static java.lang.String STYLE_DIRECTION
           
static java.lang.String STYLE_DISPLAY
           
static java.lang.String STYLE_FLOAT
           
static java.lang.String STYLE_FONT
           
static java.lang.String STYLE_FONT_FAMILY
           
static java.lang.String STYLE_FONT_SIZE
           
static java.lang.String STYLE_FONT_SIZE_ADJUST
           
static java.lang.String STYLE_FONT_STRETCH
           
static java.lang.String STYLE_FONT_STYLE
           
static java.lang.String STYLE_FONT_VARIANT
           
static java.lang.String STYLE_FONT_WEIGHT
           
static java.lang.String STYLE_HEIGHT
           
static java.lang.String STYLE_LETTER_SPACING
           
static java.lang.String STYLE_LINE_HEIGHT
           
static java.lang.String STYLE_MAX_HEIGHT
           
static java.lang.String STYLE_MAX_WIDTH
           
static java.lang.String STYLE_MIN_HEIGHT
           
static java.lang.String STYLE_MIN_WIDTH
           
static java.lang.String STYLE_POSITION
           
static java.lang.String STYLE_TEXT_ALIGN
           
static java.lang.String STYLE_TEXT_DECORATION
           
static java.lang.String STYLE_TEXT_INDENT
           
static java.lang.String STYLE_TEXT_SHADOW
           
static java.lang.String STYLE_TEXT_TRANSFORM
           
static java.lang.String STYLE_VISIBILITY
           
static java.lang.String STYLE_WHITE_SPACE
           
static java.lang.String STYLE_WIDTH
           
static java.lang.String STYLE_WORD_SPACING
           
static java.lang.String TEXT_LETTER_SPACING_NORMAL
           
static java.lang.String TEXT_SHADOW_NONE
           
static java.lang.String TEXT_WORD_SPACING_NORMAL
           
static java.net.URI URL_NONE
           
static java.lang.String WIDTH_MEDIUM
           
static java.lang.String WIDTH_THICK
           
static java.lang.String WIDTH_THIN
           
 
Constructor Summary
CSSBean()
           
 
Method Summary
protected  void appendShortHandStyle(java.lang.StringBuilder builder, java.lang.String style, java.lang.StringBuilder shortHandBuilder)
           
protected  void appendStyle(java.lang.StringBuilder builder, java.lang.String style, java.lang.String value)
           
protected  void appendStyle(java.lang.StringBuilder builder, java.lang.String style, java.net.URI uri)
           
protected  void appendStyle(java.lang.StringBuilder builder, java.lang.String style, Value value)
           
protected  void appendValue(java.lang.StringBuilder builder, java.lang.String value)
           
protected  void appendValue(java.lang.StringBuilder builder, java.net.URI uri)
           
protected  void appendValue(java.lang.StringBuilder builder, Value value)
           
protected  void checkBorderWidth(java.lang.String width)
           
protected  void checkColor(java.lang.String color)
           
 BackgroundAttachment getBackgroundAttachment()
          Gets whether a background image is fixed or scrolls with the rest of the page.
 java.lang.String getBackgroundColor()
          Gets the background color of an element.
 java.net.URI getBackgroundImage()
          Gets the background image.
 java.lang.String getBackgroundPosition()
          Gets the starting position of a background image.
 BackgroundRepeat getBackgroundRepeat()
          Gets if/how a background image will be repeated.
 java.lang.String getBorderBottomColor()
          Gets the color of the bottom border.
 BorderStyle getBorderBottomStyle()
          Gets the style of the bottom border.
 java.lang.String getBorderBottomWidth()
          Gets the width of the bottom border.
 java.lang.String getBorderColor()
          Gets the color of the four borders, can have from one to four colors.
 java.lang.String getBorderLeftColor()
          Gets the color of the left border.
 BorderStyle getBorderLeftStyle()
          Gets the style of the left border.
 java.lang.String getBorderLeftWidth()
          Gets the width of the left border.
 java.lang.String getBorderRightColor()
          Gets the color of the right border.
 BorderStyle getBorderRightStyle()
          Gets the style of the right border.
 java.lang.String getBorderRightWidth()
          Gets the width of the right border.
 BorderStyle getBorderStyle()
          Gets the style of the four borders.
 java.lang.String getBorderTopColor()
          Gets the color of the top border.
 BorderStyle getBorderTopStyle()
          Gets the style of the top border.
 java.lang.String getBorderTopWidth()
          Gets the width of the top border.
 java.lang.String getBorderWidth()
          Gets the width of the four borders.
 SidePosition getClear()
           
 java.lang.String getColor()
          Gets the color of a text.
 Direction getDirection()
          Gets the text direction.
 Display getDisplay()
           
 FloatPosition getFloat()
           
 java.lang.String getFontFamily()
          Gets the prioritized list of font family names and/or generic family names for an element.
 java.lang.String getFontSize()
          Gets the size of a font.
 java.lang.String getFontSizeAdjust()
          Specifies an aspect value for an element that will preserve the x-height of the first-choice font.
 FontStretch getFontStretch()
          Condenses or expands the current font-family.
 Style getFontStyle()
          Gets the style of the font.
 Variant getFontVariant()
          Displays text in a small-caps font or a normal font.
 Weight getFontWeight()
          Sets the weight of a font.
 java.lang.String getHeight()
          Gets the height of an element.
 java.lang.String getLetterSpacing()
          Increase or decrease the space between characters.
 java.lang.String getLineHeight()
          Gets the distance between lines.
 java.lang.String getMaxHeight()
          Gets the maximum height of an element.
 java.lang.String getMaxWidth()
          Gets the maximum width of an element.
 java.lang.String getMinHeight()
          Gets the minimum height of an element.
 java.lang.String getMinWidth()
          Gets the minimum width of an element.
 Position getPosition()
           
 TextAlign getTextAlign()
          Aligns the text in an element.
 TextDecoration getTextDecoration()
          Adds decoration to text.
 java.lang.String getTextIndent()
          Indents the first line of text in an element.
 java.lang.String getTextShadow()
           
 TextTransform getTextTransform()
           
 Visibility getVisibility()
           
 WhiteSpace getWhiteSpace()
           
 java.lang.String getWidth()
          Gets the width of an element.
 java.lang.String getWordSpacing()
           
protected static boolean isColor(java.lang.String color)
           
protected static boolean isInteger(java.lang.String val)
           
protected static boolean isLength(java.lang.String length)
           
protected static boolean isPercent(java.lang.String val)
           
 boolean isShortHandProperties()
           
protected  void seperateStyle(java.lang.StringBuilder builder)
          Appends white space to the builder parameter if the length of builder is greater than 0.
protected  void seperateValue(java.lang.StringBuilder builder)
           
 void setBackgroundAttachment(BackgroundAttachment backgroundAttachment)
          Sets whether a background image is fixed or scrolls with the rest of the page.
 void setBackgroundColor(java.lang.String backgroundColor)
          Sets the background color of an element.
 void setBackgroundImage(java.net.URI backgroundImage)
          Sets the background image.
 void setBackgroundPosition(java.lang.String backgroundPosition)
          Sets the starting position of a background image.
 void setBackgroundRepeat(BackgroundRepeat backgroundRepeat)
          Sets if/how a background image will be repeated.
 void setBorderBottomColor(java.lang.String borderBottomColor)
          Sets the color of the bottom border.
 void setBorderBottomStyle(BorderStyle borderBottomStyle)
          Sets the style of the bottom border.
 void setBorderBottomWidth(java.lang.String borderBottomWidth)
          Sets the width of the bottom border.
 void setBorderColor(java.lang.String borderColor)
          Sets the color of the four borders, can have from one to four colors.
 void setBorderLeftColor(java.lang.String borderLeftColor)
          Sets the color of the left border.
 void setBorderLeftStyle(BorderStyle borderLeftStyle)
          Sets the style of the left border.
 void setBorderLeftWidth(java.lang.String borderLeftWidth)
          Sets the width of the left border.
 void setBorderRightColor(java.lang.String borderRightColor)
          Sets the color of the right border.
 void setBorderRightStyle(BorderStyle borderRightStyle)
          Sets the style of the right border.
 void setBorderRightWidth(java.lang.String borderRightWidth)
          Sets the width of the right border.
 void setBorderStyle(BorderStyle borderStyle)
          Sets the style of the four borders.
 void setBorderTopColor(java.lang.String borderTopColor)
          Sets the color of the top border.
 void setBorderTopStyle(BorderStyle borderTopStyle)
          Sets the style of the top border.
 void setBorderTopWidth(java.lang.String borderTopWidth)
          Sets the width of the top border.
 void setBorderWidth(java.lang.String borderWidth)
          Sets the width of the four borders.
 void setClear(SidePosition clear)
           
 void setColor(java.lang.String color)
          Sets the color of a text.
 void setDirection(Direction direction)
          Sets the text direction.
 void setDisplay(Display display)
           
 void setFloat(FloatPosition float_)
           
 void setFontFamily(java.lang.String fontFamily)
          Sets the prioritized list of font family names and/or generic family names for an element.
 void setFontSize(java.lang.String fontSize)
          Sets the size of a font.
 void setFontSizeAdjust(java.lang.String fontSizeAdjust)
          Specifies an aspect value for an element that will preserve the x-height of the first-choice font.
 void setFontStretch(FontStretch fontStretch)
          Condenses or expands the current font-family.
 void setFontStyle(Style fontStyle)
          Sets the style of the font.
 void setFontVariant(Variant fontVariant)
          Displays text in a small-caps font or a normal font.
 void setFontWeight(Weight fontWeight)
          Sets the weight of a font.
 void setHeight(java.lang.String height)
          Sets the height of an element.
 void setLetterSpacing(java.lang.String letterSpacing)
          Increase or decrease the space between characters.
 void setLineHeight(java.lang.String lineHeight)
          Sets the distance between lines.
 void setMaxHeight(java.lang.String maxHeight)
          Sets the maximum height of an element.
 void setMaxWidth(java.lang.String maxWidth)
          Sets the maximum width of an element.
 void setMinHeight(java.lang.String minHeight)
          Sets the minimum height of an element.
 void setMinWidth(java.lang.String minWidth)
          Sets the minimum width of an element.
 void setPosition(Position position)
           
 void setShortHandProperties(boolean shortHandProperties)
           
 void setTextAlign(TextAlign testAlign)
          Aligns the text in an element.
 void setTextDecoration(TextDecoration textDecoration)
          Adds decoration to text.
 void setTextIndent(java.lang.String textIndent)
          Indents the first line of text in an element.
 void setTextShadow(java.lang.String textShadow)
           
 void setTextTransform(TextTransform textTransform)
           
 void setVisibility(Visibility visibility)
           
 void setWhiteSpace(WhiteSpace whiteSpace)
           
 void setWidth(java.lang.String width)
          Sets the width of an element.
 void setWordSpacing(java.lang.String wordSpacing)
           
 java.lang.String toString()
           
protected  java.lang.String trimString(java.lang.String str)
           
protected  void uriToString(java.lang.StringBuilder builder, java.net.URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STYLE_BACKGROUND

public static final java.lang.String STYLE_BACKGROUND
See Also:
Constant Field Values

STYLE_BACKGROUND_ATTACHMENT

public static final java.lang.String STYLE_BACKGROUND_ATTACHMENT
See Also:
Constant Field Values

STYLE_BACKGROUND_COLOR

public static final java.lang.String STYLE_BACKGROUND_COLOR
See Also:
Constant Field Values

STYLE_BACKGROUND_IMAGE

public static final java.lang.String STYLE_BACKGROUND_IMAGE
See Also:
Constant Field Values

STYLE_BACKGROUND_POSITION

public static final java.lang.String STYLE_BACKGROUND_POSITION
See Also:
Constant Field Values

STYLE_BACKGROUND_REPEAT

public static final java.lang.String STYLE_BACKGROUND_REPEAT
See Also:
Constant Field Values

STYLE_BORDER

public static final java.lang.String STYLE_BORDER
See Also:
Constant Field Values

STYLE_BORDER_BOTTOM

public static final java.lang.String STYLE_BORDER_BOTTOM
See Also:
Constant Field Values

STYLE_BORDER_LEFT

public static final java.lang.String STYLE_BORDER_LEFT
See Also:
Constant Field Values

STYLE_BORDER_RIGHT

public static final java.lang.String STYLE_BORDER_RIGHT
See Also:
Constant Field Values

STYLE_BORDER_TOP

public static final java.lang.String STYLE_BORDER_TOP
See Also:
Constant Field Values

STYLE_BORDER_COLOR

public static final java.lang.String STYLE_BORDER_COLOR
See Also:
Constant Field Values

STYLE_BORDER_STYLE

public static final java.lang.String STYLE_BORDER_STYLE
See Also:
Constant Field Values

STYLE_BORDER_WIDTH

public static final java.lang.String STYLE_BORDER_WIDTH
See Also:
Constant Field Values

STYLE_BORDER_BOTTOM_COLOR

public static final java.lang.String STYLE_BORDER_BOTTOM_COLOR
See Also:
Constant Field Values

STYLE_BORDER_BOTTOM_STYLE

public static final java.lang.String STYLE_BORDER_BOTTOM_STYLE
See Also:
Constant Field Values

STYLE_BORDER_BOTTOM_WIDTH

public static final java.lang.String STYLE_BORDER_BOTTOM_WIDTH
See Also:
Constant Field Values

STYLE_BORDER_LEFT_COLOR

public static final java.lang.String STYLE_BORDER_LEFT_COLOR
See Also:
Constant Field Values

STYLE_BORDER_LEFT_STYLE

public static final java.lang.String STYLE_BORDER_LEFT_STYLE
See Also:
Constant Field Values

STYLE_BORDER_LEFT_WIDTH

public static final java.lang.String STYLE_BORDER_LEFT_WIDTH
See Also:
Constant Field Values

STYLE_BORDER_RIGHT_COLOR

public static final java.lang.String STYLE_BORDER_RIGHT_COLOR
See Also:
Constant Field Values

STYLE_BORDER_RIGHT_STYLE

public static final java.lang.String STYLE_BORDER_RIGHT_STYLE
See Also:
Constant Field Values

STYLE_BORDER_RIGHT_WIDTH

public static final java.lang.String STYLE_BORDER_RIGHT_WIDTH
See Also:
Constant Field Values

STYLE_BORDER_TOP_COLOR

public static final java.lang.String STYLE_BORDER_TOP_COLOR
See Also:
Constant Field Values

STYLE_BORDER_TOP_STYLE

public static final java.lang.String STYLE_BORDER_TOP_STYLE
See Also:
Constant Field Values

STYLE_BORDER_TOP_WIDTH

public static final java.lang.String STYLE_BORDER_TOP_WIDTH
See Also:
Constant Field Values

STYLE_CLEAR

public static final java.lang.String STYLE_CLEAR
See Also:
Constant Field Values

STYLE_DISPLAY

public static final java.lang.String STYLE_DISPLAY
See Also:
Constant Field Values

STYLE_FLOAT

public static final java.lang.String STYLE_FLOAT
See Also:
Constant Field Values

STYLE_POSITION

public static final java.lang.String STYLE_POSITION
See Also:
Constant Field Values

STYLE_VISIBILITY

public static final java.lang.String STYLE_VISIBILITY
See Also:
Constant Field Values

STYLE_HEIGHT

public static final java.lang.String STYLE_HEIGHT
See Also:
Constant Field Values

STYLE_LINE_HEIGHT

public static final java.lang.String STYLE_LINE_HEIGHT
See Also:
Constant Field Values

STYLE_MAX_HEIGHT

public static final java.lang.String STYLE_MAX_HEIGHT
See Also:
Constant Field Values

STYLE_MAX_WIDTH

public static final java.lang.String STYLE_MAX_WIDTH
See Also:
Constant Field Values

STYLE_MIN_HEIGHT

public static final java.lang.String STYLE_MIN_HEIGHT
See Also:
Constant Field Values

STYLE_MIN_WIDTH

public static final java.lang.String STYLE_MIN_WIDTH
See Also:
Constant Field Values

STYLE_WIDTH

public static final java.lang.String STYLE_WIDTH
See Also:
Constant Field Values

STYLE_FONT

public static final java.lang.String STYLE_FONT
See Also:
Constant Field Values

STYLE_FONT_FAMILY

public static final java.lang.String STYLE_FONT_FAMILY
See Also:
Constant Field Values

STYLE_FONT_SIZE

public static final java.lang.String STYLE_FONT_SIZE
See Also:
Constant Field Values

STYLE_FONT_SIZE_ADJUST

public static final java.lang.String STYLE_FONT_SIZE_ADJUST
See Also:
Constant Field Values

STYLE_FONT_STRETCH

public static final java.lang.String STYLE_FONT_STRETCH
See Also:
Constant Field Values

STYLE_FONT_STYLE

public static final java.lang.String STYLE_FONT_STYLE
See Also:
Constant Field Values

STYLE_FONT_VARIANT

public static final java.lang.String STYLE_FONT_VARIANT
See Also:
Constant Field Values

STYLE_FONT_WEIGHT

public static final java.lang.String STYLE_FONT_WEIGHT
See Also:
Constant Field Values

STYLE_COLOR

public static final java.lang.String STYLE_COLOR
See Also:
Constant Field Values

STYLE_DIRECTION

public static final java.lang.String STYLE_DIRECTION
See Also:
Constant Field Values

STYLE_LETTER_SPACING

public static final java.lang.String STYLE_LETTER_SPACING
See Also:
Constant Field Values

STYLE_TEXT_ALIGN

public static final java.lang.String STYLE_TEXT_ALIGN
See Also:
Constant Field Values

STYLE_TEXT_DECORATION

public static final java.lang.String STYLE_TEXT_DECORATION
See Also:
Constant Field Values

STYLE_TEXT_INDENT

public static final java.lang.String STYLE_TEXT_INDENT
See Also:
Constant Field Values

STYLE_TEXT_SHADOW

public static final java.lang.String STYLE_TEXT_SHADOW
See Also:
Constant Field Values

STYLE_TEXT_TRANSFORM

public static final java.lang.String STYLE_TEXT_TRANSFORM
See Also:
Constant Field Values

STYLE_WHITE_SPACE

public static final java.lang.String STYLE_WHITE_SPACE
See Also:
Constant Field Values

STYLE_WORD_SPACING

public static final java.lang.String STYLE_WORD_SPACING
See Also:
Constant Field Values

COLOR_TRANSPARENT

public static final java.lang.String COLOR_TRANSPARENT
See Also:
Constant Field Values

FONT_SIZE_XX_SMALL

public static final java.lang.String FONT_SIZE_XX_SMALL
See Also:
Constant Field Values

FONT_SIZE_X_SMALL

public static final java.lang.String FONT_SIZE_X_SMALL
See Also:
Constant Field Values

FONT_SIZE_SMALL

public static final java.lang.String FONT_SIZE_SMALL
See Also:
Constant Field Values

FONT_SIZE_MEDIUM

public static final java.lang.String FONT_SIZE_MEDIUM
See Also:
Constant Field Values

FONT_SIZE_LARGE

public static final java.lang.String FONT_SIZE_LARGE
See Also:
Constant Field Values

FONT_SIZE_X_LARGE

public static final java.lang.String FONT_SIZE_X_LARGE
See Also:
Constant Field Values

FONT_SIZE_XX_LARGE

public static final java.lang.String FONT_SIZE_XX_LARGE
See Also:
Constant Field Values

FONT_SIZE_SMALLER

public static final java.lang.String FONT_SIZE_SMALLER
See Also:
Constant Field Values

FONT_SIZE_LARGER

public static final java.lang.String FONT_SIZE_LARGER
See Also:
Constant Field Values

FONT_SIZE_ADJUST_NONE

public static final java.lang.String FONT_SIZE_ADJUST_NONE
See Also:
Constant Field Values

LENGTH_UNITS

public static final java.util.Set<java.lang.String> LENGTH_UNITS

LENGTH_AUTO

public static final java.lang.String LENGTH_AUTO
See Also:
Constant Field Values

LENGTH_NONE

public static final java.lang.String LENGTH_NONE
See Also:
Constant Field Values

LENGTH_NORMAL

public static final java.lang.String LENGTH_NORMAL
See Also:
Constant Field Values

POSITION_TOP_LEFT

public static final java.lang.String POSITION_TOP_LEFT
See Also:
Constant Field Values

POSITION_TOP_CENTER

public static final java.lang.String POSITION_TOP_CENTER
See Also:
Constant Field Values

POSITION_TOP_RIGHT

public static final java.lang.String POSITION_TOP_RIGHT
See Also:
Constant Field Values

POSITION_CENTER_LEFT

public static final java.lang.String POSITION_CENTER_LEFT
See Also:
Constant Field Values

POSITION_CENTER_CENTER

public static final java.lang.String POSITION_CENTER_CENTER
See Also:
Constant Field Values

POSITION_CENTER_RIGHT

public static final java.lang.String POSITION_CENTER_RIGHT
See Also:
Constant Field Values

POSITION_BOTTOM_LEFT

public static final java.lang.String POSITION_BOTTOM_LEFT
See Also:
Constant Field Values

POSITION_BOTTOM_CENTER

public static final java.lang.String POSITION_BOTTOM_CENTER
See Also:
Constant Field Values

POSITION_BOTTOM_RIGHT

public static final java.lang.String POSITION_BOTTOM_RIGHT
See Also:
Constant Field Values

TEXT_LETTER_SPACING_NORMAL

public static final java.lang.String TEXT_LETTER_SPACING_NORMAL
See Also:
Constant Field Values

TEXT_SHADOW_NONE

public static final java.lang.String TEXT_SHADOW_NONE
See Also:
Constant Field Values

TEXT_WORD_SPACING_NORMAL

public static final java.lang.String TEXT_WORD_SPACING_NORMAL
See Also:
Constant Field Values

URL_NONE

public static final java.net.URI URL_NONE

WIDTH_THIN

public static final java.lang.String WIDTH_THIN
See Also:
Constant Field Values

WIDTH_MEDIUM

public static final java.lang.String WIDTH_MEDIUM
See Also:
Constant Field Values

WIDTH_THICK

public static final java.lang.String WIDTH_THICK
See Also:
Constant Field Values
Constructor Detail

CSSBean

public CSSBean()
Method Detail

isColor

protected static boolean isColor(java.lang.String color)

isInteger

protected static boolean isInteger(java.lang.String val)

isLength

protected static boolean isLength(java.lang.String length)

isPercent

protected static boolean isPercent(java.lang.String val)

checkColor

protected void checkColor(java.lang.String color)

trimString

protected java.lang.String trimString(java.lang.String str)

checkBorderWidth

protected void checkBorderWidth(java.lang.String width)

isShortHandProperties

public boolean isShortHandProperties()
Returns:
Returns the shortHandProperties.

setShortHandProperties

public void setShortHandProperties(boolean shortHandProperties)
Parameters:
shortHandProperties - The shortHandProperties to set.

getBackgroundAttachment

public BackgroundAttachment getBackgroundAttachment()
Gets whether a background image is fixed or scrolls with the rest of the page.

Returns:
Returns the background-attachment.

setBackgroundAttachment

public void setBackgroundAttachment(BackgroundAttachment backgroundAttachment)
Sets whether a background image is fixed or scrolls with the rest of the page.

Parameters:
backgroundAttachment - The background-attachment to set.

getBackgroundColor

public java.lang.String getBackgroundColor()
Gets the background color of an element.

Returns:
Returns the background-color.

setBackgroundColor

public void setBackgroundColor(java.lang.String backgroundColor)
Sets the background color of an element.

Parameters:
backgroundColor - The background-color to set.

getBackgroundImage

public java.net.URI getBackgroundImage()
Gets the background image.

Returns:
Returns the background-image.

setBackgroundImage

public void setBackgroundImage(java.net.URI backgroundImage)
Sets the background image.

Parameters:
backgroundImage - The background-image to set.

getBackgroundPosition

public java.lang.String getBackgroundPosition()
Gets the starting position of a background image.

Returns:
Returns the background-position.

setBackgroundPosition

public void setBackgroundPosition(java.lang.String backgroundPosition)
Sets the starting position of a background image.

Parameters:
backgroundPosition - The background-position to set.

getBackgroundRepeat

public BackgroundRepeat getBackgroundRepeat()
Gets if/how a background image will be repeated.

Returns:
Returns the background-repeat.

setBackgroundRepeat

public void setBackgroundRepeat(BackgroundRepeat backgroundRepeat)
Sets if/how a background image will be repeated.

Parameters:
backgroundRepeat - The background-repeat to set.

getBorderBottomColor

public java.lang.String getBorderBottomColor()
Gets the color of the bottom border.

Returns:
Returns the borderBottomColor.

setBorderBottomColor

public void setBorderBottomColor(java.lang.String borderBottomColor)
Sets the color of the bottom border.

Parameters:
borderBottomColor - The borderBottomColor to set.

getBorderBottomStyle

public BorderStyle getBorderBottomStyle()
Gets the style of the bottom border.

Returns:
Returns the borderBottomStyle.

setBorderBottomStyle

public void setBorderBottomStyle(BorderStyle borderBottomStyle)
Sets the style of the bottom border.

Parameters:
borderBottomStyle - The borderBottomStyle to set.

getBorderBottomWidth

public java.lang.String getBorderBottomWidth()
Gets the width of the bottom border.

Returns:
Returns the borderBottomWidth.

setBorderBottomWidth

public void setBorderBottomWidth(java.lang.String borderBottomWidth)
Sets the width of the bottom border.

Parameters:
borderBottomWidth - The borderBottomWidth to set.

getBorderColor

public java.lang.String getBorderColor()
Gets the color of the four borders, can have from one to four colors.

Returns:
Returns the borderColor.

setBorderColor

public void setBorderColor(java.lang.String borderColor)
Sets the color of the four borders, can have from one to four colors.

Parameters:
borderColor - The borderColor to set.

getBorderLeftColor

public java.lang.String getBorderLeftColor()
Gets the color of the left border.

Returns:
Returns the borderLeftColor.

setBorderLeftColor

public void setBorderLeftColor(java.lang.String borderLeftColor)
Sets the color of the left border.

Parameters:
borderLeftColor - The borderLeftColor to set.

getBorderLeftStyle

public BorderStyle getBorderLeftStyle()
Gets the style of the left border.

Returns:
Returns the borderLeftStyle.

setBorderLeftStyle

public void setBorderLeftStyle(BorderStyle borderLeftStyle)
Sets the style of the left border.

Parameters:
borderLeftStyle - The borderLeftStyle to set.

getBorderLeftWidth

public java.lang.String getBorderLeftWidth()
Gets the width of the left border.

Returns:
Returns the borderLeftWidth.

setBorderLeftWidth

public void setBorderLeftWidth(java.lang.String borderLeftWidth)
Sets the width of the left border.

Parameters:
borderLeftWidth - The borderLeftWidth to set.

getBorderRightColor

public java.lang.String getBorderRightColor()
Gets the color of the right border.

Returns:
Returns the borderRightColor.

setBorderRightColor

public void setBorderRightColor(java.lang.String borderRightColor)
Sets the color of the right border.

Parameters:
borderRightColor - The borderRightColor to set.

getBorderRightStyle

public BorderStyle getBorderRightStyle()
Gets the style of the right border.

Returns:
Returns the borderRightStyle.

setBorderRightStyle

public void setBorderRightStyle(BorderStyle borderRightStyle)
Sets the style of the right border.

Parameters:
borderRightStyle - The borderRightStyle to set.

getBorderRightWidth

public java.lang.String getBorderRightWidth()
Gets the width of the right border.

Returns:
Returns the borderRightWidth.

setBorderRightWidth

public void setBorderRightWidth(java.lang.String borderRightWidth)
Sets the width of the right border.

Parameters:
borderRightWidth - The borderRightWidth to set.

getBorderStyle

public BorderStyle getBorderStyle()
Gets the style of the four borders.

Returns:
Returns the borderStyle.

setBorderStyle

public void setBorderStyle(BorderStyle borderStyle)
Sets the style of the four borders.

Parameters:
borderStyle - The borderStyle to set.

getBorderTopColor

public java.lang.String getBorderTopColor()
Gets the color of the top border.

Returns:
Returns the borderTopColor.

setBorderTopColor

public void setBorderTopColor(java.lang.String borderTopColor)
Sets the color of the top border.

Parameters:
borderTopColor - The borderTopColor to set.

getBorderTopStyle

public BorderStyle getBorderTopStyle()
Gets the style of the top border.

Returns:
Returns the borderTopStyle.

setBorderTopStyle

public void setBorderTopStyle(BorderStyle borderTopStyle)
Sets the style of the top border.

Parameters:
borderTopStyle - The borderTopStyle to set.

getBorderTopWidth

public java.lang.String getBorderTopWidth()
Gets the width of the top border.

Returns:
Returns the borderTopWidth.

setBorderTopWidth

public void setBorderTopWidth(java.lang.String borderTopWidth)
Sets the width of the top border.

Parameters:
borderTopWidth - The borderTopWidth to set.

getBorderWidth

public java.lang.String getBorderWidth()
Gets the width of the four borders.

Returns:
Returns the borderWidth.

setBorderWidth

public void setBorderWidth(java.lang.String borderWidth)
Sets the width of the four borders.

Parameters:
borderWidth - The borderWidth to set.

getClear

public SidePosition getClear()
Returns:
Returns the clear.

setClear

public void setClear(SidePosition clear)
Parameters:
clear - The clear to set.

getDisplay

public Display getDisplay()
Returns:
Returns the display.

setDisplay

public void setDisplay(Display display)
Parameters:
display - The display to set.

getFloat

public FloatPosition getFloat()
Returns:
Returns the float_.

setFloat

public void setFloat(FloatPosition float_)
Parameters:
float_ - The float_ to set.

getPosition

public Position getPosition()
Returns:
Returns the position.

setPosition

public void setPosition(Position position)
Parameters:
position - The position to set.

getVisibility

public Visibility getVisibility()
Returns:
Returns the visibility.

setVisibility

public void setVisibility(Visibility visibility)
Parameters:
visibility - The visibility to set.

getHeight

public java.lang.String getHeight()
Gets the height of an element.

Returns:
Returns the height.

setHeight

public void setHeight(java.lang.String height)
Sets the height of an element.

Parameters:
height - The height to set.

getLineHeight

public java.lang.String getLineHeight()
Gets the distance between lines.

Returns:
Returns the lineHeight.

setLineHeight

public void setLineHeight(java.lang.String lineHeight)
Sets the distance between lines.

Parameters:
lineHeight - The lineHeight to set.

getMaxHeight

public java.lang.String getMaxHeight()
Gets the maximum height of an element.

Returns:
Returns the maxHeight.

setMaxHeight

public void setMaxHeight(java.lang.String maxHeight)
Sets the maximum height of an element.

Parameters:
maxHeight - The maxHeight to set.

getMaxWidth

public java.lang.String getMaxWidth()
Gets the maximum width of an element.

Returns:
Returns the maxWidth.

setMaxWidth

public void setMaxWidth(java.lang.String maxWidth)
Sets the maximum width of an element.

Parameters:
maxWidth - The maxWidth to set.

getMinHeight

public java.lang.String getMinHeight()
Gets the minimum height of an element.

Returns:
Returns the minHeight.

setMinHeight

public void setMinHeight(java.lang.String minHeight)
Sets the minimum height of an element.

Parameters:
minHeight - The minHeight to set.

getMinWidth

public java.lang.String getMinWidth()
Gets the minimum width of an element.

Returns:
Returns the minWidth.

setMinWidth

public void setMinWidth(java.lang.String minWidth)
Sets the minimum width of an element.

Parameters:
minWidth - The minWidth to set.

getWidth

public java.lang.String getWidth()
Gets the width of an element.

Returns:
Returns the width.

setWidth

public void setWidth(java.lang.String width)
Sets the width of an element.

Parameters:
width - The width to set.

getFontFamily

public java.lang.String getFontFamily()
Gets the prioritized list of font family names and/or generic family names for an element.

Returns:
Returns the fontFamily.

setFontFamily

public void setFontFamily(java.lang.String fontFamily)
Sets the prioritized list of font family names and/or generic family names for an element.

Parameters:
fontFamily - The fontFamily to set.

getFontSize

public java.lang.String getFontSize()
Gets the size of a font.

Returns:
Returns the fontSize.

setFontSize

public void setFontSize(java.lang.String fontSize)
Sets the size of a font.

Parameters:
fontSize - The fontSize to set.

getFontSizeAdjust

public java.lang.String getFontSizeAdjust()
Specifies an aspect value for an element that will preserve the x-height of the first-choice font.

Returns:
Returns the fontSizeAdjust.

setFontSizeAdjust

public void setFontSizeAdjust(java.lang.String fontSizeAdjust)
Specifies an aspect value for an element that will preserve the x-height of the first-choice font.

Parameters:
fontSizeAdjust - The fontSizeAdjust to set.

getFontStretch

public FontStretch getFontStretch()
Condenses or expands the current font-family.

Returns:
Returns the fontStretch.

setFontStretch

public void setFontStretch(FontStretch fontStretch)
Condenses or expands the current font-family.

Parameters:
fontStretch - The fontStretch to set.

getFontStyle

public Style getFontStyle()
Gets the style of the font.

Returns:
Returns the fontStyle.

setFontStyle

public void setFontStyle(Style fontStyle)
Sets the style of the font.

Parameters:
fontStyle - The fontStyle to set.

getFontVariant

public Variant getFontVariant()
Displays text in a small-caps font or a normal font.

Returns:
Returns the fontVariant.

setFontVariant

public void setFontVariant(Variant fontVariant)
Displays text in a small-caps font or a normal font.

Parameters:
fontVariant - The fontVariant to set.

getFontWeight

public Weight getFontWeight()
Sets the weight of a font.

Returns:
Returns the fontWeight.

setFontWeight

public void setFontWeight(Weight fontWeight)
Sets the weight of a font.

Parameters:
fontWeight - The fontWeight to set.

getColor

public java.lang.String getColor()
Gets the color of a text.

Returns:
Returns the color.

setColor

public void setColor(java.lang.String color)
Sets the color of a text.

Parameters:
color - The color to set.

getDirection

public Direction getDirection()
Gets the text direction.

Returns:
Returns the direction.

setDirection

public void setDirection(Direction direction)
Sets the text direction.

Parameters:
direction - The direction to set.

getLetterSpacing

public java.lang.String getLetterSpacing()
Increase or decrease the space between characters.

Returns:
Returns the letterSpacing.

setLetterSpacing

public void setLetterSpacing(java.lang.String letterSpacing)
Increase or decrease the space between characters.

Parameters:
letterSpacing - The letterSpacing to set.

getTextAlign

public TextAlign getTextAlign()
Aligns the text in an element.

Returns:
Returns the testAlign.

setTextAlign

public void setTextAlign(TextAlign testAlign)
Aligns the text in an element.

Parameters:
testAlign - The testAlign to set.

getTextDecoration

public TextDecoration getTextDecoration()
Adds decoration to text.

Returns:
Returns the textDecoration.

setTextDecoration

public void setTextDecoration(TextDecoration textDecoration)
Adds decoration to text.

Parameters:
textDecoration - The textDecoration to set.

getTextIndent

public java.lang.String getTextIndent()
Indents the first line of text in an element.

Returns:
Returns the textIndent.

setTextIndent

public void setTextIndent(java.lang.String textIndent)
Indents the first line of text in an element.

Parameters:
textIndent - The textIndent to set.

getTextShadow

public java.lang.String getTextShadow()
Returns:
Returns the textShadow.

setTextShadow

public void setTextShadow(java.lang.String textShadow)
Parameters:
textShadow - The textShadow to set.

getTextTransform

public TextTransform getTextTransform()
Returns:
Returns the textTransform.

setTextTransform

public void setTextTransform(TextTransform textTransform)
Parameters:
textTransform - The textTransform to set.

getWhiteSpace

public WhiteSpace getWhiteSpace()
Returns:
Returns the whiteSpace.

setWhiteSpace

public void setWhiteSpace(WhiteSpace whiteSpace)
Parameters:
whiteSpace - The whiteSpace to set.

getWordSpacing

public java.lang.String getWordSpacing()
Returns:
Returns the wordSpacing.

setWordSpacing

public void setWordSpacing(java.lang.String wordSpacing)
Parameters:
wordSpacing - The wordSpacing to set.

seperateStyle

protected void seperateStyle(java.lang.StringBuilder builder)
Appends white space to the builder parameter if the length of builder is greater than 0.

Parameters:
builder - The StringBuilder object used to generate the style.

seperateValue

protected void seperateValue(java.lang.StringBuilder builder)

appendValue

protected void appendValue(java.lang.StringBuilder builder,
                           java.lang.String value)

uriToString

protected void uriToString(java.lang.StringBuilder builder,
                           java.net.URI uri)

appendValue

protected void appendValue(java.lang.StringBuilder builder,
                           java.net.URI uri)

appendValue

protected void appendValue(java.lang.StringBuilder builder,
                           Value value)

appendStyle

protected void appendStyle(java.lang.StringBuilder builder,
                           java.lang.String style,
                           java.lang.String value)

appendStyle

protected void appendStyle(java.lang.StringBuilder builder,
                           java.lang.String style,
                           java.net.URI uri)

appendStyle

protected void appendStyle(java.lang.StringBuilder builder,
                           java.lang.String style,
                           Value value)

appendShortHandStyle

protected void appendShortHandStyle(java.lang.StringBuilder builder,
                                    java.lang.String style,
                                    java.lang.StringBuilder shortHandBuilder)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 Mike Heath. All Rights Reserved.