Child pages
  • JSProgressMonitor

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381948887907

...

HTML Table
id
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)
#cancelcancel()
Cancels the transfer process.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentBytesToTransfergetCurrentBytesToTransfer()
Returns the number of bytes to transfer for the current file.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentFileIndexgetCurrentFileIndex()
Returns the index of the current file being transferred.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentTransferredBytesgetCurrentTransferredBytes()
Returns the number of bytes already transferred for the current file.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getCurrentTransferredFileNamegetCurrentTransferredFileName()
Returns the name of the current file being transferred.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalBytesToTransfergetTotalBytesToTransfer()
Returns the total bytes to transfer to or from the server (sum of all the files size)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalFilesToTransfergetTotalFilesToTransfer()
Returns the total number of files to transfer.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalTransferredBytesgetTotalTransferredBytes()
Returns the total bytes already transferred (for all files)
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isCanceledisCanceled()
Returns true if the process was canceled.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isFinishedisFinished()
Returns true if the process is finished.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSProgressMonitor
Table Cell (td)
#setProgressCallBacksetProgressCallBack(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)
#setProgressCallBacksetProgressCallBack(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
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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)