Java Doc for HtmlComponent.java in  » J2EE » Sofia » com » salmonllc » 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 » J2EE » Sofia » com.salmonllc.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.html.HtmlComponent

All known Subclasses:   com.salmonllc.html.HtmlImageMapArea,  com.salmonllc.jsp.JspCookieCrumble,  com.salmonllc.html.HtmlApplet,  com.salmonllc.html.HtmlText,  com.salmonllc.html.HtmlContainer,  com.salmonllc.html.HtmlTreeControl,  com.salmonllc.html.HtmlLineBreak,  com.salmonllc.html.HtmlFileUpload,  com.salmonllc.html.HtmlSubmitButton,  com.salmonllc.html.HtmlFormComponent,  com.salmonllc.html.HtmlSubmitImage,  com.salmonllc.wml.WmlImage,  com.salmonllc.html.HtmlScript,  com.salmonllc.html.HtmlResetButton,  com.salmonllc.html.HtmlValidatorText,  com.salmonllc.wml.WmlText,  com.salmonllc.html.HtmlRaw,  com.salmonllc.html.HtmlTabFolder,  com.salmonllc.html.HtmlImage,  com.salmonllc.html.HtmlStyle,  com.salmonllc.jsp.JspDiv,  com.salmonllc.html.HtmlLine,  com.salmonllc.html.HtmlButton,  com.salmonllc.jsp.JspExpandAll,  com.salmonllc.jsp.JspParameter,  com.salmonllc.jsp.JspExpand,  com.salmonllc.html.HtmlCalendar,  com.salmonllc.jsp.JspContainer,
HtmlComponent
abstract public class HtmlComponent implements Serializable,Nameable(Code)
This component is the base class for every HTML component in the framework.


Field Summary
final public static  intDISABLED_ATTRIBUTE_USE_NEVER
    
final public static  intDISABLED_ATTRIBUTE_USE_ON_SUPPORTED_BROWSERS
    
final public static  intDISABLED_ATTRIBUTE_USE_SYSTEM_DEFAULT
    
final public static  intEVENT_NONE
    
final public static  intEVENT_OTHER
    
final public static  intEVENT_SUBMIT
    
protected  String_class
    
 String_fullName
    
protected  boolean_generateNewline
     Write a newline, or not, at the end of the generated tag.
 String_name
    
protected  HtmlComponent_parent
    
protected  boolean_visible
    
final protected static  booleandebug
    

Constructor Summary
public  HtmlComponent(String name, HtmlPage p)
     This method constructs a new HtmlComponent with the specified name.
Parameters:
  name - The name of the component.

Method Summary
public  voiddoBinding()
     This method should be implemented by subclasses of this component that will have autobinding.
public  StringencodeURL(String url)
    
public  StringBufferencodeURL(StringBuffer url)
    
public  booleanexecuteEvent(int eventType)
     This method should be implemented by subclasses of this component that will respond to events.
public static  StringfixSpecialHTMLCharacters(String input)
     A utility method used to replace special HTML characters <, >, &, " with their HTML representations.
abstract public  voidgenerateHTML(PrintWriter p, int rowNo)
     The purpose of this method is to generate the HTML a particular component needs to send back to the browser for its visual representation and must be implemented by each subclass.
public  voidgenerateHTML(PrintWriter p, int rowStart, int rowEnd)
     The purpose of this method is to generate the HTML a particular component needs to send back to the browser for its visual representation.
protected  StringgenerateImageURL()
     This method generates a URL for a dynamically generated image created by the component.
public  voidgenerateInitialHTML(PrintWriter p)
     This method should be implemented by containers that need to iterate through data in a datastore.
public  StringgetClassName()
     This method returns the class name used by the component (for DSS sytle sheets) .
public  StringgetDataSource()
     This method returns the Data Source the component is bound to.
public  intgetFormIndex()
     Get the form that this component is in.
public  StringgetFormString()
    
public  StringgetFullName()
     This will return the full name of the component.
public  StringgetName()
     This method returns the name of the component.
public  HtmlPagegetPage()
     This method return the page that the component is a member of.
public  HtmlComponentgetParent()
     This method returns the parent container that this component is in.
protected  StringgetPortletNameSpace()
    
protected  StringgetSiteMapEntryName(String url)
    
public  StringgetTheme()
    
public  intgetUseDisabledAttribute()
     how the component will handle the disabled HTML attribute.
public  booleangetVisible()
     This method returns whether or not the component is visible.
public  booleangetVisible(boolean checkParents)
     This method returns whether or not the component is visible.
public  booleanprocessParms(Hashtable parms, int rowNo)
     This method will process the parmeters from a HTTP post that are relavent to this component or components in it.
public  voidreset()
     This method will clear all pending events from the event queue for this component and components it contains.
public  voidsetClassName(String sClass)
     This method sets the property class (for DSS - style sheets) for the component.
public  voidsetDataSource(String dataSource)
     This method sets the Data Source the component should be bound to.
public  voidsetFormIndex(int formIndex)
     Set the form that this component is in.
public  voidsetGenerateNewline(boolean enable)
     Enables or disables the newline at the end of the generated HTML tag.
public  voidsetName(String name)
     This method sets the name of the component.
public  voidsetPage(HtmlPage p)
    
public  voidsetParent(HtmlComponent parent)
     This method sets the parent component of this component.
public  voidsetTheme(String theme)
     This method sets the property theme for the component.
public  voidsetUseDisabledAttribute(int i)
     Sets how the component will handle the disabled HTML attribute.
public  voidsetVisible(boolean visible)
     This method sets the visible property for the component.
public  StringtoString()
    
public  StringtranslateSiteMapURL(String url)
    
protected  booleanuseDisabledAttribute()
    

Field Detail
DISABLED_ATTRIBUTE_USE_NEVER
final public static int DISABLED_ATTRIBUTE_USE_NEVER(Code)



DISABLED_ATTRIBUTE_USE_ON_SUPPORTED_BROWSERS
final public static int DISABLED_ATTRIBUTE_USE_ON_SUPPORTED_BROWSERS(Code)



DISABLED_ATTRIBUTE_USE_SYSTEM_DEFAULT
final public static int DISABLED_ATTRIBUTE_USE_SYSTEM_DEFAULT(Code)



EVENT_NONE
final public static int EVENT_NONE(Code)



EVENT_OTHER
final public static int EVENT_OTHER(Code)



EVENT_SUBMIT
final public static int EVENT_SUBMIT(Code)



_class
protected String _class(Code)



_fullName
String _fullName(Code)



_generateNewline
protected boolean _generateNewline(Code)
Write a newline, or not, at the end of the generated tag.



_name
String _name(Code)



_parent
protected HtmlComponent _parent(Code)



_visible
protected boolean _visible(Code)



debug
final protected static boolean debug(Code)




Constructor Detail
HtmlComponent
public HtmlComponent(String name, HtmlPage p)(Code)
This method constructs a new HtmlComponent with the specified name.
Parameters:
  name - The name of the component. Each component in a page must have a unique name.




Method Detail
doBinding
public void doBinding() throws Exception(Code)
This method should be implemented by subclasses of this component that will have autobinding. This method is called by the framework and should not be called directly.



encodeURL
public String encodeURL(String url)(Code)
This method will encode a url to support URL rewriting



encodeURL
public StringBuffer encodeURL(StringBuffer url)(Code)
This method will encode a url to support URL rewriting



executeEvent
public boolean executeEvent(int eventType) throws Exception(Code)
This method should be implemented by subclasses of this component that will respond to events. This method should notify each of the component's listeners that an event occured. This method is called by the framework and should not be called directly.
Parameters:
  eventType - valid Types are EVENT_SUBMIT and EVENT_OTHER



fixSpecialHTMLCharacters
public static String fixSpecialHTMLCharacters(String input)(Code)
A utility method used to replace special HTML characters <, >, &, " with their HTML representations.



generateHTML
abstract public void generateHTML(PrintWriter p, int rowNo) throws Exception(Code)
The purpose of this method is to generate the HTML a particular component needs to send back to the browser for its visual representation and must be implemented by each subclass. The method is called by the framework and should not be called directly.



generateHTML
public void generateHTML(PrintWriter p, int rowStart, int rowEnd) throws Exception(Code)
The purpose of this method is to generate the HTML a particular component needs to send back to the browser for its visual representation. This version of the method is used for components that must process multiple rows in a DataStore in one generate (like computing a total for several rows). The method is called by the framework and should not be called directly.



generateImageURL
protected String generateImageURL()(Code)
This method generates a URL for a dynamically generated image created by the component. The method is called by the framework and should not be called directly.



generateInitialHTML
public void generateInitialHTML(PrintWriter p) throws Exception(Code)
This method should be implemented by containers that need to iterate through data in a datastore. The generateHtml method is called once for each row. This method is called once before the rows are processed.



