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 : true
  •  
  • persistent : false
  •  
  • author : Brad Wood, Luis Majano, Denny Valliant
  •  
    Property Summary
    type property default serializable required
    any ConsolePainter


    • access = public
    • returntype = any
    • inject = provider:ConsolePainter
    true false
    boolean active


    • access = public
    • returntype = any
    false true false
    any job


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


    • access = public
    • returntype = any
    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])
    string getActive()
    string getConsolePainter()
    string getJob()
    any getLines()
    string getMemento()
    string getPrint()
    string getShell()
    string getSystem()
    any setActive(boolean active)
    any setConsolePainter(any ConsolePainter)
    any setJob(any job)
    any setMemento(struct memento)
    any setPrint(any print)
    any setShell(any shell)
    any setSystem(any system)
    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

    ConsolePainter

    property any ConsolePainter

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

    active

    property boolean active = [false]

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

    job

    property any job

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

    memento

    property struct memento

    Attributes:
    access - public
    required - false
    returntype - any
    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

    getActive

    public string getActive()


    getConsolePainter

    public string getConsolePainter()


    getJob

    public string getJob()


    getLines

    public any getLines()


    getMemento

    public string getMemento()


    getPrint

    public string getPrint()


    getShell

    public string getShell()


    getSystem

    public string getSystem()


    setActive

    public any setActive(boolean active)

    Parameters:
    active

    setConsolePainter

    public any setConsolePainter(any ConsolePainter)

    Parameters:
    ConsolePainter

    setJob

    public any setJob(any job)

    Parameters:
    job

    setMemento

    public any setMemento(struct memento)

    Parameters:
    memento

    setPrint

    public any setPrint(any print)

    Parameters:
    print

    setShell

    public any setShell(any shell)

    Parameters:
    shell

    setSystem

    public any setSystem(any system)

    Parameters:
    system

    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