Java Doc for SimpleScriptable.java in  » Testing » htmlunit » com » gargoylesoftware » htmlunit » javascript » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » htmlunit » com.gargoylesoftware.htmlunit.javascript 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.gargoylesoftware.htmlunit.javascript.SimpleScriptable

All known Subclasses:   com.gargoylesoftware.htmlunit.javascript.host.XMLSerializer,  com.gargoylesoftware.htmlunit.javascript.host.XMLDOMParseError,  com.gargoylesoftware.htmlunit.javascript.host.History,  com.gargoylesoftware.htmlunit.javascript.host.XSLTemplate,  com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject,  com.gargoylesoftware.htmlunit.javascript.host.Range,  com.gargoylesoftware.htmlunit.javascript.host.Style,  com.gargoylesoftware.htmlunit.javascript.HTMLOptionsCollection,  com.gargoylesoftware.htmlunit.javascript.host.Node,  com.gargoylesoftware.htmlunit.javascript.host.Event,  com.gargoylesoftware.htmlunit.javascript.host.Stylesheet,  com.gargoylesoftware.htmlunit.javascript.host.Popup,  com.gargoylesoftware.htmlunit.javascript.host.Screen,  com.gargoylesoftware.htmlunit.javascript.host.Location,  com.gargoylesoftware.htmlunit.javascript.host.XPathResult,  com.gargoylesoftware.htmlunit.javascript.host.XMLAttribute,  com.gargoylesoftware.htmlunit.javascript.host.XSLTProcessor,  com.gargoylesoftware.htmlunit.javascript.host.Navigator,  com.gargoylesoftware.htmlunit.javascript.host.DOMParser,  com.gargoylesoftware.htmlunit.javascript.host.BoxObject,  com.gargoylesoftware.htmlunit.javascript.HTMLCollection,  com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest,  com.gargoylesoftware.htmlunit.javascript.host.SimpleArray,  com.gargoylesoftware.htmlunit.javascript.host.XPathNSResolver,  com.gargoylesoftware.htmlunit.javascript.host.Attribute,  com.gargoylesoftware.htmlunit.javascript.host.StyleSheetList,  com.gargoylesoftware.htmlunit.javascript.host.TextRectangle,  com.gargoylesoftware.htmlunit.javascript.host.Window,  com.gargoylesoftware.htmlunit.javascript.host.MimeType,  com.gargoylesoftware.htmlunit.javascript.host.DOMImplementation,  com.gargoylesoftware.htmlunit.javascript.NamedNodeMap,
SimpleScriptable
public class SimpleScriptable extends ScriptableObject (Code)
A javascript object for a Location
version:
   $Revision: 2132 $
author:
   Mike Bowler
author:
   David K. Taylor
author:
   Marc Guillemot
author:
   Chris Erskine
author:
   Daniel Gredler
author:
   Ahmed Ashour




Method Summary
public  Objectget(String name, Scriptable start)
     Get a named property from the object. Normally HtmlUnit objects don't need to overwrite this method as properties are defined on the prototypes from the xml configuration.
public static  booleangetBooleanArg(int index, Object[] args, boolean defaultValue)
     Return the boolean value at the specified location in the argument list.
public  StringgetClassName()
    
public  ObjectgetDefaultValue(Class hint)
     Return the javascript default value of this object.
final public  DomNodegetDomNodeOrDie()
     Return the DOM node that corresponds to this javascript object or throw an exception if one cannot be found.
final public  DomNodegetDomNodeOrNull()
     Return the DOM node that corresponds to this javascript object or null if a node hasn't been set.
public static  intgetIntArg(int index, Object[] args, int defaultValue)
     Return the int value at the specified location in the argument list.
final protected  LoggetLog()
    
public static  ObjectgetObjectArg(int index, Object[] args, Object defaultValue)
     Return the value at the specified location in the argument list.
protected  ScriptablegetPrototype(Class javaScriptClass)
    
protected  SimpleScriptablegetScriptableFor(Object object)
     Return the javascript object that corresponds to the specified object. New javascript objects will be created as needed.
protected  ScriptablegetStartingScope()
     Gets the scriptable used at starting scope for the execution of current script.
public static  StringgetStringArg(int index, Object[] args, String defaultValue)
     Return the string value at the specified location in the argument list.
protected  TransformergetTransformerScriptableFor()
    
protected  WindowgetWindow()
     Gets the window that is the top scope for this object.
protected static  WindowgetWindow(Scriptable s)
     Gets the window that is the top scope for the specified object.
Parameters:
  s - The JavaScript object whose associated window is to be returned.
protected  ObjectgetWithPreemption(String name)
    

Called by SimpleScriptable.get(String,Scriptable) to allow retrieval of the property before the prototype chain is searched.

IMPORTANT: This method is invoked *very* often by Rhino.

public  SimpleScriptablemakeScriptableFor(DomNode domNode)
    
public  voidsetDomNode(DomNode domNode)
    
protected  voidsetDomNode(DomNode domNode, boolean assignScriptObject)
    
public  voidsetHtmlElement(HtmlElement htmlElement)
    



