crystalspace.jbind.interfaces.ivaria.pmeter
Interface iProgressMeter

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csProgressMeter

public interface iProgressMeter
extends iBase

This is a general interface for a progress meter. The engine needs an implementation of this to be able to report progress on calculating lighting and other stuff.

Author:
Java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/devapi/structiProgressMeter.php

Method Summary
 void abort()
          Abort the meter.
 void Finalize()
          Finalize the meter (i.e. we completed the task sooner than expected);.
 int getCurrent()
          Get the current value of the meter ( <= total);.
 int getGranularity()
          Get the refresh granularity.
 int getTotal()
          Get the total element count represented by the meter.
 void reset()
          Reset the meter to 0%.
 void restart()
          Reset the meter and print the initial tick mark ("0%");.
 void setGranularity(int i)
          Set the refresh granularity.
 void setProgressDescription(java.lang.String id, java.lang.String description)
          Set the id and description of what we are currently monitoring.
 void setTotal(int n)
          Set the total element count represented by the meter and perform a reset.
 void step()
          Increment the meter by one unit.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Method Detail

abort

public void abort()
Abort the meter. Implemented in csTextProgressMeter, and csCsLightProgressMeter.


Finalize

public void Finalize()
Finalize the meter (i.e. we completed the task sooner than expected);. Implemented in csTextProgressMeter, and csCsLightProgressMeter.


getCurrent

public int getCurrent()
Get the current value of the meter ( <= total);. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Returns:

getGranularity

public int getGranularity()
Get the refresh granularity. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Returns:

getTotal

public int getTotal()
Get the total element count represented by the meter. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Returns:

reset

public void reset()
Reset the meter to 0%. Implemented in csTextProgressMeter, and csCsLightProgressMeter.


restart

public void restart()
Reset the meter and print the initial tick mark ("0%");. Implemented in csTextProgressMeter, and csCsLightProgressMeter.


setGranularity

public void setGranularity(int i)
Set the refresh granularity. Valid values are 1-100, inclusive. Default is 10. The meter is only refreshed after each "granularity" * number of units have passed. For instance, if granularity is 20, then * the meter will only be updated at most 5 times, or every 20%. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Parameters:
i -

setProgressDescription

public void setProgressDescription(java.lang.String id,
                                   java.lang.String description)
Set the id and description of what we are currently monitoring. An id can be something like "crystalspace.engine.lighting.calculation". Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Parameters:
id -
description -

setTotal

public void setTotal(int n)
Set the total element count represented by the meter and perform a reset. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Parameters:
n -

step

public void step()
Increment the meter by one unit. If the meter reaches 100% it should automatically stop itself. Implemented in csTextProgressMeter, and csCsLightProgressMeter.