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

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

public class SingleImageRenderable
extends ImageRenderable

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
1.4
Version:
1.2 Apr 30, 2004
Author:
Peter Jacobs

Nested Class Summary
 
Nested classes inherited from class 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, 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(nl.tudelft.simulation.language.d3.DirectedPoint staticLocation, java.awt.Dimension size, SimulatorInterface simulator, java.net.URL image)
          constructs a new SingleImageRenderable
SingleImageRenderable(LocatableInterface source, SimulatorInterface simulator, java.net.URL image)
          constructs a new SingleImageRenderable
SingleImageRenderable(java.awt.geom.Point2D staticLocation, java.awt.Dimension size, SimulatorInterface simulator, java.net.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, paint, resolveOrigin, setOrientation
 
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
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,
                             java.net.URL image)
constructs a new SingleImageRenderable

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

SingleImageRenderable

public SingleImageRenderable(java.awt.geom.Point2D staticLocation,
                             java.awt.Dimension size,
                             SimulatorInterface simulator,
                             java.net.URL image)
constructs a new SingleImageRenderable

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

SingleImageRenderable

public SingleImageRenderable(nl.tudelft.simulation.language.d3.DirectedPoint staticLocation,
                             java.awt.Dimension size,
                             SimulatorInterface simulator,
                             java.net.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 images[] which has to be drawn.

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


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