})); | })); | ||||
}-*/; | }-*/; | ||||
/** | |||||
* Executes a Runnable when all HTML imports are ready. If the browser does | |||||
* not support triggering an event when HTML imports are ready, the Runnable | |||||
* is executed immediately. | |||||
* | |||||
* @param runnable | |||||
* the code to execute | |||||
* @since 8.1 | |||||
*/ | |||||
protected void runWhenHtmlImportsReady(Runnable runnable) { | protected void runWhenHtmlImportsReady(Runnable runnable) { | ||||
if (GWT.isClient() && supportsHtmlWhenReady()) { | if (GWT.isClient() && supportsHtmlWhenReady()) { | ||||
addHtmlImportsReadyHandler(() -> { | addHtmlImportsReadyHandler(() -> { |
import elemental.json.JsonObject; | import elemental.json.JsonObject; | ||||
/** | |||||
* Connector for TreeRenderer | |||||
* | |||||
* @author Vaadin Ltd | |||||
* @since 8.1 | |||||
*/ | |||||
@Connect(TreeRenderer.class) | @Connect(TreeRenderer.class) | ||||
public class TreeRendererConnector extends AbstractRendererConnector<String> { | public class TreeRendererConnector extends AbstractRendererConnector<String> { | ||||
import com.vaadin.shared.ui.Connect.LoadStyle; | import com.vaadin.shared.ui.Connect.LoadStyle; | ||||
import com.vaadin.ui.Composite; | import com.vaadin.ui.Composite; | ||||
/** | |||||
* Connector for the Composite component. | |||||
* | |||||
* @author Vaadin Ltd | |||||
* @since 8.1 | |||||
*/ | |||||
@Connect(value = Composite.class, loadStyle = LoadStyle.EAGER) | @Connect(value = Composite.class, loadStyle = LoadStyle.EAGER) | ||||
public class CompositeConnector extends AbstractHasComponentsConnector { | public class CompositeConnector extends AbstractHasComponentsConnector { | ||||
* | * | ||||
* @param <T> | * @param <T> | ||||
* the collapsed item's type | * the collapsed item's type | ||||
* @since 8.1 | |||||
*/ | */ | ||||
@FunctionalInterface | @FunctionalInterface | ||||
public interface CollapseListener<T> extends Serializable { | public interface CollapseListener<T> extends Serializable { |
* | * | ||||
* @param <T> | * @param <T> | ||||
* the expanded item's type | * the expanded item's type | ||||
* @since 8.1 | |||||
*/ | */ | ||||
@FunctionalInterface | @FunctionalInterface | ||||
public interface ExpandListener<T> extends Serializable { | public interface ExpandListener<T> extends Serializable { |
* Gets the URI resolver to use for bootstrap resources. | * Gets the URI resolver to use for bootstrap resources. | ||||
* | * | ||||
* @return the URI resolver | * @return the URI resolver | ||||
* @since 8.1 | |||||
*/ | */ | ||||
public BootstrapUriResolver getUriResolver() { | public BootstrapUriResolver getUriResolver() { | ||||
if (uriResolver == null) { | if (uriResolver == null) { | ||||
/** | /** | ||||
* The URI resolver used in the bootstrap process. | * The URI resolver used in the bootstrap process. | ||||
* | |||||
* @since 8.1 | |||||
*/ | */ | ||||
protected static class BootstrapUriResolver extends VaadinUriResolver { | protected static class BootstrapUriResolver extends VaadinUriResolver { | ||||
private final BootstrapContext context; | private final BootstrapContext context; | ||||
* the session of the user to resolve the protocol for | * the session of the user to resolve the protocol for | ||||
* @return the URL that frontend:// resolves to, possibly using another | * @return the URL that frontend:// resolves to, possibly using another | ||||
* internal protocol | * internal protocol | ||||
* @since 8.1 | |||||
*/ | */ | ||||
public static String resolveFrontendUrl(VaadinSession session) { | public static String resolveFrontendUrl(VaadinSession session) { | ||||
DeploymentConfiguration configuration = session.getConfiguration(); | DeploymentConfiguration configuration = session.getConfiguration(); |
* | * | ||||
* @param uriResolver | * @param uriResolver | ||||
* the uri resolver which is used | * the uri resolver which is used | ||||
* @since 8.1 | |||||
*/ | */ | ||||
public void setUriResolver(VaadinUriResolver uriResolver) { | public void setUriResolver(VaadinUriResolver uriResolver) { | ||||
assert this.uriResolver == null : "URI resolver should never be changed"; | assert this.uriResolver == null : "URI resolver should never be changed"; | ||||
* Gets the URI resolver used in the bootstrap process. | * Gets the URI resolver used in the bootstrap process. | ||||
* | * | ||||
* @return the URI resolver | * @return the URI resolver | ||||
* @since 8.1 | |||||
*/ | */ | ||||
public VaadinUriResolver getUriResolver() { | public VaadinUriResolver getUriResolver() { | ||||
return uriResolver; | return uriResolver; |
* Filter for dependencies loaded using {@link StyleSheet @StyleSheet}, | * Filter for dependencies loaded using {@link StyleSheet @StyleSheet}, | ||||
* {@link JavaScript @JavaScript} and {@link HtmlImport @HtmlImport}. | * {@link JavaScript @JavaScript} and {@link HtmlImport @HtmlImport}. | ||||
* | * | ||||
* @since | |||||
* @since 8.1 | |||||
*/ | */ | ||||
public interface DependencyFilter extends Serializable { | public interface DependencyFilter extends Serializable { | ||||
/** | /** | ||||
* Provides context information for the dependency filter operation. | * Provides context information for the dependency filter operation. | ||||
* | * | ||||
* @since | |||||
* @since 8.1 | |||||
*/ | */ | ||||
public static class FilterContext implements Serializable { | public static class FilterContext implements Serializable { | ||||
* filters, which is undefined. If you need a specific order, you can | * filters, which is undefined. If you need a specific order, you can | ||||
* override this method and alter the order. | * override this method and alter the order. | ||||
* | * | ||||
* @since | |||||
* @since 8.1 | |||||
* @return the list of dependency filters to use for filtering resources, | * @return the list of dependency filters to use for filtering resources, | ||||
* not null | * not null | ||||
* @throws ServiceException | * @throws ServiceException | ||||
* | * | ||||
* @see #createDependencyFilters() | * @see #createDependencyFilters() | ||||
* | * | ||||
* @since | |||||
* @since 8.1 | |||||
* @return the dependency filters to pass resources dependencies through | * @return the dependency filters to pass resources dependencies through | ||||
* before loading | * before loading | ||||
*/ | */ |
* defined filters and returns the filtered collection of dependencies to | * defined filters and returns the filtered collection of dependencies to | ||||
* load. | * load. | ||||
* | * | ||||
* @since | |||||
* @since 8.1 | |||||
* @param connectorTypes | * @param connectorTypes | ||||
* the collection of connector classes to scan | * the collection of connector classes to scan | ||||
* @param manager | * @param manager |
/** | /** | ||||
* String renderer that handles icon resources and stores their identifiers | * String renderer that handles icon resources and stores their identifiers | ||||
* into data objects. | * into data objects. | ||||
* | |||||
* @since 8.1 | |||||
*/ | */ | ||||
public final class TreeRenderer extends AbstractRenderer<T, String> | public final class TreeRenderer extends AbstractRenderer<T, String> | ||||
implements DataGenerator<T> { | implements DataGenerator<T> { |
import com.vaadin.shared.ui.grid.renderers.AbstractRendererState; | import com.vaadin.shared.ui.grid.renderers.AbstractRendererState; | ||||
/** | |||||
* Shared state for Tree renderer. | |||||
* | |||||
* @author Vaadin Ltd | |||||
* @since 8.1 | |||||
*/ | |||||
public class TreeRendererState extends AbstractRendererState { | public class TreeRendererState extends AbstractRendererState { | ||||
} | } |