public class TrafficLightAnimation extends AbstractLineAnimation<TrafficLight> implements ClonableRenderable2DInterface<TrafficLight>, 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.
| Modifier and Type | Class and Description |
|---|---|
class |
TrafficLightAnimation.Text
Text animation for the TrafficLight.
|
Renderable2DInterface.Util| Constructor and Description |
|---|
TrafficLightAnimation(TrafficLight trafficLight,
SimulatorInterface.TimeDoubleUnit simulator)
Construct the DefaultCarAnimation for a LaneBlock (road block).
|
| Modifier and Type | Method and Description |
|---|---|
ClonableRenderable2DInterface<TrafficLight> |
clone(TrafficLight newSource,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the animation object and register it for the new source on the new simulation.
|
void |
destroy() |
TrafficLightAnimation.Text |
getText() |
void |
paint(Graphics2D graphics,
ImageObserver observer) |
String |
toString() |
getHalfLengthbind2Context, contains, equals, getSource, hashCode, isFlip, isRotate, isScale, isTranslate, paint, setFlip, setRotate, setScale, setTranslateclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, getSource, paintpublic TrafficLightAnimation(TrafficLight trafficLight, SimulatorInterface.TimeDoubleUnit simulator) throws NamingException, RemoteException
trafficLight - TrafficLight; the CSEBlock to drawsimulator - SimulatorInterface.TimeDoubleUnit; the simulator to schedule onNamingException - in case of registration failure of the animationRemoteException - on communication failurepublic final TrafficLightAnimation.Text getText()
public final void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
paint in class AbstractLineAnimation<TrafficLight>RemoteExceptionpublic final void destroy()
throws NamingException
destroy in interface Renderable2DInterface<TrafficLight>destroy in class Renderable2D<TrafficLight>NamingExceptionpublic ClonableRenderable2DInterface<TrafficLight> clone(TrafficLight newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws NamingException, RemoteException
clone in interface ClonableRenderable2DInterface<TrafficLight>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<TrafficLight>Copyright © 2014–2019 Delft University of Technology. All rights reserved.