public interface ResourceProvider
Interface that provides the concrete client bundle interface to be used by
the ComponentHighlighterConnector
. If nothing different is configured
through the widgetset definition (GWT module descriptor), then GWT will
create a DefaultResourceProvider
instance in
ComponentHighlighterConnector
as ResourceProvider
instance.
This default resource provider will ensure that the CssResource
s as
defined in highlighter.css are used by default.
The purpose of this interface is to make it possible to substitute the CSS
definition used for the component highlighter with an own definition. This
can be achieved through GWT's deferred binding mechanism. To do so, you have
to provide your own implementation of ResourceProvider
that returns
your own sub-interface of ComponentHighlighterResources
through
getResources()
. Have a look at DefaultResourceProvider
and
DefaultComponentHighlighterResources
to see how your own client
bundle has to be designed.
After you have written your custom implementation of this interface (name for
example MyResourceProvider
) and your own subclass of
ComponentHighlighterResources
, you can augment your widgetset
definition with the following statement for deferred binding which will
effectively replace the DefaultResourceProvider
with your own
implementation:
<replace-with class="com.example.client.MyResourceProvider"> <when-type-is class="org.vaadin.highlighter.client.extension.DefaultResourceProvider" /> </replace-with>
DefaultResourceProvider
,
DefaultComponentHighlighterResources
Modifier and Type | Method and Description |
---|---|
ComponentHighlighterResources |
getResources()
Return the client bundle interface to be used for styling the component
highlighting labels.
|
ComponentHighlighterResources getResources()
Copyright © 2013–2017. All rights reserved.