crystalspace.jbind.impl.varia.pmeter
Class csProgressMeter

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.varia.pmeter.csProgressMeter
All Implemented Interfaces:
iBase, iPointer, iProgressMeter

public class csProgressMeter
extends csBase
implements iProgressMeter

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csProgressMeter(iPointer nPointer)
           
 
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.
 java.lang.String getName()
          Return the name of the interface
 int getTotal()
          Get the total element count represented by the meter.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 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 class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csProgressMeter

public csProgressMeter(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

abort

public void abort()
Description copied from interface: iProgressMeter
Abort the meter. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
abort in interface iProgressMeter
See Also:
iProgressMeter.abort()

Finalize

public void Finalize()
Description copied from interface: iProgressMeter
Finalize the meter (i.e. we completed the task sooner than expected);. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
Finalize in interface iProgressMeter
See Also:
iProgressMeter.Finalize()

getCurrent

public int getCurrent()
Description copied from interface: iProgressMeter
Get the current value of the meter ( <= total);. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
getCurrent in interface iProgressMeter
Returns:
See Also:
iProgressMeter.getCurrent()

getGranularity

public int getGranularity()
Description copied from interface: iProgressMeter
Get the refresh granularity. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
getGranularity in interface iProgressMeter
Returns:
See Also:
iProgressMeter.getGranularity()

getTotal

public int getTotal()
Description copied from interface: iProgressMeter
Get the total element count represented by the meter. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
getTotal in interface iProgressMeter
Returns:
See Also:
iProgressMeter.getTotal()

reset

public void reset()
Description copied from interface: iProgressMeter
Reset the meter to 0%. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
reset in interface iProgressMeter
See Also:
iProgressMeter.reset()

restart

public void restart()
Description copied from interface: iProgressMeter
Reset the meter and print the initial tick mark ("0%");. Implemented in csTextProgressMeter, and csCsLightProgressMeter.

Specified by:
restart in interface iProgressMeter
See Also:
iProgressMeter.restart()

setGranularity

public void setGranularity(int i)
Description copied from interface: iProgressMeter
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.

Specified by:
setGranularity in interface iProgressMeter
Parameters:
i -
See Also:
iProgressMeter.setGranularity(int)

setProgressDescription

public void setProgressDescription(java.lang.String id,
                                   java.lang.String description)
Description copied from interface: iProgressMeter
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.

Specified by:
setProgressDescription in interface iProgressMeter
Parameters:
id -
description -
See Also:
iProgressMeter.setProgressDescription(java.lang.String, java.lang.String)

setTotal

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

Specified by:
setTotal in interface iProgressMeter
Parameters:
n -
See Also:
iProgressMeter.setTotal(int)

step

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

Specified by:
step in interface iProgressMeter
See Also:
iProgressMeter.step()