Package com.oorian.bootstrap
Class Bootstrap
java.lang.Object
com.oorian.bootstrap.Bootstrap
Entry point for the Bootstrap library integration with Oorian.
This class provides static methods to configure paths and add Bootstrap resources to the page head. Bootstrap is a popular CSS framework that provides pre-built components and utility classes for building responsive web interfaces.
Basic Usage:
// In your Page class
@Override
protected void createHead(Head head) {
Bootstrap.addAllResources(head);
}
Custom Paths:
// Configure custom paths for production builds
Bootstrap.setBootstrapRootPath("/custom/bootstrap");
Bootstrap.addAllResources(head);
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAllResources(com.oorian.html.elements.Head head) Adds all Bootstrap resources to the page head.static voidaddBootstrapCss(com.oorian.html.elements.Head head) Adds the Bootstrap CSS to the page head.static voidaddBootstrapJavascript(com.oorian.html.elements.Head head) Adds the Bootstrap JavaScript to the page head.static voidaddOorianBootstrapJavascript(com.oorian.html.elements.Head head) Adds the Oorian-Bootstrap bridge JavaScript to the page head.static StringGets the path to the Bootstrap CSS file.static StringGets the path to the Bootstrap JavaScript bundle.static StringGets the path to the Oorian-Bootstrap bridge JavaScript.static voidsetBootstrapRootPath(String path) Sets the root path where Bootstrap resources are located.static voidSets the path to the Oorian-Bootstrap bridge JavaScript file.
-
Constructor Details
-
Bootstrap
public Bootstrap()
-
-
Method Details
-
setOorianBootstrapJsPath
Sets the path to the Oorian-Bootstrap bridge JavaScript file.- Parameters:
path- Path to oorian.bootstrap.js
-
setBootstrapRootPath
Sets the root path where Bootstrap resources are located.- Parameters:
path- Root path for Bootstrap files (default: "/bootstrap")
-
getOorianBootstrapJs
Gets the path to the Oorian-Bootstrap bridge JavaScript.- Returns:
- Full path to oorian.bootstrap.js
-
getBootstrapJs
Gets the path to the Bootstrap JavaScript bundle.- Returns:
- Path to bootstrap.bundle.min.js
-
getBootstrapCss
Gets the path to the Bootstrap CSS file.- Returns:
- Path to bootstrap.min.css
-
addBootstrapCss
public static void addBootstrapCss(com.oorian.html.elements.Head head) Adds the Bootstrap CSS to the page head.- Parameters:
head- The page head element
-
addBootstrapJavascript
public static void addBootstrapJavascript(com.oorian.html.elements.Head head) Adds the Bootstrap JavaScript to the page head.This method adds the Bootstrap bundle which includes Popper.js for positioning tooltips, popovers, and dropdowns.
- Parameters:
head- The page head element
-
addOorianBootstrapJavascript
public static void addOorianBootstrapJavascript(com.oorian.html.elements.Head head) Adds the Oorian-Bootstrap bridge JavaScript to the page head.This method adds the bridge script that provides additional functionality for Bootstrap components, such as component initialization and event handling.
- Parameters:
head- The page head element
-
addAllResources
public static void addAllResources(com.oorian.html.elements.Head head) Adds all Bootstrap resources to the page head.This convenience method adds the Bootstrap CSS, Bootstrap JavaScript bundle, and the Oorian-Bootstrap bridge script.
- Parameters:
head- The page head element
-