net.sf.vex.css
Class Styles

java.lang.Object
  |
  +--net.sf.vex.css.Styles

public class Styles
extends java.lang.Object

Represents the computed style properties for a particular element.


Constructor Summary
Styles()
           
 
Method Summary
 java.awt.Color getBackgroundColor()
          Returns the value of the backgroundColor property.
 java.awt.Color getBorderBottomColor()
          Returns the value of the borderBottomColor property.
 java.lang.String getBorderBottomStyle()
          Returns the value of the borderBottomStyle property.
 int getBorderBottomWidth()
           
 java.awt.Color getBorderLeftColor()
          Returns the value of the borderLeftColor property.
 java.lang.String getBorderLeftStyle()
          Returns the value of the borderLeftStyle property.
 int getBorderLeftWidth()
           
 java.awt.Color getBorderRightColor()
          Returns the value of the borderRightColor property.
 java.lang.String getBorderRightStyle()
          Returns the value of the borderRightStyle property.
 int getBorderRightWidth()
           
 java.awt.Color getBorderTopColor()
          Returns the value of the borderTopColor property.
 java.lang.String getBorderTopStyle()
          Returns the value of the borderTopStyle property.
 int getBorderTopWidth()
           
 java.awt.Color getColor()
          Returns the value of the color property.
 java.util.List getContent()
          Returns a List of ContentPart objects representing the content property.
 java.lang.String getDisplay()
          Returns the value of the display property.
 java.awt.Font getFont()
          Returns the value of the font property.
 java.lang.String getFontFamily()
          Returns the value of the fontFamily property.
 float getFontSize()
          Returns the value of the fontSize property.
 java.lang.String getFontStyle()
          Returns the value of the fontStyle property.
 int getFontWeight()
          Returns the value of the fontWeight property.
 int getLineHeight()
          Returns the value of the lineHeight property.
 float getLineHeightMultiplier()
          Returns the value of the lineHeightMultiplier property.
 java.lang.String getListStyleType()
          Returns the value of the listStyleType property.
 RelativeLength getMarginBottom()
           
 RelativeLength getMarginLeft()
           
 RelativeLength getMarginRight()
           
 RelativeLength getMarginTop()
           
 RelativeLength getPaddingBottom()
           
 RelativeLength getPaddingLeft()
           
 RelativeLength getPaddingRight()
           
 RelativeLength getPaddingTop()
           
 java.lang.String getTextAlign()
          Returns the value of the textAlign property.
 java.lang.String getWhiteSpace()
          Returns the value of the whiteSpace property.
 boolean isBlock()
          Returns true if this element is block-formatted, or false if it is inline-formatted.
 void setBackgroundColor(java.awt.Color backgroundColor)
          Sets the value of the backgroundColor property.
 void setBorderBottomColor(java.awt.Color borderBottomColor)
          Sets the value of the borderBottomColor property.
 void setBorderBottomStyle(java.lang.String borderBottomStyle)
          Sets the value of the borderBottomStyle property.
 void setBorderBottomWidth(int i)
           
 void setBorderLeftColor(java.awt.Color borderLeftColor)
          Sets the value of the borderLeftColor property.
 void setBorderLeftStyle(java.lang.String borderLeftStyle)
          Sets the value of the borderLeftStyle property.
 void setBorderLeftWidth(int i)
           
 void setBorderRightColor(java.awt.Color borderRightColor)
          Sets the value of the borderRightColor property.
 void setBorderRightStyle(java.lang.String borderRightStyle)
          Sets the value of the borderRightStyle property.
 void setBorderRightWidth(int i)
           
 void setBorderTopColor(java.awt.Color borderTopColor)
          Sets the value of the borderTopColor property.
 void setBorderTopStyle(java.lang.String borderTopStyle)
          Sets the value of the borderTopStyle property.
 void setBorderTopWidth(int i)
           
 void setColor(java.awt.Color color)
          Sets the value of the color property.
 void setContent(java.util.List content)
          Sets the vale of the content property.
 void setDisplay(java.lang.String display)
          Sets the value of the display property.
 void setFont(java.awt.Font font)
          Sets the value of the font property.
 void setFontFamily(java.lang.String fontFamily)
          Sets the value of the fontFamily property.
 void setFontSize(float fontSize)
          Sets the value of the fontSize property.
 void setFontStyle(java.lang.String fontStyle)
          Sets the value of the fontStyle property.
 void setFontWeight(int fontWeight)
          Sets the value of the fontWeight property.
 void setLineHeight(int lineHeight)
          Sets the value of the lineHeight property.
 void setLineHeightMultiplier(float lineHeightMultiplier)
          Sets the value of the lineHeightMultiplier property.
 void setListStyleType(java.lang.String listStyleType)
          Sets the value of the listStyleType property.
 void setMarginBottom(RelativeLength length)
           
 void setMarginLeft(RelativeLength length)
           
 void setMarginRight(RelativeLength length)
           
 void setMarginTop(RelativeLength length)
           
 void setPaddingBottom(RelativeLength length)
           
 void setPaddingLeft(RelativeLength length)
           
 void setPaddingRight(RelativeLength length)
           
 void setPaddingTop(RelativeLength length)
           
 void setTextAlign(java.lang.String textAlign)
          Sets the value of the textAlign property.
 void setWhiteSpace(java.lang.String whiteSpace)
          Sets the value of the whiteSpace property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Styles

