Java Doc for XHtmlBuilder.java in  » XML-UI » xui32 » com » xoetrope » builder » w3c » html » 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 » XML UI » xui32 » com.xoetrope.builder.w3c.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.xoetrope.builder.w3c.html.XHtmlBuilder

All known Subclasses:   com.xoetrope.carousel.builder.XEditorHtmlBuilder,
XHtmlBuilder
public class XHtmlBuilder extends XuiBuilder (Code)
A build for W3C HTML forms/pages. The builder can create XUI pages on-the-fly or it can be used to convert and save an html page to a xui format.

Copyright (c) Xoetrope Ltd., 2002-2006

$Revision: 1.8 $

License: see License.txt



Field Summary
protected static  booleandebugLayout
    
protected static  URLdocumentUrl
    
protected  XHtmlComponentFactoryhtmlFactory
    
protected  XHtmlTagHandlerlastHandler
    
protected  StringpackageName
    
protected  StringselectStyle
    

Constructor Summary
public  XHtmlBuilder(XProject project)
    

Method Summary
public  voidaddScript(String componentName, String eventName, String methodName, String script)
    
public static  URLfindResource(String fileName)
     Find a resource URl from a resource string, resolving relative resource names in the process.
public static  ColorgetColor(String colorSpec)
    
public  ObjectgetComponentAttribute(String compName, String attribName)
    

Get a named attributes.

public static  intgetSwingConstant(String name)
    
public  XHtmlTagHandlergetTagHandler(HTML.Tag t)
    
public  StringgetType()
    
protected  InputStreamgetUrlInputStream(String urlStr)
    
public static  booleanisDebugLayout()
    
public  PageSupportloadPage(String defPackageName, String pageName, boolean include)
     Loads an XPage via a reader obtained from the XProject (searches the classpath).
public  voidprocessEvent(XHtmlTagHandler handler, String attribName, String attribValue)
    
public  PageSupportreadPage(Reader reader, String pageName, String ext, boolean include)
     Read an XML description of the page and construct a new XPage.
public  voidsetClass(Component c, String className)
    
public  voidsetComponentAttribute(String compName, String attribName, Object attribValue)
    

Set a named attributes.

public static  voidsetDebugLayout(boolean state)
    
protected  voidsetupHtmlTags()
    
protected  voidsetupPage(String pageName, String ext, boolean include)
     Loads the page based on the contents of the page tag or by using default values.
public  voidsetupStyle(String styleInfo)
    

Field Detail
debugLayout
protected static boolean debugLayout(Code)



documentUrl
protected static URL documentUrl(Code)



htmlFactory
protected XHtmlComponentFactory htmlFactory(Code)



lastHandler
protected XHtmlTagHandler lastHandler(Code)



packageName
protected String packageName(Code)



selectStyle
protected String selectStyle(Code)




Constructor Detail
XHtmlBuilder
public XHtmlBuilder(XProject project)(Code)
Create a new builder
Parameters:
  project - the current xui project
Parameters:
  factory - the component factory




Method Detail
addScript
public void addScript(String componentName, String eventName, String methodName, String script)(Code)
Add a new script function to the current class
Parameters:
  componentName - the name of the element being processed
Parameters:
  eventName - the name of the html event or null if a page event is being processed
Parameters:
  methodName - the name of the new method
Parameters:
  script - the contents of the method - the original javascript (assuming it is javascript)



findResource
public static URL findResource(String fileName)(Code)
Find a resource URl from a resource string, resolving relative resource names in the process.
Parameters:
  fileName - the resource string the resource url



getColor
public static Color getColor(String colorSpec)(Code)
Get a color from a color specification
Parameters:
  the - html color spec the Color object



getComponentAttribute
public Object getComponentAttribute(String compName, String attribName)(Code)

Get a named attributes. The attributes are stored in a hashtable owned by the page. Derived classes may access the hashtable directly but the preferred method of access is the getAttribute method. Attributes are used by the XuiBuilder class for component attributes other than those it handles directly. The attributes can be thought of as component properties or extra data and need not be used directly by the component.

