Package org.htmlunit.javascript.host.css
Class CSSStyleDeclaration
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.css.CSSStyleDeclaration
- All Implemented Interfaces:
Serializable
,Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
- Direct Known Subclasses:
ComputedCSSStyleDeclaration
A JavaScript object for
CSSStyleDeclaration
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private AbstractCssStyleDeclaration
The wrapped CSSStyleDeclarationprivate static final String[]
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance.CSSStyleDeclaration
(CSSStyleSheet parentStyleSheet, WrappedCssStyleDeclaration styleDeclaration) Creates an instance which wraps the specified style declaration.CSSStyleDeclaration
(Element element, AbstractCssStyleDeclaration styleDeclaration) Creates an instance and sets its parent scope to the one of the provided element. -
Method Summary
Modifier and TypeMethodDescriptionget
(int index, org.htmlunit.corejs.javascript.Scriptable start) Gets a named property from the object.Gets thebackgroundAttachment
style attribute.Gets thebackgroundColor
style attribute.Gets thebackgroundImage
style attribute.Gets thebackgroundPosition
style attribute.Gets thebackgroundRepeat
style attribute.Gets theborderBottomColor
style attribute.Gets theborderBottomStyle
style attribute.Gets theborderBottomWidth
style attribute.Gets theborderLeftColor
style attribute.Gets theborderLeftStyle
style attribute.Gets theborderLeftWidth
style attribute.Gets theborderRightColor
style attribute.Gets theborderRightStyle
style attribute.Gets theborderRightWidth
style attribute.Gets theborderTop
style attribute.Gets theborderTopColor
style attribute.Gets theborderTopStyle
style attribute.Gets theborderTopWidth
style attribute.Gets thebottom
style attribute.getColor()
Gets thecolor
style attribute.Gets thecssFloat
style attribute.protected AbstractCssStyleDeclaration
Returns the actual text of the style.Gets thedisplay
style attribute.getFont()
Gets thefont
style attribute.Gets thefontFamily
style attribute.Gets thefontSize
style attribute.Gets theheight
style attribute.Object[]
getIds()
getLeft()
Gets theleft
style attribute.int
Returns thelength
property.Gets theletterSpacing
style attribute.Gets thelineHeight
style attribute.Gets themargin
style attribute.Gets themarginBottom
style attribute.Gets themarginLeft
style attribute.Gets themarginRight
style attribute.Gets themarginTop
style attribute.Gets themaxHeight
style attribute.Gets themaxWidth
style attribute.Gets theminHeight
style attribute.Gets theminWidth
style attribute.Gets theopacity
style attribute.Gets theorphans
style attribute.Gets theoutline
style attribute.Gets theoutlineWidth
style attribute.Gets thepadding
style attribute.Gets thepaddingBottom
style attribute.Gets thepaddingLeft
style attribute.Gets thepaddingRight
style attribute.Gets thepaddingTop
style attribute.Returns the CSSRule that is the parent of this style block ornull
if this CSSStyleDeclaration is not attached to a CSSRule.Gets theposition
style attribute.getPropertyPriority
(String name) Gets the value of the specified property of the style.getPropertyValue
(String name) Gets the value of the specified property of the style.getRight()
Gets theright
style attribute.Gets therubyAlign
style attribute.getSize()
Gets thesize
style attribute.final String
getStyleAttribute
(StyleAttributes.Definition definition) Get the value for the style attribute.getStyleAttribute
(StyleAttributes.Definition definition, boolean getDefaultValueIfEmpty) Get the value for the style attribute.private Map
<String, StyleElement> Returns a sorted map containing style elements, keyed on style element name.protected String
getStylePriority
(String name) Returns the priority of the named style attribute, or an empty string if it is not found.Gets thetextIndent
style attribute.getTop()
Gets thetop
style attribute.Gets theverticalAlign
style attribute.Gets thewidows
style attribute.getWidth()
Gets thewidth
style attribute.Gets thewordSpacing
style attribute.Gets thezIndex
style attribute.boolean
(package private) static boolean
Returns if the specified token is a length.item
(int index) Returns the item in the given index.void
jsConstructor
(String type, org.htmlunit.corejs.javascript.ScriptableObject details) JavaScript constructor.void
removeProperty
(Object name) Removes the named property.private String
removeStyleAttribute
(String name) Removes the specified style attribute, returning the value of the removed attribute.void
setBackgroundAttachment
(String backgroundAttachment) Sets thebackgroundAttachment
style attribute.void
setBackgroundColor
(String backgroundColor) Sets thebackgroundColor
style attribute.void
setBackgroundImage
(String backgroundImage) Sets thebackgroundImage
style attribute.void
setBackgroundPosition
(String backgroundPosition) Sets thebackgroundPosition
style attribute.void
setBackgroundRepeat
(String backgroundRepeat) Sets thebackgroundRepeat
style attribute.void
setBorderBottomColor
(String borderBottomColor) Sets theborderBottomColor
style attribute.void
setBorderBottomStyle
(String borderBottomStyle) Sets theborderBottomStyle
style attribute.void
setBorderBottomWidth
(Object borderBottomWidth) Sets theborderBottomWidth
style attribute.void
setBorderLeftColor
(String borderLeftColor) Sets theborderLeftColor
style attribute.void
setBorderLeftStyle
(String borderLeftStyle) Sets theborderLeftStyle
style attribute.void
setBorderLeftWidth
(Object borderLeftWidth) Sets theborderLeftWidth
style attribute.void
setBorderRightColor
(String borderRightColor) Sets theborderRightColor
style attribute.void
setBorderRightStyle
(String borderRightStyle) Sets theborderRightStyle
style attribute.void
setBorderRightWidth
(Object borderRightWidth) Sets theborderRightWidth
style attribute.void
setBorderTop
(String borderTop) Sets theborderTop
style attribute.void
setBorderTopColor
(String borderTopColor) Sets theborderTopColor
style attribute.void
setBorderTopStyle
(String borderTopStyle) Sets theborderTopStyle
style attribute.void
setBorderTopWidth
(Object borderTopWidth) Sets theborderTopWidth
style attribute.void
Sets thebottom
style attribute.void
Sets thecolor
style attribute.void
setCssFloat
(String value) Sets thecssFloat
style attribute.void
setCssText
(String value) Sets the actual text of the style.void
setDisplay
(String display) Sets thedisplay
style attribute.void
Sets thefont
style attribute.void
setFontFamily
(String fontFamily) Sets thefontFamily
style attribute.void
setFontSize
(Object fontSize) Sets thefontSize
style attribute.void
Sets theheight
style attribute.void
Sets theleft
style attribute.void
setLetterSpacing
(Object letterSpacing) Sets theletterSpacing
style attribute.void
setLineHeight
(String lineHeight) Sets thelineHeight
style attribute.void
Sets themargin
style attribute.void
setMarginBottom
(Object marginBottom) Sets themarginBottom
style attribute.void
setMarginLeft
(Object marginLeft) Sets themarginLeft
style attribute.void
setMarginRight
(Object marginRight) Sets themarginRight
style attribute.void
setMarginTop
(Object marginTop) Sets themarginTop
style attribute.void
setMaxHeight
(Object maxHeight) Sets themaxHeight
style attribute.void
setMaxWidth
(Object maxWidth) Sets themaxWidth
style attribute.void
setMinHeight
(Object minHeight) Sets theminHeight
style attribute.void
setMinWidth
(Object minWidth) Sets theminWidth
style attribute.void
setOpacity
(Object opacity) Sets theopacity
style attribute.void
setOrphans
(String orphans) Sets theorphans
style attribute.void
setOutline
(String outline) Sets theoutline
style attribute.void
setOutlineWidth
(Object outlineWidth) Sets theoutlineWidth
style attribute.void
setPadding
(String padding) Sets thepadding
style attribute.void
setPaddingBottom
(Object paddingBottom) Sets thepaddingBottom
style attribute.void
setPaddingLeft
(Object paddingLeft) Sets thepaddingLeft
style attribute.void
setPaddingRight
(Object paddingRight) Sets thepaddingRight
style attribute.void
setPaddingTop
(Object paddingTop) Sets thepaddingTop
style attribute.void
setParentRule
(CSSRule parentRule) Nothing.void
setPosition
(String position) Sets theposition
style attribute.void
setProperty
(String name, Object value, String important) Sets the value of the specified property.void
Sets theright
style attribute.void
setRubyAlign
(String rubyAlign) Sets therubyAlign
style attribute.void
Sets thesize
style attribute.protected void
setStyleAttribute
(String name, String newValue) Sets the specified style attribute.protected void
setStyleAttribute
(String name, String newValue, String important) Sets the specified style attribute.private void
setStyleLengthAttribute
(String name, Object value, String important, boolean auto, boolean percent, boolean unitRequired, String[] validValues) Sets the style attribute which should be treated as an integer in pixels.void
setTextIndent
(Object textIndent) Sets thetextIndent
style attribute.void
Sets thetop
style attribute.void
setVerticalAlign
(Object verticalAlign) Sets theverticalAlign
style attribute.void
Sets thewidows
style attribute.void
Sets thewidth
style attribute.void
setWordSpacing
(Object wordSpacing) Sets thewordSpacing
style attribute.void
Sets thezIndex
style attribute.toString()
private void
updateFont
(String font, boolean force) org.htmlunit.corejs.javascript.Scriptable
values()
Returns an Iterator allowing to go through all keys contained in this object.Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
Field Details
-
LENGTH_PROPERTIES_FFFF
-
LENGTH_PROPERTIES_TTFF
-
LENGTH_PROPERTIES_FTFF
-
THIN_MED_THICK
-
ALIGN_KEYWORDS
-
styleDeclaration_
The wrapped CSSStyleDeclaration
-
-
Constructor Details
-
CSSStyleDeclaration
public CSSStyleDeclaration()Creates an instance. -
CSSStyleDeclaration
Creates an instance and sets its parent scope to the one of the provided element.- Parameters:
element
- the element to which this style is boundstyleDeclaration
- the style declaration to be based on
-
CSSStyleDeclaration
CSSStyleDeclaration(CSSStyleSheet parentStyleSheet, WrappedCssStyleDeclaration styleDeclaration) Creates an instance which wraps the specified style declaration.- Parameters:
parentStyleSheet
- the parentCSSStyleSheet
to usestyleDeclaration
- the style declaration to wrap
-
-
Method Details
-
jsConstructor
JavaScript constructor.- Parameters:
type
- the event typedetails
- the event details (optional)
-
getCssStyleDeclaration
-
getStylePriority
Returns the priority of the named style attribute, or an empty string if it is not found.- 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
Sets the specified style attribute.- Parameters:
name
- the attribute name (camel-cased)newValue
- the attribute value
-
setStyleAttribute
Sets the specified style attribute.- 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.- Parameters:
name
- the attribute name (delimiter-separated, not camel-cased)
-
getStyleMap
Returns a sorted map containing style elements, keyed on style element name. We use aLinkedHashMap
map so that results are deterministic and are thus testable.- Returns:
- a sorted map containing style elements, keyed on style element name
-
getBackgroundAttachment
Gets thebackgroundAttachment
style attribute.- Returns:
- the style attribute
-
setBackgroundAttachment
Sets thebackgroundAttachment
style attribute.- Parameters:
backgroundAttachment
- the new attribute
-
getBackgroundColor
Gets thebackgroundColor
style attribute.- Returns:
- the style attribute
-
setBackgroundColor
Sets thebackgroundColor
style attribute.- Parameters:
backgroundColor
- the new attribute
-
getBackgroundImage
Gets thebackgroundImage
style attribute.- Returns:
- the style attribute
-
setBackgroundImage
Sets thebackgroundImage
style attribute.- Parameters:
backgroundImage
- the new attribute
-
getBackgroundPosition
Gets thebackgroundPosition
style attribute.- Returns:
- the style attribute
-
setBackgroundPosition
Sets thebackgroundPosition
style attribute.- Parameters:
backgroundPosition
- the new attribute
-
getBackgroundRepeat
Gets thebackgroundRepeat
style attribute.- Returns:
- the style attribute
-
setBackgroundRepeat
Sets thebackgroundRepeat
style attribute.- Parameters:
backgroundRepeat
- the new attribute
-
getBorderBottomColor
Gets theborderBottomColor
style attribute.- Returns:
- the style attribute
-
setBorderBottomColor
Sets theborderBottomColor
style attribute.- Parameters:
borderBottomColor
- the new attribute
-
getBorderBottomStyle
Gets theborderBottomStyle
style attribute.- Returns:
- the style attribute
-
setBorderBottomStyle
Sets theborderBottomStyle
style attribute.- Parameters:
borderBottomStyle
- the new attribute
-
getBorderBottomWidth
Gets theborderBottomWidth
style attribute.- Returns:
- the style attribute
-
setBorderBottomWidth
Sets theborderBottomWidth
style attribute.- Parameters:
borderBottomWidth
- the new attribute
-
getBorderLeftColor
Gets theborderLeftColor
style attribute.- Returns:
- the style attribute
-
setBorderLeftColor
Sets theborderLeftColor
style attribute.- Parameters:
borderLeftColor
- the new attribute
-
getBorderLeftStyle
Gets theborderLeftStyle
style attribute.- Returns:
- the style attribute
-
setBorderLeftStyle
Sets theborderLeftStyle
style attribute.- Parameters:
borderLeftStyle
- the new attribute
-
getBorderLeftWidth
Gets theborderLeftWidth
style attribute.- Returns:
- the style attribute
-
setBorderLeftWidth
Sets theborderLeftWidth
style attribute.- Parameters:
borderLeftWidth
- the new attribute
-
getBorderRightColor
Gets theborderRightColor
style attribute.- Returns:
- the style attribute
-
setBorderRightColor
Sets theborderRightColor
style attribute.- Parameters:
borderRightColor
- the new attribute
-
getBorderRightStyle
Gets theborderRightStyle
style attribute.- Returns:
- the style attribute
-
setBorderRightStyle
Sets theborderRightStyle
style attribute.- Parameters:
borderRightStyle
- the new attribute
-
getBorderRightWidth
Gets theborderRightWidth
style attribute.- Returns:
- the style attribute
-
setBorderRightWidth
Sets theborderRightWidth
style attribute.- Parameters:
borderRightWidth
- the new attribute
-
getBorderTop
Gets theborderTop
style attribute.- Returns:
- the style attribute
-
setBorderTop
Sets theborderTop
style attribute.- Parameters:
borderTop
- the new attribute
-
getBorderTopColor
Gets theborderTopColor
style attribute.- Returns:
- the style attribute
-
setBorderTopColor
Sets theborderTopColor
style attribute.- Parameters:
borderTopColor
- the new attribute
-
getBorderTopStyle
Gets theborderTopStyle
style attribute.- Returns:
- the style attribute
-
setBorderTopStyle
Sets theborderTopStyle
style attribute.- Parameters:
borderTopStyle
- the new attribute
-
getBorderTopWidth
Gets theborderTopWidth
style attribute.- Returns:
- the style attribute
-
setBorderTopWidth
Sets theborderTopWidth
style attribute.- Parameters:
borderTopWidth
- the new attribute
-
getBottom
Gets thebottom
style attribute.- Returns:
- the style attribute
-
setBottom
Sets thebottom
style attribute.- Parameters:
bottom
- the new attribute
-
getColor
Gets thecolor
style attribute.- Returns:
- the style attribute
-
setColor
Sets thecolor
style attribute.- Parameters:
color
- the new attribute
-
getCssFloat
Gets thecssFloat
style attribute.- Returns:
- the style attribute
-
setCssFloat
Sets thecssFloat
style attribute.- Parameters:
value
- the new attribute
-
getCssText
Returns the actual text of the style.- Returns:
- the actual text of the style
-
setCssText
Sets the actual text of the style.- Parameters:
value
- the new text
-
getDisplay
Gets thedisplay
style attribute.- Returns:
- the style attribute
-
setDisplay
Sets thedisplay
style attribute.- Parameters:
display
- the new attribute
-
getFontSize
Gets thefontSize
style attribute.- Returns:
- the style attribute
-
setFontSize
Sets thefontSize
style attribute.- Parameters:
fontSize
- the new attribute
-
getLineHeight
Gets thelineHeight
style attribute.- Returns:
- the style attribute
-
setLineHeight
Sets thelineHeight
style attribute.- Parameters:
lineHeight
- the new attribute
-
getFontFamily
Gets thefontFamily
style attribute.- Returns:
- the style attribute
-
setFontFamily
Sets thefontFamily
style attribute.- Parameters:
fontFamily
- the new attribute
-
updateFont
-
getFont
Gets thefont
style attribute.- Returns:
- the style attribute
-
setFont
Sets thefont
style attribute.- Parameters:
font
- the new attribute
-
getHeight
Gets theheight
style attribute.- Returns:
- the style attribute
-
setHeight
Sets theheight
style attribute.- Parameters:
height
- the new attribute
-
getLeft
Gets theleft
style attribute.- Returns:
- the style attribute
-
setLeft
Sets theleft
style attribute.- Parameters:
left
- the new attribute
-
getLength
public int getLength()Returns thelength
property.- Returns:
- the
length
property
-
item
Returns the item in the given index.- Parameters:
index
- the index- Returns:
- the item in the given index
-
values
public org.htmlunit.corejs.javascript.Scriptable values()Returns an Iterator allowing to go through all keys contained in this object.- Returns:
- a NativeArrayIterator
-
getLetterSpacing
Gets theletterSpacing
style attribute.- Returns:
- the style attribute
-
setLetterSpacing
Sets theletterSpacing
style attribute.- Parameters:
letterSpacing
- the new attribute
-
getMargin
Gets themargin
style attribute.- Returns:
- the style attribute
-
setMargin
Sets themargin
style attribute.- Parameters:
margin
- the new attribute
-
getMarginBottom
Gets themarginBottom
style attribute.- Returns:
- the style attribute
-
setMarginBottom
Sets themarginBottom
style attribute.- Parameters:
marginBottom
- the new attribute
-
getMarginLeft
Gets themarginLeft
style attribute.- Returns:
- the style attribute
-
setMarginLeft
Sets themarginLeft
style attribute.- Parameters:
marginLeft
- the new attribute
-
getMarginRight
Gets themarginRight
style attribute.- Returns:
- the style attribute
-
setMarginRight
Sets themarginRight
style attribute.- Parameters:
marginRight
- the new attribute
-
getMarginTop
Gets themarginTop
style attribute.- Returns:
- the style attribute
-
setMarginTop
Sets themarginTop
style attribute.- Parameters:
marginTop
- the new attribute
-
getMaxHeight
Gets themaxHeight
style attribute.- Returns:
- the style attribute
-
setMaxHeight
Sets themaxHeight
style attribute.- Parameters:
maxHeight
- the new attribute
-
getMaxWidth
Gets themaxWidth
style attribute.- Returns:
- the style attribute
-
setMaxWidth
Sets themaxWidth
style attribute.- Parameters:
maxWidth
- the new attribute
-
getMinHeight
Gets theminHeight
style attribute.- Returns:
- the style attribute
-
setMinHeight
Sets theminHeight
style attribute.- Parameters:
minHeight
- the new attribute
-
getMinWidth
Gets theminWidth
style attribute.- Returns:
- the style attribute
-
setMinWidth
Sets theminWidth
style attribute.- Parameters:
minWidth
- the new attribute
-
get
Gets a named property from the object. Normally HtmlUnit objects don't need to overwrite this method as properties are defined on the prototypes from the XML configuration. In some cases where "content" of object has priority compared to the properties consider using utilityHtmlUnitScriptable.getWithPreemption(String)
.- Specified by:
get
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
get
in classHtmlUnitScriptable
-
get
- Specified by:
get
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
get
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
getStyleAttribute
Get the value for the style attribute.- Parameters:
definition
- the definition- 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 a overload inComputedCSSStyleDeclaration
.- Parameters:
definition
- the definitiongetDefaultValueIfEmpty
- whether to get the default value if empty or not- Returns:
- the value
-
put
Description copied from class:HtmlUnitScriptable
- Specified by:
put
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
put
in classHtmlUnitScriptable
-
has
- Specified by:
has
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
has
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
getIds
- Specified by:
getIds
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
getIds
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
getOpacity
Gets theopacity
style attribute.- Returns:
- the style attribute
-
setOpacity
Sets theopacity
style attribute.- Parameters:
opacity
- the new attribute
-
getOutline
Gets theoutline
style attribute.- Returns:
- the style attribute
-
setOutline
Sets theoutline
style attribute.- Parameters:
outline
- the new attribute
-
getOutlineWidth
Gets theoutlineWidth
style attribute.- Returns:
- the style attribute
-
setOutlineWidth
Sets theoutlineWidth
style attribute.- Parameters:
outlineWidth
- the new attribute
-
getPadding
Gets thepadding
style attribute.- Returns:
- the style attribute
-
setPadding
Sets thepadding
style attribute.- Parameters:
padding
- the new attribute
-
getPaddingBottom
Gets thepaddingBottom
style attribute.- Returns:
- the style attribute
-
setPaddingBottom
Sets thepaddingBottom
style attribute.- Parameters:
paddingBottom
- the new attribute
-
getPaddingLeft
Gets thepaddingLeft
style attribute.- Returns:
- the style attribute
-
setPaddingLeft
Sets thepaddingLeft
style attribute.- Parameters:
paddingLeft
- the new attribute
-
getPaddingRight
Gets thepaddingRight
style attribute.- Returns:
- the style attribute
-
setPaddingRight
Sets thepaddingRight
style attribute.- Parameters:
paddingRight
- the new attribute
-
getPaddingTop
Gets thepaddingTop
style attribute.- Returns:
- the style attribute
-
setPaddingTop
Sets thepaddingTop
style attribute.- Parameters:
paddingTop
- the new attribute
-
getParentRule
Returns the CSSRule that is the parent of this style block ornull
if this CSSStyleDeclaration is not attached to a CSSRule.- Returns:
- the CSSRule that is the parent of this style block or
null
if this CSSStyleDeclaration is not attached to a CSSRule
-
setParentRule
Nothing.- Parameters:
parentRule
- ignored
-
getRight
Gets theright
style attribute.- Returns:
- the style attribute
-
setRight
Sets theright
style attribute.- Parameters:
right
- the new attribute
-
getRubyAlign
Gets therubyAlign
style attribute.- Returns:
- the style attribute
-
setRubyAlign
Sets therubyAlign
style attribute.- Parameters:
rubyAlign
- the new attribute
-
getSize
Gets thesize
style attribute.- Returns:
- the style attribute
-
setSize
Sets thesize
style attribute.- Parameters:
size
- the new attribute
-
getTextIndent
Gets thetextIndent
style attribute.- Returns:
- the style attribute
-
setTextIndent
Sets thetextIndent
style attribute.- Parameters:
textIndent
- the new attribute
-
getTop
Gets thetop
style attribute.- Returns:
- the style attribute
-
setTop
Sets thetop
style attribute.- Parameters:
top
- the new attribute
-
getVerticalAlign
Gets theverticalAlign
style attribute.- Returns:
- the style attribute
-
setVerticalAlign
Sets theverticalAlign
style attribute.- Parameters:
verticalAlign
- the new attribute
-
getWidth
Gets thewidth
style attribute.- Returns:
- the style attribute
-
setWidth
Sets thewidth
style attribute.- Parameters:
width
- the new attribute
-
getWidows
Gets thewidows
style attribute.- Returns:
- the style attribute
-
setWidows
Sets thewidows
style attribute.- Parameters:
widows
- the new attribute
-
getOrphans
Gets theorphans
style attribute.- Returns:
- the style attribute
-
setOrphans
Sets theorphans
style attribute.- Parameters:
orphans
- the new attribute
-
getPosition
Gets theposition
style attribute.- Returns:
- the style attribute
-
setPosition
Sets theposition
style attribute.- Parameters:
position
- the new attribute
-
getWordSpacing
Gets thewordSpacing
style attribute.- Returns:
- the style attribute
-
setWordSpacing
Sets thewordSpacing
style attribute.- Parameters:
wordSpacing
- the new attribute
-
getZIndex
Gets thezIndex
style attribute.- Returns:
- the style attribute
-
setZIndex
Sets thezIndex
style attribute.- Parameters:
zIndex
- the new attribute
-
getPropertyValue
Gets the value of the specified property of the style.- Parameters:
name
- the style property name- Returns:
- empty string if nothing found
-
getPropertyPriority
Gets the value of the specified property of the style.- Parameters:
name
- the style property name- Returns:
- empty string if nothing found
-
setProperty
Sets the value of the specified property.- Parameters:
name
- the name of the attributevalue
- the value to assign to the attributeimportant
- may be null
-
removeProperty
Removes the named property.- Parameters:
name
- the name of the property to remove- Returns:
- the value deleted
-
isLength
Returns if the specified token is a length.- Parameters:
token
- the token to check- Returns:
- whether the token is a length or not
-
toString
-
setStyleLengthAttribute
private void setStyleLengthAttribute(String name, Object value, String important, boolean auto, boolean percent, boolean unitRequired, String[] validValues) Sets the style attribute which should be treated as an integer in pixels.- Parameters:
name
- the attribute namevalue
- the attribute valueimportant
- important valueauto
- true if auto is supportedpercent
- true if percent is supportedunitRequired
- unit is requiredvalidValues
- valid values
-