Java Doc for VirtualMachine.java in  » Swing-Library » OpenJX » org » openjx » core » 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 » Swing Library » OpenJX » org.openjx.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openjx.core.VirtualMachine

VirtualMachine
public class VirtualMachine (Code)
This is the core class to the OpenJX application. It controls all activities, including interpretation, translation, compilation and serialization.
author:
   Jared Spigner


Field Summary
public  JXPluginLoaderjxPluginLoader
     This is a reference to the Plugin Loader.
public  JXObjectstackObject
     This is the top most level object.

Constructor Summary
public  VirtualMachine()
     This is the constructor for the VirtualMachine class.

Method Summary
public  booleancompileProgram()
     This method compiles the script into Java code which may be displayed or executed.
public  booleandisplayProgram(OpenJX openJX, int pageid)
     This method displays the program.
Parameters:
  openJX - points to an instance of the viewer.
Parameters:
  pageid - is the id of the page we want to display (page ids startat 1 not 0).
public  StringgetApplicationFile()
     This method returns an instance of the applicationFile.
public  ObjectgetBound(String property)
     This method returns the bound property value.
Parameters:
  property - is the binding.
public  JXCompilergetJXCompiler()
     This method returns an instance to the JXCompiler.
public  JXInterpretergetJXInterpreter()
     This method returns an instance to the JXInterpreter.
public  JXObjectgetPage(int id)
     This method returns a page by index number.
Parameters:
  id - is the index number we are searching for.
public  PluginParsergetPluginParser()
     This method returns an instance of the PluginParser.
public  StringgetSerializedForm()
     This method returns a reference to the last serialized form.
public  JXViewergetViewer()
     This method returns an instance of the JXViewer.
public  booleaninterpretProgram()
     This method compiles the script into Java code which may be displayed or executed.
public  booleanisBound(String property)
     This method returns true if a property is bound syntax wise else false.
Parameters:
  property - is the property we want to check.
public  booleanloadPlugins()
     This method loads the plugin list into the classpath and hence makes them accessible.
public  booleanparsePlugins()
     This method parses the plugin list from the .jx application file.
public  booleanparseProgram()
     This method initializes the XML parser and begins the validating and parsing routines of the .jx application file.
public  JXObjectsearchOpen(JXObject next)
     This method is a recursive method that searches for the first open object in the given object chain.
Parameters:
  next - is the node who's children we will start with.
public  JXObjectsearchOpenMatch(String localName)
     This method searches for all occurences of an element matching the given element and if a match is found, returns it.
public  booleanserializeForm()
     This method serializes the form to XML.
public  JXObjectserializeJXObject(JXObject jxObject, StringWriter sw, int nl)
     This is a recursive utility method to serialize the form.
Parameters:
  jxObject - is the object we want to serialize.
Parameters:
  sw - is the string writer we want to use to serialize it.
Parameters:
  nl - is the nest level of the XML structured tags.
public  voidsetApplicationFile(String file)
     This method associates an application file with the Virtual Machine.
public  voidsetViewer(JXViewer jxViewer)
     This method associates a JXViewer instance with the Virtual Machine.
public  booleanstackCall(String localName, String data, Attributes attr, JXGLOBAL.JXSTACK_CALL call)
     This method calls the specified stack operation:
  • Stack Push - JXSTACK_PUSH, pushes data onto the stack.
public  booleanstackFinal(String localName)
     This method is called when all operations on the specific stack item have been finalized.
Parameters:
  localName - is the element name that we will use to reference thestack object.
public  booleanstackPush(String localName, Attributes attr)
     This method is called when a new item must be added to the stack.
Parameters:
  localName - is the element we would like to add to the stack.
Parameters:
  attr - is the set of attributes for the specific element.
public  booleanstackUpdate(String localName, String data)
     This method is called when a object on the stack needs to be updated. It can not be called once a stack object has been finalized.

Field Detail
jxPluginLoader
public JXPluginLoader jxPluginLoader(Code)
This is a reference to the Plugin Loader.



stackObject
public JXObject stackObject(Code)
This is the top most level object. It is composes all objects that make up a single form hierarchy.




Constructor Detail
VirtualMachine
public VirtualMachine()(Code)
This is the constructor for the VirtualMachine class. It creates a new instance of VirtualMachine.




Method Detail
compileProgram
public boolean compileProgram()(Code)
This method compiles the script into Java code which may be displayed or executed. true on success, else false on failure.



displayProgram
public boolean displayProgram(OpenJX openJX, int pageid)(Code)
This method displays the program.
Parameters:
  openJX - points to an instance of the viewer.
