commandbox.system.util

Class ProgressBar

lucee.Component
    extended by commandbox.system.util.ProgressBar

Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com Prints out a progress bar to the screen.

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano, Denny Valliant
  •  
    Property Summary
    type property default serializable required
    any job


    • access = public
    • returntype = any
    • inject = provider:InteractiveJob
    true false
    any print


    • access = public
    • returntype = any
    • inject = Print
    true false
    any shell


    • access = public
    • returntype = any
    • inject = shell
    true false
    any system


    • access = public
    • returntype = any
    • inject = system@constants
    true false
    Constructor Summary
    init()
    Method Summary
    any clear()
    any formatExecTime([any sec])
    private any formatSize([any sizeKB], [any numberChars])
    any update(numeric percent, numeric totalSizeKB, numeric completeSizeKB, numeric speedKBps)
         Call me to update the screen.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Property Detail

    job

    property any job

    Attributes:
    access - public
    required - false
    returntype - any
    inject - provider:InteractiveJob
    serializable - true

    print

    property any print

    Attributes:
    access - public
    required - false
    returntype - any
    inject - Print
    serializable - true

    shell

    property any shell

    Attributes:
    access - public
    required - false
    returntype - any
    inject - shell
    serializable - true

    system

    property any system

    Attributes:
    access - public
    required - false
    returntype - any
    inject - system@constants
    serializable - true

    Method Detail

    clear

    public any clear()


    formatExecTime

    public any formatExecTime([any sec])

    Parameters:
    sec

    formatSize

    private any formatSize([any sizeKB], [any numberChars])

    Parameters:
    sizeKB
    numberChars

    update

    public any update(numeric percent, numeric totalSizeKB, numeric completeSizeKB, numeric speedKBps)

    Call me to update the screen. If another thread outputs to the console in the mean time, it will mess it up. This method assumes it's on a fresh line with the cursor at the far left. Will print a line break if the percent is 100

    Parameters:
    percent
    totalSizeKB
    completeSizeKB
    speedKBps