Class BallAnimation
- java.lang.Object
-
- nl.tudelft.simulation.dsol.animation.D2.Renderable2D<L>
-
- nl.tudelft.simulation.dsol.animation.SimRenderable2D<Ball>
-
- nl.tudelft.simulation.examples.dsol.animation.BallAnimation
-
- All Implemented Interfaces:
Serializable,nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface<Ball>
public class BallAnimation extends SimRenderable2D<Ball>
The Animation of a Ball.Copyright (c) 2003-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Since:
- 1.4
- Author:
- Peter Jacobs
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BallAnimation(Ball source, SimulatorInterface<Double> simulator)constructs a new BallAnimation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor()voidpaint(Graphics2D graphics, ImageObserver observer)voidsetColor(Color color)-
Methods inherited from class nl.tudelft.simulation.dsol.animation.SimRenderable2D
destroy
-
Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D
bind2Context, contains, destroy, getId, getSource, isFlip, isRotate, isScale, isScaleObject, isScaleY, isTranslate, paint, paintComponent, setFlip, setRotate, setScale, setScaleObject, setScaleY, setTranslate, toString
-
-
-
-
Constructor Detail
-
BallAnimation
public BallAnimation(Ball source, SimulatorInterface<Double> simulator) throws RemoteException, NamingException
constructs a new BallAnimation.- Parameters:
source- Locatable; the sourcesimulator- SimulatorInterface<Double>; the simulator- Throws:
NamingException- on registration errorRemoteException- on remote animation error
-
-
Method Detail
-
paint
public void paint(Graphics2D graphics, ImageObserver observer)
- Specified by:
paintin classnl.tudelft.simulation.dsol.animation.D2.Renderable2D<Ball>
-
getColor
public Color getColor()
- Returns:
- Returns the color.
-
setColor
public void setColor(Color color)
- Parameters:
color- Color; The color to set.
-
-