com.gargoylesoftware.htmlunit.javascript.host.css
Class ComputedCSSStyleDeclaration

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration
              extended by com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration
All Implemented Interfaces:
ScriptableWithFallbackGetter, Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class ComputedCSSStyleDeclaration
extends CSSStyleDeclaration

A JavaScript object for a ComputedCSSStyleDeclaration.

Version:
$Revision: 8391 $
Author:
Ahmed Ashour, Marc Guillemot, Ronald Brill
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration
CSSStyleDeclaration.CssValue, CSSStyleDeclaration.StyleElement
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration
PRIORITY_IMPORTANT, WIDTH
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
ComputedCSSStyleDeclaration()
          Creates an instance.
ComputedCSSStyleDeclaration(CSSStyleDeclaration style)
           
 
Method Summary
 void applyStyleFromSelector(org.w3c.dom.css.CSSStyleDeclaration declaration, org.w3c.css.sac.Selector selector)
          Makes a local, "computed", modification to this CSS style.
 String getBackgroundAttachment()
          Gets the "backgroundAttachment" style attribute.
 String getBackgroundColor()
          Gets the "backgroundColor" style attribute.
 String getBackgroundImage()
          Gets the "backgroundImage" style attribute.
 String getBackgroundPosition()
          Gets the "backgroundPosition" style attribute.
 String getBackgroundRepeat()
          Gets the "backgroundRepeat" style attribute.
 String getBorderBottomColor()
          Gets the "borderBottomColor" style attribute.
 String getBorderBottomStyle()
          Gets the "borderBottomStyle" style attribute.
 int getBorderBottomValue()
          Gets the size of the bottom border of the element.
 String getBorderBottomWidth()
          Gets the "borderBottomWidth" style attribute.
 String getBorderCollapse()
          Gets the "borderCollapse" style attribute.
 String getBorderLeftColor()
          Gets the "borderLeftColor" style attribute.
 String getBorderLeftStyle()
          Gets the "borderLeftStyle" style attribute.
 int getBorderLeftValue()
          Gets the size of the left border of the element.
 String getBorderLeftWidth()
          Gets the "borderLeftWidth" style attribute.
 String getBorderRightColor()
          Gets the "borderRightColor" style attribute.
 String getBorderRightStyle()
          Gets the "borderRightStyle" style attribute.
 int getBorderRightValue()
          Gets the size of the right border of the element.
 String getBorderRightWidth()
          Gets the "borderRightWidth" style attribute.
 String getBorderSpacing()
          Gets the "borderSpacing" style attribute.
 String getBorderTopColor()
          Gets the "borderTopColor" style attribute.
 String getBorderTopStyle()
          Gets the "borderTopStyle" style attribute.
 int getBorderTopValue()
          Gets the size of the top border of the element.
 String getBorderTopWidth()
          Gets the "borderTopWidth" style attribute.
 String getBottom()
          Gets the "bottom" style attribute.
 String getBottomWithInheritance()
          Returns the CSS bottom attribute, replacing inherited values with the actual parent values.
 int getCalculatedHeight(boolean includeBorder, boolean includePadding)
          Returns the element's height, possibly including its padding and border.
 int getCalculatedWidth(boolean includeBorder, boolean includePadding)
          Returns the element's width in pixels, possibly including its padding and border.
 String getCaptionSide()
          Gets the "captionSide" style attribute.
 String getClear()
          Gets the "clear" style attribute.
 String getClip()
          Gets the "clip" style attribute.
 String getColor()
          Gets the "color" style attribute.
 String getContent()
          Gets the "content" style attribute.
 int getContentHeight()
          Returns the total height of the element's children.
 int getContentWidth()
          Returns the total width of the element's children.
 String getCounterIncrement()
          Gets the "counterIncrement" style attribute.
 String getCounterReset()
          Gets the "counterReset" style attribute.
 String getCssFloat()
          Gets the "cssFloat" style attribute.
 String getCursor()
          Gets the "cursor" style attribute.
 String getDirection()
          Gets the "direction" style attribute.
 String getDisplay()
          Gets the "display" style attribute.
 String getEmptyCells()
          Gets the "emptyCells" style attribute.
 String getFontFamily()
          Gets the "fontFamily" style attribute.
 String getFontSize()
          Gets the "fontSize" style attribute.
 String getFontSizeAdjust()
          Gets the "fontSizeAdjust" style attribute.
 String getFontStretch()
          Gets the "fontStretch" style attribute.
 String getFontStyle()
          Gets the "fontStyle" style attribute.
 String getFontVariant()
          Gets the "fontVariant" style attribute.
 String getFontWeight()
          Gets the "fontWeight" style attribute.
 String getHeight()
          Gets the "height" style attribute.
 String getImeMode()
          Gets the "imeMode" style attribute.
 String getLeft()
          Gets the "left" style attribute.
 int getLeft(boolean includeMargin, boolean includeBorder, boolean includePadding)
          Returns the computed left (X coordinate), relative to the node's parent's left edge.
 String getLeftWithInheritance()
          Returns the CSS left attribute, replacing inherited values with the actual parent values.
 String getLetterSpacing()
          Gets the "letterSpacing" style attribute.
 String getListStyleImage()
          Gets the "listStyleImage" style attribute.
 String getListStylePosition()
          Gets the "listStylePosition" style attribute.
 String getListStyleType()
          Gets the "listStyleType" style attribute.
 String getMarginBottom()
          Gets the "marginBottom" style attribute.
 int getMarginBottomValue()
          Gets the bottom margin of the element.
 String getMarginLeft()
          Gets the "marginLeft" style attribute.
 int getMarginLeftValue()
          Gets the left margin of the element.
 String getMarginRight()
          Gets the "marginRight" style attribute.
 int getMarginRightValue()
          Gets the right margin of the element.
 String getMarginTop()
          Gets the "marginTop" style attribute.
 int getMarginTopValue()
          Gets the top margin of the element.
 String getMarkerOffset()
          Gets the "markerOffset" style attribute.
 String getMaxHeight()
          Gets the "maxHeight" style attribute.
 String getMaxWidth()
          Gets the "maxWidth" style attribute.
 String getMinHeight()
          Gets the "minHeight" style attribute.
 String getMinWidth()
          Gets the "minWidth" style attribute.
 String getOpacity()
          Gets the "opacity" style attribute.
 String getOutlineColor()
          Gets the "outlineColor" style attribute.
 String getOutlineOffset()
          Gets the "outlineOffset" style attribute.
 String getOutlineStyle()
          Gets the "outlineStyle" style attribute.
 String getOutlineWidth()
          Gets the "outlineWidth" style attribute.
 String getOverflow()
          Gets the "overflow" style attribute.
 String getOverflowX()
          Gets the "overflowX" style attribute.
 String getOverflowY()
          Gets the "overflowY" style attribute.
 String getPaddingBottom()
          Gets the "paddingBottom" style attribute.
 int getPaddingBottomValue()
          Gets the bottom padding of the element.
 String getPaddingLeft()
          Gets the "paddingLeft" style attribute.
 int getPaddingLeftValue()
          Gets the left padding of the element.
 String getPaddingRight()
          Gets the "paddingRight" style attribute.
 int getPaddingRightValue()
          Gets the right padding of the element.
 String getPaddingTop()
          Gets the "paddingTop" style attribute.
 int getPaddingTopValue()
          Gets the top padding of the element.
 String getPageBreakAfter()
          Gets the "pageBreakAfter" style attribute.
 String getPageBreakBefore()
          Gets the "pageBreakBefore" style attribute.
 String getPointerEvents()
          Gets the "pointerEvents" style attribute.
 String getPosition()
          Gets the "position" style attribute.
 String getPositionWithInheritance()
          Returns the CSS position attribute, replacing inherited values with the actual parent values.
 String getPropertyValue(String name)
          Gets the value of the specified property of the style.
 String getRight()
          Gets the "right" style attribute.
 String getRightWithInheritance()
          Returns the CSS right attribute, replacing inherited values with the actual parent values.
