1 38 package com.gargoylesoftware.htmlunit.javascript.host; 39 40 import com.gargoylesoftware.htmlunit.html.DomCharacterData; 41 42 49 public abstract class CharacterDataImpl extends NodeImpl { 50 51 54 public CharacterDataImpl() { 55 } 56 57 58 62 public Object jsxGet_data() { 63 final DomCharacterData domCharacterData = 64 (DomCharacterData) getDomNodeOrDie(); 65 return domCharacterData.getData(); 66 } 67 68 69 73 public void jsxSet_data( final String newValue ) { 74 final DomCharacterData domCharacterData = 75 (DomCharacterData) getDomNodeOrDie(); 76 domCharacterData.setData(newValue); 77 } 78 79 80 84 public int jsxGet_length() { 85 final DomCharacterData domCharacterData = 86 (DomCharacterData) getDomNodeOrDie(); 87 return domCharacterData.getLength(); 88 } 89 90 91 95 public void jsxFunction_appendData(final String arg) { 96 final DomCharacterData domCharacterData = 97 (DomCharacterData) getDomNodeOrDie(); 98 domCharacterData.appendData(arg); 99 } 100 101 102 107 public void jsxFunction_deleteData(final int offset, final int count) { 108 final DomCharacterData domCharacterData = 109 (DomCharacterData) getDomNodeOrDie(); 110 domCharacterData.deleteData(offset, count); 111 } 112 113 114 120 public void jsxFunction_insertData(final int offset, final String arg) { 121 final DomCharacterData domCharacterData = 122 (DomCharacterData) getDomNodeOrDie(); 123 domCharacterData.insertData(offset, arg); 124 } 125 126 127 135 public void jsxFunction_replaceData(final int offset, final int count, 136 final String arg) { 137 final DomCharacterData domCharacterData = 138 (DomCharacterData) getDomNodeOrDie(); 139 domCharacterData.replaceData(offset, count, arg); 140 } 141 142 143 150 public String jsxFunction_substringData(final int offset, 151 final int count) { 152 final DomCharacterData domCharacterData = 153 (DomCharacterData) getDomNodeOrDie(); 154 return domCharacterData.substringData(offset, count); 155 } 156 } 157 | Popular Tags |