Attributes are stored using a key in the form attribName_compName or just the attribName if compName is null.


Parameters:
  attribName - the attribute name
Parameters:
  compName - the component name or null if it is a page attribute



getSwingConstant
public static int getSwingConstant(String name)(Code)
Get a SwingConstant for an attribute
Parameters:
  the - attribute name as a string the constant



getTagHandler
public XHtmlTagHandler getTagHandler(HTML.Tag t)(Code)



getType
public String getType()(Code)
Get the page loader type - a unique name identifying the loader "html"



getUrlInputStream
protected InputStream getUrlInputStream(String urlStr)(Code)
Attempt to get an input stream from the specified path
Parameters:
  urlStr - the url string the inputstream or null if the strean cannot be opened.



isDebugLayout
public static boolean isDebugLayout()(Code)
Is a debug layout to be used? true if the debug layout is to be used



loadPage
public PageSupport loadPage(String defPackageName, String pageName, boolean include)(Code)
Loads an XPage via a reader obtained from the XProject (searches the classpath). The pageName is assumed to be the name of an XML file. For example if the pageName is 'welcome' then the 'welcome.xml' file is read as a UTF8 encoded XML file (by default).
Parameters:
  defPackageName - the package or path to the page
Parameters:
  pageName - the page name or the name of the class implementing the page
Parameters:
  include - true if the page to be loaded is being included in anotherpage in which case any class attribute of the included page is ignored the page



processEvent
public void processEvent(XHtmlTagHandler handler, String attribName, String attribValue)(Code)
Process the event specification, specified as an attribute of an HTML element
Parameters:
  handler - the tag handler
Parameters:
  attribName - the attribute name
Parameters:
  attribValue - the attribute value, containing the script



readPage
public PageSupport readPage(Reader reader, String pageName, String ext, boolean include)(Code)
Read an XML description of the page and construct a new XPage. An instance of the class specified by the class attribute is constructed or else an instance of XPage if no class attribute is specified. The new page is populated but is not yet added to its parent.
The startup file parameter 'DefaultClass' is used to obtain a default for each page's class if a class parameter is not specified in the page's XML
The startup file parameter 'Validations' is used to obtain a default for each page's set of validation rules
Parameters:
  reader - a input stream from which to read the page
Parameters:
  pageName - the name of the page
Parameters:
  ext - the file extension
Parameters:
  include - the page to be loaded is being included in another page the page



setClass
public void setClass(Component c, String className)(Code)
Set the class of an element
Parameters:
  c - the component affected by the style
Parameters:
  className - the name of the class



setComponentAttribute
public void setComponentAttribute(String compName, String attribName, Object attribValue)(Code)

Set a named attributes. The attributes are stored in a hashtable owned by the page. Derived classes may access the hashtable directly but the preferred method of access is the getAttribute method. Attributes are used by the XuiBuilder class for component attributes other than those it handles directly. The attributes can be thought of as component properties or extra data and need not be used directly by the component.

Attributes are stored using a key in the form attribName_compName or just the attribName if compName is null.


Parameters:
  attribName - the attribute name
Parameters:
  compName - the component name or null if it is a page attribute
Parameters:
  attribValue - the attribute value



setDebugLayout
public static void setDebugLayout(boolean state)(Code)
Set the debug layout flag
Parameters:
  state - true if the debug layout is to be used



setupHtmlTags
protected void setupHtmlTags()(Code)
Create a hashtable of tags and ids to speed processing of HTML



setupPage
protected void setupPage(String pageName, String ext, boolean include)(Code)
Loads the page based on the contents of the page tag or by using default values.
Parameters:
  pageName - the name of the page
Parameters:
  ext - the file extension
Parameters:
  include - the page to be loaded is being included in another page



setupStyle
public void setupStyle(String styleInfo)(Code)
Setup a new style or styles by parsing the stylesheet
Parameters:
  styleInfo - the full style information



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