protected  String getStyleAttribute(String name)
          Returns the value of the named style attribute, or an empty string if it is not found.
protected  String getStyleAttributeValue(StyleAttributes.Definition style)
          Get the value for the style attribute.
protected  CSSStyleDeclaration.StyleElement getStyleElement(String name)
          Determines the StyleElement for the given name.
 String getTableLayout()
          Gets the "tableLayout" style attribute.
 String getTextAlign()
          Gets the "textAlign" style attribute.
 String getTextDecoration()
          Gets the "textDecoration" style attribute.
 String getTextIndent()
          Gets the "textIndent" style attribute.
 String getTextShadow()
          Gets the "textShadow" style attribute.
 String getTextTransform()
          Gets the "textTransform" style attribute.
 String getTop()
          Gets the "top" style attribute.
 int getTop(boolean includeMargin, boolean includeBorder, boolean includePadding)
          Returns the computed top (Y coordinate), relative to the node's parent's top edge.
 String getTopWithInheritance()
          Returns the CSS top attribute, replacing inherited values with the actual parent values.
 String getVerticalAlign()
          Gets the "verticalAlign" style attribute.
 String getVisibility()
          Gets the "visibility" style attribute.
 String getWhiteSpace()
          Gets the "whiteSpace" style attribute.
 String getWidth()
          Gets the "width" style attribute.
 String getWordSpacing()
          Gets the "wordSpacing" style attribute.
 String getWordWrap()
          Gets the "wordWrap" style attribute.
 Object getZIndex()
          Gets the "zIndex" style attribute.
 boolean isScrollable(boolean horizontal)
          Returns true if the element is scrollable along the specified axis.
