org.cruxframework.crux.core.client.screen
Class HTMLPanelHelper

java.lang.Object
  extended by org.cruxframework.crux.core.client.screen.HTMLPanelHelper

public class HTMLPanelHelper
extends Object

CRUX INTERNAL CLASS. DO NOT USE IT DIRECTLY. Helper class to improve performance of HTMLPanel creations on Crux. HTMLPanel has a poor performance when it is attached on an element that is not attached to DOM. This class provides an workaround that avoid this situation, that can occur frequently when using HTMLPanels on Crux Views.

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static class HTMLPanelHelper.HTMLPanelInfo
          Contains information about where HTMLPanel was attached early
 
Constructor Summary
HTMLPanelHelper()
           
 
Method Summary
static HTMLPanelHelper.HTMLPanelInfo attachToDom(com.google.gwt.user.client.ui.HTMLPanel panel)
          Ensure that the given HTMLPanel will be attached to DOM.
static void restorePanelParent(com.google.gwt.user.client.ui.HTMLPanel panel, HTMLPanelHelper.HTMLPanelInfo panelInfo)
          Restore the HTMLPanel into its original parent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLPanelHelper

public HTMLPanelHelper()
Method Detail

attachToDom

public static HTMLPanelHelper.HTMLPanelInfo attachToDom(com.google.gwt.user.client.ui.HTMLPanel panel)
Ensure that the given HTMLPanel will be attached to DOM. It must be ensured before the HTMLPanel children widgets are processed.

Parameters:
panel - HTML panel
Returns:
HTMLPanelInfo object, containing information about where HTMLPanel was attached early

restorePanelParent

public static void restorePanelParent(com.google.gwt.user.client.ui.HTMLPanel panel,
                                      HTMLPanelHelper.HTMLPanelInfo panelInfo)
Restore the HTMLPanel into its original parent

Parameters:
panel - HTML Panel
panelInfo - HTMLPanelInfo object, containing information about where HTMLPanel was attached early


Copyright © 2014. All rights reserved.