org.scilab.forge.scirenderer.examples.rotatableSprite
Class RotatableSpriteDrawerExample

java.lang.Object
  extended by org.scilab.forge.scirenderer.examples.rotatableSprite.RotatableSpriteDrawerExample
All Implemented Interfaces:
Drawer

public class RotatableSpriteDrawerExample
extends java.lang.Object
implements Drawer

A rotatable sprite drawer. Draws one rotating sprite for each existing sprite anchor position value.

Author:
Manuel Juliachs

Constructor Summary
RotatableSpriteDrawerExample(Canvas canvas)
          Constructor.
 
Method Summary
 void draw(DrawingTools drawingTools)
          Ask this drawer to draw with the given drawing tools.
 SpriteDrawer getSpriteDrawer()
          Returns the anchor sprite drawer.
 SpriteDrawer getTextSpriteDrawer(int textSpriteIndex)
          Returns the sprite drawer associated to a particular text sprite.
 void switchRotationDirection()
          Switches the rotation direction.
 void toggleAnchorDisplay()
          Toggles display of the anchors.
 void toggleMessageDisplay()
          Toggles display of the help message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotatableSpriteDrawerExample

public RotatableSpriteDrawerExample(Canvas canvas)
Constructor.

Parameters:
canvas - the canvas to use.
Method Detail

draw

public void draw(DrawingTools drawingTools)
Description copied from interface: Drawer
Ask this drawer to draw with the given drawing tools.

Specified by:
draw in interface Drawer
Parameters:
drawingTools - the givens drawing tools.

getSpriteDrawer

public SpriteDrawer getSpriteDrawer()
Returns the anchor sprite drawer.

Returns:
the anchor sprite drawer.

getTextSpriteDrawer

public SpriteDrawer getTextSpriteDrawer(int textSpriteIndex)
Returns the sprite drawer associated to a particular text sprite.

Parameters:
textSpriteIndex - the sprite index.
Returns:
the text sprite drawer.

toggleAnchorDisplay

public void toggleAnchorDisplay()
Toggles display of the anchors.


switchRotationDirection

public void switchRotationDirection()
Switches the rotation direction.


toggleMessageDisplay

public void toggleMessageDisplay()
Toggles display of the help message.