java.lang.Object
de.agilecoders.wicket.core.settings.BootstrapSettings
- All Implemented Interfaces:
IBootstrapSettings
#### Description
Default
IBootstrapSettings implementation- See Also:
-
Field Summary
Fields inherited from interface de.agilecoders.wicket.core.settings.IBootstrapSettings
CSS_CDN_PATTERN, CSS_RTL_CDN_PATTERN, JS_CDN_PATTERN, MODERNIZR_CDN_PATTERN, MODERNIZR_VERSION, POPPER_JS_CDN_PATTERN, POPPER_VERSION, VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleansetActiveThemeProvider(ActiveThemeProvider activeThemeProvider) TheActiveThemeProviderprovides access to the active themesetAutoAppendResources(boolean value) set value to true, if bootstrap resources should be added to each page automaticallysetCssResourceReference(ResourceReference reference) setCssRtlResourceReference(ResourceReference reference) setDeferJavascript(boolean defer) if true, the <script/> tag for the bootstrap javascript will get the defer="defer" attributesets the filter name for all bootstrap js resource referencessetJsResourceReference(ResourceReference bootstrapJavaScriptReference) setModernizrResourceReference(ResourceReference modernizrJavaScriptReference) setModernizrVersion(String version) setPopperJsResourceReference(ResourceReference popperJsResourceReference) setPopperJsVersion(String version) setThemeProvider(ThemeProvider themeProvider) TheThemeProviderinstance provides access to all available themes.setUpdateSecurityManager(boolean activate) if true, all necessary exceptions will be added to security manager to allow fonts and less files.setVersion(String version) booleanif true, all necessary exceptions will be added to security manager to allow fonts and less files.booleanuseCdnResources(boolean useCdnResources) final boolean
-
Constructor Details
-
BootstrapSettings
public BootstrapSettings()Constructor.
-
-
Method Details
-
setVersion
- Specified by:
setVersionin interfaceIBootstrapSettings- Parameters:
version- The version of Bootstrap. CDN resources use it to construct their urls- Returns:
- same instance for chaining
-
setModernizrVersion
- Specified by:
setModernizrVersionin interfaceIBootstrapSettings- Parameters:
version- The version of modernizr. CDN resources use it to construct their urls- Returns:
- same instance for chaining
-
setPopperJsVersion
- Specified by:
setPopperJsVersionin interfaceIBootstrapSettings- Parameters:
version- The version of popper.js. CDN resources use it to construct their urls- Returns:
- same instance for chaining
-
getVersion
- Specified by:
getVersionin interfaceIBootstrapSettings- Returns:
- The version of Bootstrap. CDN resources use it to construct their urls
-
deferJavascript
public boolean deferJavascript()- Specified by:
deferJavascriptin interfaceIBootstrapSettings- Returns:
- the deferJavascript flag
-
getModernizrVersion
- Specified by:
getModernizrVersionin interfaceIBootstrapSettings- Returns:
- The version of modernizr. CDN resources use it to construct their urls
-
getPopperJsVersion
- Specified by:
getPopperJsVersionin interfaceIBootstrapSettings- Returns:
- The version of popper.js. CDN resources use it to construct their urls
-
autoAppendResources
public boolean autoAppendResources()- Specified by:
autoAppendResourcesin interfaceIBootstrapSettings- Returns:
- True, if bootstrap resources should be added to each page automatically
-
getCssResourceReference
- Specified by:
getCssResourceReferencein interfaceIBootstrapSettings- Returns:
- the base bootstrap css resource reference
-
getJsResourceReference
- Specified by:
getJsResourceReferencein interfaceIBootstrapSettings- Returns:
- the base bootstrap JavaScript resource reference
-
getModernizrResourceReference
- Specified by:
getModernizrResourceReferencein interfaceIBootstrapSettings- Returns:
- the modernizr JavaScript resource reference
-
getPopperJsResourceReference
- Specified by:
getPopperJsResourceReferencein interfaceIBootstrapSettings- Returns:
- the popper.js JavaScript resource reference
-
getJsResourceFilterName
- Specified by:
getJsResourceFilterNamein interfaceIBootstrapSettings- Returns:
- javascript resource filter name
-
setAutoAppendResources
Description copied from interface:IBootstrapSettingsset value to true, if bootstrap resources should be added to each page automatically- Specified by:
setAutoAppendResourcesin interfaceIBootstrapSettings- Parameters:
value- true, if bootstrap resources should be added to each page automatically- Returns:
- same instance for chaining
-
getActiveThemeProvider
- Specified by:
getActiveThemeProviderin interfaceIBootstrapSettings- Returns:
- The
ActiveThemeProviderinstance
-
getThemeProvider
- Specified by:
getThemeProviderin interfaceIBootstrapSettings- Returns:
- The
ThemeProviderinstance
-
updateSecurityManager
public boolean updateSecurityManager()Description copied from interface:IBootstrapSettingsif true, all necessary exceptions will be added to security manager to allow fonts and less files. (default is true)- Specified by:
updateSecurityManagerin interfaceIBootstrapSettings- Returns:
- true, if security manger should be updated while installing these settings
-
setCssResourceReference
- Specified by:
setCssResourceReferencein interfaceIBootstrapSettings- Parameters:
reference- a reference to the base bootstrap css library. Defaults to the embedded bootstrap.css- Returns:
- same instance for chaining
-
setCssRtlResourceReference
- Specified by:
setCssRtlResourceReferencein interfaceIBootstrapSettings- Parameters:
reference- a reference to the RTL (right-to-left) bootstrap css library. Defaults to the embedded bootstrap.rtl.css- Returns:
- same instance for chaining
-
setJsResourceReference
- Specified by:
setJsResourceReferencein interfaceIBootstrapSettings- Parameters:
bootstrapJavaScriptReference- a reference to the base bootstrap JavaScript library. Defaults to the embedded bootstrap.js- Returns:
- same instance for chaining
-
setJsResourceFilterName
Description copied from interface:IBootstrapSettingssets the filter name for all bootstrap js resource references- Specified by:
setJsResourceFilterNamein interfaceIBootstrapSettings- Parameters:
name- javascript resource filter name- Returns:
- same instance for chaining
-
setModernizrResourceReference
public BootstrapSettings setModernizrResourceReference(ResourceReference modernizrJavaScriptReference) - Specified by:
setModernizrResourceReferencein interfaceIBootstrapSettings- Parameters:
modernizrJavaScriptReference- a reference to the Modernizr library. Defaults to the embedded modernizr.js- Returns:
- same instance for chaining
-
setPopperJsResourceReference
- Specified by:
setPopperJsResourceReferencein interfaceIBootstrapSettings- Parameters:
popperJsResourceReference- a reference to the Popper.js library. Defaults to the embedded popper.js.- Returns:
- same instance for chaining
-
setUpdateSecurityManager
Description copied from interface:IBootstrapSettingsif true, all necessary exceptions will be added to security manager to allow fonts and less files. (default is true)- Specified by:
setUpdateSecurityManagerin interfaceIBootstrapSettings- Parameters:
activate- true, if security manger should be updated while installing these settings- Returns:
- same instance for chaining
-
setDeferJavascript
Description copied from interface:IBootstrapSettingsif true, the <script/> tag for the bootstrap javascript will get the defer="defer" attribute- Specified by:
setDeferJavascriptin interfaceIBootstrapSettings- Returns:
- same instance for chaining
-
setActiveThemeProvider
Description copied from interface:IBootstrapSettingsTheActiveThemeProviderprovides access to the active theme- Specified by:
setActiveThemeProviderin interfaceIBootstrapSettings- Parameters:
activeThemeProvider- TheActiveThemeProviderinstance- Returns:
- same instance for chaining
-
setThemeProvider
Description copied from interface:IBootstrapSettingsTheThemeProviderinstance provides access to all available themes.- Specified by:
setThemeProviderin interfaceIBootstrapSettings- Parameters:
themeProvider- TheThemeProviderinstance- Returns:
- same instance for chaining
-
useCdnResources
public boolean useCdnResources()- Specified by:
useCdnResourcesin interfaceIBootstrapSettings- Returns:
- true, if the resources for the themes should be loaded from a CDN network
-
useWebjars
public final boolean useWebjars()- Specified by:
useWebjarsin interfaceIBootstrapSettings- Returns:
- true, if wicket bootstrap uses the webjars library. If you don't want to use the webjars libraries,
please set bootstrap css/js, modernizr reference to your own instance or call
IBootstrapSettings.useCdnResources(boolean). Some components uses webjars references internally, so if you want to use them, please override the providednewXYHeaderItem()methods.
-
useCdnResources
- Specified by:
useCdnResourcesin interfaceIBootstrapSettings- Parameters:
useCdnResources- a flag indicating whether the resources for the themes should be loaded from a CDN network- Returns:
- this instance
-