public Styles()
Method Detail

getBackgroundColor

public java.awt.Color getBackgroundColor()
Returns the value of the backgroundColor property. Returns null if the background color is transparent.


getBorderBottomColor

public java.awt.Color getBorderBottomColor()
Returns the value of the borderBottomColor property.


getBorderBottomStyle

public java.lang.String getBorderBottomStyle()
Returns the value of the borderBottomStyle property.


getBorderLeftColor

public java.awt.Color getBorderLeftColor()
Returns the value of the borderLeftColor property.


getBorderLeftStyle

public java.lang.String getBorderLeftStyle()
Returns the value of the borderLeftStyle property.


getBorderRightColor

public java.awt.Color getBorderRightColor()
Returns the value of the borderRightColor property.


getBorderRightStyle

public java.lang.String getBorderRightStyle()
Returns the value of the borderRightStyle property.


getBorderTopColor

public java.awt.Color getBorderTopColor()
Returns the value of the borderTopColor property.


getBorderTopStyle

public java.lang.String getBorderTopStyle()
Returns the value of the borderTopStyle property.


getColor

public java.awt.Color getColor()
Returns the value of the color property.


getContent

public java.util.List getContent()
Returns a List of ContentPart objects representing the content property.


getDisplay

public java.lang.String getDisplay()
Returns the value of the display property.


getFont

public java.awt.Font getFont()
Returns the value of the font property.


getFontFamily

public java.lang.String getFontFamily()
Returns the value of the fontFamily property.


getFontSize

public float getFontSize()
Returns the value of the fontSize property.


getFontStyle

public java.lang.String getFontStyle()
Returns the value of the fontStyle property.


getFontWeight

public int getFontWeight()
Returns the value of the fontWeight property.


getLineHeight

public int getLineHeight()
Returns the value of the lineHeight property.


getLineHeightMultiplier

public float getLineHeightMultiplier()
Returns the value of the lineHeightMultiplier property.


getListStyleType

public java.lang.String getListStyleType()
Returns the value of the listStyleType property.


getTextAlign

public java.lang.String getTextAlign()
Returns the value of the textAlign property.


getWhiteSpace

public java.lang.String getWhiteSpace()
Returns the value of the whiteSpace property.


isBlock

public boolean isBlock()
Returns true if this element is block-formatted, or false if it is inline-formatted.


setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)
Sets the value of the backgroundColor property.

Parameters:
backgroundColor - new value for the backgroundColor property.

setBorderBottomColor

public void setBorderBottomColor(java.awt.Color borderBottomColor)
Sets the value of the borderBottomColor property.

Parameters:
borderBottomColor - new value for the borderBottomColor property.

setBorderBottomStyle

public void setBorderBottomStyle(java.lang.String borderBottomStyle)
Sets the value of the borderBottomStyle property.

Parameters:
borderBottomStyle - new value for the borderBottomStyle property.

setBorderLeftColor

public void setBorderLeftColor(java.awt.Color borderLeftColor)
Sets the value of the borderLeftColor property.

Parameters:
borderLeftColor - new value for the borderLeftColor property.

setBorderLeftStyle

public void setBorderLeftStyle(java.lang.String borderLeftStyle)
Sets the value of the borderLeftStyle property.

Parameters:
borderLeftStyle - new value for the borderLeftStyle property.

setBorderRightColor

public void setBorderRightColor(java.awt.Color borderRightColor)
Sets the value of the borderRightColor property.

Parameters:
borderRightColor - new value for the borderRightColor property.

setBorderRightStyle

public void setBorderRightStyle(java.lang.String borderRightStyle)
Sets the value of the borderRightStyle property.

Parameters:
borderRightStyle - new value for the borderRightStyle property.

setBorderTopColor

public void setBorderTopColor(java.awt.Color borderTopColor)
Sets the value of the borderTopColor property.

Parameters:
borderTopColor - new value for the borderTopColor property.

setBorderTopStyle

