Interface ClonableRenderable2DInterface<T extends Locatable>

Type Parameters:
T - the Locatable class of the source that indicates the location of the Renderable on the screen
All Superinterfaces:
Renderable2DInterface<T>
All Known Implementing Classes:
DefaultCarAnimation, LaneAnimation, LaneAnimation.CenterLineAnimation, LinkAnimation, NodeAnimation, SensorAnimation, StripeAnimation, TrafficLightAnimation

public interface ClonableRenderable2DInterface<T extends Locatable>
extends Renderable2DInterface<T>
This interface extends the animation objects with an option to clone them for a new source on a new Simulator.

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-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Jan 15, 2017
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • clone

      ClonableRenderable2DInterface<T> clone​(T newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws javax.naming.NamingException, java.rmi.RemoteException
      Clone the animation object and register it for the new source on the new simulation.
      Parameters:
      newSource - T; the source
      newSimulator - SimulatorInterface.TimeDoubleUnit; the simulator
      Returns:
      the generated clone
      Throws:
      javax.naming.NamingException - when animation context cannot be created or retrieved
      java.rmi.RemoteException - - when remote context cannot be found