org.graphstream.ui.spriteManager
Class SpriteFactory

java.lang.Object
  extended by org.graphstream.ui.spriteManager.SpriteFactory

public class SpriteFactory
extends Object

Factory for sprites.

Use the sprite factory in the sprite manager so that the manager produce instance of a chosen subclass of Sprite. This is useful if you intend to have each sprite pertain to the same subclass. If you intend to have different kinds of sprites at the same time in the same manager, use SpriteManager.addSprite(String, Class) instead.


Constructor Summary
SpriteFactory()
           
 
Method Summary
 Sprite newSprite(String identifier, SpriteManager manager, Values position)
          Create a new sprite for the given manager with the given identifier.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpriteFactory

public SpriteFactory()
Method Detail

newSprite

public Sprite newSprite(String identifier,
                        SpriteManager manager,
                        Values position)
Create a new sprite for the given manager with the given identifier.

Parameters:
identifier - Identifier of the newly created sprite.
manager - The sprite manager this sprite will pertain to.
position - The sprite initial position or null for (0,0,0,GU).
Returns:
A new sprite.


Copyright © 2011. All Rights Reserved.