Method Detail
get
public Object get(String name, Scriptable start)(Code)
Get a named property from the object. Normally HtmlUnit objects don't need to overwrite this method as properties are defined on the prototypes from the xml configuration. In some cases where "content" of object has priority compared to the properties consider using utility SimpleScriptable.getWithPreemption(String) . For fallback case just implement ScriptableWithFallbackGetter .



getBooleanArg
public static boolean getBooleanArg(int index, Object[] args, boolean defaultValue)(Code)
Return the boolean value at the specified location in the argument list. If the index is larger than the argument array then return the default value.
Parameters:
  index - The index into the argument list.
Parameters:
  args - The argument list.
Parameters:
  defaultValue - The default value to be used. The specified boolean or the default value.



getClassName
public String getClassName()(Code)
Return the javascript class name The javascript class name



getDefaultValue
public Object getDefaultValue(Class hint)(Code)
Return the javascript default value of this object. This is the javascript equivalent of a toString() in java.
Parameters:
  hint - A hint as to the format of the default value. Ignored in this case. The default value.



getDomNodeOrDie
final public DomNode getDomNodeOrDie() throws IllegalStateException(Code)
Return the DOM node that corresponds to this javascript object or throw an exception if one cannot be found. The DOM node
exception:
  IllegalStateException - If the DOM node could not be found.



getDomNodeOrNull
final public DomNode getDomNodeOrNull()(Code)
Return the DOM node that corresponds to this javascript object or null if a node hasn't been set. The DOM node or null



getIntArg
public static int getIntArg(int index, Object[] args, int defaultValue)(Code)
Return the int value at the specified location in the argument list. If the index is larger than the argument array then return the default value.
Parameters:
  index - The index into the argument list.
Parameters:
  args - The argument list.
Parameters:
  defaultValue - The default value to be used. The specified int or the default value.



getLog
final protected Log getLog()(Code)
Return the log that is being used for all scripting objects The log.



getObjectArg
public static Object getObjectArg(int index, Object[] args, Object defaultValue)(Code)
Return the value at the specified location in the argument list. If the index is larger than the argument array then return the default value.
Parameters:
  index - The index into the argument list.
Parameters:
  args - The argument list.
Parameters:
  defaultValue - The default value to return if the arg wasn't specified. The specified object or null



getPrototype
protected Scriptable getPrototype(Class javaScriptClass)(Code)
Get the prototype object for the given host class
Parameters:
  javaScriptClass - the host class the prototype



getScriptableFor
protected SimpleScriptable getScriptableFor(Object object)(Code)
Return the javascript object that corresponds to the specified object. New javascript objects will be created as needed. If a javascript object cannot be created for a domNode then NOT_FOUND will be returned.
Parameters:
  object - a DomNode or a WebWindow The javascript object or NOT_FOUND



getStartingScope
protected Scriptable getStartingScope()(Code)
Gets the scriptable used at starting scope for the execution of current script. the scope as defined in JavaScriptEngine.callFunctionor JavaScriptEngine.execute.



getStringArg
public static String getStringArg(int index, Object[] args, String defaultValue)(Code)
Return the string value at the specified location in the argument list. If the index is larger than the argument array then return the default value.
Parameters:
  index - The index into the argument list.
Parameters:
  args - The argument list.
Parameters:
  defaultValue - The default value to return if the arg wasn't specified. The specified string or null



getTransformerScriptableFor
protected Transformer getTransformerScriptableFor()(Code)
Gets a transformer getting the scriptable element for an HtmlElement the transformer.



getWindow
protected Window getWindow() throws RuntimeException(Code)
Gets the window that is the top scope for this object. The window associated with this object.
throws:
  RuntimeException - If the window cannot be found, which should never occur.



getWindow
protected static Window getWindow(Scriptable s) throws RuntimeException(Code)
Gets the window that is the top scope for the specified object.
Parameters:
  s - The JavaScript object whose associated window is to be returned. The window associated with the specified JavaScript object.
throws:
  RuntimeException - If the window cannot be found, which should never occur.



getWithPreemption
protected Object getWithPreemption(String name)(Code)

Called by SimpleScriptable.get(String,Scriptable) to allow retrieval of the property before the prototype chain is searched.

IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!


Parameters:
  name - the property name Scriptable.NOT_FOUND if not found



makeScriptableFor
public SimpleScriptable makeScriptableFor(DomNode domNode)(Code)
Builds a new the javascript object that corresponds to the specified object.

Parameters:
  domNode - the dom node for which a JS object should be created The javascript object



setDomNode
public void setDomNode(DomNode domNode)(Code)
Set the DOM node that corresponds to this javascript object
Parameters:
  domNode - The DOM node



setDomNode
protected void setDomNode(DomNode domNode, boolean assignScriptObject)(Code)
Set the DOM node that corresponds to this javascript object
Parameters:
  domNode - The DOM node
Parameters:
  assignScriptObject - If true, call setScriptObject on domNode



setHtmlElement
public void setHtmlElement(HtmlElement htmlElement)(Code)
Set the html element that corresponds to this javascript object
Parameters:
  htmlElement - The html element



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.