public class SensorAnimation extends AbstractLineAnimation<SingleSensor> implements ClonableRenderable2DInterface<SingleSensor>, Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-08-12 16:37:45 +0200 (Wed, 12 Aug 2015) $, @version $Revision: 1240 $, by $Author: averbraeck $,
initial version Jan 30, 2015
Modifier and Type | Class and Description |
---|---|
class |
SensorAnimation.Text
Text animation for the Sensor.
|
Renderable2DInterface.Util
Constructor and Description |
---|
SensorAnimation(SingleSensor sensor,
Length sensorPosition,
SimulatorInterface.TimeDoubleUnit simulator,
Color color)
Construct a SensorAnimation.
|
Modifier and Type | Method and Description |
---|---|
ClonableRenderable2DInterface<SingleSensor> |
clone(SingleSensor newSource,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the animation object and register it for the new source on the new simulation.
|
void |
destroy() |
SensorAnimation.Text |
getText() |
void |
paint(Graphics2D graphics,
ImageObserver observer) |
String |
toString() |
getHalfLength
bind2Context, contains, equals, getSource, hashCode, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, getSource, paint
public SensorAnimation(SingleSensor sensor, Length sensorPosition, SimulatorInterface.TimeDoubleUnit simulator, Color color) throws NamingException, RemoteException
sensor
- SingleSensor; the Sensor to drawsensorPosition
- Length; the position of the sensor on the lane to determine the width of the lane at that pointsimulator
- SimulatorInterface.TimeDoubleUnit; the simulator to schedule oncolor
- Color; the display color of the sensorNamingException
- in case of registration failure of the animationRemoteException
- in case of remote registration failure of the animationpublic final SensorAnimation.Text getText()
public final void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
paint
in class AbstractLineAnimation<SingleSensor>
RemoteException
public final void destroy() throws NamingException
destroy
in interface Renderable2DInterface<SingleSensor>
destroy
in class Renderable2D<SingleSensor>
NamingException
public ClonableRenderable2DInterface<SingleSensor> clone(SingleSensor newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws NamingException, RemoteException
clone
in interface ClonableRenderable2DInterface<SingleSensor>
newSource
- T; the sourcenewSimulator
- SimulatorInterface.TimeDoubleUnit; the simulatorNamingException
- when animation context cannot be created or retrievedRemoteException
- - when remote context cannot be foundpublic final String toString()
toString
in class Renderable2D<SingleSensor>
Copyright © 2014–2019 Delft University of Technology. All rights reserved.