protected  String pixelString(Element element, CSSStyleDeclaration.CssValue value)
          Returns the specified length CSS attribute value value as a pixel length value, as long as we're not emulating IE.
protected  String pixelString(String value)
          Returns the specified length value as a pixel length value, as long as we're not emulating IE.
 void setDefaultLocalStyleAttribute(String name, String newValue)
          Makes a local, "computed", modification to this CSS style that won't override other style attributes of the same name.
protected  void setStyleAttribute(String name, String newValue)
          Sets the specified style attribute.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration
camelize, get, getAttribute, getBackground, getBackgroundPositionX, getBackgroundPositionY, getBehavior, getBorder, getBorderBottom, getBorderColor, getBorderLeft, getBorderRight, getBorderStyle, getBorderTop, getBorderWidth, getBoxSizing, getCssText, getCurrentElementIndex, getElement, getFont, getIds, getLayoutFlow, getLayoutGrid, getLayoutGridChar, getLayoutGridLine, getLayoutGridMode, getLayoutGridType, getLength, getLineBreak, getListStyle, getMargin, getMarks, getMsBlockProgression, getMsInterpolationMode, getOrphans, getOutline, getPadding, getPage, getPageBreakInside, getPixelBottom, getPixelLeft, getPixelRight, getPixelTop, getPosBottom, getPosHeight, getPosLeft, getPosRight, getPosTop, getPosWidth, getPropertyCSSValue, getRubyAlign, getRubyOverhang, getRubyPosition, getScrollbar3dLightColor, getScrollbarArrowColor, getScrollbarBaseColor, getScrollbarDarkShadowColor, getScrollbarFaceColor, getScrollbarHighlightColor, getScrollbarShadowColor, getScrollbarTrackColor, getSize, getStyleFloat, getTextAlignLast, getTextAutospace, getTextDecorationBlink, getTextDecorationLineThrough, getTextDecorationNone, getTextDecorationOverline, getTextDecorationUnderline, getTextJustify, getTextJustifyTrim, getTextKashida, getTextKashidaSpace, getTextOverflow, getTextUnderlinePosition, getWidows, getWithFallback, getWritingMode, getZoom, has, pixelValue, pixelValue, put, removeAttribute, removeExpression, removeProperty, setAttribute, setBackground, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundPositionX, setBackgroundPositionY, setBackgroundRepeat, setBehavior, setBorder, setBorderBottom, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderCollapse, setBorderColor, setBorderLeft, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRight, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderSpacing, setBorderStyle, setBorderTop, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBoxSizing, setCaptionSide, setClear, setClip, setColor, setContent, setCounterIncrement, setCounterReset, setCssFloat, setCssText, setCursor, setDirection, setDisplay, setEmptyCells, setExpression, setFont, setFontFamily, setFontSize, setFontSizeAdjust, setFontStretch, setFontStyle, setFontVariant, setFontWeight, setHeight, setImeMode, setLayoutFlow, setLayoutGrid, setLayoutGridChar, setLayoutGridLine, setLayoutGridMode, setLayoutGridType, setLeft, setLetterSpacing, setLineBreak, setListStyle, setListStyleImage, setListStylePosition, setListStyleType, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMarkerOffset, setMarks, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMsBlockProgression, setMsInterpolationMode, setOpacity, setOrphans, setOutline, setOutlineColor, setOutlineOffset, setOutlineStyle, setOutlineWidth, setOverflow, setOverflowX, setOverflowY, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPage, setPageBreakAfter, setPageBreakBefore, setPageBreakInside, setPixelBottom, setPixelLeft, setPixelRight, setPixelTop, setPointerEvents, setPosBottom, setPosHeight, setPosition, setPosLeft, setPosRight, setPosTop, setPosWidth, setRight, setRubyAlign, setRubyOverhang, setRubyPosition, setScrollbar3dLightColor, setScrollbarArrowColor, setScrollbarBaseColor, setScrollbarDarkShadowColor, setScrollbarFaceColor, setScrollbarHighlightColor, setScrollbarShadowColor, setScrollbarTrackColor, setSize, setStyleAttributePixel, setStyleFloat, setTableLayout, setTextAlign, setTextAlignLast, setTextAutospace, setTextDecoration, setTextDecorationBlink, setTextDecorationLineThrough, setTextDecorationNone, setTextDecorationOverline, setTextDecorationUnderline, setTextIndent, setTextJustify, setTextJustifyTrim, setTextKashida, setTextKashidaSpace, setTextOverflow, setTextShadow, setTextTransform, setTextUnderlinePosition, setTop, setVerticalAlign, setVisibility, setWhiteSpace, setWidows, setWidth, setWordSpacing, setWordWrap, setWritingMode, setZIndex, setZoom, toRGBColor, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement, setParentScope
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
delete, delete, get, getClassName, getDefaultValue, getParentScope, getPrototype, has, hasInstance, put, setParentScope, setPrototype
 

