nl.tudelft.simulation.dsol.animation.D2
Class SingleImageRenderable

java.lang.Object
  extended by nl.tudelft.simulation.dsol.animation.D2.Renderable2D
      extended by nl.tudelft.simulation.dsol.animation.D2.ImageRenderable
          extended by nl.tudelft.simulation.dsol.animation.D2.SingleImageRenderable
All Implemented Interfaces:
Renderable2DInterface

public class SingleImageRenderable
extends ImageRenderable

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:28 $
Author:
Peter Jacobs

Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface
Renderable2DInterface.Util
 
Field Summary
 
Fields inherited from class nl.tudelft.simulation.dsol.animation.D2.ImageRenderable
CB, CC, CT, imageIcons, images, LB, LC, LT, orientation, RB, RC, RT
 
Fields inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
flip, rotate, scale, simulator, source, translate
 
Constructor Summary
SingleImageRenderable(DirectedPoint staticLocation, Dimension size, SimulatorInterface simulator, URL image)
          constructs a new SingleImageRenderable
SingleImageRenderable(LocatableInterface source, SimulatorInterface simulator, URL image)
          constructs a new SingleImageRenderable
SingleImageRenderable(Point2D staticLocation, Dimension size, SimulatorInterface simulator, URL image)
          constructs a new SingleImageRenderable
 
Method Summary
 int selectImage()
          selects the image.
 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.ImageRenderable
getImages, getOrientation, paint, resolveOrigin, setOrientation
 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, destroy, getSource, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleImageRenderable

public SingleImageRenderable(LocatableInterface source,
                             SimulatorInterface simulator,
                             URL image)
constructs a new SingleImageRenderable

Parameters:
source - the moving source
simulator - the simulator
image - the image to animate

SingleImageRenderable

public SingleImageRenderable(Point2D staticLocation,
                             Dimension size,
                             SimulatorInterface simulator,
                             URL image)
constructs a new SingleImageRenderable

Parameters:
staticLocation - the static location
size - the size
simulator - the simulator
image - the image

SingleImageRenderable

public SingleImageRenderable(DirectedPoint staticLocation,
                             Dimension size,
                             SimulatorInterface simulator,
                             URL image)
constructs a new SingleImageRenderable

Parameters:
staticLocation - the static location
size - the size of the image
simulator - the simulator
image - the image
Method Detail

selectImage

public int selectImage()
Description copied from class: ImageRenderable
selects the image. This methods makes the ImageRenderable state dependent. One is required to return the index number of the imageIcons[] which has to be drawn.

Specified by:
selectImage in class ImageRenderable
Returns:
int the current (state-dependent) image.
See Also:
#selectImage()


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.