com.vaadin.terminal.gwt.widgetsetutils
Class CustomWidgetMapGenerator
java.lang.Object
com.google.gwt.core.ext.Generator
com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator
com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator
public abstract class CustomWidgetMapGenerator
- extends WidgetMapGenerator
An abstract helper class that can be used to easily build a widgetset with
customized load styles for each components. In three abstract methods one can
override the default values given in Connect
annotations.
- See Also:
WidgetMapGenerator
Methods inherited from class com.google.gwt.core.ext.Generator |
escape |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomWidgetMapGenerator
public CustomWidgetMapGenerator()
getLoadStyle
protected Connect.LoadStyle getLoadStyle(Class<? extends ServerConnector> connector)
- Description copied from class:
WidgetMapGenerator
- Returns true if the widget for given component will be lazy loaded by the
client. The default implementation reads the information from the
Connect
annotation.
The method can be overridden to optimize the widget loading mechanism. If
the Widgetset is wanted to be optimized for a network with a high latency
or for a one with a very fast throughput, it may be good to return false
for every component.
- Overrides:
getLoadStyle
in class WidgetMapGenerator
- Returns:
- true iff the widget for given component should be lazy loaded by
the client side engine
getEagerComponents
protected abstract Class<? extends ComponentConnector>[] getEagerComponents()
- Returns:
- an array of components whose load style should be overridden to
Connect.LoadStyle.EAGER
getLazyComponents
protected abstract Class<? extends ComponentConnector>[] getLazyComponents()
- Returns:
- an array of components whose load style should be overridden to
Connect.LoadStyle.LAZY
getDeferredComponents
protected abstract Class<? extends ComponentConnector>[] getDeferredComponents()
- Returns:
- an array of components whose load style should be overridden to
Connect.LoadStyle.DEFERRED
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.