Constructor Detail

ComputedCSSStyleDeclaration

public ComputedCSSStyleDeclaration()
Creates an instance. JavaScript objects must have a default constructor.


ComputedCSSStyleDeclaration

public ComputedCSSStyleDeclaration(CSSStyleDeclaration style)
Parameters:
style - the original Style
Method Detail

getStyleAttribute

protected String getStyleAttribute(String name)
Returns the value of the named style attribute, or an empty string if it is not found. Overridden because some CSS properties are inherited from parent elements.

Overrides:
getStyleAttribute in class CSSStyleDeclaration
Parameters:
name - the name of the style attribute whose value is to be retrieved
Returns:
the named style attribute value, or an empty string if it is not found

setStyleAttribute

protected void setStyleAttribute(String name,
                                 String newValue)
Sets the specified style attribute. This method does nothing as the object is read-only.

Overrides:
setStyleAttribute in class CSSStyleDeclaration
Parameters:
name - the attribute name (camel-cased)
newValue - the attribute value

applyStyleFromSelector

public void applyStyleFromSelector(org.w3c.dom.css.CSSStyleDeclaration declaration,
                                   org.w3c.css.sac.Selector selector)
Makes a local, "computed", modification to this CSS style.

Parameters:
declaration - the style declaration
selector - the selector determining that the style applies to this element

setDefaultLocalStyleAttribute

public void setDefaultLocalStyleAttribute(String name,
                                          String newValue)
Makes a local, "computed", modification to this CSS style that won't override other style attributes of the same name. This method should be used to set default values for style attributes.

Parameters:
name - the name of the style attribute to set
newValue - the value of the style attribute to set

getStyleElement

protected CSSStyleDeclaration.StyleElement getStyleElement(String name)
Description copied from class: CSSStyleDeclaration
Determines the StyleElement for the given name.

Overrides:
getStyleElement in class CSSStyleDeclaration
Parameters:
name - the name of the requested StyleElement
Returns:
the StyleElement or null if not found

getBackgroundAttachment

public String getBackgroundAttachment()
Gets the "backgroundAttachment" style attribute.

Overrides:
getBackgroundAttachment in class CSSStyleDeclaration
Returns:
the style attribute

getBackgroundColor

public String getBackgroundColor()
Gets the "backgroundColor" style attribute.

Overrides:
getBackgroundColor in class CSSStyleDeclaration
Returns:
the style attribute

getBackgroundImage

public String getBackgroundImage()
Gets the "backgroundImage" style attribute.

Overrides:
getBackgroundImage in class CSSStyleDeclaration
Returns:
the style attribute

getBackgroundPosition

public String getBackgroundPosition()
Gets the "backgroundPosition" style attribute.

Overrides:
getBackgroundPosition in class CSSStyleDeclaration
Returns:
the style attribute

getBackgroundRepeat

public String getBackgroundRepeat()
Gets the "backgroundRepeat" style attribute.

Overrides:
getBackgroundRepeat in class CSSStyleDeclaration
Returns:
the style attribute

getBorderBottomColor

public String getBorderBottomColor()
Gets the "borderBottomColor" style attribute.

Overrides:
getBorderBottomColor in class CSSStyleDeclaration
Returns:
the style attribute

getBorderBottomStyle

public String getBorderBottomStyle()
Gets the "borderBottomStyle" style attribute.

Overrides:
getBorderBottomStyle in class CSSStyleDeclaration
Returns:
the style attribute

getBorderBottomWidth

public String getBorderBottomWidth()
Gets the "borderBottomWidth" style attribute.

Overrides:
getBorderBottomWidth in class CSSStyleDeclaration
Returns:
the style attribute

getBorderCollapse

public String getBorderCollapse()
Gets the "borderCollapse" style attribute.

Overrides:
getBorderCollapse in class CSSStyleDeclaration
Returns:
the style attribute

getBorderLeftColor

public String getBorderLeftColor()
Gets the "borderLeftColor" style attribute.

Overrides:
getBorderLeftColor in class CSSStyleDeclaration
Returns:
the style attribute

getBorderLeftStyle

public String getBorderLeftStyle()
Gets the "borderLeftStyle" style attribute.

Overrides:
getBorderLeftStyle in class CSSStyleDeclaration
Returns:
the style attribute

getBorderLeftWidth

public String getBorderLeftWidth()
Gets the "borderLeftWidth" style attribute.

Overrides:
getBorderLeftWidth in class CSSStyleDeclaration
Returns:
the style attribute

getBorderRightColor

public String getBorderRightColor()
Gets the "borderRightColor" style attribute.

