1 package org.opentrafficsim.draw.core; 2 3 import java.rmi.RemoteException; 4 5 import javax.naming.NamingException; 6 7 import org.opentrafficsim.core.dsol.OTSSimulatorInterface; 8 9 import nl.tudelft.simulation.dsol.animation.Locatable; 10 import nl.tudelft.simulation.dsol.animation.D2.Renderable2DInterface; 11 12 /** 13 * This interface extends the animation objects with an option to clone them for a new source on a new Simulator. 14 * <p> 15 * Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 16 * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>. 17 * </p> 18 * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, 19 * initial version Jan 15, 2017 <br> 20 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 21 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 22 * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a> 23 * @param <T> the Locatable class of the source that indicates the location of the Renderable on the screen 24 */ 25 public interface ClonableRenderable2DInterface<T extends Locatable> extends Renderable2DInterface<T> 26 { 27 /** 28 * Clone the animation object and register it for the new source on the new simulation. 29 * @param newSource T; the source 30 * @param newSimulator OTSSimulatorInterface; the simulator 31 * @return the generated clone 32 * @throws NamingException when animation context cannot be created or retrieved 33 * @throws RemoteException - when remote context cannot be found 34 */ 35 ClonableRenderable2DInterface<T> clone(T newSource, OTSSimulatorInterface newSimulator) 36 throws NamingException, RemoteException; 37 38 }