Class BusStopAnimation.Text

java.lang.Object
org.opentrafficsim.draw.core.TextAnimation
org.opentrafficsim.draw.road.BusStopAnimation.Text
All Implemented Interfaces:
java.io.Serializable, Locatable
Enclosing class:
BusStopAnimation

public class BusStopAnimation.Text
extends TextAnimation
Text animation for the BusStop. Separate class to be able to turn it on and off...

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 Dec 11, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

    • Text

      public Text​(Locatable source, java.lang.String text, float dx, float dy, TextAlignment textPlacement, java.awt.Color color, SimulatorInterface.TimeDoubleUnit simulator) throws java.rmi.RemoteException, javax.naming.NamingException
      Parameters:
      source - Locatable; the object for which the text is displayed
      text - String; the text to display
      dx - float; the horizontal movement of the text, in meters
      dy - float; the vertical movement of the text, in meters
      textPlacement - TextAlignment; where to place the text
      color - Color; the color of the text
      simulator - SimulatorInterface.TimeDoubleUnit; the simulator
      Throws:
      javax.naming.NamingException - when animation context cannot be created or retrieved
      java.rmi.RemoteException - - when remote context cannot be found
  • Method Details

    • 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
    • toString

      public final java.lang.String toString()
      Overrides:
      toString in class java.lang.Object