Overrides:
getBorderRightColor in class CSSStyleDeclaration
Returns:
the style attribute

getBorderRightStyle

public String getBorderRightStyle()
Gets the "borderRightStyle" style attribute.

Overrides:
getBorderRightStyle in class CSSStyleDeclaration
Returns:
the style attribute

getBorderRightWidth

public String getBorderRightWidth()
Gets the "borderRightWidth" style attribute.

Overrides:
getBorderRightWidth in class CSSStyleDeclaration
Returns:
the style attribute

getBorderSpacing

public String getBorderSpacing()
Gets the "borderSpacing" style attribute.

Overrides:
getBorderSpacing in class CSSStyleDeclaration
Returns:
the style attribute

getBorderTopColor

public String getBorderTopColor()
Gets the "borderTopColor" style attribute.

Overrides:
getBorderTopColor in class CSSStyleDeclaration
Returns:
the style attribute

getBorderTopStyle

public String getBorderTopStyle()
Gets the "borderTopStyle" style attribute.

Overrides:
getBorderTopStyle in class CSSStyleDeclaration
Returns:
the style attribute

getBorderTopWidth

public String getBorderTopWidth()
Gets the "borderTopWidth" style attribute.

Overrides:
getBorderTopWidth in class CSSStyleDeclaration
Returns:
the style attribute

getBottom

public String getBottom()
Gets the "bottom" style attribute.

Overrides:
getBottom in class CSSStyleDeclaration
Returns:
the style attribute

getCaptionSide

public String getCaptionSide()
Gets the "captionSide" style attribute.

Overrides:
getCaptionSide in class CSSStyleDeclaration
Returns:
the style attribute

getClear

public String getClear()
Gets the "clear" style attribute.

Overrides:
getClear in class CSSStyleDeclaration
Returns:
the style attribute

getClip

public String getClip()
Gets the "clip" style attribute.

Overrides:
getClip in class CSSStyleDeclaration
Returns:
the style attribute

getContent

public String getContent()
Gets the "content" style attribute.

Overrides:
getContent in class CSSStyleDeclaration
Returns:
the style attribute

getColor

public String getColor()
Gets the "color" style attribute.

Overrides:
getColor in class CSSStyleDeclaration
Returns:
the style attribute

getCounterIncrement

public String getCounterIncrement()
Gets the "counterIncrement" style attribute.

Overrides:
getCounterIncrement in class CSSStyleDeclaration
Returns:
the style attribute

getCounterReset

public String getCounterReset()
Gets the "counterReset" style attribute.

Overrides:
getCounterReset in class CSSStyleDeclaration
Returns:
the style attribute

getCssFloat

public String getCssFloat()
Gets the "cssFloat" style attribute.

Overrides:
getCssFloat in class CSSStyleDeclaration
Returns:
the style attribute

getCursor

public String getCursor()
Gets the "cursor" style attribute.

Overrides:
getCursor in class CSSStyleDeclaration
Returns:
the style attribute

getDirection

public String getDirection()
Gets the "direction" style attribute.

Overrides:
getDirection in class CSSStyleDeclaration
Returns:
the style attribute

getDisplay

public String getDisplay()
Gets the "display" style attribute.

Overrides:
getDisplay in class CSSStyleDeclaration
Returns:
the style attribute

getEmptyCells

public String getEmptyCells()
Gets the "emptyCells" style attribute.

Overrides:
getEmptyCells in class CSSStyleDeclaration
Returns:
the style attribute

getFontFamily

public String getFontFamily()
Gets the "fontFamily" style attribute.

Overrides:
getFontFamily in class CSSStyleDeclaration
Returns:
the style attribute

getFontSize

public String getFontSize()
Gets the "fontSize" style attribute.

Overrides:
getFontSize in class CSSStyleDeclaration
Returns:
the style attribute

getFontSizeAdjust

public String getFontSizeAdjust()
Gets the "fontSizeAdjust" style attribute.

Overrides:
getFontSizeAdjust in class CSSStyleDeclaration
Returns:
the style attribute

getFontStretch

public String getFontStretch()
Gets the "fontStretch" style attribute.

Overrides:
getFontStretch in class CSSStyleDeclaration
Returns:
the style attribute

getFontStyle

public String getFontStyle()
Gets the "fontStyle" style attribute.

Overrides:
getFontStyle in class CSSStyleDeclaration
Returns:
the style attribute

getFontVariant

public String getFontVariant()
Gets the "fontVariant" style attribute.

Overrides:
getFontVariant in class CSSStyleDeclaration
Returns:
the style attribute

getFontWeight

public String getFontWeight()
Gets the "fontWeight" style attribute.

Overrides:
getFontWeight in class CSSStyleDeclaration
Returns:
the style attribute

getHeight

public String getHeight()
Gets the "height" style attribute.

