public abstract class AbstractCssStyleDeclaration extends Object implements Serializable
Constructor and Description |
---|
AbstractCssStyleDeclaration() |
Modifier and Type | Method and Description |
---|---|
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. |
String |
getBorderBottomWidth()
Gets the
borderBottomWidth style attribute. |
String |
getBorderLeftColor()
Gets the
borderLeftColor style attribute. |
String |
getBorderLeftStyle()
Gets the
borderLeftStyle style attribute. |
String |
getBorderLeftWidth()
Gets the
borderLeftWidth style attribute. |
String |
getBorderRightColor()
Gets the
borderRightColor style attribute. |
String |
getBorderRightStyle()
Gets the
borderRightStyle style attribute. |
String |
getBorderRightWidth()
Gets the
borderRightWidth style attribute. |
String |
getBorderTop()
Gets the
borderTop style attribute. |
String |
getBorderTopColor()
Gets the
borderTopColor style attribute. |
String |
getBorderTopStyle()
Gets the
borderTopStyle style attribute. |
String |
getBorderTopWidth()
Gets the
borderTopWidth style attribute. |
String |
getBottom()
Gets the
bottom style attribute. |
abstract BrowserVersion |
getBrowserVersion() |
String |
getColor()
Gets the
color style attribute. |
String |
getCssFloat()
Gets the
cssFloat style attribute. |
abstract String |
getCssText()
Returns the actual text of the style.
|
String |
getDisplay()
Gets the
display style attribute. |
String |
getFont()
Gets the
font style attribute. |
String |
getFontFamily()
Gets the
fontFamily style attribute. |
String |
getFontSize()
Gets the
fontSize style attribute. |
String |
getHeight()
Gets the
height style attribute. |
String |
getLeft() |
abstract int |
getLength()
Returns the
length property. |
String |
getLetterSpacing() |
String |
getLineHeight() |
String |
getMargin() |
String |
getMarginBottom()
Gets the
marginBottom style attribute. |
String |
getMarginLeft()
Gets the
marginLeft style attribute. |
String |
getMarginRight()
Gets the
marginRight style attribute. |
String |
getMarginTop()
Gets the
marginTop style attribute. |
String |
getMaxHeight() |
String |
getMaxWidth() |
String |
getMinHeight() |
String |
getMinWidth() |
String |
getOpacity()
Gets the
opacity style attribute. |
String |
getOrphans() |
String |
getOutline() |
String |
getOutlineWidth() |
String |
getPadding() |
String |
getPaddingBottom() |
String |
getPaddingLeft() |
String |
getPaddingRight() |
String |
getPaddingTop() |
abstract org.htmlunit.cssparser.dom.AbstractCSSRuleImpl |
getParentRule()
Returns the CSSRule that is the parent of this style block or
null if this CSSStyleDeclaration is
not attached to a CSSRule. |
String |
getPosition() |
String |
getRight() |
String |
getRubyAlign() |
String |
getSize() |
abstract String |
getStyleAttribute(String name)
Get the value for the style attribute.
|
abstract String |
getStyleAttribute(StyleAttributes.Definition definition,
boolean getDefaultValueIfEmpty)
Get the value for the style attribute.
|
String |
getStyleAttribute(StyleAttributes.Definition definition1,
StyleAttributes.Definition definition2)
Returns the value of one of the two named style attributes.
|
abstract StyleElement |
getStyleElement(String name)
Determines the StyleElement for the given name.
|
abstract StyleElement |
getStyleElementCaseInSensitive(String name)
Determines the StyleElement for the given name.
|
abstract Map<String,StyleElement> |
getStyleMap()
Returns a sorted map containing style elements, keyed on style element name.
|
abstract String |
getStylePriority(String name)
Returns the priority of the named style attribute, or an empty string if it is not found.
|
String |
getTextIndent() |
String |
getTop() |
String |
getVerticalAlign() |
String |
getWidows() |
String |
getWidth() |
String |
getWordSpacing() |
String |
getZIndex()
Gets the
zIndex style attribute. |
abstract boolean |
hasFeature(BrowserVersionFeatures property)
Indicates if the browser this is associated with has the feature.
|
boolean |
isComputed() |
abstract String |
item(int index) |
abstract String |
removeStyleAttribute(String name)
Removes the specified style attribute, returning the value of the removed attribute.
|
abstract void |
setCssText(String value)
Sets the actual text of the style.
|
abstract void |
setStyleAttribute(String name,
String newValue,
String important)
Sets the specified style attribute.
|
public abstract String getStylePriority(String name)
name
- the name of the style attribute whose value is to be retrievedpublic abstract String getCssText()
public abstract String getStyleAttribute(String name)
name
- the namepublic abstract String getStyleAttribute(StyleAttributes.Definition definition, boolean getDefaultValueIfEmpty)
ComputedCssStyleDeclaration
.definition
- the definitiongetDefaultValueIfEmpty
- whether to get the default value if empty or notpublic abstract boolean hasFeature(BrowserVersionFeatures property)
property
- the property namefalse
if this browser doesn't have this featurepublic abstract BrowserVersion getBrowserVersion()
BrowserVersion
public String getStyleAttribute(StyleAttributes.Definition definition1, StyleAttributes.Definition definition2)
Returns the value of one of the two named style attributes. If both attributes exist, the value of the attribute that was declared last is returned. If only one of the attributes exists, its value is returned. If neither attribute exists, an empty string is returned.
The second named attribute may be shorthand for a the actual desired property. The following formats are possible:
top right bottom left
: All values are explicit.top right bottom
: Left is implicitly the same as right.top right
: Left is implicitly the same as right, bottom is implicitly the same as top.top
: Left, bottom and right are implicitly the same as top.definition1
- the name of the first style attributedefinition2
- the name of the second style attributepublic abstract void setCssText(String value)
value
- the new textpublic abstract void setStyleAttribute(String name, String newValue, String important)
name
- the attribute name (camel-cased)newValue
- the attribute valueimportant
- important valuepublic abstract String removeStyleAttribute(String name)
name
- the attribute name (delimiter-separated, not camel-cased)public abstract int getLength()
length
property.length
propertypublic abstract String item(int index)
index
- the indexpublic abstract org.htmlunit.cssparser.dom.AbstractCSSRuleImpl getParentRule()
null
if this CSSStyleDeclaration is
not attached to a CSSRule.null
if this CSSStyleDeclaration is
not attached to a CSSRulepublic abstract StyleElement getStyleElement(String name)
name
- the name of the requested StyleElementpublic abstract StyleElement getStyleElementCaseInSensitive(String name)
name
- the name of the requested StyleElementpublic abstract Map<String,StyleElement> getStyleMap()
LinkedHashMap
map so that results are deterministic and are thus testable.public boolean isComputed()
public String getBackgroundAttachment()
backgroundAttachment
style attribute.public String getBackgroundColor()
backgroundColor
style attribute.public String getBackgroundImage()
backgroundImage
style attribute.public String getBackgroundPosition()
backgroundPosition
style attribute.public String getBackgroundRepeat()
backgroundRepeat
style attribute.public String getBorderBottomColor()
borderBottomColor
style attribute.public String getBorderBottomStyle()
borderBottomStyle
style attribute.public String getBorderBottomWidth()
borderBottomWidth
style attribute.public String getBorderLeftColor()
borderLeftColor
style attribute.public String getBorderLeftStyle()
borderLeftStyle
style attribute.public String getBorderLeftWidth()
borderLeftWidth
style attribute.public String getBorderRightColor()
borderRightColor
style attribute.public String getBorderRightStyle()
borderRightStyle
style attribute.public String getBorderRightWidth()
borderRightWidth
style attribute.public String getBorderTop()
borderTop
style attribute.public String getBorderTopColor()
borderTopColor
style attribute.public String getBorderTopStyle()
borderTopStyle
style attribute.public String getBorderTopWidth()
borderTopWidth
style attribute.public String getBottom()
bottom
style attribute.public String getColor()
color
style attribute.public String getCssFloat()
cssFloat
style attribute.public String getDisplay()
display
style attribute.public String getFont()
font
style attribute.public String getFontFamily()
fontFamily
style attribute.public String getFontSize()
fontSize
style attribute.public String getHeight()
height
style attribute.public String getLeft()
left
public String getLetterSpacing()
letterSpacing
public String getLineHeight()
lineHeight
public String getMargin()
margin
public String getMarginBottom()
marginBottom
style attribute.public String getMarginLeft()
marginLeft
style attribute.public String getMarginRight()
marginRight
style attribute.public String getMarginTop()
marginTop
style attribute.public String getMaxHeight()
maxHeight
public String getMaxWidth()
maxWidth
public String getMinHeight()
minHeight
public String getMinWidth()
minWidth
public String getOpacity()
opacity
style attribute.public String getOrphans()
orphans
public String getOutline()
outline
public String getOutlineWidth()
outlineWidth
public String getPadding()
padding
public String getPaddingBottom()
paddingBottom
public String getPaddingLeft()
paddingLeft
public String getPaddingRight()
paddingRight
public String getPaddingTop()
paddingTop
public String getPosition()
position
public String getRight()
right
public String getRubyAlign()
rubyAlign
public String getSize()
size
public String getTextIndent()
textIndent
public String getTop()
top
public String getVerticalAlign()
verticalAlign
public String getWidows()
widows
public String getWidth()
width
public String getWordSpacing()
wordSpacing
public String getZIndex()
zIndex
style attribute.Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.