1 package org.opentrafficsim.road.network.animation;
2
3 import java.awt.Color;
4 import java.awt.Graphics2D;
5 import java.awt.image.ImageObserver;
6 import java.io.Serializable;
7 import java.rmi.RemoteException;
8
9 import javax.naming.NamingException;
10
11 import org.djunits.unit.LengthUnit;
12 import org.djunits.value.vdouble.scalar.Length;
13 import org.opentrafficsim.road.network.lane.object.sensor.SinkSensor;
14
15 import nl.tudelft.simulation.dsol.simulators.SimulatorInterface;
16
17
18
19
20
21
22
23
24
25
26
27
28
29 public class SinkAnimation extends AbstractLineAnimation<SinkSensor> implements Serializable
30 {
31
32 private static final long serialVersionUID = 20150130L;
33
34
35
36
37
38
39
40
41 public SinkAnimation(final SinkSensor source, final SimulatorInterface.TimeDoubleUnit simulator) throws NamingException, RemoteException
42 {
43 super(source, simulator, 0.8, new Length(0.5, LengthUnit.SI));
44 }
45
46
47 @Override
48 public final void paint(final Graphics2D graphics, final ImageObserver observer) throws RemoteException
49 {
50 graphics.setColor(Color.YELLOW);
51 super.paint(graphics, observer);
52 }
53
54
55 @Override
56 public final String toString()
57 {
58 return "SinkAnimation [getSource()=" + this.getSource() + "]";
59 }
60 }