Overrides:
getHeight in class CSSStyleDeclaration
Returns:
the style attribute

getImeMode

public String getImeMode()
Gets the "imeMode" style attribute.

Overrides:
getImeMode in class CSSStyleDeclaration
Returns:
the style attribute

getLeft

public String getLeft()
Gets the "left" style attribute.

Overrides:
getLeft in class CSSStyleDeclaration
Returns:
the style attribute

getLetterSpacing

public String getLetterSpacing()
Gets the "letterSpacing" style attribute.

Overrides:
getLetterSpacing in class CSSStyleDeclaration
Returns:
the style attribute

getListStyleImage

public String getListStyleImage()
Gets the "listStyleImage" style attribute.

Overrides:
getListStyleImage in class CSSStyleDeclaration
Returns:
the style attribute

getListStylePosition

public String getListStylePosition()
Gets the "listStylePosition" style attribute.

Overrides:
getListStylePosition in class CSSStyleDeclaration
Returns:
the style attribute

getListStyleType

public String getListStyleType()
Gets the "listStyleType" style attribute.

Overrides:
getListStyleType in class CSSStyleDeclaration
Returns:
the style attribute

getMarginBottom

public String getMarginBottom()
Gets the "marginBottom" style attribute.

Overrides:
getMarginBottom in class CSSStyleDeclaration
Returns:
the style attribute

getMarginLeft

public String getMarginLeft()
Gets the "marginLeft" style attribute.

Overrides:
getMarginLeft in class CSSStyleDeclaration
Returns:
the style attribute

getMarginRight

public String getMarginRight()
Gets the "marginRight" style attribute.

Overrides:
getMarginRight in class CSSStyleDeclaration
Returns:
the style attribute

getMarginTop

public String getMarginTop()
Gets the "marginTop" style attribute.

Overrides:
getMarginTop in class CSSStyleDeclaration
Returns:
the style attribute

getMarkerOffset

public String getMarkerOffset()
Gets the "markerOffset" style attribute.

Overrides:
getMarkerOffset in class CSSStyleDeclaration
Returns:
the style attribute

getMaxHeight

public String getMaxHeight()
Gets the "maxHeight" style attribute.

Overrides:
getMaxHeight in class CSSStyleDeclaration
Returns:
the style attribute

getMaxWidth

public String getMaxWidth()
Gets the "maxWidth" style attribute.

Overrides:
getMaxWidth in class CSSStyleDeclaration
Returns:
the style attribute

getMinHeight

public String getMinHeight()
Gets the "minHeight" style attribute.

Overrides:
getMinHeight in class CSSStyleDeclaration
Returns:
the style attribute

getMinWidth

public String getMinWidth()
Gets the "minWidth" style attribute.

Overrides:
getMinWidth in class CSSStyleDeclaration
Returns:
the style attribute

getStyleAttributeValue

protected String getStyleAttributeValue(StyleAttributes.Definition style)
Description copied from class: CSSStyleDeclaration
Get the value for the style attribute.

Overrides:
getStyleAttributeValue in class CSSStyleDeclaration
Parameters:
style - the style
Returns:
the value

getOpacity

public String getOpacity()
Gets the "opacity" style attribute.

Overrides:
getOpacity in class CSSStyleDeclaration
Returns:
the style attribute

getOutlineColor

public String getOutlineColor()
Gets the "outlineColor" style attribute.

Overrides:
getOutlineColor in class CSSStyleDeclaration
Returns:
the style attribute

getOutlineOffset

public String getOutlineOffset()
Gets the "outlineOffset" style attribute.

Overrides:
getOutlineOffset in class CSSStyleDeclaration
Returns:
the style attribute

getOutlineStyle

public String getOutlineStyle()
Gets the "outlineStyle" style attribute.

Overrides:
getOutlineStyle in class CSSStyleDeclaration
Returns:
the style attribute

getOutlineWidth

public String getOutlineWidth()
Gets the "outlineWidth" style attribute.

Overrides:
getOutlineWidth in class CSSStyleDeclaration
Returns:
the style attribute

getOverflow

public String getOverflow()
Gets the "overflow" style attribute.

Overrides:
getOverflow in class CSSStyleDeclaration
Returns:
the style attribute

getOverflowX

public String getOverflowX()
Gets the "overflowX" style attribute.

Overrides:
getOverflowX in class CSSStyleDeclaration
Returns:
the style attribute

getOverflowY

public String getOverflowY()
Gets the "overflowY" style attribute.

Overrides:
getOverflowY in class CSSStyleDeclaration
Returns:
the style attribute

getPageBreakAfter

public String getPageBreakAfter()
Gets the "pageBreakAfter" style attribute.

Overrides:
getPageBreakAfter in class CSSStyleDeclaration
Returns:
the style attribute

getPageBreakBefore

public String getPageBreakBefore()
Gets the "pageBreakBefore" style attribute.

