|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectEventObject
ProcessEvent
public class ProcessEvent
Event sent by a running process to its listeners. This event contains an optional user-friendly task description together with the task progression as a percentage. In addition the event can contains one of the following:
ParameterValueGroup which contain either the final calculation result when
the process completed, or intermediate values
while the process is still progressing.Exception which describe either the fatal error why the process
failed, or non-fatal warnings while the process
is still progressing.
| utility/geotk-utility (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
ProcessEvent(Process source)
Creates a new event with the given source but no message, no exception and an undetermined progress state. |
|
ProcessEvent(Process source,
CharSequence task,
float progress)
Creates a new event with the given source, task and progress. |
|
ProcessEvent(Process source,
CharSequence task,
float progress,
Exception exception)
Creates a new event with the given source, task, progress and exception. |
|
ProcessEvent(Process source,
CharSequence task,
float progress,
ParameterValueGroup output)
Creates a new event with the given source, task, progress and output. |
|
| Method Summary | |
|---|---|
Exception |
getException()
Returns an error or warning that occurred while executing the task, or null if none. |
ParameterValueGroup |
getOutput()
Returns the output, which may be an intermediate calculation or the final result. |
float |
getProgress()
Returns the current progress as a percent completed, from 0 to 100 inclusive. |
Process |
getSource()
Returns the source of this event. |
InternationalString |
getTask()
Returns a message that describes the task under execution, or null if none. |
String |
toString()
Returns a string representation of this event. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessEvent(Process source)
source - The source of this event.
public ProcessEvent(Process source,
CharSequence task,
float progress)
source - The source of this event.task - A message that describe the task under execution, or null if none.progress - The progress as a number between 0 and 100, or Float.NaN if undetermined.
public ProcessEvent(Process source,
CharSequence task,
float progress,
ParameterValueGroup output)
source - The source of this event.task - A message that describe the task under execution, or null if none.progress - The progress as a number between 0 and 100, or Float.NaN if undetermined.output - The output (intermediate calculation of final result), or null if none.
public ProcessEvent(Process source,
CharSequence task,
float progress,
Exception exception)
source - The source of this event.task - A message that describe the task under execution, or null if none.progress - The progress as a number between 0 and 100, or Float.NaN if undetermined.exception - An error or warning that occurred while executing the task, or null if none.| Method Detail |
|---|
public Process getSource()
getSource in class EventObjectpublic InternationalString getTask()
null if none.
The message may contain user friendly information provided by the process. This message
may be show in a dialog box or elsewhere, at listener choice.
null if none.public float getProgress()
NaN value means that the process is in an undetermined state.
Float.NaN if undetermined.public ParameterValueGroup getOutput()
ProcessListener.progressing(ProcessEvent)
then the output (if non-null) is an intermediate calculation.ProcessListener.completed(ProcessEvent)
then the output is the same final result than the one returned by
Process.call().
null if none.public Exception getException()
null if none.
The exception is considered fatal if this ProcessEvent was given to the
ProcessListener.failed(ProcessEvent) method. Otherwise the exception is
considered as a warning only.
null if none.public String toString()
toString in class EventObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||