public class IlvProgressMonitor extends ProgressMonitor
ProgressMonitor.AccessibleProgressMonitor
Modifier and Type | Field and Description |
---|---|
static String |
END_PROGRESS_MESSAGE
Message sent to the application to notify that a task has ended.
|
static String |
NEW_PROGRESS_VALUE_MESSAGE
Message sent to the application to notify a new progression value of the
task.
|
static String |
START_PROGRESS_MESSAGE
Message sent to the application to notify that a task has started.
|
accessibleContext
Constructor and Description |
---|
IlvProgressMonitor(Action action,
IlvApplication application,
Object message,
String note,
int min,
int max)
Constructs a new progress monitor associated with the processing of the
specified
action in a separate thread. |
IlvProgressMonitor(IlvApplication application,
Object message,
String note,
int min,
int max)
Constructs a new progress monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Indicates that the task monitored by this object is complete.
|
IlvApplication |
getApplication()
Returns the application of the monitor.
|
String |
getMessage()
Returns the message describing the task monitored by this object.
|
String |
getName()
Returns the name that identifies the task that this monitor is associated with.
|
void |
incrementProgressValue(int value)
Increments the progression value to the specified
value . |
boolean |
isCanceled()
Returns
true if the user clicks the Cancel button in the
progress dialog. |
boolean |
isInProgress()
Determines whether the task that this monitor is associated with is in progress.
|
void |
setApplication(IlvApplication application)
Sets the application of the monitor.
|
void |
setName(String name)
Sets a new name for identifying the task that this monitor is associated with.
|
void |
setProgress(int newValue)
Sets a new progression value.
|
getAccessibleContext, getMaximum, getMillisToDecideToPopup, getMillisToPopup, getMinimum, getNote, setMaximum, setMillisToDecideToPopup, setMillisToPopup, setMinimum, setNote
public static final String START_PROGRESS_MESSAGE
IlvProgressMonitor
associated with the task being started as the parameter.public static final String NEW_PROGRESS_VALUE_MESSAGE
IlvProgressMonitor
associated with the task as the parameter.public static final String END_PROGRESS_MESSAGE
IlvProgressMonitor
associated with the task as the parameter.public IlvProgressMonitor(IlvApplication application, Object message, String note, int min, int max)
application
- The application the task in running in.message
- A descriptive message that will be shown
to the user to indicate what operation is being monitored.
See the constructor of the
javax.swing.ProgressMonitor
class for more information.
It is recommended that this message be a key to a string resource.note
- A short note describing the state of the
operation. See the constructor of the
javax.swing.ProgressMonitor
class for more information.
It is recommended that this message be a key to a string resource.min
- The lower bound of the rangemax
- The upper bound of the rangegetApplication()
,
setApplication(ilog.views.appframe.IlvApplication)
public IlvProgressMonitor(Action action, IlvApplication application, Object message, String note, int min, int max)
action
in a separate thread.action
- The action in the thread. This action must have the property
ilog.views.appframe.IlvAction.ACTION_PROCESSED_IN_NEW_THREAD
equal to Boolean.TRUE
.application
- The application the task is running in.message
- A descriptive message that will be shown
to the user to indicate what operation is being monitored.
See the constructor of the
javax.swing.ProgressMonitor
class for more information.
It is recommended that this message be a key to a string resource.
If null
, the Action.LONG_DESCRIPTION
property of the specified action
will be used.note
- A short note describing the state of the
operation. See the constructor of the
javax.swing.ProgressMonitor
class for more information.
It is recommended that this message be a key to a string resource.min
- The lower bound of the rangemax
- The upper bound of the rangepublic String getName()
setName(java.lang.String)
public void setName(String name)
name
- The new identifier name of the task.getName()
public IlvApplication getApplication()
public void setApplication(IlvApplication application)
application
- The application of the monitor.getApplication()
public void setProgress(int newValue)
setProgress
in class ProgressMonitor
newValue
- The new current value, between the maximum and minimum
specified for this monitor.incrementProgressValue(int)
public void incrementProgressValue(int value)
value
.value
- The incremental value to add to the current progression value.setProgress(int)
public void close()
setProgress
is >= max
,
but it may be called earlier if the operation ends early.close
in class ProgressMonitor
public boolean isInProgress()
true
if the task is in progress; false
otherwise.public boolean isCanceled()
true
if the user clicks the Cancel button in the
progress dialog.isCanceled
in class ProgressMonitor
public String getMessage()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.