1 18 package org.apache.batik.dom.svg; 19 20 26 public abstract class AbstractSVGItem 27 implements SVGItem { 28 29 32 protected AbstractSVGList parent; 33 34 40 protected String itemStringValue; 41 42 45 protected abstract String getStringValue(); 46 47 protected AbstractSVGItem(){ 49 } 50 51 56 public void setParent(AbstractSVGList list){ 57 parent = list; 58 } 59 60 65 public AbstractSVGList getParent(){ 66 return parent; 67 } 68 69 76 protected void resetAttribute(){ 77 if ( parent != null ){ 78 itemStringValue = null; 79 parent.itemChanged(); 80 } 81 } 82 83 89 public String getValueAsString(){ 90 if ( itemStringValue == null ){ 91 itemStringValue = getStringValue(); 92 } 93 return itemStringValue; 94 } 95 } 96 | Popular Tags |