Java Doc for ViewCompiler.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » compiler » 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 » Ajax » Laszlo 4.0.10 » org.openlaszlo.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.compiler.ElementCompiler
      org.openlaszlo.compiler.ViewCompiler

All known Subclasses:   org.openlaszlo.compiler.ClassCompiler,  org.openlaszlo.compiler.DebugCompiler,
ViewCompiler
public class ViewCompiler extends ElementCompiler (Code)
Responsible for compiling elements that compile into instances of LzNode. This is called ViewCompiler for historical reasons; it would more appropriately be called NodeCompiler. Node compilation consists of these steps:
  • compute text metrics
  • call the XML compiler to generate bytecodes that recreate the view template subtree and pass it to a runtime view instantiation library


Field Summary
static  StringsConstPatStr
    
final static  PatternsConstraintPat
    
static  StringsConstraintPatStr
    
static  StringsFontNamePatStr
    
static  StringsFontSizePatStr
    
static  StringsFontstylePatStr
    
static  HashMapsUnsupportedServerlessFiletypes
    
static  HashMapsUnsupportedServerlessFiletypesSWF7
    

Constructor Summary
public  ViewCompiler(CompilationEnvironment env)
    

Method Summary
static  voidcheckUnresolvedResourceReferences(CompilationEnvironment env)
    
static  voidcheckUnsupportedMediaTypes(CompilationEnvironment env, Element elt, String url)
    
static  voidcollectElementNames(Element element, Set names)
     Collect the names of classes that are referenced.
static  voidcollectLayoutElement(Element element, Set names)
    
public  voidcompile(Element element)
    
static  voidcompileAttributes(Element elt, CompilationEnvironment env)
     Modify elt and its children to replace source attribute values by runtime values.
static  voidcompileClickResources(Element elt, CompilationEnvironment env)
    
static  voidcompileResources(Element elt, CompilationEnvironment env)
    
 voidcompileXML(Element element, FontInfo fontInfo)
     Compile a XML element and generate code that binds it to a runtime data structure named _lzViewTemplate.
protected static  StringgetAttributeValue(Element elt, String attrName)
    
protected static  booleanhasAttribute(Element elt, String attrName)
    
static  booleanisElement(Element element)
     Returns true if this node applies to the element.
protected  voidmapTextMetricsCompilation(Element elt, CompilationEnvironment env, FontInfo fontInfo, Set classList)
     Adds in text widths for all text views below this element that need them.
protected static  voidmergeClassFontInfo(Element elt, FontInfo fontInfo, CompilationEnvironment env)
     Walk the whole superclass chain, starting at the root, merging fontInfo.
protected static  voidmergeClassFontInfo(ClassModel classinfo, FontInfo fontInfo)
     Merge FontInfo from a class definition.
protected static  voidmergeFontAttributes(Element elt, FontInfo fontInfo)
    
static  voidpreprocess(Element elt, CompilationEnvironment env)
     Modify the DOM in place, to what the runtime expects.
static  voidsetFontInfo(FontInfo info, Element elt)
    

Field Detail
sConstPatStr
static String sConstPatStr(Code)
Pattern matcher for compile-time optimizations



sConstraintPat
final static Pattern sConstraintPat(Code)



sConstraintPatStr
static String sConstraintPatStr(Code)



sFontNamePatStr
static String sFontNamePatStr(Code)



sFontSizePatStr
static String sFontSizePatStr(Code)



sFontstylePatStr
static String sFontstylePatStr(Code)



sUnsupportedServerlessFiletypes
static HashMap sUnsupportedServerlessFiletypes(Code)



sUnsupportedServerlessFiletypesSWF7
static HashMap sUnsupportedServerlessFiletypesSWF7(Code)




Constructor Detail
ViewCompiler
public ViewCompiler(CompilationEnvironment env)(Code)




Method Detail
checkUnresolvedResourceReferences
static void checkUnresolvedResourceReferences(CompilationEnvironment env)(Code)



checkUnsupportedMediaTypes
static void checkUnsupportedMediaTypes(CompilationEnvironment env, Element elt, String url)(Code)



collectElementNames
static void collectElementNames(Element element, Set names)(Code)
Collect the names of classes that are referenced.



collectLayoutElement
static void collectLayoutElement(Element element, Set names)(Code)



compile
public void compile(Element element) throws CompilationError(Code)



compileAttributes
static void compileAttributes(Element elt, CompilationEnvironment env)(Code)
Modify elt and its children to replace source attribute values by runtime values.



compileClickResources
static void compileClickResources(Element elt, CompilationEnvironment env)(Code)



compileResources
static void compileResources(Element elt, CompilationEnvironment env)(Code)
Compiles all resources under the current element
Parameters:
  env -
Parameters:
  elt -



compileXML
void compileXML(Element element, FontInfo fontInfo)(Code)
Compile a XML element and generate code that binds it to a runtime data structure named _lzViewTemplate.
Parameters:
  element - an element
Parameters:
  fontInfo - font info inherited from canvas



getAttributeValue
protected static String getAttributeValue(Element elt, String attrName)(Code)
return value if element has an attribute named ATTRNAME in it's attribute list, or has a child lzx element



hasAttribute
protected static boolean hasAttribute(Element elt, String attrName)(Code)
return true if element has an attribute named ATTRIBUTE in it's attribute list, or has a child lzx element



isElement
static boolean isElement(Element element)(Code)
Returns true if this node applies to the element. Anything that the interface compiler doesn't recognize is considered a view node, so this always returns true.
Parameters:
  element - an element see doc



mapTextMetricsCompilation
protected void mapTextMetricsCompilation(Element elt, CompilationEnvironment env, FontInfo fontInfo, Set classList)(Code)
Adds in text widths for all text views below this element that need them. This walks down into class definitions, merging font info as it goes. We don't need to walk into class defs for measuring text, since we have no way to pass those text widths to the runtime, but we do need this to check if we need to import the default bold or italic fonts.
Parameters:
  env -
Parameters:
  elt -
Parameters:
  fontInfo - the current font name/style/size



mergeClassFontInfo
protected static void mergeClassFontInfo(Element elt, FontInfo fontInfo, CompilationEnvironment env)(Code)
Walk the whole superclass chain, starting at the root, merging fontInfo.



mergeClassFontInfo
protected static void mergeClassFontInfo(ClassModel classinfo, FontInfo fontInfo)(Code)
Merge FontInfo from a class definition.



mergeFontAttributes
protected static void mergeFontAttributes(Element elt, FontInfo fontInfo)(Code)
Merges font name/size/style from an element's direct attributes into a FontInfo



preprocess
static void preprocess(Element elt, CompilationEnvironment env)(Code)
Modify the DOM in place, to what the runtime expects. This function encapsulates the behavior that is common to root views, and class definitions. Preprocessing consists of compiling resources, and turning view-specific source-format attributes into runtime format
Parameters:
  elt - an Element value
Parameters:
  env - a CompilationEnvironment value



setFontInfo
static void setFontInfo(FontInfo info, Element elt)(Code)



Fields inherited from org.openlaszlo.compiler.ElementCompiler
final protected static String VIEW_INSTANTIATION_FNAME(Code)(Java Doc)
final protected CompilationEnvironment mEnv(Code)(Java Doc)

Methods inherited from org.openlaszlo.compiler.ElementCompiler
abstract void compile(Element element) throws CompilationError(Code)(Java Doc)
public static String requireIdentifierAttributeValue(Element e, String aname)(Code)(Java Doc)
File resolveSrcReference(Element elt)(Code)(Java Doc)
void updateSchema(Element element, ViewSchema schema, Set visited)(Code)(Java Doc)

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.