public abstract class DataProcess extends ProcessParamsManagement implements IIncrementable, IncrementableListener, java.lang.Runnable, org.gvsig.tools.dispose.Disposable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Thread |
blinker |
protected IProcessActions |
externalActions |
protected IncrementableTask |
incrementableTask |
protected org.slf4j.Logger |
logger |
protected org.gvsig.fmap.dal.coverage.process.TaskEventManager |
taskEventManager |
protected java.util.Hashtable<java.lang.String,java.lang.Object> |
taskParams |
inputParameters, OUTPUT_HEIGHT, OUTPUT_WIDTH, outputParameters, PREVIEW, PROCESS, PROCESS_NAME, REGISTER_INPUT_PARAMETERS_LABEL, REGISTER_OUTPUT_PARAMETERS_LABEL, ROI_EPSG, TIME, WINDOWdoubleNODATA| Constructor and Description |
|---|
DataProcess() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionCanceled(IncrementableEvent e)
Un evento de cancelado es enviado a la tarea cuando actionCanceled es activado.
|
void |
actionResumed(IncrementableEvent e)
Invocado cuando se aprieta el boton Resumir de la ventana
|
void |
actionSuspended(IncrementableEvent e)
Invocado cuando se aprieta el boton Suspender de la ventana
|
protected void |
addOutputValue(java.lang.String key,
java.lang.Object value)
Adds a output from the process in runtime
|
void |
dispose() |
void |
execute()
Sequential execution of this task
|
protected void |
finalize() |
IProcessActions |
getActions()
Gets the object to execute external actions.
|
IncrementableTask |
getIncrementableTask()
Builds the window
IncrementableTask to show
the increment of the task. |
java.lang.String |
getLabel()
Gets the last line in the increment window
|
java.lang.String |
getLog()
Gets the log of the increment window
|
java.lang.String |
getName() |
int |
getPercent()
Devuelve el porcentaje de 0 a 100 de la ventana IncrementableTask
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getResult()
Gets the result of the process.
|
long |
getTime()
Gets the time that a task lasts
|
IProcessActions |
getUniqueProcessActions()
Gets the object to execute actions in the queue of processes
|
abstract void |
init()
A specific task will load parameters using this initialization.
|
protected void |
insertLineLog(java.lang.String line)
Inserts a new line in the increment window
|
boolean |
isCancelable()
Determines if this process can be canceled.
|
boolean |
isPausable()
Determines if this process can be paused.
|
abstract void |
process()
This call will be implemented by a specific process.
|
void |
run()
This method will be executed by the Thread.
|
void |
setActions(IProcessActions actions)
Sets the object to execute external actions.
|
void |
setCancelable(boolean enabled)
Sets the button to cancel the task
|
void |
setName(java.lang.String name) |
void |
setProgressActive(boolean active)
When the process is launched in a thread, this method enables or disables
the GUI to show the progress.
|
void |
setUniqueProcessActions(IProcessActions actions)
Asigna el objeto para ejecutar acciones externar.
|
void |
showIncrementableWindow()
Show the increment of this task
IncrementableTask |
void |
start()
Starts the process.
|
void |
updatePercent(int parcial,
int total)
Updates the percentaje of progress and manages the cancelation
|
addParam, getBooleanParam, getByteParam, getDoubleArrayParam, getDoubleParam, getExtentParam, getFloatParam, getIntArrayParam, getIntParam, getOutputHeight, getOutputWidth, getOutputWindow, getParam, getParameterClassList, getParameterTypeByProcess, getRasterTaskInputParameters, getRasterTaskOutputParameters, getROIEPSG, getStringParam, isForPreviews, isOutputRescaled, loadGlobalParameters, registerGlobalInputParameters, registerGlobalOutputParameters, registerInputParameter, registerOutputParameter, removeParamcreateOutputBuffer, createOutputBuffer, createSourceBuffer, debug, exportRaster, exportRaster, exportRaster, exportRaster, getData, getExtentResult, getIntersectionInPxCoords, getSourcePxBox, isAnalizedEntireLayer, isInsideOfROI, messageBoxError, messageBoxError, messageBoxErrorclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTitleprotected volatile java.lang.Thread blinker
protected IProcessActions externalActions
protected IncrementableTask incrementableTask
protected org.slf4j.Logger logger
protected org.gvsig.fmap.dal.coverage.process.TaskEventManager taskEventManager
protected java.util.Hashtable<java.lang.String,java.lang.Object> taskParams
public void actionCanceled(IncrementableEvent e)
actionCanceled in interface IncrementableListenerpublic void actionResumed(IncrementableEvent e)
IncrementableListeneractionResumed in interface IncrementableListenerpublic void actionSuspended(IncrementableEvent e)
IncrementableListeneractionSuspended in interface IncrementableListenerprotected void addOutputValue(java.lang.String key,
java.lang.Object value)
key - value - public void dispose()
dispose in interface org.gvsig.tools.dispose.Disposablepublic void execute()
throws org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException,
ProcessException
ProcessExceptionorg.gvsig.fmap.dal.coverage.exception.ProcessInterruptedExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class ProcessParamsManagementjava.lang.Throwablepublic IProcessActions getActions()
public IncrementableTask getIncrementableTask()
IncrementableTask to show
the increment of the task.public java.lang.String getLabel()
getLabel in interface IIncrementablepublic java.lang.String getLog()
getLog in interface IIncrementablepublic java.lang.String getName()
public int getPercent()
IIncrementablegetPercent in interface IIncrementablepublic java.util.HashMap<java.lang.String,java.lang.Object> getResult()
IProcessActions when the task
is thrown in a thread or is recovered by the user when the task is thrown sequentially.public long getTime()
public IProcessActions getUniqueProcessActions()
public abstract void init()
protected void insertLineLog(java.lang.String line)
public boolean isCancelable()
IIncrementableDetermines if this process can be canceled.
isCancelable in interface IIncrementabletrue if this process can be canceled, otherwise falsepublic boolean isPausable()
IIncrementableDetermines if this process can be paused.
isPausable in interface IIncrementabletrue if this process can be paused, otherwise falsepublic abstract void process()
throws org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException,
ProcessException
java.lang.InterruptedExceptionorg.gvsig.fmap.dal.coverage.exception.ProcessInterruptedExceptionProcessExceptionpublic void run()
execute function.run in interface java.lang.Runnablepublic void setActions(IProcessActions actions)
public void setCancelable(boolean enabled)
public void setName(java.lang.String name)
public void setProgressActive(boolean active)
public void setUniqueProcessActions(IProcessActions actions)
IProcessActions - public void showIncrementableWindow()
IncrementableTaskpublic void start()
public void updatePercent(int parcial,
int total)
throws org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException
parcial - total - org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedExceptionCopyright © 2015 gvSIG Association. All Rights Reserved.