Class WebPage

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    JQueryWebPage

    public class WebPage
    extends java.lang.Object
    implements java.io.Serializable
    Web page
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WebPage​(java.lang.String title)
      Constructor
      WebPage​(java.lang.String root, java.lang.String title)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void append​(java.lang.String html)
      Add HTML to body
      void appendAjax()
      Add Ajax components to page
      void appendAjax​(boolean bundle)
      Add Ajax components to page
      void appendBootbox()
      Add BootBox components
      void appendBootstrap​(boolean theme)
      Add Bootstrap® components
      void appendBootstrap​(boolean theme, boolean datetimepicker, java.lang.String lang)
      Add Bootstrap® components
      void appendBootstrap​(java.lang.String theme)
      Add Bootstrap® components
      void appendBootstrap​(java.lang.String theme, boolean datetimepicker, java.lang.String lang)
      Add Bootstrap® components
      void appendChartjs()
      Add Chart.js® components
      void appendCore()
      Deprecated.
      Core now needs grant parameter
      void appendCore​(Grant g)
      Add core components and global variables to page
      void appendCSS​(java.lang.String css)
      Add CSS styles
      void appendCSSInclude​(java.lang.String url)
      Add CSS stylesheet include
      void appendCSSInclude​(java.lang.String url, java.lang.String encoding)
      Add CSS stylesheet include
      void appendCSSIncludes​(java.lang.String[] urls)
      Add CSS stylesheet includes
      void appendCSSIncludes​(java.lang.String[] urls, java.lang.String encoding)
      Add CSS stylesheet includes
      void appendFullcalendar()
      Add Fullcalendar® components
      void appendFullcalendar​(java.lang.String lang)
      Add Fullcalendar® components.
      void appendGlobals​(Grant g)
      Add global variables
      void appendGmap()
      Add GoogleMaps® components
      void appendHEAD​(java.lang.String head)
      Add head components
      void appendHTML​(java.lang.String html)
      Add HTML to body
      void appendHTMLEditor()
      Add HTML editor components
      void appendJQPlot()
      Add jQPlot® components
      void appendJQuery()
      Add jQuery®
      void appendJQueryNoConflict​(java.lang.String noConflictVar)
      Deprecated. 
      void appendJS​(java.lang.String js)
      Add JavaScript
      void appendJSInclude​(java.lang.String url)
      Add JavaScript include
      void appendJSInclude​(java.lang.String url, java.lang.String encoding)
      Add JavaScript include
      void appendJSIncludes​(java.lang.String[] urls)
      Add JavaScript includes
      void appendJSIncludes​(java.lang.String[] urls, java.lang.String encoding)
      Add JavaScript includes
      void appendLayout1CSS​(int leftWidth, int rightWidth, int topHeight, int menuHeight, int bottomHeight, int leftMargin, int rightMargin, int topMargin, int bottomMargin)
      Add standard layout CSS styles
      void appendLayout1CSS​(int leftWidth, int rightWidth, int topHeight, int menuHeight, int bottomHeight, int leftMargin, int rightMargin, int topMargin, int bottomMargin, int leftResizeWidth, int rightResizeWidth)
      Add standard layout CSS styles
      void appendLayout2CSS​(int totalWidth, int leftWidth, int rightWidth, int totalHeight, int topHeight, int menuHeight, int bottomHeight)
      Add variant layout
      void appendLayout2MobileCSS​(int maxWidth, boolean left, boolean right, java.lang.String styles)
      Add variant layout
      void appendLayout2TabletCSS​(int maxWidth, int mainWidthPercent, int leftWidthPercent, int rightWidthPercent, java.lang.String styles)
      Add variant layout
      void appendLayoutCommonCSS()
      Add common layout CSS styles
      void appendLayoutHTML​(java.lang.String main, java.lang.String left, boolean leftresize, java.lang.String lefttgl, java.lang.String right, boolean rightresize, java.lang.String righttgl, java.lang.String top, java.lang.String menu, java.lang.String bottom)
      Add layout
      void appendLayoutHTML​(java.lang.String main, java.lang.String left, java.lang.String right, java.lang.String top, java.lang.String menu, java.lang.String bottom)
      Add layout
      void appendLayoutLeftRightResizeJS()
      Add right resize JavaScript
      void appendLayoutLeftRightToggleJS()
      Add left resize JavaScript
      void appendMarkdown()
      Add markdown converter components
      void appendMoment()
      Add Moment® components
      void appendMustache()
      Add Mustache® templating components
      void appendResponsiveCSS​(int width, boolean min, java.lang.String styles)
      Add responsive CSS styles
      void appendResponsiveCSS​(java.lang.String condition, java.lang.String styles)
      Add responsive CSS styles
      void appendTools()
      Add tools components to page
      void appendUI()
      Add responsive UI components (Note: it also add Ajax components)
      void appendUITools()
      Add legacy UI tools components to page
      void appendVue()
      Add Vue® components
      java.lang.String end()
      End page
      java.lang.String getBodyCSSClass()
      Get body CSS class
      java.lang.String getBodyId()
      Get body CSS Id
      java.lang.String getCSS()
      Get CSS styles
      java.lang.String getFavicon​(int size)
      Get favicon URL
      java.lang.String getHead()
      Get header
      java.lang.String getHTML()
      Get HTML
      java.lang.String getJS()
      Get JavaScript
      java.lang.String getLanguage()
      Get page language
      java.lang.String getManifest()
      Get manifest
      java.lang.String getRoot()
      Get web application root
      java.lang.String getTitle()
      Get page title
      void setBodyCSSClass​(java.lang.String bodyCSSClass)
      Set body CSS class
      void setBodyId​(java.lang.String id)
      Set body DOM Id
      void setFavicon​(int size, java.lang.String url)
      Set favicon
      void setFavicon​(java.lang.String url)
      Set favicon (size 16)
      void setLanguage​(java.lang.String language)
      Set page language
      void setManifest​(java.lang.String manifest)
      Set manifest
      java.lang.String start()
      Start page
      java.lang.String toString()
      Full page (start + html + end)
      boolean useAjax()
      Is page using Ajax components?
      boolean useBootbox()
      Is page using BootBox® components?
      boolean useBootstrap()
      Is page using Bootstrap® components?
      boolean useChartjs()
      Is page using Chart.js® components?
      boolean useCore()
      Is page using core components and global variables?
      boolean useFullcalendar()
      Is page is using FullCalendar® components?
      boolean useGmap()
      Is page is using GoogleMaps® components?
      boolean useHTMLEditor()
      Is page using the HTML editor components?
      boolean useJQPlot()
      Is page using the jQplot® components
      boolean useJQuery()
      Is page using jQuery®?
      boolean useMarkdown()
      Is page using Markdown converter components?
      boolean useMoment()
      Is page using Moment® components?
      boolean useMustache()
      Is page is using Mustache® templating components?
      boolean useTools()
      Is page using tools components
      boolean useUI()
      Is page using responsive UI components?
      boolean useUITools()
      Is page using the legacy UI tools?
      boolean useVue()
      Is page is using Vue® components?
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WebPage

        public WebPage​(java.lang.String title)
        Constructor
        Parameters:
        title - Page title
      • WebPage

        public WebPage​(java.lang.String root,
                       java.lang.String title)
        Constructor
        Parameters:
        root - Web application root
        title - Page title
    • Method Detail

      • getRoot

        public java.lang.String getRoot()
        Get web application root
        Returns:
        Web application root
      • getTitle

        public java.lang.String getTitle()
        Get page title
        Returns:
        Page title
      • useCore

        public boolean useCore()
        Is page using core components and global variables?
        Returns:
        True if page uses core components and global variables
      • appendCore

        @Deprecated
        public void appendCore()
        Deprecated.
        Core now needs grant parameter
      • appendCore

        public void appendCore​(Grant g)
        Add core components and global variables to page
        Parameters:
        g - Grant
      • useTools

        public boolean useTools()
        Is page using tools components
        Returns:
        True if the page is using tools components
      • appendTools

        public void appendTools()
        Add tools components to page
      • useAjax

        public boolean useAjax()
        Is page using Ajax components?
        Returns:
        True if the page is using Ajax components
      • appendAjax

        public void appendAjax()
        Add Ajax components to page
      • appendAjax

        public void appendAjax​(boolean bundle)
        Add Ajax components to page
        Parameters:
        bundle - Use single bundle file instead of individual files?
      • useUI

        public boolean useUI()
        Is page using responsive UI components?
        Returns:
        True if the page is using responsive UI components
      • appendUI

        public void appendUI()
        Add responsive UI components (Note: it also add Ajax components)
      • useUITools

        public boolean useUITools()
        Is page using the legacy UI tools?
        Returns:
        True if the page is using the legacy UI tools
      • appendUITools

        public void appendUITools()
        Add legacy UI tools components to page
      • useJQuery

        public boolean useJQuery()
        Is page using jQuery®?
        Returns:
        True if the page is using jQuery®
      • appendJQuery

        public void appendJQuery()
        Add jQuery®
      • appendJQueryNoConflict

        @Deprecated
        public void appendJQueryNoConflict​(java.lang.String noConflictVar)
        Deprecated.
      • useHTMLEditor

        public boolean useHTMLEditor()
        Is page using the HTML editor components?
        Returns:
        True if the page is using the HTML editor components
      • appendHTMLEditor

        public void appendHTMLEditor()
        Add HTML editor components
      • useJQPlot

        public boolean useJQPlot()
        Is page using the jQplot® components
        Returns:
        True if the page is using jQplo® components
      • appendJQPlot

        public void appendJQPlot()
        Add jQPlot® components
      • useChartjs

        public boolean useChartjs()
        Is page using Chart.js® components?
        Returns:
        True if the page is using Chart.js® components
      • appendChartjs

        public void appendChartjs()
        Add Chart.js® components
      • useMoment

        public boolean useMoment()
        Is page using Moment® components?
        Returns:
        True if the page is using Moment® components
      • appendMoment

        public void appendMoment()
        Add Moment® components
      • useGmap

        public boolean useGmap()
        Is page is using GoogleMaps® components?
        Returns:
        True if the page is using GoogleMaps® components
      • appendGmap

        public void appendGmap()
        Add GoogleMaps® components
      • useBootstrap

        public boolean useBootstrap()
        Is page using Bootstrap® components?
        Returns:
        True if page is using Bootstrap® components
      • appendBootstrap

        public void appendBootstrap​(boolean theme)
        Add Bootstrap® components
        Parameters:
        theme - Add default theme styles?
      • appendBootstrap

        public void appendBootstrap​(java.lang.String theme)
        Add Bootstrap® components
        Parameters:
        theme - Add theme styles?
      • appendBootstrap

        public void appendBootstrap​(boolean theme,
                                    boolean datetimepicker,
                                    java.lang.String lang)
        Add Bootstrap® components
        Parameters:
        theme - Add specified theme styles
      • appendBootstrap

        public void appendBootstrap​(java.lang.String theme,
                                    boolean datetimepicker,
                                    java.lang.String lang)
        Add Bootstrap® components
        Parameters:
        theme - Add specified theme styles
        datetimepicker - Add date picker?
        lang - Use specified language
      • useBootbox

        public boolean useBootbox()
        Is page using BootBox® components?
        Returns:
        True if page is using BootBox® components
      • appendBootbox

        public void appendBootbox()
        Add BootBox components
      • useFullcalendar

        public boolean useFullcalendar()
        Is page is using FullCalendar® components?
        Returns:
        True if page is using FullCalendar® components
      • appendFullcalendar

        public void appendFullcalendar()
        Add Fullcalendar® components
      • appendFullcalendar

        public void appendFullcalendar​(java.lang.String lang)
        Add Fullcalendar® components. Needs sysparam FULLCALENDAR_VERSION = 3 or 4 to specify version.
        Parameters:
        lang - Use specified language
      • useMarkdown

        public boolean useMarkdown()
        Is page using Markdown converter components?
        Returns:
        True if page is using Markdown components
      • appendMarkdown

        public void appendMarkdown()
        Add markdown converter components
      • useMustache

        public boolean useMustache()
        Is page is using Mustache® templating components?
        Returns:
        True if page is using Mustache® templating components
      • appendMustache

        public void appendMustache()
        Add Mustache® templating components
      • useVue

        public boolean useVue()
        Is page is using Vue® components?
        Returns:
        True if page is using Vue® templating components
      • appendVue

        public void appendVue()
        Add Vue® components
      • appendGlobals

        public void appendGlobals​(Grant g)
        Add global variables
        Parameters:
        g - Grant
      • appendHEAD

        public void appendHEAD​(java.lang.String head)
        Add head components
        Parameters:
        head - Head component (HTML)
      • appendCSSInclude

        public void appendCSSInclude​(java.lang.String url)
        Add CSS stylesheet include
        Parameters:
        url - CSS stylesheet URL
      • appendCSSInclude

        public void appendCSSInclude​(java.lang.String url,
                                     java.lang.String encoding)
        Add CSS stylesheet include
        Parameters:
        url - CSS stylesheet URL
        encoding - Encoding
      • appendCSSIncludes

        public void appendCSSIncludes​(java.lang.String[] urls)
        Add CSS stylesheet includes
        Parameters:
        urls - CSS stylesheet URLs
      • appendCSSIncludes

        public void appendCSSIncludes​(java.lang.String[] urls,
                                      java.lang.String encoding)
        Add CSS stylesheet includes
        Parameters:
        urls - CSS stylesheet URLs
        encoding - Encoding
      • appendJSInclude

        public void appendJSInclude​(java.lang.String url)
        Add JavaScript include
        Parameters:
        url - JavaScript URL
      • appendJSInclude

        public void appendJSInclude​(java.lang.String url,
                                    java.lang.String encoding)
        Add JavaScript include
        Parameters:
        url - JavaScript URL
        encoding - Encoding
      • appendJSIncludes

        public void appendJSIncludes​(java.lang.String[] urls)
        Add JavaScript includes
        Parameters:
        urls - JavaScript URLs
      • appendJSIncludes

        public void appendJSIncludes​(java.lang.String[] urls,
                                     java.lang.String encoding)
        Add JavaScript includes
        Parameters:
        urls - JavaScript URLs
        encoding - Encoding
      • getHead

        public java.lang.String getHead()
        Get header
        Returns:
        HTML
      • setFavicon

        public void setFavicon​(java.lang.String url)
        Set favicon (size 16)
        Parameters:
        url - Favicon URL
      • setFavicon

        public void setFavicon​(int size,
                               java.lang.String url)
        Set favicon
        Parameters:
        size - Size
        url - Favicon URL
      • getFavicon

        public java.lang.String getFavicon​(int size)
        Get favicon URL
        Parameters:
        size - Size
      • setManifest

        public void setManifest​(java.lang.String manifest)
        Set manifest
        Parameters:
        manifest - Manifest
      • getManifest

        public java.lang.String getManifest()
        Get manifest
        Returns:
        Manifest
      • appendCSS

        public void appendCSS​(java.lang.String css)
        Add CSS styles
        Parameters:
        css - CSS styles
      • getCSS

        public java.lang.String getCSS()
        Get CSS styles
        Returns:
        CSS styles
      • appendJS

        public void appendJS​(java.lang.String js)
        Add JavaScript
        Parameters:
        js - JavaScript
      • getJS

        public java.lang.String getJS()
        Get JavaScript
        Returns:
        JavaScript
      • appendHTML

        public void appendHTML​(java.lang.String html)
        Add HTML to body
        Parameters:
        html - HTML
      • append

        public void append​(java.lang.String html)
        Add HTML to body
        Parameters:
        html - HTML
      • getHTML

        public java.lang.String getHTML()
        Get HTML
        Returns:
        HTML
      • appendResponsiveCSS

        public void appendResponsiveCSS​(java.lang.String condition,
                                        java.lang.String styles)
        Add responsive CSS styles
        Parameters:
        condition - Condition
        styles - CSS styles
      • appendResponsiveCSS

        public void appendResponsiveCSS​(int width,
                                        boolean min,
                                        java.lang.String styles)
        Add responsive CSS styles
        Parameters:
        width - Width
        min - Min?
        styles - CSS styles
      • appendLayoutCommonCSS

        public void appendLayoutCommonCSS()
        Add common layout CSS styles
      • appendLayout1CSS

        public void appendLayout1CSS​(int leftWidth,
                                     int rightWidth,
                                     int topHeight,
                                     int menuHeight,
                                     int bottomHeight,
                                     int leftMargin,
                                     int rightMargin,
                                     int topMargin,
                                     int bottomMargin)
        Add standard layout CSS styles
        Parameters:
        leftWidth - Left width
        rightWidth - Right width
        topHeight - Top height
        menuHeight - Menu height
        bottomHeight - Bottom height
        leftMargin - Left margin
        rightMargin - Right margin
        topMargin - Top margin
        bottomMargin - Bottom margin
      • appendLayout1CSS

        public void appendLayout1CSS​(int leftWidth,
                                     int rightWidth,
                                     int topHeight,
                                     int menuHeight,
                                     int bottomHeight,
                                     int leftMargin,
                                     int rightMargin,
                                     int topMargin,
                                     int bottomMargin,
                                     int leftResizeWidth,
                                     int rightResizeWidth)
        Add standard layout CSS styles
        Parameters:
        leftWidth - Left width
        rightWidth - Right width
        topHeight - Top height
        menuHeight - Menu height
        bottomHeight - Bottom height
        leftMargin - Left margin
        rightMargin - Right margin
        topMargin - Top margin
        bottomMargin - Bottom margin
        leftResizeWidth - Left resize width
        rightResizeWidth - Right resize width
      • appendLayout2CSS

        public void appendLayout2CSS​(int totalWidth,
                                     int leftWidth,
                                     int rightWidth,
                                     int totalHeight,
                                     int topHeight,
                                     int menuHeight,
                                     int bottomHeight)
        Add variant layout
        Parameters:
        totalWidth - Total width
        leftWidth - Left width
        rightWidth - Right width
        totalHeight - Total height
        topHeight - Top height
        menuHeight - Menu height
        bottomHeight - Bottom height
      • appendLayout2TabletCSS

        public void appendLayout2TabletCSS​(int maxWidth,
                                           int mainWidthPercent,
                                           int leftWidthPercent,
                                           int rightWidthPercent,
                                           java.lang.String styles)
        Add variant layout
        Parameters:
        maxWidth - Max width
        mainWidthPercent - Main width percentage
        leftWidthPercent - Left width percentage
        rightWidthPercent - Right width percentage
        styles - Styles
      • appendLayout2MobileCSS

        public void appendLayout2MobileCSS​(int maxWidth,
                                           boolean left,
                                           boolean right,
                                           java.lang.String styles)
        Add variant layout
        Parameters:
        maxWidth - Max width
        left - Left?
        right - Right?
        styles - Styles
      • appendLayoutHTML

        public void appendLayoutHTML​(java.lang.String main,
                                     java.lang.String left,
                                     java.lang.String right,
                                     java.lang.String top,
                                     java.lang.String menu,
                                     java.lang.String bottom)
        Add layout
        Parameters:
        main - Main content
        left - Left content
        right - Right content
        top - Top content
        menu - Menu content
        bottom - Bottom content
      • appendLayoutHTML

        public void appendLayoutHTML​(java.lang.String main,
                                     java.lang.String left,
                                     boolean leftresize,
                                     java.lang.String lefttgl,
                                     java.lang.String right,
                                     boolean rightresize,
                                     java.lang.String righttgl,
                                     java.lang.String top,
                                     java.lang.String menu,
                                     java.lang.String bottom)
        Add layout
        Parameters:
        main - Main content
        left - Left content
        leftresize - Left resize?
        lefttgl - Left toggle
        right - Right content
        rightresize - Right resize?
        righttgl - Right toggle
        top - Top content
        menu - Menu content
        bottom - Bottom content
      • appendLayoutLeftRightToggleJS

        public void appendLayoutLeftRightToggleJS()
        Add left resize JavaScript
      • appendLayoutLeftRightResizeJS

        public void appendLayoutLeftRightResizeJS()
        Add right resize JavaScript
      • getBodyId

        public java.lang.String getBodyId()
        Get body CSS Id
        Returns:
        Body CSS Id
      • setBodyId

        public void setBodyId​(java.lang.String id)
        Set body DOM Id
        Parameters:
        id - Body DOM Id
      • getBodyCSSClass

        public java.lang.String getBodyCSSClass()
        Get body CSS class
        Returns:
        Body CSS class
      • setBodyCSSClass

        public void setBodyCSSClass​(java.lang.String bodyCSSClass)
        Set body CSS class
        Parameters:
        bodyCSSClass - Body CSS class
      • getLanguage

        public java.lang.String getLanguage()
        Get page language
        Returns:
        Language
      • setLanguage

        public void setLanguage​(java.lang.String language)
        Set page language
        Parameters:
        language - Language
      • start

        public java.lang.String start()
        Start page
        Returns:
        HTML
      • end

        public java.lang.String end()
        End page
        Returns:
        HTML
      • toString

        public java.lang.String toString()
        Full page (start + html + end)
        Overrides:
        toString in class java.lang.Object
        Returns:
        HTML