com.jme.system.dummy
Class DummySystemProvider

java.lang.Object
  extended by com.jme.system.dummy.DummySystemProvider
All Implemented Interfaces:
SystemProvider

public class DummySystemProvider
extends java.lang.Object
implements SystemProvider

SystemProvider for DummyDisplaySystem.

It is a basic SystemProvider which allows to specify which DisplaySystem owns it and what Timer to use. If a Timer is not providen, a NanoTimer will be used.


Field Summary
protected  DisplaySystem displaySystem
          The DisplaySystem that this SystemProvider belongs to.
static java.lang.String DUMMY_SYSTEM_IDENTIFIER
          The DummySystemProvider identifier
protected  Timer timer
          The timer hold by this SystemProvider.
 
Constructor Summary
DummySystemProvider()
          Creates a new DummySystemProvider
DummySystemProvider(DisplaySystem displaySystem)
          Creates a new DummySystemProvider
DummySystemProvider(DisplaySystem displaySystem, Timer timer)
          Creates a new DummySystemProvider
 
Method Summary
 void disposeDisplaySystem()
          Often the display system is in a static field.
 DisplaySystem getDisplaySystem()
          Returns a valid DisplaySystem for the current system.
 java.lang.String getProviderIdentifier()
          getProviderIdentifier returns a unique identifier for this system.
 Timer getTimer()
          Returns a hight resolution timer for the current system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUMMY_SYSTEM_IDENTIFIER

public static final java.lang.String DUMMY_SYSTEM_IDENTIFIER
The DummySystemProvider identifier

See Also:
Constant Field Values

timer

protected Timer timer
The timer hold by this SystemProvider.


displaySystem

protected DisplaySystem displaySystem
The DisplaySystem that this SystemProvider belongs to.

Constructor Detail

DummySystemProvider

public DummySystemProvider()
Creates a new DummySystemProvider


DummySystemProvider

public DummySystemProvider(DisplaySystem displaySystem)
Creates a new DummySystemProvider

Parameters:
displaySystem - The DisplaySystem that this SystemProvider belongs to.

DummySystemProvider

public DummySystemProvider(DisplaySystem displaySystem,
                           Timer timer)
Creates a new DummySystemProvider

Parameters:
displaySystem - The DisplaySystem that this SystemProvider belongs to.
timer - The timer hold by this SystemProvider.
Method Detail

getProviderIdentifier

public java.lang.String getProviderIdentifier()
Description copied from interface: SystemProvider
getProviderIdentifier returns a unique identifier for this system.

Specified by:
getProviderIdentifier in interface SystemProvider
Returns:
a globally unique identifier for the implementation system

getDisplaySystem

public DisplaySystem getDisplaySystem()
Description copied from interface: SystemProvider
Returns a valid DisplaySystem for the current system.

Specified by:
getDisplaySystem in interface SystemProvider
Returns:
a valid displaysystem for the implementation system

getTimer

public Timer getTimer()
Description copied from interface: SystemProvider
Returns a hight resolution timer for the current system.

Specified by:
getTimer in interface SystemProvider
Returns:
a high resolution timer for the implementation system

disposeDisplaySystem

public void disposeDisplaySystem()
Description copied from interface: SystemProvider
Often the display system is in a static field. This should null out this field so that subsequent calls are forced to make a new displaysystem.

Specified by:
disposeDisplaySystem in interface SystemProvider