com.gargoylesoftware.htmlunit.javascript.host
Class CharacterDataImpl

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
              extended by com.gargoylesoftware.htmlunit.javascript.host.CharacterDataImpl
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable
Direct Known Subclasses:
TextImpl

public class CharacterDataImpl
extends NodeImpl

A javascript object for CharacterData.

Version:
$Revision: 1.3 $
Author:
David K. Taylor, Chris Erskine
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
CharacterDataImpl()
 Create an instance.
 
Method Summary
 void jsxFunction_appendData(java.lang.String arg)
 Append a string to character data.
 void jsxFunction_deleteData(int offset, int count)
 Delete characters from character data.
 void jsxFunction_insertData(int offset, java.lang.String arg)
 Insert a string into character data.
 void jsxFunction_replaceData(int offset, int count, java.lang.String arg)
 Replace characters of character data with a string.
 java.lang.String jsxFunction_substringData(int offset, int count)
 Extract a substring from character data.
 java.lang.Object jsxGet_data()
 Get the JavaScript property "data" for this character data.
 int jsxGet_length()
 Get the number of character in the character data.
 void jsxSet_data(java.lang.String newValue)
 Set the JavaScript property "data" for this character data.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setDomNode, setHtmlElement
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterDataImpl

public CharacterDataImpl()
Create an instance. Javascript objects must have a default constructor.

Method Detail

jsxFunction_appendData

public void jsxFunction_appendData(java.lang.String arg)
Append a string to character data.

Parameters:
arg - The string to be appended to the character data.

jsxFunction_deleteData

public void jsxFunction_deleteData(int offset,
                                   int count)
Delete characters from character data.

Parameters:
offset - The position of the first character to be deleted.
count - The number of characters to be deleted.

jsxFunction_insertData

public void jsxFunction_insertData(int offset,
                                   java.lang.String arg)
Insert a string into character data.

Parameters:
offset - The position within the first character at which the string is to be inserted.
arg - The string to insert.

jsxFunction_replaceData

public void jsxFunction_replaceData(int offset,
                                    int count,
                                    java.lang.String arg)
Replace characters of character data with a string.

Parameters:
offset - The position within the first character at which the string is to be replaced.
count - The number of characters to be replaced.
arg - The string that replaces the count characters beginning at the character at offset.

jsxFunction_substringData

public java.lang.String jsxFunction_substringData(int offset,
                                                  int count)
Extract a substring from character data.

Parameters:
offset - The position of the first character to be extracted.
count - The number of characters to be extracted.
Returns:
A string that consists of the count characters of the character data starting from the character at position offset.

jsxGet_data

public java.lang.Object jsxGet_data()
Get the JavaScript property "data" for this character data.

Returns:
The String of data.

jsxGet_length

public int jsxGet_length()
Get the number of character in the character data.

Returns:
The number of characters.

jsxSet_data

public void jsxSet_data(java.lang.String newValue)
Set the JavaScript property "data" for this character data.

Parameters:
newValue - The new String of data.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.