org.graphstream.ui.spriteManager
Class SpriteFactory
java.lang.Object
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.
SpriteFactory
public SpriteFactory()
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 © 2012. All Rights Reserved.