Class CmsStylesheetLoader

java.lang.Object
org.opencms.gwt.client.util.CmsStylesheetLoader

public class CmsStylesheetLoader extends 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 Details

    • CmsStylesheetLoader

      public CmsStylesheetLoader(List<String> stylesheets, 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 Details

    • 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