com.steadystate.css.dom.CSSStyleDeclarationImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cssparser Show documentation
Show all versions of cssparser Show documentation
A CSS parser which implements SAC (the Simple API for CSS).
/*
* Copyright (C) 1999-2018 David Schweinsberg.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.steadystate.css.dom;
import java.io.Serializable;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import org.w3c.css.sac.InputSource;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSS2Properties;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSValue;
import com.steadystate.css.format.CSSFormat;
import com.steadystate.css.format.CSSFormatable;
import com.steadystate.css.parser.CSSOMParser;
import com.steadystate.css.util.LangUtils;
/**
* Implementation of {@link CSSStyleDeclaration}.
*
* @author David Schweinsberg
* @author rbri
* @author Ahmed Ashour
*/
public class CSSStyleDeclarationImpl implements CSSStyleDeclaration, CSSFormatable, CSS2Properties, Serializable {
private static final long serialVersionUID = -2373755821317100189L;
private static final String PRIORITY_IMPORTANT = "important";
private CSSRule parentRule_;
private List properties_ = new ArrayList();
public void setParentRule(final CSSRule parentRule) {
parentRule_ = parentRule;
}
public List getProperties() {
return properties_;
}
public void setProperties(final List properties) {
properties_ = properties;
}
public CSSStyleDeclarationImpl(final CSSRule parentRule) {
parentRule_ = parentRule;
}
public CSSStyleDeclarationImpl() {
// Empty.
}
/**
* {@inheritDoc}
*/
public String getCssText() {
return getCssText(null);
}
/**
* {@inheritDoc}
*/
public String getCssText(final CSSFormat format) {
final boolean nl = format != null && format.getPropertiesInSeparateLines();
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < properties_.size(); ++i) {
final Property p = properties_.get(i);
if (p != null) {
if (nl) {
sb.append(format.getNewLine());
sb.append(format.getPropertiesIndent());
}
sb.append(p.getCssText(format));
}
if (i < properties_.size() - 1) {
sb.append(";");
if (!nl) {
sb.append(' ');
}
}
else if (nl) {
sb.append(format.getNewLine());
}
}
return sb.toString();
}
public void setCssText(final String cssText) throws DOMException {
try {
final InputSource is = new InputSource(new StringReader(cssText));
final CSSOMParser parser = new CSSOMParser();
properties_.clear();
parser.parseStyleDeclaration(this, is);
}
catch (final Exception e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
}
public String getPropertyValue(final String propertyName) {
final Property p = getPropertyDeclaration(propertyName);
if (p == null || p.getValue() == null) {
return "";
}
return p.getValue().toString();
}
public CSSValue getPropertyCSSValue(final String propertyName) {
final Property p = getPropertyDeclaration(propertyName);
return (p == null) ? null : p.getValue();
}
public String removeProperty(final String propertyName) throws DOMException {
if (null == propertyName) {
return "";
}
for (int i = 0; i < properties_.size(); i++) {
final Property p = properties_.get(i);
if (p != null && propertyName.equalsIgnoreCase(p.getName())) {
properties_.remove(i);
if (p.getValue() == null) {
return "";
}
return p.getValue().toString();
}
}
return "";
}
public String getPropertyPriority(final String propertyName) {
final Property p = getPropertyDeclaration(propertyName);
if (p == null) {
return "";
}
return p.isImportant() ? PRIORITY_IMPORTANT : "";
}
public void setProperty(
final String propertyName,
final String value,
final String priority) throws DOMException {
try {
CSSValue expr = null;
if (!value.isEmpty()) {
final CSSOMParser parser = new CSSOMParser();
final InputSource is = new InputSource(new StringReader(value));
expr = parser.parsePropertyValue(is);
}
Property p = getPropertyDeclaration(propertyName);
final boolean important = PRIORITY_IMPORTANT.equalsIgnoreCase(priority);
if (p == null) {
p = new Property(propertyName, expr, important);
addProperty(p);
}
else {
p.setValue(expr);
p.setImportant(important);
}
}
catch (final Exception e) {
throw new DOMExceptionImpl(
DOMException.SYNTAX_ERR,
DOMExceptionImpl.SYNTAX_ERROR,
e.getMessage());
}
}
public int getLength() {
return properties_.size();
}
public String item(final int index) {
final Property p = properties_.get(index);
return (p == null) ? "" : p.getName();
}
public CSSRule getParentRule() {
return parentRule_;
}
public void addProperty(final Property p) {
if (null == p) {
return;
}
properties_.add(p);
}
public Property getPropertyDeclaration(final String propertyName) {
if (null == propertyName) {
return null;
}
for (int i = properties_.size() - 1; i > -1; i--) {
final Property p = properties_.get(i);
if (p != null && propertyName.equalsIgnoreCase(p.getName())) {
return p;
}
}
return null;
}
@Override
public String toString() {
return getCssText();
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CSSStyleDeclaration)) {
return false;
}
final CSSStyleDeclaration csd = (CSSStyleDeclaration) obj;
// don't use parentRule in equals()
// recursive loop -> stack overflow!
return equalsProperties(csd);
}
private boolean equalsProperties(final CSSStyleDeclaration csd) {
if ((csd == null) || (getLength() != csd.getLength())) {
return false;
}
for (int i = 0; i < getLength(); i++) {
final String propertyName = item(i);
// CSSValue propertyCSSValue1 = getPropertyCSSValue(propertyName);
// CSSValue propertyCSSValue2 = csd.getPropertyCSSValue(propertyName);
final String propertyValue1 = getPropertyValue(propertyName);
final String propertyValue2 = csd.getPropertyValue(propertyName);
if (!LangUtils.equals(propertyValue1, propertyValue2)) {
return false;
}
final String propertyPriority1 = getPropertyPriority(propertyName);
final String propertyPriority2 = csd.getPropertyPriority(propertyName);
if (!LangUtils.equals(propertyPriority1, propertyPriority2)) {
return false;
}
}
return true;
}
@Override
public int hashCode() {
int hash = LangUtils.HASH_SEED;
// don't use parentRule in hashCode()
// recursive loop -> stack overflow!
hash = LangUtils.hashCode(hash, properties_);
return hash;
}
// ---- start CSS2Properties interface ----
private static final String AZIMUTH = "azimuth";
private static final String BACKGROUND = "background";
private static final String BACKGROUND_ATTACHMENT = "background-attachment";
private static final String BACKGROUND_COLOR = "background-color";
private static final String BACKGROUND_IMAGE = "background-image";
private static final String BACKGROUND_POSITION = "background-position";
private static final String BACKGROUND_REPEAT = "background-repeat";
private static final String BORDER = "border";
private static final String BORDER_BOTTOM = "border-bottom";
private static final String BORDER_BOTTOM_COLOR = "border-bottom-color";
private static final String BORDER_BOTTOM_STYLE = "border-bottom-style";
private static final String BORDER_BOTTOM_WIDTH = "border-bottom-width";
private static final String BORDER_COLLAPSE = "border-collapse";
private static final String BORDER_COLOR = "border-color";
private static final String BORDER_LEFT = "border-left";
private static final String BORDER_LEFT_COLOR = "border-left-color";
private static final String BORDER_LEFT_STYLE = "border-left-style";
private static final String BORDER_LEFT_WIDTH = "border-left-width";
private static final String BORDER_RIGHT = "border-right";
private static final String BORDER_RIGHT_COLOR = "border-right-color";
private static final String BORDER_RIGHT_STYLE = "border-right-style";
private static final String BORDER_RIGHT_WIDTH = "border-right-width";
private static final String BORDER_SPACING = "border-spacing";
private static final String BORDER_STYLE = "border-style";
private static final String BORDER_TOP = "border-top";
private static final String BORDER_TOP_COLOR = "border-top-color";
private static final String BORDER_TOP_STYLE = "border-top-style";
private static final String BORDER_TOP_WIDTH = "border-top-width";
private static final String BORDER_WIDTH = "border-width";
private static final String BOTTOM = "bottom";
private static final String CAPTION_SIDE = "caption-side";
private static final String CLEAR = "clear";
private static final String CLIP = "clip";
private static final String COLOR = "color";
private static final String CONTENT = "content";
private static final String COUNTER_INCREMENT = "counter-increment";
private static final String COUNTER_RESET = "counter-reset";
private static final String CSS_FLOAT = "css-float";
private static final String CUE = "cue";
private static final String CUE_AFTER = "cue-after";
private static final String CUE_BEFORE = "cue-before";
private static final String CURSOR = "cursor";
private static final String DIRECTION = "direction";
private static final String DISPLAY = "display";
private static final String ELEVATION = "elevation";
private static final String EMPTY_CELLS = "empty-cells";
private static final String FONT = "font";
private static final String FONT_FAMILY = "font-family";
private static final String FONT_SIZE = "font-size";
private static final String FONT_SIZE_ADJUST = "font-size-adjust";
private static final String FONT_STRETCH = "font-stretch";
private static final String FONT_STYLE = "font-style";
private static final String FONT_VARIANT = "font-variant";
private static final String FONT_WEIGHT = "font-weight";
private static final String HEIGHT = "height";
private static final String LEFT = "left";
private static final String LETTER_SPACING = "letter-spacing";
private static final String LINE_HEIGHT = "line-height";
private static final String LIST_STYLE = "list-style";
private static final String LIST_STYLE_IMAGE = "list-style-image";
private static final String LIST_STYLE_POSITION = "list-style-position";
private static final String LIST_STYLE_TYPE = "list-style-type";
private static final String MARGIN = "margin";
private static final String MARGIN_BOTTOM = "margin-bottom";
private static final String MARGIN_LEFT = "margin-left";
private static final String MARGIN_RIGHT = "margin-right";
private static final String MARGIN_TOP = "margin-top";
private static final String MARKER_OFFSET = "marker-offset";
private static final String MARKS = "marks";
private static final String MAX_HEIGHT = "max-height";
private static final String MAX_WIDTH = "max-width";
private static final String MIN_HEIGHT = "min-height";
private static final String MIN_WIDTH = "min-width";
private static final String ORPHANS = "orphans";
private static final String OUTLINE = "outline";
private static final String OUTLINE_COLOR = "outline-color";
private static final String OUTLINE_STYLE = "outline-style";
private static final String OUTLINE_WIDTH = "outline-width";
private static final String OVERFLOW = "overflow";
private static final String PADDING = "padding";
private static final String PADDING_BOTTOM = "padding-bottom";
private static final String PADDING_LEFT = "padding-left";
private static final String PADDING_RIGHT = "padding-right";
private static final String PADDING_TOP = "padding-top";
private static final String PAGE = "page";
private static final String PAGE_BREAK_AFTER = "page-break-after";
private static final String PAGE_BREAK_BEFORE = "page-break-before";
private static final String PAGE_BREAK_INSIDE = "page-break-inside";
private static final String PAUSE = "pause";
private static final String PAUSE_AFTER = "pause-after";
private static final String PAUSE_BEFORE = "pause-before";
private static final String PITCH = "pitch";
private static final String PITCH_RANGE = "pitch-range";
private static final String PLAY_DURING = "play-during";
private static final String POSITION = "position";
private static final String QUOTES = "quotes";
private static final String RICHNESS = "richness";
private static final String RIGHT = "right";
private static final String SIZE = "size";
private static final String SPEAK = "speak";
private static final String SPEAK_HEADER = "speak-header";
private static final String SPEAK_NUMERAL = "speak-numeral";
private static final String SPEAK_PUNCTUATION = "speak-puctuation";
private static final String SPEECH_RATE = "speech-rate";
private static final String STRESS = "stress";
private static final String TABLE_LAYOUT = "table-layout";
private static final String TEXT_ALIGN = "text-align";
private static final String TEXT_DECORATION = "text-decoration";
private static final String TEXT_INDENT = "text-indent";
private static final String TEXT_SHADOW = "text-shadow";
private static final String TEXT_TRANSFORM = "text-transform";
private static final String TOP = "top";
private static final String UNICODE_BIDI = "unicode-bidi";
private static final String VERTICAL_ALIGN = "vertical-align";
private static final String VISIBILITY = "visibility";
private static final String VOICE_FAMILY = "voice-family";
private static final String VOLUME = "volume";
private static final String WHITE_SPACE = "white-space";
private static final String WIDOWS = "widows";
private static final String WIDTH = "width";
private static final String WORD_SPACING = "word_spacing";
private static final String Z_INDEX = "z-index";
public String getAzimuth() {
return getPropertyValue(AZIMUTH);
}
public void setAzimuth(final String azimuth) throws DOMException {
setProperty(AZIMUTH, azimuth, null);
}
public String getBackground() {
return getPropertyValue(BACKGROUND);
}
public void setBackground(final String background) throws DOMException {
setProperty(BACKGROUND, background, null);
}
public String getBackgroundAttachment() {
return getPropertyValue(BACKGROUND_ATTACHMENT);
}
public void setBackgroundAttachment(final String backgroundAttachment) throws DOMException {
setProperty(BACKGROUND_ATTACHMENT, backgroundAttachment, null);
}
public String getBackgroundColor() {
return getPropertyValue(BACKGROUND_COLOR);
}
public void setBackgroundColor(final String backgroundColor) throws DOMException {
setProperty(BACKGROUND_COLOR, backgroundColor, null);
}
public String getBackgroundImage() {
return getPropertyValue(BACKGROUND_IMAGE);
}
public void setBackgroundImage(final String backgroundImage) throws DOMException {
setProperty(BACKGROUND_IMAGE, backgroundImage, null);
}
public String getBackgroundPosition() {
return getPropertyValue(BACKGROUND_POSITION);
}
public void setBackgroundPosition(final String backgroundPosition) throws DOMException {
setProperty(BACKGROUND_POSITION, backgroundPosition, null);
}
public String getBackgroundRepeat() {
return getPropertyValue(BACKGROUND_REPEAT);
}
public void setBackgroundRepeat(final String backgroundRepeat) throws DOMException {
setProperty(BACKGROUND_REPEAT, backgroundRepeat, null);
}
public String getBorder() {
return getPropertyValue(BORDER);
}
public void setBorder(final String border) throws DOMException {
setProperty(BORDER, border, null);
}
public String getBorderCollapse() {
return getPropertyValue(BORDER_COLLAPSE);
}
public void setBorderCollapse(final String borderCollapse) throws DOMException {
setProperty(BORDER_COLLAPSE, borderCollapse, null);
}
public String getBorderColor() {
return getPropertyValue(BORDER_COLOR);
}
public void setBorderColor(final String borderColor) throws DOMException {
setProperty(BORDER_COLOR, borderColor, null);
}
public String getBorderSpacing() {
return getPropertyValue(BORDER_SPACING);
}
public void setBorderSpacing(final String borderSpacing) throws DOMException {
setProperty(BORDER_SPACING, borderSpacing, null);
}
public String getBorderStyle() {
return getPropertyValue(BORDER_STYLE);
}
public void setBorderStyle(final String borderStyle) throws DOMException {
setProperty(BORDER_STYLE, borderStyle, null);
}
public String getBorderTop() {
return getPropertyValue(BORDER_TOP);
}
public void setBorderTop(final String borderTop) throws DOMException {
setProperty(BORDER_TOP, borderTop, null);
}
public String getBorderRight() {
return getPropertyValue(BORDER_RIGHT);
}
public void setBorderRight(final String borderRight) throws DOMException {
setProperty(BORDER_RIGHT, borderRight, null);
}
public String getBorderBottom() {
return getPropertyValue(BORDER_BOTTOM);
}
public void setBorderBottom(final String borderBottom) throws DOMException {
setProperty(BORDER_BOTTOM, borderBottom, null);
}
public String getBorderLeft() {
return getPropertyValue(BORDER_LEFT);
}
public void setBorderLeft(final String borderLeft) throws DOMException {
setProperty(BORDER_LEFT, borderLeft, null);
}
public String getBorderTopColor() {
return getPropertyValue(BORDER_TOP_COLOR);
}
public void setBorderTopColor(final String borderTopColor) throws DOMException {
setProperty(BORDER_TOP_COLOR, borderTopColor, null);
}
public String getBorderRightColor() {
return getPropertyValue(BORDER_RIGHT_COLOR);
}
public void setBorderRightColor(final String borderRightColor) throws DOMException {
setProperty(BORDER_RIGHT_COLOR, borderRightColor, null);
}
public String getBorderBottomColor() {
return getPropertyValue(BORDER_BOTTOM_COLOR);
}
public void setBorderBottomColor(final String borderBottomColor) throws DOMException {
setProperty(BORDER_BOTTOM_COLOR, borderBottomColor, null);
}
public String getBorderLeftColor() {
return getPropertyValue(BORDER_LEFT_COLOR);
}
public void setBorderLeftColor(final String borderLeftColor) throws DOMException {
setProperty(BORDER_LEFT_COLOR, borderLeftColor, null);
}
public String getBorderTopStyle() {
return getPropertyValue(BORDER_TOP_STYLE);
}
public void setBorderTopStyle(final String borderTopStyle) throws DOMException {
setProperty(BORDER_TOP_STYLE, borderTopStyle, null);
}
public String getBorderRightStyle() {
return getPropertyValue(BORDER_RIGHT_STYLE);
}
public void setBorderRightStyle(final String borderRightStyle) throws DOMException {
setProperty(BORDER_RIGHT_STYLE, borderRightStyle, null);
}
public String getBorderBottomStyle() {
return getPropertyValue(BORDER_BOTTOM_STYLE);
}
public void setBorderBottomStyle(final String borderBottomStyle) throws DOMException {
setProperty(BORDER_BOTTOM_STYLE, borderBottomStyle, null);
}
public String getBorderLeftStyle() {
return getPropertyValue(BORDER_LEFT_STYLE);
}
public void setBorderLeftStyle(final String borderLeftStyle) throws DOMException {
setProperty(BORDER_LEFT_STYLE, borderLeftStyle, null);
}
public String getBorderTopWidth() {
return getPropertyValue(BORDER_TOP_WIDTH);
}
public void setBorderTopWidth(final String borderTopWidth) throws DOMException {
setProperty(BORDER_TOP_WIDTH, borderTopWidth, null);
}
public String getBorderRightWidth() {
return getPropertyValue(BORDER_RIGHT_WIDTH);
}
public void setBorderRightWidth(final String borderRightWidth) throws DOMException {
setProperty(BORDER_RIGHT_WIDTH, borderRightWidth, null);
}
public String getBorderBottomWidth() {
return getPropertyValue(BORDER_BOTTOM_WIDTH);
}
public void setBorderBottomWidth(final String borderBottomWidth) throws DOMException {
setProperty(BORDER_BOTTOM_WIDTH, borderBottomWidth, null);
}
public String getBorderLeftWidth() {
return getPropertyValue(BORDER_LEFT_WIDTH);
}
public void setBorderLeftWidth(final String borderLeftWidth) throws DOMException {
setProperty(BORDER_LEFT_WIDTH, borderLeftWidth, null);
}
public String getBorderWidth() {
return getPropertyValue(BORDER_WIDTH);
}
public void setBorderWidth(final String borderWidth) throws DOMException {
setProperty(BORDER_WIDTH, borderWidth, null);
}
public String getBottom() {
return getPropertyValue(BOTTOM);
}
public void setBottom(final String bottom) throws DOMException {
setProperty(BOTTOM, bottom, null);
}
public String getCaptionSide() {
return getPropertyValue(CAPTION_SIDE);
}
public void setCaptionSide(final String captionSide) throws DOMException {
setProperty(CAPTION_SIDE, captionSide, null);
}
public String getClear() {
return getPropertyValue(CLEAR);
}
public void setClear(final String clear) throws DOMException {
setProperty(CLEAR, clear, null);
}
public String getClip() {
return getPropertyValue(CLIP);
}
public void setClip(final String clip) throws DOMException {
setProperty(CLIP, clip, null);
}
public String getColor() {
return getPropertyValue(COLOR);
}
public void setColor(final String color) throws DOMException {
setProperty(COLOR, color, null);
}
public String getContent() {
return getPropertyValue(CONTENT);
}
public void setContent(final String content) throws DOMException {
setProperty(CONTENT, content, null);
}
public String getCounterIncrement() {
return getPropertyValue(COUNTER_INCREMENT);
}
public void setCounterIncrement(final String counterIncrement) throws DOMException {
setProperty(COUNTER_INCREMENT, counterIncrement, null);
}
public String getCounterReset() {
return getPropertyValue(COUNTER_RESET);
}
public void setCounterReset(final String counterReset) throws DOMException {
setProperty(COUNTER_RESET, counterReset, null);
}
public String getCue() {
return getPropertyValue(CUE);
}
public void setCue(final String cue) throws DOMException {
setProperty(CUE, cue, null);
}
public String getCueAfter() {
return getPropertyValue(CUE_AFTER);
}
public void setCueAfter(final String cueAfter) throws DOMException {
setProperty(CUE_AFTER, cueAfter, null);
}
public String getCueBefore() {
return getPropertyValue(CUE_BEFORE);
}
public void setCueBefore(final String cueBefore) throws DOMException {
setProperty(CUE_BEFORE, cueBefore, null);
}
public String getCursor() {
return getPropertyValue(CURSOR);
}
public void setCursor(final String cursor) throws DOMException {
setProperty(CURSOR, cursor, null);
}
public String getDirection() {
return getPropertyValue(DIRECTION);
}
public void setDirection(final String direction) throws DOMException {
setProperty(DIRECTION, direction, null);
}
public String getDisplay() {
return getPropertyValue(DISPLAY);
}
public void setDisplay(final String display) throws DOMException {
setProperty(DISPLAY, display, null);
}
public String getElevation() {
return getPropertyValue(ELEVATION);
}
public void setElevation(final String elevation) throws DOMException {
setProperty(ELEVATION, elevation, null);
}
public String getEmptyCells() {
return getPropertyValue(EMPTY_CELLS);
}
public void setEmptyCells(final String emptyCells) throws DOMException {
setProperty(EMPTY_CELLS, emptyCells, null);
}
public String getCssFloat() {
return getPropertyValue(CSS_FLOAT);
}
public void setCssFloat(final String cssFloat) throws DOMException {
setProperty(CSS_FLOAT, cssFloat, null);
}
public String getFont() {
return getPropertyValue(FONT);
}
public void setFont(final String font) throws DOMException {
setProperty(FONT, font, null);
}
public String getFontFamily() {
return getPropertyValue(FONT_FAMILY);
}
public void setFontFamily(final String fontFamily) throws DOMException {
setProperty(FONT_FAMILY, fontFamily, null);
}
public String getFontSize() {
return getPropertyValue(FONT_SIZE);
}
public void setFontSize(final String fontSize) throws DOMException {
setProperty(FONT_SIZE, fontSize, null);
}
public String getFontSizeAdjust() {
return getPropertyValue(FONT_SIZE_ADJUST);
}
public void setFontSizeAdjust(final String fontSizeAdjust) throws DOMException {
setProperty(FONT_SIZE_ADJUST, fontSizeAdjust, null);
}
public String getFontStretch() {
return getPropertyValue(FONT_STRETCH);
}
public void setFontStretch(final String fontStretch) throws DOMException {
setProperty(FONT_STRETCH, fontStretch, null);
}
public String getFontStyle() {
return getPropertyValue(FONT_STYLE);
}
public void setFontStyle(final String fontStyle) throws DOMException {
setProperty(FONT_STYLE, fontStyle, null);
}
public String getFontVariant() {
return getPropertyValue(FONT_VARIANT);
}
public void setFontVariant(final String fontVariant) throws DOMException {
setProperty(FONT_VARIANT, fontVariant, null);
}
public String getFontWeight() {
return getPropertyValue(FONT_WEIGHT);
}
public void setFontWeight(final String fontWeight) throws DOMException {
setProperty(FONT_WEIGHT, fontWeight, null);
}
public String getHeight() {
return getPropertyValue(HEIGHT);
}
public void setHeight(final String height) throws DOMException {
setProperty(HEIGHT, height, null);
}
public String getLeft() {
return getPropertyValue(LEFT);
}
public void setLeft(final String left) throws DOMException {
setProperty(LEFT, left, null);
}
public String getLetterSpacing() {
return getPropertyValue(LETTER_SPACING);
}
public void setLetterSpacing(final String letterSpacing) throws DOMException {
setProperty(LETTER_SPACING, letterSpacing, null);
}
public String getLineHeight() {
return getPropertyValue(LINE_HEIGHT);
}
public void setLineHeight(final String lineHeight) throws DOMException {
setProperty(LINE_HEIGHT, lineHeight, null);
}
public String getListStyle() {
return getPropertyValue(LIST_STYLE);
}
public void setListStyle(final String listStyle) throws DOMException {
setProperty(LIST_STYLE, listStyle, null);
}
public String getListStyleImage() {
return getPropertyValue(LIST_STYLE_IMAGE);
}
public void setListStyleImage(final String listStyleImage) throws DOMException {
setProperty(LIST_STYLE_IMAGE, listStyleImage, null);
}
public String getListStylePosition() {
return getPropertyValue(LIST_STYLE_POSITION);
}
public void setListStylePosition(final String listStylePosition) throws DOMException {
setProperty(LIST_STYLE_POSITION, listStylePosition, null);
}
public String getListStyleType() {
return getPropertyValue(LIST_STYLE_TYPE);
}
public void setListStyleType(final String listStyleType) throws DOMException {
setProperty(LIST_STYLE_TYPE, listStyleType, null);
}
public String getMargin() {
return getPropertyValue(MARGIN);
}
public void setMargin(final String margin) throws DOMException {
setProperty(MARGIN, margin, null);
}
public String getMarginTop() {
return getPropertyValue(MARGIN_TOP);
}
public void setMarginTop(final String marginTop) throws DOMException {
setProperty(MARGIN_TOP, marginTop, null);
}
public String getMarginRight() {
return getPropertyValue(MARGIN_RIGHT);
}
public void setMarginRight(final String marginRight) throws DOMException {
setProperty(MARGIN_RIGHT, marginRight, null);
}
public String getMarginBottom() {
return getPropertyValue(MARGIN_BOTTOM);
}
public void setMarginBottom(final String marginBottom) throws DOMException {
setProperty(MARGIN_BOTTOM, marginBottom, null);
}
public String getMarginLeft() {
return getPropertyValue(MARGIN_LEFT);
}
public void setMarginLeft(final String marginLeft) throws DOMException {
setProperty(MARGIN_LEFT, marginLeft, null);
}
public String getMarkerOffset() {
return getPropertyValue(MARKER_OFFSET);
}
public void setMarkerOffset(final String markerOffset) throws DOMException {
setProperty(MARKER_OFFSET, markerOffset, null);
}
public String getMarks() {
return getPropertyValue(MARKS);
}
public void setMarks(final String marks) throws DOMException {
setProperty(MARKS, marks, null);
}
public String getMaxHeight() {
return getPropertyValue(MAX_HEIGHT);
}
public void setMaxHeight(final String maxHeight) throws DOMException {
setProperty(MAX_HEIGHT, maxHeight, null);
}
public String getMaxWidth() {
return getPropertyValue(MAX_WIDTH);
}
public void setMaxWidth(final String maxWidth) throws DOMException {
setProperty(MAX_WIDTH, maxWidth, null);
}
public String getMinHeight() {
return getPropertyValue(MIN_HEIGHT);
}
public void setMinHeight(final String minHeight) throws DOMException {
setProperty(MIN_HEIGHT, minHeight, null);
}
public String getMinWidth() {
return getPropertyValue(MIN_WIDTH);
}
public void setMinWidth(final String minWidth) throws DOMException {
setProperty(MIN_WIDTH, minWidth, null);
}
public String getOrphans() {
return getPropertyValue(ORPHANS);
}
public void setOrphans(final String orphans) throws DOMException {
setProperty(ORPHANS, orphans, null);
}
public String getOutline() {
return getPropertyValue(OUTLINE);
}
public void setOutline(final String outline) throws DOMException {
setProperty(OUTLINE, outline, null);
}
public String getOutlineColor() {
return getPropertyValue(OUTLINE_COLOR);
}
public void setOutlineColor(final String outlineColor) throws DOMException {
setProperty(OUTLINE_COLOR, outlineColor, null);
}
public String getOutlineStyle() {
return getPropertyValue(OUTLINE_STYLE);
}
public void setOutlineStyle(final String outlineStyle) throws DOMException {
setProperty(OUTLINE_STYLE, outlineStyle, null);
}
public String getOutlineWidth() {
return getPropertyValue(OUTLINE_WIDTH);
}
public void setOutlineWidth(final String outlineWidth) throws DOMException {
setProperty(OUTLINE_WIDTH, outlineWidth, null);
}
public String getOverflow() {
return getPropertyValue(OVERFLOW);
}
public void setOverflow(final String overflow) throws DOMException {
setProperty(OVERFLOW, overflow, null);
}
public String getPadding() {
return getPropertyValue(PADDING);
}
public void setPadding(final String padding) throws DOMException {
setProperty(PADDING, padding, null);
}
public String getPaddingTop() {
return getPropertyValue(PADDING_TOP);
}
public void setPaddingTop(final String paddingTop) throws DOMException {
setProperty(PADDING_TOP, paddingTop, null);
}
public String getPaddingRight() {
return getPropertyValue(PADDING_RIGHT);
}
public void setPaddingRight(final String paddingRight) throws DOMException {
setProperty(PADDING_RIGHT, paddingRight, null);
}
public String getPaddingBottom() {
return getPropertyValue(PADDING_BOTTOM);
}
public void setPaddingBottom(final String paddingBottom) throws DOMException {
setProperty(PADDING_BOTTOM, paddingBottom, null);
}
public String getPaddingLeft() {
return getPropertyValue(PADDING_LEFT);
}
public void setPaddingLeft(final String paddingLeft) throws DOMException {
setProperty(PADDING_LEFT, paddingLeft, null);
}
public String getPage() {
return getPropertyValue(PAGE);
}
public void setPage(final String page) throws DOMException {
setProperty(PAGE, page, null);
}
public String getPageBreakAfter() {
return getPropertyValue(PAGE_BREAK_AFTER);
}
public void setPageBreakAfter(final String pageBreakAfter) throws DOMException {
setProperty(PAGE_BREAK_AFTER, pageBreakAfter, null);
}
public String getPageBreakBefore() {
return getPropertyValue(PAGE_BREAK_BEFORE);
}
public void setPageBreakBefore(final String pageBreakBefore) throws DOMException {
setProperty(PAGE_BREAK_BEFORE, PAGE_BREAK_BEFORE, null);
}
public String getPageBreakInside() {
return getPropertyValue(PAGE_BREAK_INSIDE);
}
public void setPageBreakInside(final String pageBreakInside) throws DOMException {
setProperty(PAGE_BREAK_INSIDE, pageBreakInside, null);
}
public String getPause() {
return getPropertyValue(PAUSE);
}
public void setPause(final String pause) throws DOMException {
setProperty(PAUSE, pause, null);
}
public String getPauseAfter() {
return getPropertyValue(PAUSE_AFTER);
}
public void setPauseAfter(final String pauseAfter) throws DOMException {
setProperty(PAUSE_AFTER, pauseAfter, null);
}
public String getPauseBefore() {
return getPropertyValue(PAUSE_BEFORE);
}
public void setPauseBefore(final String pauseBefore) throws DOMException {
setProperty(PAUSE_BEFORE, PAUSE_BEFORE, null);
}
public String getPitch() {
return getPropertyValue(PITCH);
}
public void setPitch(final String pitch) throws DOMException {
setProperty(PITCH, pitch, null);
}
public String getPitchRange() {
return getPropertyValue(PITCH_RANGE);
}
public void setPitchRange(final String pitchRange) throws DOMException {
setProperty(PITCH_RANGE, pitchRange, null);
}
public String getPlayDuring() {
return getPropertyValue(PLAY_DURING);
}
public void setPlayDuring(final String playDuring) throws DOMException {
setProperty(PLAY_DURING, playDuring, null);
}
public String getPosition() {
return getPropertyValue(POSITION);
}
public void setPosition(final String position) throws DOMException {
setProperty(POSITION, position, null);
}
public String getQuotes() {
return getPropertyValue(QUOTES);
}
public void setQuotes(final String quotes) throws DOMException {
setProperty(QUOTES, quotes, null);
}
public String getRichness() {
return getPropertyValue(RICHNESS);
}
public void setRichness(final String richness) throws DOMException {
setProperty(RICHNESS, richness, null);
}
public String getRight() {
return getPropertyValue(RIGHT);
}
public void setRight(final String right) throws DOMException {
setProperty(RIGHT, right, null);
}
public String getSize() {
return getPropertyValue(SIZE);
}
public void setSize(final String size) throws DOMException {
setProperty(SIZE, size, null);
}
public String getSpeak() {
return getPropertyValue(SPEAK);
}
public void setSpeak(final String speak) throws DOMException {
setProperty(SPEAK, speak, null);
}
public String getSpeakHeader() {
return getPropertyValue(SPEAK_HEADER);
}
public void setSpeakHeader(final String speakHeader) throws DOMException {
setProperty(SPEAK_HEADER, speakHeader, null);
}
public String getSpeakNumeral() {
return getPropertyValue(SPEAK_NUMERAL);
}
public void setSpeakNumeral(final String speakNumeral) throws DOMException {
setProperty(SPEAK_NUMERAL, speakNumeral, null);
}
public String getSpeakPunctuation() {
return getPropertyValue(SPEAK_PUNCTUATION);
}
public void setSpeakPunctuation(final String speakPunctuation) throws DOMException {
setProperty(SPEAK_PUNCTUATION, speakPunctuation, null);
}
public String getSpeechRate() {
return getPropertyValue(SPEECH_RATE);
}
public void setSpeechRate(final String speechRate) throws DOMException {
setProperty(SPEECH_RATE, speechRate, null);
}
public String getStress() {
return getPropertyValue(STRESS);
}
public void setStress(final String stress) throws DOMException {
setProperty(STRESS, stress, null);
}
public String getTableLayout() {
return getPropertyValue(TABLE_LAYOUT);
}
public void setTableLayout(final String tableLayout) throws DOMException {
setProperty(TABLE_LAYOUT, tableLayout, null);
}
public String getTextAlign() {
return getPropertyValue(TEXT_ALIGN);
}
public void setTextAlign(final String textAlign) throws DOMException {
setProperty(TEXT_ALIGN, textAlign, null);
}
public String getTextDecoration() {
return getPropertyValue(TEXT_DECORATION);
}
public void setTextDecoration(final String textDecoration) throws DOMException {
setProperty(TEXT_DECORATION, textDecoration, null);
}
public String getTextIndent() {
return getPropertyValue(TEXT_INDENT);
}
public void setTextIndent(final String textIndent) throws DOMException {
setProperty(TEXT_INDENT, textIndent, null);
}
public String getTextShadow() {
return getPropertyValue(TEXT_SHADOW);
}
public void setTextShadow(final String textShadow) throws DOMException {
setProperty(TEXT_SHADOW, textShadow, null);
}
public String getTextTransform() {
return getPropertyValue(TEXT_TRANSFORM);
}
public void setTextTransform(final String textTransform) throws DOMException {
setProperty(TEXT_TRANSFORM, textTransform, null);
}
public String getTop() {
return getPropertyValue(TOP);
}
public void setTop(final String top) throws DOMException {
setProperty(TOP, top, null);
}
public String getUnicodeBidi() {
return getPropertyValue(UNICODE_BIDI);
}
public void setUnicodeBidi(final String unicodeBidi) throws DOMException {
setProperty(UNICODE_BIDI, unicodeBidi, null);
}
public String getVerticalAlign() {
return getPropertyValue(VERTICAL_ALIGN);
}
public void setVerticalAlign(final String verticalAlign) throws DOMException {
setProperty(VERTICAL_ALIGN, verticalAlign, null);
}
public String getVisibility() {
return getPropertyValue(VISIBILITY);
}
public void setVisibility(final String visibility) throws DOMException {
setProperty(VISIBILITY, visibility, null);
}
public String getVoiceFamily() {
return getPropertyValue(VOICE_FAMILY);
}
public void setVoiceFamily(final String voiceFamily) throws DOMException {
setProperty(VOICE_FAMILY, voiceFamily, null);
}
public String getVolume() {
return getPropertyValue(VOLUME);
}
public void setVolume(final String volume) throws DOMException {
setProperty(VOLUME, volume, null);
}
public String getWhiteSpace() {
return getPropertyValue(WHITE_SPACE);
}
public void setWhiteSpace(final String whiteSpace) throws DOMException {
setProperty(WHITE_SPACE, whiteSpace, null);
}
public String getWidows() {
return getPropertyValue(WIDOWS);
}
public void setWidows(final String widows) throws DOMException {
setProperty(WIDOWS, widows, null);
}
public String getWidth() {
return getPropertyValue(WIDTH);
}
public void setWidth(final String width) throws DOMException {
setProperty(WIDTH, width, null);
}
public String getWordSpacing() {
return getPropertyValue(WORD_SPACING);
}
public void setWordSpacing(final String wordSpacing) throws DOMException {
setProperty(WORD_SPACING, wordSpacing, null);
}
public String getZIndex() {
return getPropertyValue(Z_INDEX);
}
public void setZIndex(final String zIndex) throws DOMException {
setProperty(Z_INDEX, zIndex, null);
}
// ---- end CSS2Properties interface ----
}