public interface ActivityModel
extends javax.swing.BoundedRangeModel
Every progress model should add itself to the ActivityManager
after it has been created.
Framework
The interfaces and classes listed below define a framework for progress
management.
Contract: ActivityManager, ActivityModel,
JActivityWindow, JActivityIndicator.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CANCELABLE_PROPERTY |
static java.lang.String |
CANCELED_PROPERTY |
static java.lang.String |
CLOSED_PROPERTY |
static java.lang.String |
ERROR_PROPERTY |
static java.lang.String |
INDETERMINATE_PROPERTY |
static java.lang.String |
NOTE_PROPERTY |
static java.lang.String |
WARNING_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener.
|
void |
cancel()
Cancels the operation.
|
void |
close()
Indicate that the operation is closed.
|
java.lang.String |
getError()
Specifies the error message that is displayed along with the
progress message.
|
java.lang.String |
getNote()
Specifies the additional note that is displayed along with the
progress message.
|
java.lang.Object |
getOwner()
Gets the owner of the progress model.
|
java.lang.String |
getTitle()
Returns the title of the progress model.
|
java.lang.String |
getWarning()
Specifies the warning message that is displayed along with the
progress message.
|
boolean |
isCancelable()
Returns true if the operation can be canceled.
|
boolean |
isCanceled()
Returns true if the user has hit the Cancel button in the progress dialog.
|
boolean |
isClosed()
Returns true if the operation is completed.
|
boolean |
isIndeterminate()
Returns true if the progress observer is set to indeterminate.
|
void |
printf(java.lang.String format,
java.lang.Object... args)
Sets a formatted note.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener.
|
void |
setCancelable(boolean b)
Set cancelable to false if the operation can not be canceled.
|
void |
setDoCancel(java.lang.Runnable doCancel)
The specified Runnable is executed when the user presses
the cancel button.
|
void |
setError(java.lang.String message)
Specifies the additional error message that is displayed along with the
progress message.
|
void |
setIndeterminate(boolean newValue)
Sets the progress observer to indeterminate.
|
void |
setNote(java.lang.String note)
Specifies the additional note that is displayed along with the
progress message.
|
void |
setWarning(java.lang.String message)
Specifies the additional warning message that is displayed along with the
progress message.
|
static final java.lang.String INDETERMINATE_PROPERTY
static final java.lang.String NOTE_PROPERTY
static final java.lang.String WARNING_PROPERTY
static final java.lang.String ERROR_PROPERTY
static final java.lang.String CANCELABLE_PROPERTY
static final java.lang.String CANCELED_PROPERTY
static final java.lang.String CLOSED_PROPERTY
java.lang.Object getOwner()
View
or a Application.void setCancelable(boolean b)
boolean isCancelable()
void setDoCancel(java.lang.Runnable doCancel)
void setIndeterminate(boolean newValue)
boolean isIndeterminate()
void close()
ActivityManager
it MUST remove itself now.boolean isClosed()
void cancel()
boolean isCanceled()
void setNote(java.lang.String note)
Only set a note if you have something important to tell. Setting a note is a time consuming operation because the GUI components ensure that the note is displayed on the screen before they let the activity model continue.
note - a String specifying the note to displaygetNote()void printf(java.lang.String format,
java.lang.Object... args)
Only set a note if you have something important to tell. Setting a note is a time consuming operation because the GUI components ensure that the note is displayed on the screen before they let the activity model continue.
java.lang.String getNote()
setNote(java.lang.String)void setWarning(java.lang.String message)
message - a String specifying the message to display, or null
if there is no warning.getWarning()java.lang.String getWarning()
void setError(java.lang.String message)
message - a String specifying the message to display, or null
if there is no error.getWarning()java.lang.String getError()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
java.lang.String getTitle()