APIdia Launch Partner
Top Description Methods
org.w3c.dom.css

public Interface CSS2Properties

Imports
org.w3c.dom.DOMException

The CSS2Properties interface represents a convenience mechanism for retrieving and setting properties within a CSSStyleDeclaration. The attributes of this interface correspond to all the properties specified in CSS2. Getting an attribute of this interface is equivalent to calling the getPropertyValue method of the CSSStyleDeclaration interface. Setting an attribute of this interface is equivalent to calling the setProperty method of the CSSStyleDeclaration interface.

A conformant implementation of the CSS module is not required to implement the CSS2Properties interface. If an implementation does implement this interface, the expectation is that language-specific methods can be used to cast from an instance of the CSSStyleDeclaration interface to the CSS2Properties interface.

If an implementation does implement this interface, it is expected to understand the specific syntax of the shorthand properties, and apply their semantics; when the margin property is set, for example, the marginTop, marginRight, marginBottom and marginLeft properties are actually being set by the underlying implementation.

When dealing with CSS "shorthand" properties, the shorthand properties should be decomposed into their component longhand properties as appropriate, and when querying for their value, the form returned should be the shortest form exactly equivalent to the declarations made in the ruleset. However, if there is no shorthand declaration that could be added to the ruleset without changing in any way the rules already declared in the ruleset (i.e., by adding longhand rules that were previously not declared in the ruleset), then the empty string should be returned for the shorthand property.

For example, querying for the font property should not return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt Arial, sans-serif" suffices. (The normals are initial values, and are implied by use of the longhand property.)

If the values for all the longhand properties that compose a particular string are the initial values, then a string consisting of all the initial values should be returned (e.g. a border-width value of "medium" should be returned as such, not as "").

For some shorthand properties that take missing values from other sides, such as the margin, padding, and border-[width|style|color] properties, the minimum number of sides possible should be used; i.e., "0px 10px" will be returned instead of "0px 10px 0px 10px".

If the value of a shorthand property can not be decomposed into its component longhand properties, as is the case for the font property with a value of "menu", querying for the values of the component longhand properties should return the empty string.

See also the Document Object Model (DOM) Level 2 Style Specification.

Since
1.4, DOM Level 2

Method Summary

Modifier and TypeMethod and Description
public String
getAzimuth()

See the azimuth property definition in CSS2.

public String
getBackground()

See the background property definition in CSS2.

public String
getBackgroundAttachment()

See the background-attachment property definition in CSS2.

public String
getBackgroundColor()

See the background-color property definition in CSS2.

public String
getBackgroundImage()

See the background-image property definition in CSS2.

public String
getBackgroundPosition()

See the background-position property definition in CSS2.

public String
getBackgroundRepeat()

See the background-repeat property definition in CSS2.

public String
getBorder()

See the border property definition in CSS2.

public String
getBorderBottom()

See the border-bottom property definition in CSS2.

public String
getBorderBottomColor()

See the border-bottom-color property definition in CSS2.

public String
getBorderBottomStyle()

See the border-bottom-style property definition in CSS2.

public String
getBorderBottomWidth()

See the border-bottom-width property definition in CSS2.

public String
getBorderCollapse()

See the border-collapse property definition in CSS2.

public String
getBorderColor()

See the border-color property definition in CSS2.

public String
getBorderLeft()

See the border-left property definition in CSS2.

public String
getBorderLeftColor()

See the border-left-color property definition in CSS2.

public String
getBorderLeftStyle()

See the border-left-style property definition in CSS2.

public String
getBorderLeftWidth()

See the border-left-width property definition in CSS2.

public String
getBorderRight()

See the border-right property definition in CSS2.

public String
getBorderRightColor()

See the border-right-color property definition in CSS2.

public String
getBorderRightStyle()

See the border-right-style property definition in CSS2.

public String
getBorderRightWidth()

See the border-right-width property definition in CSS2.

public String
getBorderSpacing()

See the border-spacing property definition in CSS2.

public String
getBorderStyle()

See the border-style property definition in CSS2.

public String
getBorderTop()

See the border-top property definition in CSS2.

public String
getBorderTopColor()

See the border-top-color property definition in CSS2.

