Class CmsStylesheetLoader


  • public class CmsStylesheetLoader
    extends java.lang.Object
    Helper class to append a stylesheet link to the head of the current page and run a callback when everything has been loaded.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsStylesheetLoader​(java.util.List<java.lang.String> stylesheets, java.lang.Runnable allLoadedCallback)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void loadWithTimeout​(int timeout)
      Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsStylesheetLoader

        public CmsStylesheetLoader​(java.util.List<java.lang.String> stylesheets,
                                   java.lang.Runnable allLoadedCallback)
        Creates a new instance.

        Parameters:
        stylesheets - the list of stylesheets to load
        allLoadedCallback - the callback to call when everything has been loaded
    • Method Detail

      • loadWithTimeout

        public void loadWithTimeout​(int timeout)
        Starts the loading process and creates a timer that sets of the callback after a given tiime if it hasn't already been triggered.
        Parameters:
        timeout - number of milliseconds after which the callback should be called if it hasn't already been