|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration
com.gargoylesoftware.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration
public class ComputedCSSStyleDeclaration
A JavaScript object for a ComputedCSSStyleDeclaration.
| 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 |
getAccelerator()
Gets the "accelerator" style attribute. |
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.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 |
|---|
public ComputedCSSStyleDeclaration()
public ComputedCSSStyleDeclaration(CSSStyleDeclaration style)
style - the original Style| Method Detail |
|---|
protected String getStyleAttribute(String name)
getStyleAttribute in class CSSStyleDeclarationname - the name of the style attribute whose value is to be retrieved
protected void setStyleAttribute(String name,
String newValue)
setStyleAttribute in class CSSStyleDeclarationname - the attribute name (camel-cased)newValue - the attribute value
public void applyStyleFromSelector(org.w3c.dom.css.CSSStyleDeclaration declaration,
org.w3c.css.sac.Selector selector)
declaration - the style declarationselector - the selector determining that the style applies to this element
public void setDefaultLocalStyleAttribute(String name,
String newValue)
name - the name of the style attribute to setnewValue - the value of the style attribute to setprotected CSSStyleDeclaration.StyleElement getStyleElement(String name)
CSSStyleDeclaration
getStyleElement in class CSSStyleDeclarationname - the name of the requested StyleElement
public String getAccelerator()
getAccelerator in class CSSStyleDeclarationpublic String getBackgroundAttachment()
getBackgroundAttachment in class CSSStyleDeclarationpublic String getBackgroundColor()
getBackgroundColor in class CSSStyleDeclarationpublic String getBackgroundImage()
getBackgroundImage in class CSSStyleDeclarationpublic String getBackgroundPosition()
getBackgroundPosition in class CSSStyleDeclarationpublic String getBackgroundRepeat()
getBackgroundRepeat in class CSSStyleDeclarationpublic String getBorderBottomColor()
getBorderBottomColor in class CSSStyleDeclarationpublic String getBorderBottomStyle()
getBorderBottomStyle in class CSSStyleDeclarationpublic String getBorderBottomWidth()
getBorderBottomWidth in class CSSStyleDeclarationpublic String getBorderCollapse()
getBorderCollapse in class CSSStyleDeclarationpublic String getBorderLeftColor()
getBorderLeftColor in class CSSStyleDeclarationpublic String getBorderLeftStyle()
getBorderLeftStyle in class CSSStyleDeclarationpublic String getBorderLeftWidth()
getBorderLeftWidth in class CSSStyleDeclarationpublic String getBorderRightColor()
getBorderRightColor in class CSSStyleDeclarationpublic String getBorderRightStyle()
getBorderRightStyle in class CSSStyleDeclarationpublic String getBorderRightWidth()
getBorderRightWidth in class CSSStyleDeclarationpublic String getBorderSpacing()
getBorderSpacing in class CSSStyleDeclarationpublic String getBorderTopColor()
getBorderTopColor in class CSSStyleDeclarationpublic String getBorderTopStyle()
getBorderTopStyle in class CSSStyleDeclarationpublic String getBorderTopWidth()
getBorderTopWidth in class CSSStyleDeclarationpublic String getBottom()
getBottom in class CSSStyleDeclarationpublic String getCaptionSide()
getCaptionSide in class CSSStyleDeclarationpublic String getClear()
getClear in class CSSStyleDeclarationpublic String getClip()
getClip in class CSSStyleDeclarationpublic String getContent()
getContent in class CSSStyleDeclarationpublic String getColor()
getColor in class CSSStyleDeclarationpublic String getCounterIncrement()
getCounterIncrement in class CSSStyleDeclarationpublic String getCounterReset()
getCounterReset in class CSSStyleDeclarationpublic String getCssFloat()
getCssFloat in class CSSStyleDeclarationpublic String getCursor()
getCursor in class CSSStyleDeclarationpublic String getDirection()
getDirection in class CSSStyleDeclarationpublic String getDisplay()
getDisplay in class CSSStyleDeclarationpublic String getEmptyCells()
getEmptyCells in class CSSStyleDeclarationpublic String getFontFamily()
getFontFamily in class CSSStyleDeclarationpublic String getFontSize()
getFontSize in class CSSStyleDeclarationpublic String getFontSizeAdjust()
getFontSizeAdjust in class CSSStyleDeclarationpublic String getFontStretch()
getFontStretch in class CSSStyleDeclarationpublic String getFontStyle()
getFontStyle in class CSSStyleDeclarationpublic String getFontVariant()
getFontVariant in class CSSStyleDeclarationpublic String getFontWeight()
getFontWeight in class CSSStyleDeclarationpublic String getHeight()
getHeight in class CSSStyleDeclarationpublic String getImeMode()
getImeMode in class CSSStyleDeclarationpublic String getLeft()
getLeft in class CSSStyleDeclarationpublic String getLetterSpacing()
getLetterSpacing in class CSSStyleDeclarationpublic String getListStyleImage()
getListStyleImage in class CSSStyleDeclarationpublic String getListStylePosition()
getListStylePosition in class CSSStyleDeclarationpublic String getListStyleType()
getListStyleType in class CSSStyleDeclarationpublic String getMarginBottom()
getMarginBottom in class CSSStyleDeclarationpublic String getMarginLeft()
getMarginLeft in class CSSStyleDeclarationpublic String getMarginRight()
getMarginRight in class CSSStyleDeclarationpublic String getMarginTop()
getMarginTop in class CSSStyleDeclarationpublic String getMarkerOffset()
getMarkerOffset in class CSSStyleDeclarationpublic String getMaxHeight()
getMaxHeight in class CSSStyleDeclarationpublic String getMaxWidth()
getMaxWidth in class CSSStyleDeclarationpublic String getMinHeight()
getMinHeight in class CSSStyleDeclarationpublic String getMinWidth()
getMinWidth in class CSSStyleDeclarationprotected String getStyleAttributeValue(StyleAttributes.Definition style)
CSSStyleDeclaration
getStyleAttributeValue in class CSSStyleDeclarationstyle - the style
public String getOpacity()
getOpacity in class CSSStyleDeclarationpublic String getOutlineColor()
getOutlineColor in class CSSStyleDeclarationpublic String getOutlineOffset()
getOutlineOffset in class CSSStyleDeclarationpublic String getOutlineStyle()
getOutlineStyle in class CSSStyleDeclarationpublic String getOutlineWidth()
getOutlineWidth in class CSSStyleDeclarationpublic String getOverflow()
getOverflow in class CSSStyleDeclarationpublic String getOverflowX()
getOverflowX in class CSSStyleDeclarationpublic String getOverflowY()
getOverflowY in class CSSStyleDeclarationpublic String getPageBreakAfter()
getPageBreakAfter in class CSSStyleDeclarationpublic String getPageBreakBefore()
getPageBreakBefore in class CSSStyleDeclarationpublic String getPaddingBottom()
getPaddingBottom in class CSSStyleDeclarationpublic String getPaddingLeft()
getPaddingLeft in class CSSStyleDeclarationpublic String getPaddingRight()
getPaddingRight in class CSSStyleDeclarationpublic String getPaddingTop()
getPaddingTop in class CSSStyleDeclarationpublic String getPointerEvents()
getPointerEvents in class CSSStyleDeclarationpublic String getPosition()
getPosition in class CSSStyleDeclarationpublic String getRight()
getRight in class CSSStyleDeclarationpublic String getTableLayout()
getTableLayout in class CSSStyleDeclarationpublic String getTextAlign()
getTextAlign in class CSSStyleDeclarationpublic String getTextDecoration()
getTextDecoration in class CSSStyleDeclarationpublic String getTextIndent()
getTextIndent in class CSSStyleDeclarationpublic String getTextShadow()
getTextShadow in class CSSStyleDeclarationpublic String getTextTransform()
getTextTransform in class CSSStyleDeclarationpublic String getTop()
getTop in class CSSStyleDeclarationpublic String getVerticalAlign()
getVerticalAlign in class CSSStyleDeclarationpublic String getVisibility()
getVisibility in class CSSStyleDeclarationpublic String getWhiteSpace()
getWhiteSpace in class CSSStyleDeclarationpublic String getWidth()
getWidth in class CSSStyleDeclaration
public int getCalculatedWidth(boolean includeBorder,
boolean includePadding)
includeBorder - whether or not to include the border width in the returned valueincludePadding - whether or not to include the padding width in the returned value
public int getContentWidth()
public int getCalculatedHeight(boolean includeBorder,
boolean includePadding)
includeBorder - whether or not to include the border height in the returned valueincludePadding - whether or not to include the padding height in the returned value
public int getContentHeight()
public boolean isScrollable(boolean horizontal)
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
public int getTop(boolean includeMargin,
boolean includeBorder,
boolean includePadding)
includeMargin - whether or not to take the margin into account in the calculationincludeBorder - whether or not to take the border into account in the calculationincludePadding - whether or not to take the padding into account in the calculation
public int getLeft(boolean includeMargin,
boolean includeBorder,
boolean includePadding)
includeMargin - whether or not to take the margin into account in the calculationincludeBorder - whether or not to take the border into account in the calculationincludePadding - whether or not to take the padding into account in the calculation
public String getPositionWithInheritance()
public String getLeftWithInheritance()
public String getRightWithInheritance()
public String getTopWithInheritance()
public String getBottomWithInheritance()
public int getMarginLeftValue()
public int getMarginRightValue()
public int getMarginTopValue()
public int getMarginBottomValue()
public int getPaddingLeftValue()
public int getPaddingRightValue()
public int getPaddingTopValue()
public int getPaddingBottomValue()
public int getBorderLeftValue()
public int getBorderRightValue()
public int getBorderTopValue()
public int getBorderBottomValue()
public String getWordSpacing()
getWordSpacing in class CSSStyleDeclarationpublic String getWordWrap()
getWordWrap in class CSSStyleDeclarationpublic Object getZIndex()
getZIndex in class CSSStyleDeclarationpublic String getPropertyValue(String name)
getPropertyValue in class CSSStyleDeclarationname - the style property name
protected String pixelString(String value)
#pixelValue(HTMLElement, CssValue)
if you need percentage support).
value - the length value to convert to a pixel length value
#pixelString(HTMLElement, CSSStyleDeclaration.CssValue)
protected String pixelString(Element element,
CSSStyleDeclaration.CssValue value)
element - the element for which the CSS attribute value is to be retrievedvalue - the CSS attribute value which is to be retrieved
pixelString(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||