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 TypeMethodDescriptionvoid
active()
All fonts have been loaded.void
fontActive
(String fontFamily, String fontDescription) void
fontInactive
(String fontFamily, String fontDescription) void
fontLoading
(String fontFamily, String fontDescription) void
inactive()
All fonts have had their chance to be loaded.void
loading()
-
Constructor Details
-
DefaultWebFontHandler
public DefaultWebFontHandler()
-
-
Method Details
-
loading
public void loading()- Specified by:
loading
in interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontLoading
- Specified by:
fontLoading
in interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontActive
- Specified by:
fontActive
in interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
fontInactive
- Specified by:
fontInactive
in interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-
active
public void active()All fonts have been loaded. When this happens, repaint thePageView
to be sure that annotations, which have been already created, will be rendered with the correct font.- Specified by:
active
in 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:
inactive
in interfacecom.levigo.jadice.web.client.util.internal.fonts.WebFontLoader.WebFontHandler
-