Child pages
  • JSProgressMonitor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
Div
iddescription
HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
cancel()
Cancels the transfer process.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)getCurrentBytesToTransfer()
styleindexdisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable
id

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryCancels the transfer process.Returns the number of bytes to transfer for the current file. Table Row (tr)

Table Cell (td)
Number
Table Cell (td)getCurrentFileIndex()
Table Cell (td)
Number
Table Cell (td)getCurrentTransferredBytes()
Returns the index of the current file being transferred. Table Row (tr)Returns the number of bytes already transferred for the current file. Table Row (tr)
Table Cell (td)
String
Table Cell (td)getCurrentTransferredFileName()
Returns the name of the current file being transferred. Table Row (tr)
Table Cell (td)
Number
Table Cell (td)getTotalBytesToTransfer()
Table Cell (td)
Number
Table Cell (td)getTotalFilesToTransfer()
Returns the total bytes to transfer to or from the server (sum of all the files size) Table Row (tr) Table Cell (td)getTotalTransferredBytes()
Returns the total number of files to transfer. Table Row (tr)
Table Cell (td)
Number
Returns the total bytes already transferred (for all files) Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)isCanceled()
Table Cell (td)
Boolean
Table Cell (td)isFinished()
Returns true if the process was canceled. Table Row (tr)Returns true if the process is finished. Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)setProgressCallBack(function, interval)
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)setProgressCallBack(function, interval, delay)
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. HTML Table

functionclass Colgroup Tag Colcolspanservoy sDetail2width100%

Col
Table Head (thead) Table Row (tr)styleheight:30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idcancel
Table Row (tr)
idname
Table Cell (td)

cancel

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
cancel
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Cancels the transfer process.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
monitor.cancel();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentBytesToTransfer
Table Row (tr)
idname
Table Cell (td)

getCurrentBytesToTransfer

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getCurrentBytesToTransfer
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the number of bytes to transfer for the current file.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentFileIndex
Table Row (tr)
idname
Table Cell (td)

getCurrentFileIndex

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getCurrentFileIndex
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the index of the current file being transferred.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentTransferredBytes
Table Row (tr)
idname
Table Cell (td)

getCurrentTransferredBytes

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getCurrentTransferredBytes
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the number of bytes already transferred for the current file.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCurrentTransferredFileName
Table Row (tr)
idname
Table Cell (td)

getCurrentTransferredFileName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getCurrentTransferredFileName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the name of the current file being transferred.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTotalBytesToTransfer
Table Row (tr)
idname
Table Cell (td)

getTotalBytesToTransfer

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getTotalBytesToTransfer
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the total bytes to transfer to or from the server (sum of all the files size)
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTotalFilesToTransfer
Table Row (tr)
idname
Table Cell (td)

getTotalFilesToTransfer

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getTotalFilesToTransfer
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the total number of files to transfer.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetTotalTransferredBytes
Table Row (tr)
idname
Table Cell (td)

getTotalTransferredBytes

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getTotalTransferredBytes
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns the total bytes already transferred (for all files)
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisCanceled
Table Row (tr)
idname
Table Cell (td)

isCanceled

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
isCanceled
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns true if the process was canceled.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisFinished
Table Row (tr)
idname
Table Cell (td)

isFinished

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
isFinished
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns true if the process is finished.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
	application.output('canceled!')
}
if (monitor.isFinished()) {
	application.output('finished!')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetProgressCallBack-Function_Number
Table Row (tr)
idname
Table Cell (td)

setProgressCallBack

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
setProgressCallBack
Span
(function, interval)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. Can use an optional delay (for testing purpose in developer).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Function} function - the Function to call back at the specified interval
{Number} interval - the interval (in seconds) to use
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
JSProgressMonitor - this for chaining
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// call the progressCallbackFuntion every 2 and a half seconds (with a delay of 200ms in developer):
monitor.setProgressCallBack(progressCallbackFunction, 2.5, (application.isInDeveloper() ? 200 : 0));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetProgressCallBack-Function_Number_Number
Table Row (tr)
idname
Table Cell (td)

setProgressCallBack

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
JSProgressMonitor
Span
stylefont-weight: bold;
setProgressCallBack
Span
(function, interval, delay)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. Can use an optional delay (for testing purpose in developer).
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Function} function - the Function to call back at the specified interval
{Number} interval - the interval (in seconds) to use
{Number} delay - adds a delay for testing purpose in Developer
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
JSProgressMonitor - this for chaining
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// call the progressCallbackFuntion every 2 and a half seconds (with a delay of 200ms in developer):
monitor.setProgressCallBack(progressCallbackFunction, 2.5, (application.isInDeveloper() ? 200 : 0));
Table Row (tr)
classlastDetailRow
Table Cell (td) 2Methods Detailscancelname

cancel()

dessIndent
Cancels the transfer process.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentBytesToTransfername

getCurrentBytesToTransfer()

dessIndent
Returns the number of bytes to transfer for the current file.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentFileIndexname

getCurrentFileIndex()

dessIndent
Returns the index of the current file being transferred.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentTransferredBytesname

getCurrentTransferredBytes()

dessIndent
Returns the number of bytes already transferred for the current file.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentTransferredFileNamename

getCurrentTransferredFileName()

dessIndent
Returns the name of the current file being transferred.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTotalBytesToTransfername

getTotalBytesToTransfer()

dessIndent
Returns the total bytes to transfer to or from the server (sum of all the files size)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTotalFilesToTransfername

getTotalFilesToTransfer()

dessIndent
Returns the total number of files to transfer.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTotalTransferredBytesname

getTotalTransferredBytes()

dessIndent
Returns the total bytes already transferred (for all files)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isCanceledname

isCanceled()

dessIndent
Returns true if the process was canceled.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isFinishedname

isFinished()

dessIndent
Returns true if the process is finished.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setProgressCallBackname

setProgressCallBack(function, interval)

dessIndent
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. Can use an optional delay (for testing purpose in developer).
prs

Parameters

sIndentfunctionthe Function to call back at the specified intervalintervalthe interval (in seconds) to use
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setProgressCallBackname

setProgressCallBack(function, interval, delay)

dessIndent
Sets a method to be called repeatedly at the given interval (in seconds), the method will receive an instance of this JSProgressMonitor updated with the latest values. Can use an optional delay (for testing purpose in developer).
prs

Parameters

sIndentfunctionthe Function to call back at the specified intervalintervalthe interval (in seconds) to usedelayadds a delay for testing purpose in Developer
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow