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
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(StyleValue value) Adds a value to the end of this list.boolean
Appends all of the elements in the given list to the end of this list.void
clear()
Removes all the items from this list.abstract ValueList
clone()
Creates and returns a copy of this object.static ValueList
static ValueList
static ValueList
boolean
int
int
hashCode()
boolean
abstract boolean
boolean
isEmpty()
Is this list empty ?boolean
Is this a subproperty that has been set by a shorthand?item
(int index) retrieve anExtendedCSSValue
by 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.void
setCssText
(String cssText) Attempts to change this value to match the supplied css text.void
setSubproperty
(boolean subp) abstract ValueList
Methods inherited from class io.sf.carte.doc.style.css.property.StyleValue
getCssText, getCssValueType, getMinifiedCssText, isSystemDefault, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.w3c.dom.css.CSSValue
getCssText, getCssValueType
Methods inherited from interface io.sf.carte.doc.style.css.ExtendedCSSValue
getMinifiedCssText, writeCssText
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
valueList
-
-
Method Details
-
getLength
public int getLength()- Specified by:
getLength
in interfaceCSSValueList
-
item
Description copied from interface:ExtendedCSSValueList
retrieve anExtendedCSSValue
by ordinal index.- Specified by:
item
in interfaceCSSValueList
- Specified by:
item
in interfaceExtendedCSSValueList<StyleValue>
- Parameters:
index
- the index in this list.- Returns:
- the value at
index
, ornull
ifindex
is less than zero, or greater or equal to the list length.
-
iterator
- Specified by:
iterator
in interfaceIterable<StyleValue>
-
add
Adds a value to the end of this list.- Specified by:
add
in 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:
true
if this list changed as a result of the call.
-
remove
Removes the value at the specified index.- Specified by:
remove
in 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:
set
in 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:
isEmpty
in interfaceExtendedCSSValueList<StyleValue>
- Returns:
true
if this list has no items,false
otherwise.
-
clear
public void clear()Removes all the items from this list.- Specified by:
clear
in interfaceExtendedCSSValueList<StyleValue>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classStyleValue
-
equals
- Overrides:
equals
in classStyleValue
-
setSubproperty
public void setSubproperty(boolean subp) -
isSubproperty
public boolean isSubproperty()Description copied from class:StyleValue
Is this a subproperty that has been set by a shorthand?- Overrides:
isSubproperty
in classStyleValue
- Returns:
true
if this a subproperty that has been set by a shorthand,false
otherwise.
-
setCssText
Description copied from class:StyleValue
Attempts 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:
setCssText
in interfaceCSSValue
- Overrides:
setCssText
in 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:
clone
in interfaceExtendedCSSValue
- Specified by:
clone
in interfaceExtendedCSSValueList<StyleValue>
- Specified by:
clone
in classStyleValue
- Returns:
- a clone of this instance.
-
createCSValueList
-
createWSValueList
-
createBracketValueList
-
wrap
-