public class DefaultJTaskStatusController extends java.lang.Object implements TaskStatusController, Observer
TaskStatusController
.Constructor and Description |
---|
DefaultJTaskStatusController(javax.swing.JLabel titlelabel,
javax.swing.JLabel messagelabel,
javax.swing.JProgressBar progressBar) |
DefaultJTaskStatusController(TaskStatus taskStatus,
javax.swing.JLabel titlelabel,
javax.swing.JLabel messagelabel,
javax.swing.JProgressBar progressBar) |
DefaultJTaskStatusController(TaskStatus taskStatus,
javax.swing.JLabel titlelabel,
javax.swing.JLabel messagelabel,
javax.swing.JProgressBar progressBar,
javax.swing.JButton cancelRequestButton,
javax.swing.JButton removeTaskButton) |
Modifier and Type | Method and Description |
---|---|
void |
bind(TaskStatus taskStatus) |
void |
bind(TaskStatusManager taskStatusManager) |
boolean |
getShowCancelButton() |
boolean |
getShowRemoveTaskButton() |
SimpleTaskStatus |
getSimpleTaskStatus() |
TaskStatus |
getTaskStatus() |
void |
message(java.lang.String message) |
void |
setCurValue(long value) |
void |
setShowCancelButton(boolean showCancelButton) |
void |
setShowRemoveTaskButton(boolean showRemoveTaskButton) |
void |
setTitle(java.lang.String title) |
void |
setVisible(boolean visible) |
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
public DefaultJTaskStatusController(TaskStatus taskStatus, javax.swing.JLabel titlelabel, javax.swing.JLabel messagelabel, javax.swing.JProgressBar progressBar, javax.swing.JButton cancelRequestButton, javax.swing.JButton removeTaskButton)
public DefaultJTaskStatusController(TaskStatus taskStatus, javax.swing.JLabel titlelabel, javax.swing.JLabel messagelabel, javax.swing.JProgressBar progressBar)
public DefaultJTaskStatusController(javax.swing.JLabel titlelabel, javax.swing.JLabel messagelabel, javax.swing.JProgressBar progressBar)
public void setVisible(boolean visible)
setVisible
in interface TaskStatusController
public boolean getShowCancelButton()
getShowCancelButton
in interface TaskStatusController
public void setShowCancelButton(boolean showCancelButton)
setShowCancelButton
in interface TaskStatusController
public boolean getShowRemoveTaskButton()
getShowRemoveTaskButton
in interface TaskStatusController
public void setShowRemoveTaskButton(boolean showRemoveTaskButton)
setShowRemoveTaskButton
in interface TaskStatusController
public void bind(TaskStatus taskStatus)
bind
in interface TaskStatusController
public void bind(TaskStatusManager taskStatusManager)
bind
in interface TaskStatusController
public void update(Observable observable, java.lang.Object notification)
Observer
Observable
object is changed and this
Observer
has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer
and other Observer
s listening to the same
Observable
.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver
and prepare this method
implementation to handle receiving DefaultComplexNotification
instances
as well as direct notification objects.
public TaskStatus getTaskStatus()
getTaskStatus
in interface TaskStatusController
public SimpleTaskStatus getSimpleTaskStatus()
getSimpleTaskStatus
in interface TaskStatusController
public void setTitle(java.lang.String title)
setTitle
in interface TaskStatusController
public void message(java.lang.String message)
message
in interface TaskStatusController
public void setCurValue(long value)
setCurValue
in interface TaskStatusController