Overrides:
getPageBreakBefore in class CSSStyleDeclaration
Returns:
the style attribute

getPaddingBottom

public String getPaddingBottom()
Gets the "paddingBottom" style attribute.

Overrides:
getPaddingBottom in class CSSStyleDeclaration
Returns:
the style attribute

getPaddingLeft

public String getPaddingLeft()
Gets the "paddingLeft" style attribute.

Overrides:
getPaddingLeft in class CSSStyleDeclaration
Returns:
the style attribute

getPaddingRight

public String getPaddingRight()
Gets the "paddingRight" style attribute.

Overrides:
getPaddingRight in class CSSStyleDeclaration
Returns:
the style attribute

getPaddingTop

public String getPaddingTop()
Gets the "paddingTop" style attribute.

Overrides:
getPaddingTop in class CSSStyleDeclaration
Returns:
the style attribute

getPointerEvents

public String getPointerEvents()
Gets the "pointerEvents" style attribute.

Overrides:
getPointerEvents in class CSSStyleDeclaration
Returns:
the style attribute

getPosition

public String getPosition()
Gets the "position" style attribute.

Overrides:
getPosition in class CSSStyleDeclaration
Returns:
the style attribute

getRight

public String getRight()
Gets the "right" style attribute.

Overrides:
getRight in class CSSStyleDeclaration
Returns:
the style attribute

getTableLayout

public String getTableLayout()
Gets the "tableLayout" style attribute.

Overrides:
getTableLayout in class CSSStyleDeclaration
Returns:
the style attribute

getTextAlign

public String getTextAlign()
Gets the "textAlign" style attribute.

Overrides:
getTextAlign in class CSSStyleDeclaration
Returns:
the style attribute

getTextDecoration

public String getTextDecoration()
Gets the "textDecoration" style attribute.

Overrides:
getTextDecoration in class CSSStyleDeclaration
Returns:
the style attribute

getTextIndent

public String getTextIndent()
Gets the "textIndent" style attribute.

Overrides:
getTextIndent in class CSSStyleDeclaration
Returns:
the style attribute

getTextShadow

public String getTextShadow()
Gets the "textShadow" style attribute.

Overrides:
getTextShadow in class CSSStyleDeclaration
Returns:
the style attribute

getTextTransform

public String getTextTransform()
Gets the "textTransform" style attribute.

Overrides:
getTextTransform in class CSSStyleDeclaration
Returns:
the style attribute

getTop

public String getTop()
Gets the "top" style attribute.

Overrides:
getTop in class CSSStyleDeclaration
Returns:
the style attribute

getVerticalAlign

public String getVerticalAlign()
Gets the "verticalAlign" style attribute.

Overrides:
getVerticalAlign in class CSSStyleDeclaration
Returns:
the style attribute

getVisibility

public String getVisibility()
Gets the "visibility" style attribute.

Overrides:
getVisibility in class CSSStyleDeclaration
Returns:
the style attribute

getWhiteSpace

public String getWhiteSpace()
Gets the "whiteSpace" style attribute.

Overrides:
getWhiteSpace in class CSSStyleDeclaration
Returns:
the style attribute

getWidth

public String getWidth()
Gets the "width" style attribute.

Overrides:
getWidth in class CSSStyleDeclaration
Returns:
the style attribute

getCalculatedWidth

public int getCalculatedWidth(boolean includeBorder,
                              boolean includePadding)
Returns the element's width in pixels, possibly including its padding and border.

Parameters:
includeBorder - whether or not to include the border width in the returned value
includePadding - whether or not to include the padding width in the returned value
Returns:
the element's width in pixels, possibly including its padding and border

getContentWidth

public int getContentWidth()
Returns the total width of the element's children.

Returns:
the total width of the element's children

getCalculatedHeight

public int getCalculatedHeight(boolean includeBorder,
                               boolean includePadding)
Returns the element's height, possibly including its padding and border.

Parameters:
includeBorder - whether or not to include the border height in the returned value
includePadding - whether or not to include the padding height in the returned value
Returns:
the element's height, possibly including its padding and border

getContentHeight

public int getContentHeight()
Returns the total height of the element's children.

Returns:
the total height of the element's children

isScrollable

public boolean isScrollable(boolean horizontal)
Returns true if the element is scrollable along the specified axis.

Parameters:
horizontal - if true, the caller is interested in scrollability along the x-axis; if false, the caller is interested in scrollability along the y-axis
Returns:
true if the element is scrollable along the specified axis

getTop

public int getTop(boolean includeMargin,
                  boolean includeBorder,
                  boolean includePadding)
Returns the computed top (Y coordinate), relative to the node's parent's top edge.

Parameters:
includeMargin - whether or not to take the margin into account in the calculation
includeBorder - whether or not to take the border into account in the calculation
includePadding - whether or not to take the padding into account in the calculation
Returns:
the computed top (Y coordinate), relative to the node's parent's top edge

