Java Doc for LayoutElementBase.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » web » ui » component » util » descriptors » 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 » IDE Netbeans » visualweb.api.designer » com.sun.rave.web.ui.component.util.descriptors 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.rave.web.ui.component.util.descriptors.LayoutElementBase

All known Subclasses:   com.sun.rave.web.ui.component.util.descriptors.LayoutDefinition,  com.sun.rave.web.ui.component.util.descriptors.LayoutForEach,  com.sun.rave.web.ui.component.util.descriptors.LayoutAttribute,  com.sun.rave.web.ui.component.util.descriptors.LayoutStaticText,  com.sun.rave.web.ui.component.util.descriptors.LayoutIf,  com.sun.rave.web.ui.component.util.descriptors.LayoutComponent,  com.sun.rave.web.ui.component.util.descriptors.LayoutFacet,  com.sun.rave.web.ui.component.util.descriptors.LayoutMarkup,
LayoutElementBase
abstract public class LayoutElementBase implements LayoutElement(Code)

This class provides some common functionality between the various types of LayoutElements. It is the base class of most implementations (perhaps all).


author:
   Ken Paulsen (ken.paulsen@sun.com)


Field Summary
final public static  StringAFTER_ENCODE
    
final public static  StringBEFORE_ENCODE
    
final public static  StringENCODE
    

This is the "type" for handlers to be invoked during the encoding of this element.


Constructor Summary
protected  LayoutElementBase(LayoutElement parent, String id)
    

Method Summary
public  voidaddChildLayoutElement(LayoutElement element)
     This method is used to add a LayoutElement.
protected  HandlerContextcreateHandlerContext(FacesContext context, EventObject event, String eventType)
    

This method is responsible for creating a new HandlerContext.

public  ObjectdispatchHandlers(FacesContext context, String eventType, EventObject event)
    

This method iterates over the handlers and executes each one.

public  ObjectdispatchHandlers(HandlerContext handlerCtx, List handlers)
    

As currently implemented, this method is essentially a utility method.

public  voidencode(FacesContext context, UIComponent component)
    

This is the base implementation for encode.

public static  voidencodeChild(FacesContext context, UIComponent component)
    

This method is a convenience method for encoding the given UIComponent.

abstract protected  booleanencodeThis(FacesContext context, UIComponent component)
    

This method allows each LayoutElement to provide it's own encode functionality.

public  ListgetChildLayoutElements()
     This method returns the LayoutElements as a List.
public  ListgetHandlers(String type)
    
public  ListgetHandlers(String type, UIComponent comp)
    

This method retrieves the Handlers for the requested type.

public  MapgetHandlersByTypeMap()
    
public  StringgetId(FacesContext context, UIComponent parent)
    

Accessor method for id.

public  LayoutDefinitiongetLayoutDefinition()
     This method walks to the top-most LayoutElement, which should be a LayoutDefinition.
public  LayoutElementgetParent()
     This method returns the parent LayoutElement.
public  StringgetUnevaluatedId()
    

This method generally should not be used.

public  ObjectresolveValue(FacesContext context, UIComponent parent, String value)
    

This method will attempt to resolve EL strings in the given value.


Parameters:
  context - The FacesContext
Parameters:
  parent - The parent UIComponent.
public  voidsetHandlers(String type, List handlers)
    
public  voidsetHandlersByTypeMap(Map map)
    

This method provides a means to set the "handlersByType" Map. Normally this is done for each type individually via LayoutElementBase.setHandlers(String,List) .

protected  voidsetParent(LayoutElement parent)
     This method sets the parent LayoutElement.

Field Detail
AFTER_ENCODE
final public static String AFTER_ENCODE(Code)

This is the "type" for handlers to be invoked after the encoding of this element.




BEFORE_ENCODE
final public static String BEFORE_ENCODE(Code)

This is the "type" for handlers to be invoked before the encoding of this element.




ENCODE
final public static String ENCODE(Code)

This is the "type" for handlers to be invoked during the encoding of this element. This occurs before any child LayoutElements are invoked and only if child Elements are to be invoked.





Constructor Detail
LayoutElementBase
protected LayoutElementBase(LayoutElement parent, String id)(Code)
Constructor
Parameters:
  parent - The parent LayoutElement
Parameters:
  id - Identifier for this LayoutElement




Method Detail
addChildLayoutElement
public void addChildLayoutElement(LayoutElement element)(Code)
This method is used to add a LayoutElement. LayoutElements should be added sequentially in the order in which they are to be rendered.
Parameters:
  element - The LayoutElement to add as a child



createHandlerContext
protected HandlerContext createHandlerContext(FacesContext context, EventObject event, String eventType)(Code)

This method is responsible for creating a new HandlerContext. It does not set the Handler descriptor. This is done right before a Handler is invoked. This allows the HandlerContext object to be reused.


Parameters:
  context - The FacesContext



dispatchHandlers
public Object dispatchHandlers(FacesContext context, String eventType, EventObject event)(Code)

This method iterates over the handlers and executes each one. A HandlerContext will be created to pass to each Handler. The HandlerContext object is reused across all Handlers that are invoked; the setHandler(Handler) method is invoked with the correct Handler descriptor before the handler is executed.


Parameters:
  context - The FacesContext
Parameters:
  eventType - The event type which is being fired
Parameters:
  event - An optional EventObject providing more detail By default, (null) is returned. However, if any of thehandlers produce a non-null return value, then the value fromthe last handler to produces a non-null return value isreturned.



dispatchHandlers
public Object dispatchHandlers(HandlerContext handlerCtx, List handlers)(Code)

As currently implemented, this method is essentially a utility method. May want to rethink this.




encode
public void encode(FacesContext context, UIComponent component) throws IOException(Code)

This is the base implementation for encode. Typically each type of LayoutElement wants to do something specific then conditionally have its children rendered. This method invokes the abstract method "encodeThis" to do specific functionality, it the walks the children and renders them, if encodeThis returns true. It skips the children if encodeThis returns false.


Parameters:
  context - The FacesContext
Parameters:
  component - The UIComponent



encodeChild
public static void encodeChild(FacesContext context, UIComponent component) throws IOException(Code)

This method is a convenience method for encoding the given UIComponent. It calls the appropriate encoding methods on the component and calls itself recursively for all UIComponent children that do not render their own children.


Parameters:
  context - FacesContext
Parameters:
  component - UIComponent to encode



encodeThis
abstract protected boolean encodeThis(FacesContext context, UIComponent component) throws IOException(Code)

This method allows each LayoutElement to provide it's own encode functionality. If the LayoutElement should render its children, this method should return true. Otherwise, this method should return false.


Parameters:
  context - The FacesContext
Parameters:
  component - The UIComponent true if children are to be rendered, false otherwise.



getChildLayoutElements
public List getChildLayoutElements()(Code)
This method returns the LayoutElements as a List. List of LayoutElements



getHandlers
public List getHandlers(String type)(Code)

This method retrieves the Handlers for the requested type.


Parameters:
  type - The type of Handlers to retrieve. A List of Handlers.



getHandlers
public List getHandlers(String type, UIComponent comp)(Code)

This method retrieves the Handlers for the requested type. But also includes any handlers that are associated with the instance (i.e. the UIComponent).


Parameters:
  type - The type of Handlers to retrieve.
Parameters:
  event - The associated UIComponent (or null). A List of Handlers.



getHandlersByTypeMap
public Map getHandlersByTypeMap()(Code)

This method provides access to the "handlersByType" Map.




getId
public String getId(FacesContext context, UIComponent parent)(Code)

Accessor method for id. This returns a non-null value, it may return "" if id is not set or does not apply.

This method will also attempt to resolve EL strings.


Parameters:
  context - The FacesContext
Parameters:
  parent - The parent UIComponent. This is usedbecause the current UIComponent is typicallyunknown (or not even created yet). a non-null id



getLayoutDefinition
public LayoutDefinition getLayoutDefinition()(Code)
This method walks to the top-most LayoutElement, which should be a LayoutDefinition. If not, it will throw an Exception. The LayoutDefinition



getParent
public LayoutElement getParent()(Code)
This method returns the parent LayoutElement. parent LayoutElement



getUnevaluatedId
public String getUnevaluatedId()(Code)

This method generally should not be used. It does not resolve expressions. Instead use LayoutElementBase.getId(FacesContext,UIComponent) .

The unevaluated id.



resolveValue
public Object resolveValue(FacesContext context, UIComponent parent, String value)(Code)

This method will attempt to resolve EL strings in the given value.


Parameters:
  context - The FacesContext
Parameters:
  parent - The parent UIComponent. This is usedbecause the current UIComponent is typicallyunknown (or not even created yet).
Parameters:
  value - The String to resolve The evaluated value (may be null).



setHandlers
public void setHandlers(String type, List handlers)(Code)

This method associates 'type' with the given list of Handlers.


Parameters:
  type - The String type for the List of Handlers
Parameters:
  handlers - The List of Handlers



setHandlersByTypeMap
public void setHandlersByTypeMap(Map map)(Code)

This method provides a means to set the "handlersByType" Map. Normally this is done for each type individually via LayoutElementBase.setHandlers(String,List) . This Map may not be null (null will be ignored) and should contain entries that map to Lists of Handler s.




setParent
protected void setParent(LayoutElement parent)(Code)
This method sets the parent LayoutElement.
Parameters:
  parent - Parent LayoutElement



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.