org.h2gis.h2spatialapi
Interface ProgressVisitor

All Known Implementing Classes:
EmptyProgressVisitor

public interface ProgressVisitor

Progression information.

Author:
Nicolas Fortin

Field Summary
static String PROPERTY_CANCELED
           
 
Method Summary
 void addPropertyChangeListener(String property, PropertyChangeListener listener)
          Listen for this visitor properties
 void cancel()
          Call this method to cancel the operation
 void endOfProgress()
          Same thing as call setStep(int) with step count.
 void endStep()
          Same as setStep(int) with currentStep++
 double getProgression()
           
 int getStepCount()
           
 boolean isCanceled()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setStep(int idStep)
           
 ProgressVisitor subProcess(int stepCount)
          Create a sub process.
 

Field Detail

PROPERTY_CANCELED

static final String PROPERTY_CANCELED
See Also:
Constant Field Values
Method Detail

subProcess

ProgressVisitor subProcess(int stepCount)
Create a sub process. When this sub process finish it will count as a single step in this process.

Parameters:
stepCount - Number of step into the sub-process.
Returns:

endStep

void endStep()
Same as setStep(int) with currentStep++


setStep

void setStep(int idStep)
Parameters:
idStep - Set the current step, must be in [0-stepCount]

getStepCount

int getStepCount()
Returns:
The step count of this progress

endOfProgress

void endOfProgress()
Same thing as call setStep(int) with step count.


getProgression

double getProgression()
Returns:
This step progression [O-1], take account sub process progression.

isCanceled

boolean isCanceled()
Returns:
True if the process has been canceled

cancel

void cancel()
Call this method to cancel the operation


addPropertyChangeListener

void addPropertyChangeListener(String property,
                               PropertyChangeListener listener)
Listen for this visitor properties

Parameters:
property - Property name one of PROPERTY_CANCELED
listener - Listener instance

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Parameters:
listener - Listener instance


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.