public void setBorderTopStyle(java.lang.String borderTopStyle)
Sets the value of the borderTopStyle property.

Parameters:
borderTopStyle - new value for the borderTopStyle property.

setColor

public void setColor(java.awt.Color color)
Sets the value of the color property.

Parameters:
color - new value for the color property.

setContent

public void setContent(java.util.List content)
Sets the vale of the content property.

Parameters:
content - List of ContentPart objects representing the content.

setDisplay

public void setDisplay(java.lang.String display)
Sets the value of the display property.

Parameters:
display - new value for the display property.

setFont

public void setFont(java.awt.Font font)
Sets the value of the font property.

Parameters:
font - new value for the font property.

setFontFamily

public void setFontFamily(java.lang.String fontFamily)
Sets the value of the fontFamily property.

Parameters:
fontFamily - new value for the fontFamily property.

setFontSize

public void setFontSize(float fontSize)
Sets the value of the fontSize property.

Parameters:
fontSize - new value for the fontSize property.

setFontStyle

public void setFontStyle(java.lang.String fontStyle)
Sets the value of the fontStyle property.

Parameters:
fontStyle - new value for the fontStyle property.

setFontWeight

public void setFontWeight(int fontWeight)
Sets the value of the fontWeight property.

Parameters:
fontWeight - new value for the fontWeight property.

setLineHeight

public void setLineHeight(int lineHeight)
Sets the value of the lineHeight property.

Parameters:
lineHeight - new value for the lineHeight property.

setLineHeightMultiplier

public void setLineHeightMultiplier(float lineHeightMultiplier)
Sets the value of the lineHeightMultiplier property.

Parameters:
lineHeightMultiplier - new value for the lineHeightMultiplier property.

setListStyleType

public void setListStyleType(java.lang.String listStyleType)
Sets the value of the listStyleType property.

Parameters:
listStyleType - new value for the listStyleType property.

setTextAlign

public void setTextAlign(java.lang.String textAlign)
Sets the value of the textAlign property.

Parameters:
textAlign - new value for the textAlign property.

setWhiteSpace

public void setWhiteSpace(java.lang.String whiteSpace)
Sets the value of the whiteSpace property.

Parameters:
whiteSpace - new value for the whiteSpace property.

getBorderBottomWidth

public int getBorderBottomWidth()
Returns:
the value of border-bottom-width

getBorderLeftWidth

public int getBorderLeftWidth()
Returns:
the value of border-left-width

getBorderRightWidth

public int getBorderRightWidth()
Returns:
the value of border-right-width

getBorderTopWidth

public int getBorderTopWidth()
Returns:
the value of border-top-width

getMarginBottom

public RelativeLength getMarginBottom()
Returns:
the value of margin-bottom

getMarginLeft

public RelativeLength getMarginLeft()
Returns:
the value of margin-left

getMarginRight

public RelativeLength getMarginRight()
Returns:
the value of margin-right

getMarginTop

public RelativeLength getMarginTop()
Returns:
the value of margin-top

getPaddingBottom

public RelativeLength getPaddingBottom()
Returns:
the value of padding-bottom

getPaddingLeft

public RelativeLength getPaddingLeft()
Returns:
the value of padding-left

getPaddingRight

public RelativeLength getPaddingRight()
Returns:
the value of padding-right

getPaddingTop

public RelativeLength getPaddingTop()
Returns:
the value of padding-top

setBorderBottomWidth

public void setBorderBottomWidth(int i)
Parameters:
i - new value for border-bottom-width

setBorderLeftWidth

public void setBorderLeftWidth(int i)
Parameters:
i - new value for border-left-width

setBorderRightWidth

public void setBorderRightWidth(int i)
Parameters:
i - new value for border-right-width

setBorderTopWidth

public void setBorderTopWidth(int i)
Parameters:
i - new value for border-top-width

setMarginBottom

public void setMarginBottom(RelativeLength length)
Parameters:
length - new value for margin-bottom

setMarginLeft

public void setMarginLeft(RelativeLength length)
Parameters:
length - new value for margin-left

setMarginRight

public void setMarginRight(RelativeLength length)
Parameters:
length - new value for margin-right

setMarginTop

public void setMarginTop(RelativeLength length)
Parameters:
length - new value for margin-top

setPaddingBottom

public void setPaddingBottom(RelativeLength length)
Parameters:
length - new value for padding-bottom

setPaddingLeft

public void setPaddingLeft(RelativeLength length)
Parameters:
length - new value for padding-left

setPaddingRight

public void setPaddingRight(RelativeLength length)
Parameters:
length - new value for padding-right

setPaddingTop

public void setPaddingTop(RelativeLength length)
Parameters:
length - new value for padding-top