java.lang.Object
org.htmlunit.css.AbstractCssStyleDeclaration
org.htmlunit.css.ComputedCssStyleDeclaration
- All Implemented Interfaces:
Serializable
An object for a CSSStyleDeclaration, which is computed.
- Author:
- Ahmed Ashour, Marc Guillemot, Ronald Brill, Frank Danek, Alex Gorbatovsky, cd alexndr
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDenotes a value which should be returned as is. -
Constructor Summary
ConstructorsConstructorDescriptionComputedCssStyleDeclaration(ElementCssStyleDeclaration styleDeclaration) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyStyleFromSelector(org.htmlunit.cssparser.dom.CSSStyleDeclarationImpl declaration, org.htmlunit.cssparser.parser.selector.Selector selector) Makes a local, "computed", modification to this CSS style.Gets thebackgroundAttachmentstyle attribute.Gets thebackgroundColorstyle attribute.Gets thebackgroundImagestyle attribute.Gets thebackgroundPositionstyle attribute.Gets thebackgroundRepeatstyle attribute.Gets theblockSizestyle attribute.Gets theborderBottomColorstyle attribute.Gets theborderBottomStylestyle attribute.intGets the size of the bottom border of the element.Gets theborderBottomWidthstyle attribute.Gets theborderLeftColorstyle attribute.Gets theborderLeftStylestyle attribute.intGets the size of the left border of the element.Gets theborderLeftWidthstyle attribute.Gets theborderRightColorstyle attribute.Gets theborderRightStylestyle attribute.intGets the size of the right border of the element.Gets theborderRightWidthstyle attribute.Gets theborderTopColorstyle attribute.Gets theborderTopStylestyle attribute.intGets the size of the top border of the element.Gets theborderTopWidthstyle attribute.Gets thebottomstyle attribute.Returns the CSSbottomattribute, replacing inherited values with the actual parent values.Returns the theBrowserVersion.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intgetCalculatedHeight(boolean includeBorder, boolean includePadding) Returns the element's height, possibly including its padding and border.intgetCalculatedWidth(boolean includeBorder, boolean includePadding) Returns the element's width in pixels, possibly including its padding and border.getColor()Gets thecolorstyle attribute.intReturns the total height of the element's children.intReturns the total width of the element's children.Gets thecssFloatstyle attribute.Returns the actual text of the style.Gets thedisplaystyle attribute.Returns theDomElementthe backingElementCssStyleDeclarationis associated with.getFont()Gets thefontstyle attribute.Gets thefontFamilystyle attribute.Gets thefontSizestyle attribute.Gets theheightstyle attribute.getLeft()Returns the style attributeleft.intgetLeft(boolean includeMargin, boolean includeBorder, boolean includePadding) Returns the computed left (X coordinate), relative to the node's parent's left edge.Returns the CSSleftattribute, replacing inherited values with the actual parent values.intReturns thelengthproperty.Returns the style attributeletterSpacing.Returns the style attributeletterSpacing.Gets themarginstyle attribute.Gets themarginBottomstyle attribute.intGets the bottom margin of the element.Gets themarginLeftstyle attribute.intGets the left margin of the element.Gets themarginRightstyle attribute.intGets the right margin of the element.Gets themarginTopstyle attribute.intGets the top margin of the element.Gets themaxHeightstyle attribute.Gets themaxWidthstyle attribute.Gets theminHeightstyle attribute.Gets theminWidthstyle attribute.Gets theopacitystyle attribute.Gets theorphansstyle attribute.Gets theoutlineWidthstyle attribute.Gets thepaddingstyle attribute.Gets thepaddingBottomstyle attribute.intGets the bottom padding of the element.Gets thepaddingLeftstyle attribute.intGets the left padding of the element.Gets thepaddingRightstyle attribute.intGets the right padding of the element.Gets thepaddingTopstyle attribute.intGets the top padding of the element.org.htmlunit.cssparser.dom.AbstractCSSRuleImplReturns the CSSRule that is the parent of this style block ornullif this CSSStyleDeclaration is not attached to a CSSRule.Gets thepositionstyle attribute.Returns the CSSpositionattribute, replacing inherited values with the actual parent values.getRight()Gets therightstyle attribute.Returns the CSSrightattribute, replacing inherited values with the actual parent values.getStyleAttribute(String name) Get the value for the style attribute.getStyleAttribute(StyleAttributes.Definition definition, boolean getDefaultValueIfEmpty) Get the value for the style attribute.getStyleElement(String name) Determines the StyleElement for the given name.Determines the StyleElement for the given name.Returns a sorted map containing style elements, keyed on style element name.getStylePriority(String name) Returns the priority of the named style attribute, or an empty string if it is not found.Gets thetextIndentstyle attribute.getTop()Gets thetopstyle attribute.intgetTop(boolean includeMargin, boolean includeBorder, boolean includePadding) Returns the computed top (Y coordinate), relative to the node's parent's top edge.Returns the CSStopattribute, replacing inherited values with the actual parent values.Gets theverticalAlignstyle attribute.Gets thewidowsstyle attribute.getWidth()Returns the width.Gets thewordSpacingstyle attribute.Gets thezIndexstyle attribute.booleanhasFeature(BrowserVersionFeatures property) Indicates if the browser this is associated with has the feature.booleanReturns true if this is a computed style declaration.booleanisScrollable(boolean horizontal) Returnstrueif the element is scrollable along the specified axis.item(int index) Returns the name of the CSS property at the specified index.removeStyleAttribute(String name) Removes the specified style attribute, returning the value of the removed attribute.voidsetCachedTop(Integer top) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.voidsetCssText(String value) Sets the actual text of the style.voidsetDefaultLocalStyleAttribute(String name, String newValue) Makes a local, "computed", modification to this CSS style that won't override other style attributes of the same name.voidsetStyleAttribute(String name, String newValue, String important) Sets the specified style attribute.toString()intupdateCachedBorderHorizontal(int borderHorizontal) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedBorderVertical(int borderVertical) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedEmptyHeight(int emptyHeight) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedHeight(int height) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedPaddingHorizontal(int paddingHorizontal) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedPaddingVertical(int paddingVertical) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.intupdateCachedWidth(int width) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.Methods inherited from class org.htmlunit.css.AbstractCssStyleDeclaration
getBorderTop, getOutline, getRubyAlign, getSize, getStyleAttribute
-
Field Details
-
EMPTY_FINAL
Denotes a value which should be returned as is.
-
-
Constructor Details
-
ComputedCssStyleDeclaration
Ctor.- Parameters:
styleDeclaration- theElementCssStyleDeclarationthis is based on
-
-
Method Details
-
getStylePriority
Returns the priority of the named style attribute, or an empty string if it is not found.- Specified by:
getStylePriorityin classAbstractCssStyleDeclaration- 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
-
getCssText
Returns the actual text of the style.- Specified by:
getCssTextin classAbstractCssStyleDeclaration- Returns:
- the actual text of the style
-
getStyleAttribute
Get the value for the style attribute.- Specified by:
getStyleAttributein classAbstractCssStyleDeclaration- Parameters:
name- the name- Returns:
- the value
-
getStyleAttribute
public String getStyleAttribute(StyleAttributes.Definition definition, boolean getDefaultValueIfEmpty) Get the value for the style attribute. This impl ignores the default getDefaultValueIfEmpty flag, but there is an overload inComputedCssStyleDeclaration.- Specified by:
getStyleAttributein classAbstractCssStyleDeclaration- Parameters:
definition- the definitiongetDefaultValueIfEmpty- whether to get the default value if empty or not- Returns:
- the value
-
setCssText
Sets the actual text of the style.- Specified by:
setCssTextin classAbstractCssStyleDeclaration- Parameters:
value- the new text
-
setStyleAttribute
Sets the specified style attribute.- Specified by:
setStyleAttributein classAbstractCssStyleDeclaration- Parameters:
name- the attribute name (camel-cased)newValue- the attribute valueimportant- important value
-
removeStyleAttribute
Removes the specified style attribute, returning the value of the removed attribute.- Specified by:
removeStyleAttributein classAbstractCssStyleDeclaration- Parameters:
name- the attribute name (delimiter-separated, not camel-cased)- Returns:
- the removed value
-
getLength
public int getLength()Returns thelengthproperty.- Specified by:
getLengthin classAbstractCssStyleDeclaration- Returns:
- the
lengthproperty
-
getWidth
Returns the width.- Overrides:
getWidthin classAbstractCssStyleDeclaration- Returns:
- the width
-
item
Returns the name of the CSS property at the specified index.- Specified by:
itemin classAbstractCssStyleDeclaration- Parameters:
index- the index- Returns:
- the name of the CSS property at the specified index
-
getParentRule
public org.htmlunit.cssparser.dom.AbstractCSSRuleImpl getParentRule()Returns the CSSRule that is the parent of this style block ornullif this CSSStyleDeclaration is not attached to a CSSRule.- Specified by:
getParentRulein classAbstractCssStyleDeclaration- Returns:
- the CSSRule that is the parent of this style block or
nullif this CSSStyleDeclaration is not attached to a CSSRule
-
getStyleElement
Determines the StyleElement for the given name.- Specified by:
getStyleElementin classAbstractCssStyleDeclaration- Parameters:
name- the name of the requested StyleElement- Returns:
- the StyleElement or null if not found
-
getStyleElementCaseInSensitive
Determines the StyleElement for the given name. This ignores the case of the name.- Specified by:
getStyleElementCaseInSensitivein classAbstractCssStyleDeclaration- Parameters:
name- the name of the requested StyleElement- Returns:
- the StyleElement or null if not found
-
getStyleMap
Returns a sorted map containing style elements, keyed on style element name. We use aLinkedHashMapmap so that results are deterministic and are thus testable.- Specified by:
getStyleMapin classAbstractCssStyleDeclaration- Returns:
- a sorted map containing style elements, keyed on style element name
-
getDomElement
Returns theDomElementthe backingElementCssStyleDeclarationis associated with.- Returns:
- the
DomElementthe backingElementCssStyleDeclarationis associated with
-
getBackgroundAttachment
Gets thebackgroundAttachmentstyle attribute.- Overrides:
getBackgroundAttachmentin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBackgroundColor
Gets thebackgroundColorstyle attribute.- Overrides:
getBackgroundColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBackgroundImage
Gets thebackgroundImagestyle attribute.- Overrides:
getBackgroundImagein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBackgroundPosition
Gets thebackgroundPositionstyle attribute.- Overrides:
getBackgroundPositionin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBackgroundRepeat
Gets thebackgroundRepeatstyle attribute.- Overrides:
getBackgroundRepeatin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBlockSize
Gets theblockSizestyle attribute.- Overrides:
getBlockSizein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomColor
Gets theborderBottomColorstyle attribute.- Overrides:
getBorderBottomColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomStyle
Gets theborderBottomStylestyle attribute.- Overrides:
getBorderBottomStylein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomWidth
Gets theborderBottomWidthstyle attribute.- Overrides:
getBorderBottomWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftColor
Gets theborderLeftColorstyle attribute.- Overrides:
getBorderLeftColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftStyle
Gets theborderLeftStylestyle attribute.- Overrides:
getBorderLeftStylein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftWidth
Gets theborderLeftWidthstyle attribute.- Overrides:
getBorderLeftWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderRightColor
Gets theborderRightColorstyle attribute.- Overrides:
getBorderRightColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderRightStyle
Gets theborderRightStylestyle attribute.- Overrides:
getBorderRightStylein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderRightWidth
Gets theborderRightWidthstyle attribute.- Overrides:
getBorderRightWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderTopColor
Gets theborderTopColorstyle attribute.- Overrides:
getBorderTopColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderTopStyle
Gets theborderTopStylestyle attribute.- Overrides:
getBorderTopStylein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBorderTopWidth
Gets theborderTopWidthstyle attribute.- Overrides:
getBorderTopWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getBottom
Gets thebottomstyle attribute.- Overrides:
getBottomin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getColor
Gets thecolorstyle attribute.- Overrides:
getColorin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getCssFloat
Gets thecssFloatstyle attribute.- Overrides:
getCssFloatin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getDisplay
Gets thedisplaystyle attribute.- Overrides:
getDisplayin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getFont
Gets thefontstyle attribute.- Overrides:
getFontin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getFontFamily
Gets thefontFamilystyle attribute.- Overrides:
getFontFamilyin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getFontSize
Gets thefontSizestyle attribute.- Overrides:
getFontSizein classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getLineHeight
Returns the style attributeletterSpacing.- Overrides:
getLineHeightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
lineHeight
-
getHeight
Gets theheightstyle attribute.- Overrides:
getHeightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getLeft
Returns the style attributeleft.- Overrides:
getLeftin classAbstractCssStyleDeclaration- Returns:
- the style attribute
left
-
getLetterSpacing
Returns the style attributeletterSpacing.- Overrides:
getLetterSpacingin classAbstractCssStyleDeclaration- Returns:
- the style attribute
letterSpacing
-
getMargin
Gets themarginstyle attribute.- Overrides:
getMarginin classAbstractCssStyleDeclaration- Returns:
- the style attribute
margin
-
getMarginBottom
Gets themarginBottomstyle attribute.- Overrides:
getMarginBottomin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getMarginLeft
Gets themarginLeftstyle attribute.- Overrides:
getMarginLeftin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getMarginRight
Gets themarginRightstyle attribute.- Overrides:
getMarginRightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getMarginTop
Gets themarginTopstyle attribute.- Overrides:
getMarginTopin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getMaxHeight
Gets themaxHeightstyle attribute.- Overrides:
getMaxHeightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
maxHeight
-
getMaxWidth
Gets themaxWidthstyle attribute.- Overrides:
getMaxWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
maxWidth
-
getMinHeight
Gets theminHeightstyle attribute.- Overrides:
getMinHeightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
minHeight
-
getMinWidth
Gets theminWidthstyle attribute.- Overrides:
getMinWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
minWidth
-
getOpacity
Gets theopacitystyle attribute.- Overrides:
getOpacityin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
getOrphans
Gets theorphansstyle attribute.- Overrides:
getOrphansin classAbstractCssStyleDeclaration- Returns:
- the style attribute
orphans
-
getOutlineWidth
Gets theoutlineWidthstyle attribute.- Overrides:
getOutlineWidthin classAbstractCssStyleDeclaration- Returns:
- the style attribute
outlineWidth
-
getPadding
Gets thepaddingstyle attribute.- Overrides:
getPaddingin classAbstractCssStyleDeclaration- Returns:
- the style attribute
padding
-
getPaddingBottom
Gets thepaddingBottomstyle attribute.- Overrides:
getPaddingBottomin classAbstractCssStyleDeclaration- Returns:
- the style attribute
paddingBottom
-
getPaddingLeft
Gets thepaddingLeftstyle attribute.- Overrides:
getPaddingLeftin classAbstractCssStyleDeclaration- Returns:
- the style attribute
paddingLeft
-
getPaddingRight
Gets thepaddingRightstyle attribute.- Overrides:
getPaddingRightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
paddingRight
-
getPaddingTop
Gets thepaddingTopstyle attribute.- Overrides:
getPaddingTopin classAbstractCssStyleDeclaration- Returns:
- the style attribute
paddingTop
-
getRight
Gets therightstyle attribute.- Overrides:
getRightin classAbstractCssStyleDeclaration- Returns:
- the style attribute
right
-
getTextIndent
Gets thetextIndentstyle attribute.- Overrides:
getTextIndentin classAbstractCssStyleDeclaration- Returns:
- the style attribute
textIndent
-
getTop
Gets thetopstyle attribute.- Overrides:
getTopin classAbstractCssStyleDeclaration- Returns:
- the style attribute
top
-
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 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- Returns:
- the computed top (Y coordinate), relative to the node's parent's top edge
-
getTopWithInheritance
Returns the CSStopattribute, replacing inherited values with the actual parent values.- Returns:
- the CSS
topattribute, replacing inherited values with the actual parent values
-
getBottomWithInheritance
Returns the CSSbottomattribute, replacing inherited values with the actual parent values.- Returns:
- the CSS
bottomattribute, replacing inherited values with the actual parent values
-
getVerticalAlign
Gets theverticalAlignstyle attribute.- Overrides:
getVerticalAlignin classAbstractCssStyleDeclaration- Returns:
- the style attribute
verticalAlign
-
getWidows
Gets thewidowsstyle attribute.- Overrides:
getWidowsin classAbstractCssStyleDeclaration- Returns:
- the style attribute
widows
-
getWordSpacing
Gets thewordSpacingstyle attribute.- Overrides:
getWordSpacingin classAbstractCssStyleDeclaration- Returns:
- the style attribute
wordSpacing
-
getZIndex
Gets thezIndexstyle attribute.- Overrides:
getZIndexin classAbstractCssStyleDeclaration- Returns:
- the style attribute
-
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
-
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 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- Returns:
- the computed left (X coordinate), relative to the node's parent's left edge
-
getPosition
Gets thepositionstyle attribute.- Overrides:
getPositionin classAbstractCssStyleDeclaration- Returns:
- the style attribute
position
-
getPositionWithInheritance
Returns the CSSpositionattribute, replacing inherited values with the actual parent values.- Returns:
- the CSS
positionattribute, replacing inherited values with the actual parent values
-
getLeftWithInheritance
Returns the CSSleftattribute, replacing inherited values with the actual parent values.- Returns:
- the CSS
leftattribute, replacing inherited values with the actual parent values
-
getRightWithInheritance
Returns the CSSrightattribute, replacing inherited values with the actual parent values.- Returns:
- the CSS
rightattribute, replacing inherited values with the actual parent values
-
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 valueincludePadding- whether or not to include the padding height in the returned value- Returns:
- the element's height, possibly including its padding and border
-
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 valueincludePadding- 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
-
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) Returnstrueif the element is scrollable along the specified axis.- Parameters:
horizontal- iftrue, the caller is interested in scrollability along the x-axis; iffalse, the caller is interested in scrollability along the y-axis- Returns:
trueif the element is scrollable along the specified axis
-
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
-
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
-
getCachedWidth
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached width
-
updateCachedWidth
public int updateCachedWidth(int width) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
width- the new value- Returns:
- the param width
-
getCachedHeight
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached height
-
updateCachedHeight
public int updateCachedHeight(int height) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
height- the new value- Returns:
- the param height
-
getCachedEmptyHeight
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached emptyHeight
-
updateCachedEmptyHeight
public int updateCachedEmptyHeight(int emptyHeight) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
emptyHeight- the new value- Returns:
- the param emptyHeight
-
getCachedTop
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached top
-
setCachedTop
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
top- the new value
-
getCachedPaddingHorizontal
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached padding horizontal
-
updateCachedPaddingHorizontal
public int updateCachedPaddingHorizontal(int paddingHorizontal) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
paddingHorizontal- the new value- Returns:
- the param paddingHorizontal
-
getCachedPaddingVertical
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached padding vertical
-
updateCachedPaddingVertical
public int updateCachedPaddingVertical(int paddingVertical) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
paddingVertical- the new value- Returns:
- the param paddingVertical
-
getCachedBorderHorizontal
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached border horizontal
-
updateCachedBorderHorizontal
public int updateCachedBorderHorizontal(int borderHorizontal) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
borderHorizontal- the new value- Returns:
- the param borderHorizontal
-
getCachedBorderVertical
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Returns:
- the cached border vertical
-
updateCachedBorderVertical
public int updateCachedBorderVertical(int borderVertical) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.- Parameters:
borderVertical- the new value- Returns:
- the param borderVertical
-
applyStyleFromSelector
public void applyStyleFromSelector(org.htmlunit.cssparser.dom.CSSStyleDeclarationImpl declaration, org.htmlunit.cssparser.parser.selector.Selector selector) Makes a local, "computed", modification to this CSS style.- Parameters:
declaration- the style declarationselector- the selector determining that the style applies to this element
-
setDefaultLocalStyleAttribute
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 setnewValue- the value of the style attribute to set
-
hasFeature
Indicates if the browser this is associated with has the feature.- Specified by:
hasFeaturein classAbstractCssStyleDeclaration- Parameters:
property- the property name- Returns:
falseif this browser doesn't have this feature
-
getBrowserVersion
Returns the theBrowserVersion.- Specified by:
getBrowserVersionin classAbstractCssStyleDeclaration- Returns:
- the
BrowserVersion
-
isComputed
public boolean isComputed()Returns true if this is a computed style declaration.- Overrides:
isComputedin classAbstractCssStyleDeclaration- Returns:
- true if this is a computed style declaration
-
toString
-