|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.dsol.animation.D2.Renderable2D
nl.tudelft.simulation.dsol.animation.D2.ImageRenderable
public abstract class ImageRenderable
An abstract class for state-dependent image renderables.
(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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface |
---|
Renderable2DInterface.Util |
Field Summary | |
---|---|
static short |
CB
CENTER-BOTTOM location |
static short |
CC
CENTER-CENTER location |
static short |
CT
CENTER-TOP location |
protected ImageIcon[] |
imageIcons
the imageIcons to be used |
protected URL[] |
images
the imageIcons to use |
static short |
LB
LEFT-BOTTOM location |
static short |
LC
LEFT-CENTER location |
static short |
LT
LEFT-TOP location |
protected short |
orientation
the origin of the image |
static short |
RB
RIGHT-BOTTOM location |
static short |
RC
RIGHT-CENTER location |
static short |
RT
RIGHT-TOP location |
Fields inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D |
---|
flip, rotate, scale, simulator, source, translate |
Constructor Summary | |
---|---|
ImageRenderable(DirectedPoint staticLocation,
Dimension size,
SimulatorInterface simulator,
URL[] images)
constructs a new ImageRenderable |
|
ImageRenderable(LocatableInterface source,
SimulatorInterface simulator,
URL[] images)
constructs a new ImageRenderable |
|
ImageRenderable(Point2D staticLocation,
Dimension size,
SimulatorInterface simulator,
URL[] images)
constructs a new ImageRenderable |
Method Summary | |
---|---|
ImageIcon[] |
getImages()
|
short |
getOrientation()
Returns the orientation of this image to the point [0,0]. |
void |
paint(Graphics2D graphics,
ImageObserver observer)
draws an animation on a worldcoordinates around [x,y=0,0] |
protected Point2D |
resolveOrigin(short orientation,
Dimension size)
resolves the origin of the image |
abstract int |
selectImage()
selects the image. |
void |
setOrientation(short orientation)
|
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 |
Field Detail |
---|
public static final short LB
public static final short CB
public static final short RB
public static final short LC
public static final short CC
public static final short RC
public static final short LT
public static final short CT
public static final short RT
protected URL[] images
protected transient ImageIcon[] imageIcons
protected short orientation
Constructor Detail |
---|
public ImageRenderable(LocatableInterface source, SimulatorInterface simulator, URL[] images)
source
- the source to be animated.simulator
- the simulator to be used.imageIcons
- the image urls.public ImageRenderable(DirectedPoint staticLocation, Dimension size, SimulatorInterface simulator, URL[] images)
staticLocation
- the static location of the set of imageIconssize
- the size of the imageIcons in world coordinates.simulator
- the simulator to be usedimageIcons
- the imageIcons to display.public ImageRenderable(Point2D staticLocation, Dimension size, SimulatorInterface simulator, URL[] images)
staticLocation
- the static location of the set of imageIconssize
- the size of the imageIcons in world coordinates.simulator
- the simulator to be usedimageIcons
- the imageIcons to display.Method Detail |
---|
public void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
Renderable2D
paint
in class Renderable2D
graphics
- the graphics objectobserver
- the observer
RemoteException
- on network exceptionRenderable2D.paint(java.awt.Graphics2D,
java.awt.image.ImageObserver)
public abstract int selectImage()
public void setOrientation(short orientation)
orientation
- The orientation to set.public ImageIcon[] getImages()
protected Point2D resolveOrigin(short orientation, Dimension size)
orientation
- the orientation (CC,..)size
- the size of the image.
public short getOrientation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |