org.cruxframework.crux.gwt.rebind
Class AbstractHTMLPanelFactory

java.lang.Object
  extended by org.cruxframework.crux.core.rebind.screen.widget.WidgetCreator<C>
      extended by org.cruxframework.crux.gwt.rebind.PanelFactory<C>
          extended by org.cruxframework.crux.gwt.rebind.ComplexPanelFactory<WidgetCreatorContext>
              extended by org.cruxframework.crux.gwt.rebind.AbstractHTMLPanelFactory
All Implemented Interfaces:
WidgetContainer
Direct Known Subclasses:
HTMLPanelFactory

public abstract class AbstractHTMLPanelFactory
extends ComplexPanelFactory<WidgetCreatorContext>

Base class for HTMLPanel like widgets creation from crux declarative engine.

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
 
Nested classes/interfaces inherited from class org.cruxframework.crux.core.rebind.screen.widget.WidgetCreator
WidgetCreator.StyleNameProcessor, WidgetCreator.StyleProcessor, WidgetCreator.ViewPermissionAttributeProcessor
 
Constructor Summary
AbstractHTMLPanelFactory()
           
 
Method Summary
protected  void createChildren(AbstractProxyCreator.SourcePrinter out, WidgetCreatorContext context)
          Generate the code for HTMLPanel children creation
protected  void createChildrenEagerly(AbstractProxyCreator.SourcePrinter out, WidgetCreatorContext context)
          Create the children widgets eagerly.
protected  void createChildrenLazily(AbstractProxyCreator.SourcePrinter out, WidgetCreatorContext context)
          Create the children widgets lazily.
protected  void createChildrenWidgets(AbstractProxyCreator.SourcePrinter out, WidgetCreatorContext context)
          Generate the children creation code for HTMLPanel.
 WidgetCreatorContext instantiateContext()
           
 
Methods inherited from class org.cruxframework.crux.core.rebind.screen.widget.WidgetCreator
commitPostProcessing, createChildWidget, createChildWidget, createChildWidget, createContext, createPostProcessingScope, createVariableName, createWidget, ensureChildren, ensureFirstChild, ensureHtmlChild, ensureTextChild, ensureWidget, getChildName, getChildWidgetClass, getChildWidgetClassName, getContext, getControllerAccessorHandler, getDeclaredMessage, getDeclaredMessages, getDevice, getLogger, getLoggerVariable, getResourceAccessExpression, getSubTypeWriter, getSubTypeWriter, getSubTypeWriter, getView, getViewVariable, getWidgetClass, getWidgetClass, getWidgetClassName, getWidgetFactoryDeclaration, hasChildPartialSupport, hasHeight, hasPartialSupport, hasWidth, instantiateWidget, isCurrentDeviceSupported, isHtmlChild, isResourceReference, isTextChild, isWidget, postProcess, printlnPostProcessing, processAttributes, processChildren, processEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHTMLPanelFactory

public AbstractHTMLPanelFactory()
Method Detail

createChildren

protected void createChildren(AbstractProxyCreator.SourcePrinter out,
                              WidgetCreatorContext context)
                       throws CruxGeneratorException
Generate the code for HTMLPanel children creation

Parameters:
out - printer to output the source
context - Crux view creation context
Throws:
CruxGeneratorException

createChildrenEagerly

protected void createChildrenEagerly(AbstractProxyCreator.SourcePrinter out,
                                     WidgetCreatorContext context)
Create the children widgets eagerly. It means, attach the panel to DOM, process its children generation and put the panel back to its place after that. This strategy is safer, but slower that lazy loading strategy.

Parameters:
out - printer to output the source
context - Crux view creation context

createChildrenLazily

protected void createChildrenLazily(AbstractProxyCreator.SourcePrinter out,
                                    WidgetCreatorContext context)
Create the children widgets lazily. It means, only process the HTML panel children creation when the panel is attached to DOM. This strategy is less secure, but faster, that eager loading strategy.

Parameters:
out - printer to output the source
context - Crux view creation context

createChildrenWidgets

protected void createChildrenWidgets(AbstractProxyCreator.SourcePrinter out,
                                     WidgetCreatorContext context)
Generate the children creation code for HTMLPanel.

Parameters:
out - printer to output the source
context - Crux view creation context

instantiateContext

public WidgetCreatorContext instantiateContext()
Specified by:
instantiateContext in class WidgetCreator<WidgetCreatorContext>
Returns:


Copyright © 2014. All rights reserved.