Package org.opencms.gwt.client.util
Class CmsStylesheetLoader
java.lang.Object
org.opencms.gwt.client.util.CmsStylesheetLoader
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
ConstructorsConstructorDescriptionCmsStylesheetLoader
(List<String> stylesheets, Runnable allLoadedCallback) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
CmsStylesheetLoader
Creates a new instance.- Parameters:
stylesheets
- the list of stylesheets to loadallLoadedCallback
- the callback to call when everything has been loaded
-
-
Method Details
-
loadWithTimeout
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
-