getClassName
public String getClassName()(Code)
This method returns the class name used by the component (for DSS sytle sheets) .



getDataSource
public String getDataSource()(Code)
This method returns the Data Source the component is bound to.



getFormIndex
public int getFormIndex()(Code)
Get the form that this component is in. This can be used if a page uses more than one form and the component is in an html form tag instead of the tag.



getFormString
public String getFormString()(Code)



getFullName
public String getFullName()(Code)
This will return the full name of the component. The full name is the name of the component appended to the names of its parent components and seperated by underscores. For example if this is a button named "button1" inside a table named "table1" the full name for this component would be "table1_button1".



getName
public String getName()(Code)
This method returns the name of the component.



getPage
public HtmlPage getPage()(Code)
This method return the page that the component is a member of.



getParent
public HtmlComponent getParent()(Code)
This method returns the parent container that this component is in. The parent component or null if there is no parent.



getPortletNameSpace
protected String getPortletNameSpace()(Code)



getSiteMapEntryName
protected String getSiteMapEntryName(String url)(Code)



getTheme
public String getTheme()(Code)
Returns the theme for this component or null if it doesn't have one



getUseDisabledAttribute
public int getUseDisabledAttribute()(Code)
how the component will handle the disabled HTML attribute. DISABLED_ATTRIBUTE_USE_ON_SUPPORTED_BROWSERS (use disabled html attribute on browsers that support it) , DISABLED_ATTRIBUTE_USE_NEVER (Never use the disabled attribute for this component) or DISABLED_ATTRIBUTE_USE_SYSTEM_DEFAULT (Use the attribute if the system default is to and the browser supports it)



getVisible
public boolean getVisible()(Code)
This method returns whether or not the component is visible. If it is not visible, no HTML will be generated.



getVisible
public boolean getVisible(boolean checkParents)(Code)
This method returns whether or not the component is visible. If it is not visible, no HTML will be generated.
Parameters:
  checkParents - A boolean value, true mean that this component is considered visible if it and all it's parents are visible. A false value only checks the component itself.



processParms
public boolean processParms(Hashtable parms, int rowNo) throws Exception(Code)
This method will process the parmeters from a HTTP post that are relavent to this component or components in it. This is a framework method and should not be called directly.
Parameters:
  parms - a HashTable containing all the parameters for the servlet.
Parameters:
  rowNo - - int row number to act on true if this component or a child is the one that submitted the page and false if not.



reset
public void reset()(Code)
This method will clear all pending events from the event queue for this component and components it contains.



setClassName
public void setClassName(String sClass)(Code)
This method sets the property class (for DSS - style sheets) for the component.
Parameters:
  sClass - The class to use.



setDataSource
public void setDataSource(String dataSource)(Code)
This method sets the Data Source the component should be bound to.



setFormIndex
public void setFormIndex(int formIndex)(Code)
Set the form that this component is in. This can be used if a page uses more than one form and the component is in an html form tag instead of the tag.



setGenerateNewline
public void setGenerateNewline(boolean enable)(Code)
Enables or disables the newline at the end of the generated HTML tag.
Parameters:
  enable - If true, generate a newline after the generated HTML.



setName
public void setName(String name)(Code)
This method sets the name of the component.



setPage
public void setPage(HtmlPage p)(Code)
This method sets the page the component is in



setParent
public void setParent(HtmlComponent parent)(Code)
This method sets the parent component of this component. If a component is inside of a container, the container is its parent.



setTheme
public void setTheme(String theme)(Code)
This method sets the property theme for the component.



setUseDisabledAttribute
public void setUseDisabledAttribute(int i)(Code)
Sets how the component will handle the disabled HTML attribute. DISABLED_ATTRIBUTE_USE_ON_SUPPORTED_BROWSERS (use disabled html attribute on browsers that support it) , DISABLED_ATTRIBUTE_USE_NEVER (Never use the disabled attribute for this component) or DISABLED_ATTRIBUTE_USE_SYSTEM_DEFAULT (Use the attribute if the system default is to and the browser supports it)



setVisible
public void setVisible(boolean visible)(Code)
This method sets the visible property for the component. If it is not visible, no html will be generated.



toString
public String toString()(Code)



translateSiteMapURL
public String translateSiteMapURL(String url)(Code)
Translates a site map url (preceeded by a % sign) to an actual URL
Parameters:
  url -



useDisabledAttribute
protected boolean useDisabledAttribute()(Code)



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.