Child pages
  • JSProgressMonitor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#cancel()
Cancels the transfer process.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentBytesToTransfer()
Returns the number of bytes to transfer for the current file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentFileIndex()
Returns the index of the current file being transferred.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentTransferredBytes()
Returns the number of bytes already transferred for the current file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getCurrentTransferredFileName()
Returns the name of the current file being transferred.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalBytesToTransfer()
Returns the total bytes to transfer to or from the server (sum of all the files size)
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalFilesToTransfer()
Returns the total number of files to transfer.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalTransferredBytes()
Returns the total bytes already transferred (for all files)
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isCanceled()
Returns true if the process was canceled.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isFinished()
Returns true if the process is finished.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#setProgressCallBack(progressCallbackFunction, interval, [testDelay])
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
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idcancel
classnode
Table Row (tr)
idname
Table Cell (td)
cancel
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
cancel
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Cancels the transfer process.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getCurrentBytesToTransfer
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getCurrentBytesToTransfer
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the number of bytes to transfer for the current file.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getCurrentFileIndex
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getCurrentFileIndex
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the index of the current file being transferred.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getCurrentTransferredBytes
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getCurrentTransferredBytes
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the number of bytes already transferred for the current file.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getCurrentTransferredFileName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getCurrentTransferredFileName
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the name of the current file being transferred.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getTotalBytesToTransfer
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getTotalBytesToTransfer
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
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
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
classnode
Table Row (tr)
idname
Table Cell (td)
getTotalFilesToTransfer
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getTotalFilesToTransfer
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the total number of files to transfer.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
getTotalTransferredBytes
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getTotalTransferredBytes
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the total bytes already transferred (for all files)
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
isCanceled
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
isCanceled
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns true if the process was canceled.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
isFinished
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
isFinished
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns true if the process is finished.
Table Row (tr)
idret
Table Cell (td)
Returns
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
classnode
Table Row (tr)
idname
Table Cell (td)
setProgressCallBack
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSProgressMonitor
Span
stylefloat: left; font-weight: bold;
idiets
setProgressCallBack
Span
stylefloat: left;
idiets
(progressCallbackFunction, interval, [testDelay])
Table Row (tr)
iddes
Table Cell (td)
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
progressCallbackFunction
interval
[testDelay]
Table Row (tr)
idret
Table Cell (td)
Returns
JSProgressMonitor
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)