public String
getBorderTopStyle()

See the border-top-style property definition in CSS2.

public String
getBorderTopWidth()

See the border-top-width property definition in CSS2.

public String
getBorderWidth()

See the border-width property definition in CSS2.

public String
getBottom()

See the bottom property definition in CSS2.

public String
getCaptionSide()

See the caption-side property definition in CSS2.

public String
getClear()

See the clear property definition in CSS2.

public String
getClip()

See the clip property definition in CSS2.

public String
getColor()

See the color property definition in CSS2.

public String
getContent()

See the content property definition in CSS2.

public String
getCounterIncrement()

See the counter-increment property definition in CSS2.

public String
getCounterReset()

See the counter-reset property definition in CSS2.

public String
getCssFloat()

See the float property definition in CSS2.

public String
getCue()

See the cue property definition in CSS2.

public String
getCueAfter()

See the cue-after property definition in CSS2.

public String
getCueBefore()

See the cue-before property definition in CSS2.

public String
getCursor()

See the cursor property definition in CSS2.

public String
getDirection()

See the direction property definition in CSS2.

public String
getDisplay()

See the display property definition in CSS2.

public String
getElevation()

See the elevation property definition in CSS2.

public String
getEmptyCells()

See the empty-cells property definition in CSS2.

public String
getFont()

See the font property definition in CSS2.

public String
getFontFamily()

See the font-family property definition in CSS2.

public String
getFontSize()

See the font-size property definition in CSS2.

public String
getFontSizeAdjust()

See the font-size-adjust property definition in CSS2.

public String
getFontStretch()

See the font-stretch property definition in CSS2.

public String
getFontStyle()

See the font-style property definition in CSS2.

public String
getFontVariant()

See the font-variant property definition in CSS2.

public String
getFontWeight()

See the font-weight property definition in CSS2.

public String
getHeight()

See the height property definition in CSS2.

public String
getLeft()

See the left property definition in CSS2.

public String
getLetterSpacing()

See the letter-spacing property definition in CSS2.

public String
getLineHeight()

See the line-height property definition in CSS2.

public String
getListStyle()

See the list-style property definition in CSS2.

public String
getListStyleImage()

See the list-style-image property definition in CSS2.

public String
getListStylePosition()

See the list-style-position property definition in CSS2.

public String
getListStyleType()

See the list-style-type property definition in CSS2.

public String
getMargin()

See the margin property definition in CSS2.

public String
getMarginBottom()

See the margin-bottom property definition in CSS2.

public String
getMarginLeft()

See the margin-left property definition in CSS2.

public String
getMarginRight()

See the margin-right property definition in CSS2.

public String
getMarginTop()

See the margin-top property definition in CSS2.

public String
getMarkerOffset()

See the marker-offset property definition in CSS2.

public String
getMarks()

See the marks property definition in CSS2.

public String
getMaxHeight()

See the max-height property definition in CSS2.

public String
getMaxWidth()

See the max-width property definition in CSS2.

public String
getMinHeight()

See the min-height property definition in CSS2.

public String
getMinWidth()

See the min-width property definition in CSS2.

public String
getOrphans()

See the orphans property definition in CSS2.

public String
getOutline()

See the outline property definition in CSS2.

public String
getOutlineColor()

See the outline-color property definition in CSS2.

public String
getOutlineStyle()

See the outline-style property definition in CSS2.

public String
getOutlineWidth()

See the outline-width property definition in CSS2.

public String
getOverflow()

See the overflow property definition in CSS2.

public String
getPadding()

See the padding property definition in CSS2.

public String
getPaddingBottom()

See the padding-bottom property definition in CSS2.

public String
getPaddingLeft()

See the padding-left property definition in CSS2.

public String
getPaddingRight()

See the padding-right property definition in CSS2.

public String
getPaddingTop()

See the padding-top property definition in CSS2.

public String
getPage()

See the page property definition in CSS2.

public String
getPageBreakAfter()

See the page-break-after property definition in CSS2.

public String
getPageBreakBefore()

See the page-break-before property definition in CSS2.

public String
getPageBreakInside()

See the page-break-inside property definition in CSS2.

public String
getPause()

See the pause property definition in CSS2.

public String
getPauseAfter()

See the pause-after property definition in CSS2.

public String
getPauseBefore()

See the pause-before property definition in CSS2.

public String
getPitch()

See the pitch property definition in CSS2.

public String
getPitchRange()

See the pitch-range property definition in CSS2.

public String
getPlayDuring()

See the play-during property definition in CSS2.

public String
getPosition()

See the position property definition in CSS2.

public String
getQuotes()

See the quotes property definition in CSS2.

public String
getRichness()

See the richness property definition in CSS2.

public String
getRight()

See the right property definition in CSS2.

public String
getSize()

See the size property definition in CSS2.

public String
getSpeak()

See the speak property definition in CSS2.

public String
getSpeakHeader()

See the speak-header property definition in CSS2.

public String
getSpeakNumeral()

See the speak-numeral property definition in CSS2.

public String
getSpeakPunctuation()

See the speak-punctuation property definition in CSS2.

public String
getSpeechRate()

See the speech-rate property definition in CSS2.

public String
getStress()

See the stress property definition in CSS2.

public String
getTableLayout()

See the table-layout property definition in CSS2.

public String
getTextAlign()

See the text-align property definition in CSS2.

public String
getTextDecoration()

See the text-decoration property definition in CSS2.

public String
getTextIndent()

See the text-indent property definition in CSS2.

public String
getTextShadow()

See the text-shadow property definition in CSS2.

public String
getTextTransform()

See the text-transform property definition in CSS2.

public String
getTop()

See the top property definition in CSS2.

public String
getUnicodeBidi()

See the unicode-bidi property definition in CSS2.

public String
getVerticalAlign()

See the vertical-align property definition in CSS2.

public String
getVisibility()

See the visibility property definition in CSS2.

public String
getVoiceFamily()

See the voice-family property definition in CSS2.

public String
getVolume()

See the volume property definition in CSS2.

public String
getWhiteSpace()

See the white-space property definition in CSS2.

public String
getWidows()

See the widows property definition in CSS2.

public String
getWidth()

See the width property definition in CSS2.

public String
getWordSpacing()

See the word-spacing property definition in CSS2.

public String
getZIndex()

See the z-index property definition in CSS2.

public void
setAzimuth(String azimuth)

See the azimuth property definition in CSS2.

public void
setBackground(String background)

See the background property definition in CSS2.

public void
setBackgroundAttachment(String backgroundAttachment)

See the background-attachment property definition in CSS2.

public void
setBackgroundColor(String backgroundColor)

See the background-color property definition in CSS2.

public void
setBackgroundImage(String backgroundImage)

See the background-image property definition in CSS2.

public void
setBackgroundPosition(String backgroundPosition)

See the background-position property definition in CSS2.

public void
setBackgroundRepeat(String backgroundRepeat)

See the background-repeat property definition in CSS2.

public void
setBorder(String border)

See the border property definition in CSS2.

public void
setBorderBottom(String borderBottom)

See the border-bottom property definition in CSS2.

public void
setBorderBottomColor(String borderBottomColor)

See the border-bottom-color property definition in CSS2.

public void
setBorderBottomStyle(String borderBottomStyle)

See the border-bottom-style property definition in CSS2.

public void
setBorderBottomWidth(String borderBottomWidth)

See the border-bottom-width property definition in CSS2.

public void
setBorderCollapse(String borderCollapse)

See the border-collapse property definition in CSS2.

public void
setBorderColor(String borderColor)

See the border-color property definition in CSS2.

public void
setBorderLeft(String borderLeft)

See the border-left property definition in CSS2.

public void
setBorderLeftColor(String borderLeftColor)

See the border-left-color property definition in CSS2.

public void
setBorderLeftStyle(String borderLeftStyle)

See the border-left-style property definition in CSS2.

public void
setBorderLeftWidth(String borderLeftWidth)

See the border-left-width property definition in CSS2.

public void
setBorderRight(String borderRight)

See the border-right property definition in CSS2.

public void
setBorderRightColor(String borderRightColor)

See the border-right-color property definition in CSS2.

public void
setBorderRightStyle(String borderRightStyle)

See the border-right-style property definition in CSS2.

public void
setBorderRightWidth(String borderRightWidth)

See the border-right-width property definition in CSS2.

public void
setBorderSpacing(String borderSpacing)

See the border-spacing property definition in CSS2.

public void
setBorderStyle(String borderStyle)

See the border-style property definition in CSS2.

public void
setBorderTop(String borderTop)

See the border-top property definition in CSS2.

public void
setBorderTopColor(String borderTopColor)

See the border-top-color property definition in CSS2.

public void
setBorderTopStyle(String borderTopStyle)

See the border-top-style property definition in CSS2.

public void
setBorderTopWidth(String borderTopWidth)

See the border-top-width property definition in CSS2.

public void
setBorderWidth(String borderWidth)

See the border-width property definition in CSS2.

public void
setBottom(String bottom)

See the bottom property definition in CSS2.

public void
setCaptionSide(String captionSide)

See the caption-side property definition in CSS2.

public void
setClear(String clear)

See the clear property definition in CSS2.

public void
setClip(String clip)

See the clip property definition in CSS2.

public void
setColor(String color)

See the color property definition in CSS2.

public void
setContent(String content)

See the content property definition in CSS2.

public void
setCounterIncrement(String counterIncrement)

See the counter-increment property definition in CSS2.

public void
setCounterReset(String counterReset)

See the counter-reset property definition in CSS2.

public void
setCssFloat(String cssFloat)

See the float property definition in CSS2.

public void
setCue(String cue)

See the cue property definition in CSS2.

public void
setCueAfter(String cueAfter)

See the cue-after property definition in CSS2.

public void
setCueBefore(String cueBefore)

See the cue-before property definition in CSS2.

public void
setCursor(String cursor)

See the cursor property definition in CSS2.

public void
setDirection(String direction)

See the direction property definition in CSS2.

public void
setDisplay(String display)

See the display property definition in CSS2.

public void
setElevation(String elevation)

See the elevation property definition in CSS2.

public void
setEmptyCells(String emptyCells)

See the empty-cells property definition in CSS2.

public void
setFont(String font)

See the font property definition in CSS2.

public void
setFontFamily(String fontFamily)

See the font-family property definition in CSS2.

public void
setFontSize(String fontSize)

See the font-size property definition in CSS2.

public void
setFontSizeAdjust(String fontSizeAdjust)

See the font-size-adjust property definition in CSS2.

public void
setFontStretch(String fontStretch)

See the font-stretch property definition in CSS2.

public void
setFontStyle(String fontStyle)

See the font-style property definition in CSS2.

public void
setFontVariant(String fontVariant)

See the font-variant property definition in CSS2.

public void
setFontWeight(String fontWeight)

See the font-weight property definition in CSS2.

public void
setHeight(String height)

See the height property definition in CSS2.

public void
setLeft(String left)

See the left property definition in CSS2.

public void
setLetterSpacing(String letterSpacing)

See the letter-spacing property definition in CSS2.

public void
setLineHeight(String lineHeight)

See the line-height property definition in CSS2.

public void
setListStyle(String listStyle)

See the list-style property definition in CSS2.

public void
setListStyleImage(String listStyleImage)

See the list-style-image property definition in CSS2.

public void
setListStylePosition(String listStylePosition)

See the list-style-position property definition in CSS2.

public void
setListStyleType(String listStyleType)

See the list-style-type property definition in CSS2.

public void
setMargin(String margin)

See the margin property definition in CSS2.

public void
setMarginBottom(String marginBottom)

See the margin-bottom property definition in CSS2.

public void
setMarginLeft(String marginLeft)

See the margin-left property definition in CSS2.

public void
setMarginRight(String marginRight)

See the margin-right property definition in CSS2.

public void
setMarginTop(String marginTop)

See the margin-top property definition in CSS2.

public void
setMarkerOffset(String markerOffset)

See the marker-offset property definition in CSS2.

public void
setMarks(String marks)

See the marks property definition in CSS2.

public void
setMaxHeight(String maxHeight)

See the max-height property definition in CSS2.

public void
setMaxWidth(String maxWidth)

See the max-width property definition in CSS2.

public void
setMinHeight(String minHeight)

