Child pages
  • JSProgressMonitor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table Cell (td)
Number

...

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.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
Divcache
styleindexdisplay:none

...

iddescription

...

padding0px
width80px

...

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.
true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

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 Cell (td)
Number

...

...

Returns the index of the current file being transferred.

...

Table Cell (td)
Number

...

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

...

Table Cell (td)
String

...

Returns the name of the current file being transferred.

...

Table Cell (td)
Number

...

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

...

Table Cell (td)
Number

...

)

...

Returns the total number of files to transfer.

...

Table Cell (td)
Number

...

Returns the total bytes already transferred (for all files)

...

Table Cell (td)
Boolean

...

...

Returns true if the process was canceled.

...

Table Cell (td)
Boolean
Returns true if the process is finished.

...

Table Cell (td)
JSProgressMonitor

...

Table Cell (td)
JSProgressMonitor

...

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.

...

...

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.

...

...

function

...

servoy sDetail

...

padding0px
width100%

...

2100%height:30px

...

Table Head (th)
colspan1
Method Details

...

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();

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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!')
}

...

classlastDetailRow

...

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));

...

classlastDetailRow

...

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));

...

classlastDetailRow

...

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 this for chaining
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 this for chaining
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow