Class FontConfig.DefaultWebFontHandler
java.lang.Object
com.levigo.jadice.web.client.util.fonts.FontConfig.DefaultWebFontHandler
- All Implemented Interfaces:
com.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
- Enclosing class:
FontConfig
protected static class FontConfig.DefaultWebFontHandler
extends Object
implements com.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
A standard
WebFontLoader implementation that has the main purpose to repaint the PageView
when the loading operation has finished. The repaint is needed to be sure that
Annotations are rendered with the correct font.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactive()All fonts have been loaded.voidfontActive(String fontFamily, String fontDescription) voidfontInactive(String fontFamily, String fontDescription) voidfontLoading(String fontFamily, String fontDescription) voidinactive()All fonts have had their chance to be loaded.voidloading()
-
Constructor Details
-
DefaultWebFontHandler
public DefaultWebFontHandler()
-
-
Method Details
-
loading
public void loading()- Specified by:
loadingin interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontLoading
- Specified by:
fontLoadingin interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontActive
- Specified by:
fontActivein interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontInactive
- Specified by:
fontInactivein interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
active
public void active()All fonts have been loaded. When this happens, repaint thePageViewto be sure that annotations, which have been already created, will be rendered with the correct font.- Specified by:
activein interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
inactive
public void inactive()All fonts have had their chance to be loaded. If for any reason a font loading has failed, there won't be any retry until the next browser refresh, so no need to wait any further.When this happens, repaint the pageView. That way we can be sure that annotations, which have been already created, get the right font in case that font has been loaded successfully.
In case the font has not been loaded, the browser will decide on its own which font to use instead.
- Specified by:
inactivein interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-