1 18 package org.apache.batik.dom; 19 20 import org.w3c.dom.Node ; 21 import org.w3c.dom.Text ; 22 23 30 31 public class GenericText extends AbstractText { 32 35 protected boolean readonly; 36 37 40 protected GenericText() { 41 } 42 43 46 public GenericText(String value, AbstractDocument owner) { 47 ownerDocument = owner; 48 setNodeValue(value); 49 } 50 51 55 public String getNodeName() { 56 return "#text"; 57 } 58 59 63 public short getNodeType() { 64 return TEXT_NODE; 65 } 66 67 70 public boolean isReadonly() { 71 return readonly; 72 } 73 74 77 public void setReadonly(boolean v) { 78 readonly = v; 79 } 80 81 84 protected Text createTextNode(String text) { 85 return getOwnerDocument().createTextNode(text); 86 } 87 88 91 protected Node newNode() { 92 return new GenericText(); 93 } 94 } 95 | Popular Tags |