Parameters:
  pageid - is the id of the page we want to display (page ids startat 1 not 0). true on success, else false on failure.



getApplicationFile
public String getApplicationFile()(Code)
This method returns an instance of the applicationFile. an instance of the applicationFile.



getBound
public Object getBound(String property)(Code)
This method returns the bound property value.
Parameters:
  property - is the binding. the value fo the binding.



getJXCompiler
public JXCompiler getJXCompiler()(Code)
This method returns an instance to the JXCompiler. an instance to the JXCompiler.



getJXInterpreter
public JXInterpreter getJXInterpreter()(Code)
This method returns an instance to the JXInterpreter. an instance to the JXInterpreter.



getPage
public JXObject getPage(int id)(Code)
This method returns a page by index number.
Parameters:
  id - is the index number we are searching for. the page associated with the given index or null on failure.



getPluginParser
public PluginParser getPluginParser()(Code)
This method returns an instance of the PluginParser. an instance of the plugin parser.



getSerializedForm
public String getSerializedForm()(Code)
This method returns a reference to the last serialized form. a string reference to the serialized form.



getViewer
public JXViewer getViewer()(Code)
This method returns an instance of the JXViewer. an instance of the JXViewer or null.



interpretProgram
public boolean interpretProgram()(Code)
This method compiles the script into Java code which may be displayed or executed. true on success, else false on failure.



isBound
public boolean isBound(String property)(Code)
This method returns true if a property is bound syntax wise else false.
Parameters:
  property - is the property we want to check. true on binding syntax, else false if not bound.



loadPlugins
public boolean loadPlugins()(Code)
This method loads the plugin list into the classpath and hence makes them accessible. Currently this does not return false if a plugin fails . We may want to change this in the future. true on success, else false on failure.



parsePlugins
public boolean parsePlugins()(Code)
This method parses the plugin list from the .jx application file. true on success, else false on failure.



parseProgram
public boolean parseProgram()(Code)
This method initializes the XML parser and begins the validating and parsing routines of the .jx application file. true on success, else false on failure.



searchOpen
public JXObject searchOpen(JXObject next)(Code)
This method is a recursive method that searches for the first open object in the given object chain.
Parameters:
  next - is the node who's children we will start with. the next open object.



searchOpenMatch
public JXObject searchOpenMatch(String localName)(Code)
This method searches for all occurences of an element matching the given element and if a match is found, returns it. Otherwise null is returned.
Parameters:
  localName - is the element to search for.



serializeForm
public boolean serializeForm()(Code)
This method serializes the form to XML. true on success, else false on failure.



serializeJXObject
public JXObject serializeJXObject(JXObject jxObject, StringWriter sw, int nl)(Code)
This is a recursive utility method to serialize the form.
Parameters:
  jxObject - is the object we want to serialize.
Parameters:
  sw - is the string writer we want to use to serialize it.
Parameters:
  nl - is the nest level of the XML structured tags. We use this tomake the code pretty and indent. the object it has just serialized.



setApplicationFile
public void setApplicationFile(String file)(Code)
This method associates an application file with the Virtual Machine.
Parameters:
  file - points to the application file we want to use.



setViewer
public void setViewer(JXViewer jxViewer)(Code)
This method associates a JXViewer instance with the Virtual Machine.
Parameters:
  jxViewer - points to an instance of the JXViewer class.



stackCall
public boolean stackCall(String localName, String data, Attributes attr, JXGLOBAL.JXSTACK_CALL call)(Code)
This method calls the specified stack operation:
  • Stack Push - JXSTACK_PUSH, pushes data onto the stack.
  • Stack Update - JXSTACK_UPDATE, updates the stack storage area.
  • Stack Final - JXSTACK_FINAL, completes all operations on storage.
true on success, else false on failure.



stackFinal
public boolean stackFinal(String localName)(Code)
This method is called when all operations on the specific stack item have been finalized.
Parameters:
  localName - is the element name that we will use to reference thestack object. The element type must match and it must be on the "openroute", meaning a stack push has occured bt no prior finalize has beencalled on the item. true on success, else false on failure.



stackPush
public boolean stackPush(String localName, Attributes attr)(Code)
This method is called when a new item must be added to the stack.
Parameters:
  localName - is the element we would like to add to the stack.
Parameters:
  attr - is the set of attributes for the specific element. true on success, else false on failure.



stackUpdate
public boolean stackUpdate(String localName, String data)(Code)
This method is called when a object on the stack needs to be updated. It can not be called once a stack object has been finalized. Currently objects are only update when they are a jxscript or jximage.
Parameters:
  localName - is the element we would like to update.
Parameters:
  data - is the data behind the attribute we want to update. true on success, else false on failure.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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