java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.ValueList
- All Implemented Interfaces:
ExtendedCSSValue,ExtendedCSSValueList<StyleValue>,Cloneable,Iterable<StyleValue>,CSSValue,CSSValueList
Implementation of CSSValueList.
-
Field Summary
FieldsFields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(StyleValue value) Adds a value to the end of this list.booleanAppends all of the elements in the given list to the end of this list.voidclear()Removes all the items from this list.abstract ValueListclone()Creates and returns a copy of this object.static ValueListstatic ValueListstatic ValueListbooleanintinthashCode()booleanabstract booleanbooleanisEmpty()Is this list empty ?booleanIs this a subproperty that has been set by a shorthand?item(int index) retrieve anExtendedCSSValueby ordinal index.iterator()remove(int index) Removes the value at the specified index.set(int index, StyleValue value) Replaces the value at the specified index with the supplied value.voidsetCssText(String cssText) Attempts to change this value to match the supplied css text.voidsetSubproperty(boolean subp) abstract ValueListMethods inherited from class io.sf.carte.doc.style.css.property.StyleValue
getCssText, getCssValueType, getMinifiedCssText, isSystemDefault, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.css.CSSValue
getCssText, getCssValueTypeMethods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSValue
getMinifiedCssText, writeCssTextMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
valueList
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLengthin interfaceCSSValueList
-
item
Description copied from interface:ExtendedCSSValueListretrieve anExtendedCSSValueby ordinal index.- Specified by:
itemin interfaceCSSValueList- Specified by:
itemin interfaceExtendedCSSValueList<StyleValue>- Parameters:
index- the index in this list.- Returns:
- the value at
index, ornullifindexis less than zero, or greater or equal to the list length.
-
iterator
- Specified by:
iteratorin interfaceIterable<StyleValue>
-
add
Adds a value to the end of this list.- Specified by:
addin interfaceExtendedCSSValueList<StyleValue>- Parameters:
value- the value to be added.- Returns:
- true
-
addAll
Appends all of the elements in the given list to the end of this list.The appended list must be of the same type as this list.
- Parameters:
list- the list to add.- Returns:
trueif this list changed as a result of the call.
-
remove
Removes the value at the specified index.- Specified by:
removein interfaceExtendedCSSValueList<StyleValue>- Parameters:
index- the index of the value to be removed.- Returns:
- the list item that was removed.
-
set
Replaces the value at the specified index with the supplied value.- Specified by:
setin interfaceExtendedCSSValueList<StyleValue>- Parameters:
index- the index of the value to be replaced.value- the value to replace the item atindex.- Returns:
- the item previously at the specified position.
- Throws:
IndexOutOfBoundsException- if the index is invalid.NullPointerException- if the value isnull.
-
isEmpty
public boolean isEmpty()Is this list empty ?- Specified by:
isEmptyin interfaceExtendedCSSValueList<StyleValue>- Returns:
trueif this list has no items,falseotherwise.
-
clear
public void clear()Removes all the items from this list.- Specified by:
clearin interfaceExtendedCSSValueList<StyleValue>
-
hashCode
public int hashCode()- Overrides:
hashCodein classStyleValue
-
equals
- Overrides:
equalsin classStyleValue
-
setSubproperty
public void setSubproperty(boolean subp) -
isSubproperty
public boolean isSubproperty()Description copied from class:StyleValueIs this a subproperty that has been set by a shorthand?- Overrides:
isSubpropertyin classStyleValue- Returns:
trueif this a subproperty that has been set by a shorthand,falseotherwise.
-
setCssText
Description copied from class:StyleValueAttempts to change this value to match the supplied css text.In css4j, it is not recommended to set property values using this method.
- Specified by:
setCssTextin interfaceCSSValue- Overrides:
setCssTextin classStyleValue- Throws:
DOMException- SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is read-only.
-
isCommaSeparated
public abstract boolean isCommaSeparated() -
isBracketList
public boolean isBracketList() -
clone
Creates and returns a copy of this object.The list is cloned, but its contents are not.
- Specified by:
clonein interfaceExtendedCSSValue- Specified by:
clonein interfaceExtendedCSSValueList<StyleValue>- Specified by:
clonein classStyleValue- Returns:
- a clone of this instance.
-
createCSValueList
-
createWSValueList
-
createBracketValueList
-
wrap
-