getLeft

public int getLeft(boolean includeMargin,
                   boolean includeBorder,
                   boolean includePadding)
Returns the computed left (X coordinate), relative to the node's parent's left edge.

Parameters:
includeMargin - whether or not to take the margin into account in the calculation
includeBorder - whether or not to take the border into account in the calculation
includePadding - whether or not to take the padding into account in the calculation
Returns:
the computed left (X coordinate), relative to the node's parent's left edge

getPositionWithInheritance

public String getPositionWithInheritance()
Returns the CSS position attribute, replacing inherited values with the actual parent values.

Returns:
the CSS position attribute, replacing inherited values with the actual parent values

getLeftWithInheritance

public String getLeftWithInheritance()
Returns the CSS left attribute, replacing inherited values with the actual parent values.

Returns:
the CSS left attribute, replacing inherited values with the actual parent values

getRightWithInheritance

public String getRightWithInheritance()
Returns the CSS right attribute, replacing inherited values with the actual parent values.

Returns:
the CSS right attribute, replacing inherited values with the actual parent values

getTopWithInheritance

public String getTopWithInheritance()
Returns the CSS top attribute, replacing inherited values with the actual parent values.

Returns:
the CSS top attribute, replacing inherited values with the actual parent values

getBottomWithInheritance

public String getBottomWithInheritance()
Returns the CSS bottom attribute, replacing inherited values with the actual parent values.

Returns:
the CSS bottom attribute, replacing inherited values with the actual parent values

getMarginLeftValue

public int getMarginLeftValue()
Gets the left margin of the element.

Returns:
the value in pixels

getMarginRightValue

public int getMarginRightValue()
Gets the right margin of the element.

Returns:
the value in pixels

getMarginTopValue

public int getMarginTopValue()
Gets the top margin of the element.

Returns:
the value in pixels

getMarginBottomValue

public int getMarginBottomValue()
Gets the bottom margin of the element.

Returns:
the value in pixels

getPaddingLeftValue

public int getPaddingLeftValue()
Gets the left padding of the element.

Returns:
the value in pixels

getPaddingRightValue

public int getPaddingRightValue()
Gets the right padding of the element.

Returns:
the value in pixels

getPaddingTopValue

public int getPaddingTopValue()
Gets the top padding of the element.

Returns:
the value in pixels

getPaddingBottomValue

public int getPaddingBottomValue()
Gets the bottom padding of the element.

Returns:
the value in pixels

getBorderLeftValue

public int getBorderLeftValue()
Gets the size of the left border of the element.

Returns:
the value in pixels

getBorderRightValue

public int getBorderRightValue()
Gets the size of the right border of the element.

Returns:
the value in pixels

getBorderTopValue

public int getBorderTopValue()
Gets the size of the top border of the element.

Returns:
the value in pixels

getBorderBottomValue

public int getBorderBottomValue()
Gets the size of the bottom border of the element.

Returns:
the value in pixels

getWordSpacing

public String getWordSpacing()
Gets the "wordSpacing" style attribute.

Overrides:
getWordSpacing in class CSSStyleDeclaration
Returns:
the style attribute

getWordWrap

public String getWordWrap()
Gets the "wordWrap" style attribute.

Overrides:
getWordWrap in class CSSStyleDeclaration
Returns:
the style attribute

getZIndex

public Object getZIndex()
Gets the "zIndex" style attribute.

Overrides:
getZIndex in class CSSStyleDeclaration
Returns:
the style attribute

getPropertyValue

public String getPropertyValue(String name)
Gets the value of the specified property of the style.

Overrides:
getPropertyValue in class CSSStyleDeclaration
Parameters:
name - the style property name
Returns:
empty string if nothing found

pixelString

protected String pixelString(String value)
Returns the specified length value as a pixel length value, as long as we're not emulating IE. This method does NOT handle percentages correctly; use #pixelValue(HTMLElement, CssValue) if you need percentage support).

Parameters:
value - the length value to convert to a pixel length value
Returns:
the specified length value as a pixel length value
See Also:
#pixelString(HTMLElement, CSSStyleDeclaration.CssValue)

pixelString

protected String pixelString(Element element,
                             CSSStyleDeclaration.CssValue value)
Returns the specified length CSS attribute value value as a pixel length value, as long as we're not emulating IE. If the specified CSS attribute value is a percentage, this method uses the specified value object to recursively retrieve the base (parent) CSS attribute value.

Parameters:
element - the element for which the CSS attribute value is to be retrieved
value - the CSS attribute value which is to be retrieved
Returns:
the specified length CSS attribute value as a pixel length value
See Also:
pixelString(String)


Copyright © 2002–2013 Gargoyle Software Inc.. All rights reserved.