Class GtuGeneratorQueueAnimation

java.lang.Object
org.opentrafficsim.draw.core.TextAnimation
org.opentrafficsim.draw.gtu.GtuGeneratorQueueAnimation
All Implemented Interfaces:
java.io.Serializable, Locatable

public class GtuGeneratorQueueAnimation
extends TextAnimation
Animator that displays generation queues as numbers.

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.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version 28 dec. 2017
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

    • GtuGeneratorQueueAnimation

      public GtuGeneratorQueueAnimation​(GtuGeneratorQueue source, SimulatorInterface.TimeDoubleUnit simulator) throws javax.naming.NamingException, java.rmi.RemoteException
      Constructor.
      Parameters:
      source - GTUGenerator; generator
      simulator - SimulatorInterface.TimeDoubleUnit; simulator
      Throws:
      javax.naming.NamingException - when animation context cannot be created or retrieved
      java.rmi.RemoteException - when remote context cannot be found
  • Method Details

    • paint

      public void paint​(java.awt.Graphics2D graphics, java.awt.image.ImageObserver observer) throws java.rmi.RemoteException
      paint() method so it can be overridden or extended.
      Overrides:
      paint in class TextAnimation
      Parameters:
      graphics - Graphics2D; the graphics object
      observer - ImageObserver; the observer
      Throws:
      java.rmi.RemoteException - on network exception
    • clone

      public TextAnimation clone​(Locatable newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws java.rmi.RemoteException, javax.naming.NamingException
      Clone the TextAnimation and return a copy for the new source on the new simulator.
      Specified by:
      clone in class TextAnimation
      Parameters:
      newSource - Locatable; the new source to link to the text animation
      newSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator to register the animation on
      Returns:
      TextAnimation; a copy of this TextAnimation
      Throws:
      java.rmi.RemoteException - when remote animation cannot be reached
      javax.naming.NamingException - when animation name cannot be found or bound in the Context