@@ -345,6 +345,7 @@ public class ApplicationConfiguration implements EntryPoint { | |||
* resolve to. | |||
* | |||
* @return the URL of the frontend protocol | |||
* @since 8.1 | |||
*/ | |||
public String getFrontendUrl() { | |||
return frontendUrl; |
@@ -253,6 +253,13 @@ public class BrowserInfo { | |||
return browserDetails.isSafari(); | |||
} | |||
/** | |||
* Returns true if the browser is Safari or is a browser that is running on | |||
* iOS and using the Safari rendering engine. | |||
* | |||
* @return true if the browser is using the Safari rendering engine | |||
* @since 8.1 | |||
*/ | |||
public boolean isSafariOrIOS() { | |||
return browserDetails.isSafariOrIOS(); | |||
} |
@@ -115,7 +115,7 @@ public class VNativeSelect extends FocusableFlowPanelComposite | |||
* Sets the number of items that are visible. If only one item is visible, | |||
* then the box will be displayed as a drop-down list (the default). | |||
* | |||
* @since | |||
* @since 8.1 | |||
* @param visibleItemCount | |||
* the visible item count | |||
*/ | |||
@@ -127,7 +127,7 @@ public class VNativeSelect extends FocusableFlowPanelComposite | |||
* Gets the number of items that are visible. If only one item is visible, | |||
* then the box will be displayed as a drop-down list. | |||
* | |||
* @since | |||
* @since 8.1 | |||
* @return the visible item count | |||
*/ | |||
public int getVisibleItemCount() { |
@@ -545,6 +545,7 @@ public class WebBrowser implements Serializable { | |||
* | |||
* @return <code>true</code> if the browser supports ES6, <code>false</code> | |||
* otherwise. | |||
* @since 8.1 | |||
*/ | |||
public boolean isEs6Supported() { | |||
if (browserDetails == null) { |
@@ -22,9 +22,16 @@ import org.osgi.service.http.HttpService; | |||
import org.osgi.service.http.NamespaceException; | |||
import com.vaadin.osgi.resources.OSGiVaadinResources; | |||
import com.vaadin.osgi.resources.VaadinResourceService; | |||
import com.vaadin.osgi.resources.OSGiVaadinResources.ResourceBundleInactiveException; | |||
import com.vaadin.osgi.resources.VaadinResourceService; | |||
/** | |||
* OSGi service component registering bootstrap JS as published resources in | |||
* OSGi environments. | |||
* | |||
* @author Vaadin Ltd | |||
* @since 8.1 | |||
*/ | |||
@Component(immediate = true) | |||
public class BootstrapContribution { | |||
private static final String[] RESOURCES = { "vaadinBootstrap.js", | |||
@@ -41,10 +48,10 @@ public class BootstrapContribution { | |||
@Reference | |||
void setHttpService(HttpService service) { | |||
this.httpService = service; | |||
httpService = service; | |||
} | |||
void unsetHttpService(HttpService service) { | |||
this.httpService = null; | |||
httpService = null; | |||
} | |||
} |
@@ -208,7 +208,7 @@ public class NativeSelect<T> extends AbstractSingleSelect<T> | |||
* Sets the number of items that are visible. If only one item is visible, | |||
* then the box will be displayed as a drop-down list (the default). | |||
* | |||
* @since | |||
* @since 8.1 | |||
* @param visibleItemCount | |||
* the visible item count | |||
* @throws IllegalArgumentException | |||
@@ -226,7 +226,7 @@ public class NativeSelect<T> extends AbstractSingleSelect<T> | |||
* Gets the number of items that are visible. If only one item is visible, | |||
* then the box will be displayed as a drop-down list. | |||
* | |||
* @since | |||
* @since 8.1 | |||
* @return the visible item count | |||
*/ | |||
public int getVisibleItemCount() { |
@@ -45,6 +45,13 @@ public class ApplicationConstants implements Serializable { | |||
public static final String PUBLISHED_PROTOCOL_NAME = "published"; | |||
public static final String PUBLISHED_PROTOCOL_PREFIX = PUBLISHED_PROTOCOL_NAME | |||
+ "://"; | |||
/** | |||
* An internal protocol used for referencing frontend resources. | |||
* | |||
* @see #FRONTEND_URL | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_PROTOCOL_PREFIX = "frontend://"; | |||
/** | |||
@@ -106,6 +113,8 @@ public class ApplicationConstants implements Serializable { | |||
* <p> | |||
* By default, this is "vaadin://es6" ("vaadin://es5" for browsers which | |||
* does not support ES6). | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_URL = "frontendUrl"; | |||
@@ -199,18 +208,24 @@ public class ApplicationConstants implements Serializable { | |||
/** | |||
* Configuration name for the {@literal frontend://} URL when using a | |||
* browser which is not ES6 compatible (i.e. IE11 or Safari 9). | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_URL_ES5 = "frontend.url.es5"; | |||
/** | |||
* Configuration name for the {@literal frontend://} URL when using an ES6 | |||
* compatible browser. | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_URL_ES6 = "frontend.url.es6"; | |||
/** | |||
* Default value of the configuration of the build URL of ES6 web | |||
* components. | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_URL_ES6_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX | |||
+ "frontend/es6/"; | |||
@@ -218,6 +233,8 @@ public class ApplicationConstants implements Serializable { | |||
/** | |||
* Default value of the configuration of the build URL of ES5 web | |||
* components. | |||
* | |||
* @since 8.1 | |||
*/ | |||
public static final String FRONTEND_URL_ES5_DEFAULT_VALUE = VAADIN_PROTOCOL_PREFIX | |||
+ "frontend/es5/"; |
@@ -365,6 +365,7 @@ public class VBrowserDetails implements Serializable { | |||
* iOS). | |||
* | |||
* @return true if it is Safari or running on IOS, false otherwise | |||
* @since 8.1 | |||
*/ | |||
public boolean isSafariOrIOS() { | |||
return isSafari() || isIOS(); | |||
@@ -602,6 +603,13 @@ public class VBrowserDetails implements Serializable { | |||
return false; | |||
} | |||
/** | |||
* Checks whether the browser should support ES6 based on its vendor and | |||
* version number. | |||
* | |||
* @return true if the browser supports ES6 | |||
* @since 8.1 | |||
*/ | |||
public boolean isEs6Supported() { | |||
if (isTooOldToFunctionProperly()) { | |||
return false; |
@@ -189,6 +189,7 @@ public abstract class VaadinUriResolver implements Serializable { | |||
* | |||
* @return the absolute or relative URL to the frontend files, ending with a | |||
* slash '/' | |||
* @since 8.1 | |||
*/ | |||
protected abstract String getFrontendUrl(); | |||
} |
@@ -44,6 +44,12 @@ public class NativeSelectState extends AbstractSingleSelectState { | |||
*/ | |||
public String emptySelectionCaption = ""; | |||
/** | |||
* The number of items that are visible. If only one item is visible, then | |||
* the box will be displayed as a drop-down list. | |||
* | |||
* @since 8.1 | |||
*/ | |||
@DelegateToWidget | |||
public int visibleItemCount = 1; | |||