nl.tudelft.simulation.examples.dsol.animation

## Class BallAnimation

- java.lang.Object
- - nl.tudelft.simulation.dsol.animation.D2.Renderable2D<Locatable>
  - - nl.tudelft.simulation.examples.dsol.animation.BallAnimation

All Implemented Interfaces:
  Renderable2DInterface<Locatable>

    public class BallAnimation
    extends Renderable2D<Locatable>

The Animation of a Ball.

Copyright (c) 2003-2019 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://simulation.tudelft.nl/dsol/3.0/license.html.

Since:
  1.4
Author:
  Peter Jacobs

### Nested Class Summary

### Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface

`Renderable2DInterface.Util`

### Constructor Summary

Constructors
Constructor and Description
`BallAnimation(Locatable source, SimulatorInterface.TimeDouble simulator)` constructs a new BallAnimation.

### Method Summary

All Methods Instance Methods Concrete Methods
`Color` `getColor()`
`void` `paint(Graphics2D graphics, ImageObserver observer)`
`void` `setColor(Color color)`

### Methods inherited from class nl.tudelft.simulation.dsol.animation.D2.Renderable2D

`bind2Context, contains, destroy, equals, getSource, hashCode, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslate, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### BallAnimation

    public BallAnimation(Locatable source,
                         SimulatorInterface.TimeDouble simulator)
                  throws RemoteException,
                         NamingException

constructs a new BallAnimation.

Parameters:
  `source` - Locatable; the source
  `simulator` - SimulatorInterface.TimeDouble; the simulator
Throws:
  `NamingException` - on registration error
  `RemoteException` - on remote animation error

### Method Detail

#### paint

    public void paint(Graphics2D graphics,
                      ImageObserver observer)

Specified by:
  `paint` in class `Renderable2D<Locatable>`

#### getColor

    public Color getColor()

Returns:
  Returns the color.

#### setColor

    public void setColor(Color color)

Parameters:
  `color` - Color; The color to set.