Package org.apache.batik.dom.svg
Class AbstractSVGItem
- java.lang.Object
-
- org.apache.batik.dom.svg.AbstractSVGItem
-
- All Implemented Interfaces:
SVGItem
- Direct Known Subclasses:
SVGPathSegItem
,SVGPointItem
public abstract class AbstractSVGItem extends java.lang.Object implements SVGItem
Adapter for the SVGItem interface.- Version:
- $Id: AbstractSVGItem.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
itemStringValue
String representation of the item.protected AbstractSVGList
parent
List the item belongs to.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSVGItem()
Creates a new AbstractSVGList.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbstractSVGList
getParent()
Returns the parent list of this item.protected abstract java.lang.String
getStringValue()
Return the string representation of the item.java.lang.String
getValueAsString()
Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.protected void
resetAttribute()
Notifies the parent list that the item has changed.void
setParent(AbstractSVGList list)
Assigns a parent list to this item.
-
-
-
Field Detail
-
parent
protected AbstractSVGList parent
List the item belongs to.
-
itemStringValue
protected java.lang.String itemStringValue
String representation of the item. This is a cached representation of the item while it is not changed.
-
-
Method Detail
-
getStringValue
protected abstract java.lang.String getStringValue()
Return the string representation of the item.
-
setParent
public void setParent(AbstractSVGList list)
Assigns a parent list to this item.
-
getParent
public AbstractSVGList getParent()
Returns the parent list of this item.
-
resetAttribute
protected void resetAttribute()
Notifies the parent list that the item has changed. This discards the cached representation of the item.
-
getValueAsString
public java.lang.String getValueAsString()
Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.- Specified by:
getValueAsString
in interfaceSVGItem
- Returns:
- textual representation of the item to be inserted in the attribute value representing the list.
-
-