See the min-height property definition in CSS2.

public void
setMinWidth(String minWidth)

See the min-width property definition in CSS2.

public void
setOrphans(String orphans)

See the orphans property definition in CSS2.

public void
setOutline(String outline)

See the outline property definition in CSS2.

public void
setOutlineColor(String outlineColor)

See the outline-color property definition in CSS2.

public void
setOutlineStyle(String outlineStyle)

See the outline-style property definition in CSS2.

public void
setOutlineWidth(String outlineWidth)

See the outline-width property definition in CSS2.

public void
setOverflow(String overflow)

See the overflow property definition in CSS2.

public void
setPadding(String padding)

See the padding property definition in CSS2.

public void
setPaddingBottom(String paddingBottom)

See the padding-bottom property definition in CSS2.

public void
setPaddingLeft(String paddingLeft)

See the padding-left property definition in CSS2.

public void
setPaddingRight(String paddingRight)

See the padding-right property definition in CSS2.

public void
setPaddingTop(String paddingTop)

See the padding-top property definition in CSS2.

public void
setPage(String page)

See the page property definition in CSS2.

public void
setPageBreakAfter(String pageBreakAfter)

See the page-break-after property definition in CSS2.

public void
setPageBreakBefore(String pageBreakBefore)

See the page-break-before property definition in CSS2.

public void
setPageBreakInside(String pageBreakInside)

See the page-break-inside property definition in CSS2.

public void
setPause(String pause)

See the pause property definition in CSS2.

public void
setPauseAfter(String pauseAfter)

See the pause-after property definition in CSS2.

public void
setPauseBefore(String pauseBefore)

See the pause-before property definition in CSS2.

public void
setPitch(String pitch)

See the pitch property definition in CSS2.

public void
setPitchRange(String pitchRange)

See the pitch-range property definition in CSS2.

public void
setPlayDuring(String playDuring)

See the play-during property definition in CSS2.

public void
setPosition(String position)

See the position property definition in CSS2.

public void
setQuotes(String quotes)

See the quotes property definition in CSS2.

public void
setRichness(String richness)

See the richness property definition in CSS2.

public void
setRight(String right)

See the right property definition in CSS2.

public void
setSize(String size)

See the size property definition in CSS2.

public void
setSpeak(String speak)

See the speak property definition in CSS2.

public void
setSpeakHeader(String speakHeader)

See the speak-header property definition in CSS2.

public void
setSpeakNumeral(String speakNumeral)

See the speak-numeral property definition in CSS2.

public void
setSpeakPunctuation(String speakPunctuation)

See the speak-punctuation property definition in CSS2.

public void
setSpeechRate(String speechRate)

See the speech-rate property definition in CSS2.

public void
setStress(String stress)

See the stress property definition in CSS2.

public void
setTableLayout(String tableLayout)

See the table-layout property definition in CSS2.

public void
setTextAlign(String textAlign)

See the text-align property definition in CSS2.

public void
setTextDecoration(String textDecoration)

See the text-decoration property definition in CSS2.

public void
setTextIndent(String textIndent)

See the text-indent property definition in CSS2.

public void
setTextShadow(String textShadow)

See the text-shadow property definition in CSS2.

public void
setTextTransform(String textTransform)

See the text-transform property definition in CSS2.

public void
setTop(String top)

See the top property definition in CSS2.

public void
setUnicodeBidi(String unicodeBidi)

See the unicode-bidi property definition in CSS2.

public void
setVerticalAlign(String verticalAlign)

See the vertical-align property definition in CSS2.

public void
setVisibility(String visibility)

See the visibility property definition in CSS2.

public void
setVoiceFamily(String voiceFamily)

See the voice-family property definition in CSS2.

public void
setVolume(String volume)

See the volume property definition in CSS2.

public void
setWhiteSpace(String whiteSpace)

See the white-space property definition in CSS2.

public void
setWidows(String widows)

See the widows property definition in CSS2.

public void
setWidth(String width)

See the width property definition in CSS2.

public void
setWordSpacing(String wordSpacing)

See the word-spacing property definition in CSS2.

public void
setZIndex(String zIndex)

See the z-index property definition in CSS2.