|
SOA © 2004 SoS Group All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sos.koa.Task
Class which reacts to buttons in the menu.
Class Specifications |
invariant 0 <= subTaskCount&&subTaskCount <= maxSubTasks; |
Nested Class Summary | |
(package private) class |
Task.ActionThread
Inner class that runs this task's doAction
method. |
(package private) class |
Task.MonitoredThread
Inner class to monitor the ActionThread . |
Field Summary | |
[spec_public] (package private) int |
maxSubTasks
The (estimated) maximum number of sub-tasks. |
(package private) javax.swing.ProgressMonitor |
monitor
Progress monitor. |
(package private) boolean |
stillWorking
Whether doAction is still running. |
[spec_public] (package private) int |
subTaskCount
The current sub-task. |
(package private) boolean |
success
Success status of this task. |
Constructor Summary | |
(package private) |
Task()
Constructs this task. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
Gets called when the button associated to this task is pressed. |
(package private) void |
clear()
Clears temporary memory used by this task. |
(package private) abstract void |
doAction()
Performs the actual work of this task. |
(package private) java.lang.Object |
getAdditionalInfo()
Gets even more information about this (completed) task. |
(package private) abstract java.lang.String |
getFailureMessage()
What to print in failure dialog. |
(package private) java.lang.String |
getInfo()
Gets information that should be displayed if this task completes successfully. |
(package private) abstract java.lang.String |
getSuccessMessage()
What to print in success dialog. |
(package private) abstract int |
getSuccessState()
The application state after successful termination of this task. |
(package private) abstract java.lang.String |
getTitle()
The title of this task. |
(package private) java.lang.String |
getWarningMessage()
What to print in warning dialog used to ask user if he/she is sure to perform this task. |
(package private) boolean |
isAdditionalInfoAvailable()
Indicates whether even more information is available about this (completed) task. |
(package private) boolean |
isCancelableTask()
Indicates whether the effect of this task can be undone (and whether the user should be given the option to undo the task). |
(package private) boolean |
isDangerousTask()
Indicates whether the user should be warned that we're about to start this task. |
(package private) boolean |
isModalTask()
Indicates whether this task influences the application's state and whether the GUI should be disabled until this task completes. |
(package private) abstract boolean |
isPreStateAllowed(int state)
|
(package private) boolean |
isProgressMonitoredTask()
Indicates whether a progress monitor should be popped up. |
(package private) void |
logCanceled()
Writes a 'task canceled' entry in the log. |
(package private) void |
logCompleted()
Writes a 'task completed' entry in the log. |
(package private) void |
logFailed(java.lang.String reason)
Writes a 'task failed' entry in the log. |
(package private) void |
logOpenedFile(java.io.File file)
Writes a 'task opened file' entry in the log. |
(package private) void |
logStarted()
Writes a 'task started' entry in the log. |
(package private) void |
popupAdditionalInfo()
Pops up a dialog. |
(package private) int |
popupAdditionalInfo(java.lang.Object[] options)
Pops up a dialog. |
(package private) void |
popupFailure(java.lang.String info)
Pops up a dialog. |
(package private) java.io.File |
popupGetFile(java.lang.String extension,
java.lang.String description)
Pops up a dialog. |
(package private) java.lang.String |
popupGetPassword()
Pops up a dialog. |
(package private) boolean |
popupNext()
Pops up a dialog. |
(package private) boolean |
popupNextOrBack()
Pops up a dialog. |
(package private) void |
popupSuccess()
Pops up a dialog. |
(package private) boolean |
popupWarning()
Pops up a dialog. |
(package private) void |
setMaxSubTasks(int maxSubTasks)
Sets the (estimated) maximum number of sub-tasks. |
(package private) void |
setSubTaskCount(int subTaskCount)
Sets the number of already completed subtasks. |
(package private) void |
stopAction()
What to do to halt the execution of the doAction method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
int subTaskCount
int maxSubTasks
boolean success
boolean stillWorking
doAction
is still running.
javax.swing.ProgressMonitor monitor
Constructor Detail |
Task()
Method Detail |
boolean isDangerousTask()
false
.boolean isProgressMonitoredTask()
false
.boolean isModalTask()
true
.boolean isCancelableTask()
false
.void setSubTaskCount(int subTaskCount)
subTaskCount
- the number of already completed subtasks.java.lang.String getInfo()
boolean isAdditionalInfoAvailable()
java.lang.Object getAdditionalInfo()
Object
can be used in a dialog message.
void setMaxSubTasks(int maxSubTasks)
maxSubTasks
- the new (estimated) maximum number of sub-tasks.abstract java.lang.String getTitle()
abstract java.lang.String getSuccessMessage()
abstract java.lang.String getFailureMessage()
java.lang.String getWarningMessage()
abstract boolean isPreStateAllowed(int state)
abstract int getSuccessState()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
ae
- Event indicating the button is pressed.abstract void doAction() throws KOAException
KOAException
- if something goes wrong.void stopAction()
doAction
method.
void clear()
void logStarted()
void logCanceled()
void logOpenedFile(java.io.File file)
void logFailed(java.lang.String reason)
void logCompleted()
java.io.File popupGetFile(java.lang.String extension, java.lang.String description) throws KOAException
KOAException
java.lang.String popupGetPassword()
void popupSuccess()
boolean popupWarning()
boolean popupNextOrBack()
boolean popupNext()
void popupFailure(java.lang.String info)
void popupAdditionalInfo()
int popupAdditionalInfo(java.lang.Object[] options)
|
SOA © 2004 SoS Group All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |