NextApp Echo2
v2.1.1

nextapp.echo2.webcontainer.propertyrender
Class CellLayoutDataRender

java.lang.Object
  extended by nextapp.echo2.webcontainer.propertyrender.CellLayoutDataRender

public class CellLayoutDataRender
extends java.lang.Object

Utility class for rendering nextapp.echo2.app.layout.CellLayoutData layout data properties to CSS.


Method Summary
static nextapp.echo2.app.ImageReference getCellLayoutDataBackgroundImage(nextapp.echo2.app.Component component, java.lang.String imageId)
          A delegate method to be invoked by the container Component's ComponentSynchronizePeer's ImageRenderSupport.getImage() implementation.
static void renderBackgroundImageToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, RenderContext rc, ImageRenderSupport irs, nextapp.echo2.app.Component parent, nextapp.echo2.app.Component child)
          Renders the backgroundImage property of a CellLayoutDataRender to a CssStyle.
static void renderToElementAndStyle(org.w3c.dom.Element element, nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.Component component, nextapp.echo2.app.layout.CellLayoutData layoutData, java.lang.String defaultInsetsAttributeValue)
          Renders a CellLayoutData property to the given CSS style and HTML element.
static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.Component component, nextapp.echo2.app.layout.CellLayoutData layoutData, java.lang.String defaultInsetsAttributeValue)
          Renders a CellLayoutData property to the given CSS style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCellLayoutDataBackgroundImage

public static nextapp.echo2.app.ImageReference getCellLayoutDataBackgroundImage(nextapp.echo2.app.Component component,
                                                                                java.lang.String imageId)
A delegate method to be invoked by the container Component's ComponentSynchronizePeer's ImageRenderSupport.getImage() implementation. This method will return the appropriate CellLayoutData background image if the identifier corresponds to one, otherwise null is returned.

Parameters:
component - the container Component
imageId - the identifier of the image
Returns:
the ImageReference or null if the specified imageId does not specify a CellLayoutData BackgroundImage
See Also:
renderBackgroundImageToStyle(CssStyle, RenderContext, ImageRenderSupport, Component, Component)

renderBackgroundImageToStyle

public static void renderBackgroundImageToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                                RenderContext rc,
                                                ImageRenderSupport irs,
                                                nextapp.echo2.app.Component parent,
                                                nextapp.echo2.app.Component child)
Renders the backgroundImage property of a CellLayoutDataRender to a CssStyle. The image will be assigned an identifier by this object prefaced with the namespace "CellLayoutData". The ImageRenderSupport.getImage() implementation may obtain images based on these ids by invoking the getCellLayoutDataBackgroundImage() method. Note that any image id may be safely passed to getCellLayoutDataBackgroundImage() as it will return null if it does not have an image to match the specified id.

Parameters:
cssStyle - the target CssStyle
rc - the relevant RenderContext
irs - the ImageRenderSupport which will provide identified images
parent - the parent Component
child - the child Component
See Also:
getCellLayoutDataBackgroundImage(Component, String)

renderToElementAndStyle

public static void renderToElementAndStyle(org.w3c.dom.Element element,
                                           nextapp.echo2.webrender.output.CssStyle cssStyle,
                                           nextapp.echo2.app.Component component,
                                           nextapp.echo2.app.layout.CellLayoutData layoutData,
                                           java.lang.String defaultInsetsAttributeValue)
Renders a CellLayoutData property to the given CSS style and HTML element. Null property values are handled properly (and default insets are still rendered if provided in such cases). Alignment information will be added to the Element such that block elements contained within it will be properly aligned. All other properties will be rendered using the CssSyle. Use of this method requires a "transitional" DOCTYPE.

Parameters:
element - the target Element
cssStyle - the target CssStyle
component - the child Component being laid out (used to determine LayoutDirection (LTR/RTL).
layoutData - the property value
defaultInsetsAttributeValue - the default insets for the cell (provided as a string in the interest of performance to avoid repeatedly rendering the same Insets object for each cell

renderToStyle

public static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                 nextapp.echo2.app.Component component,
                                 nextapp.echo2.app.layout.CellLayoutData layoutData,
                                 java.lang.String defaultInsetsAttributeValue)
Renders a CellLayoutData property to the given CSS style. Null property values are handled properly (and default insets are still rendered if provided in such cases).

Parameters:
cssStyle - the target CssStyle
component - the child Component being laid out (used to determine LayoutDirection (LTR/RTL).
layoutData - the property value
defaultInsetsAttributeValue - the default insets for the cell (provided as a string in the interest of performance to avoid repeatedly rendering the same Insets object for each cell

NextApp Echo2
v2.1.1