Class LaneAnimation.Text

    • Constructor Detail

      • Text

        public Text​(Locatable source,
                    String text,
                    float dx,
                    float dy,
                    TextAlignment textPlacement,
                    Color color,
                    org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator)
             throws RemoteException,
                    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 - OTSSimulatorInterface; the simulator
        Throws:
        NamingException - when animation context cannot be created or retrieved
        RemoteException - - when remote context cannot be found
    • Method Detail

      • clone

        public TextAnimation clone​(Locatable newSource,
                                   org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator)
                            throws RemoteException,
                                   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 - OTSSimulatorInterface; the new simulator to register the animation on
        Returns:
        TextAnimation; a copy of this TextAnimation
        Throws:
        RemoteException - when remote animation cannot be reached
        NamingException - when animation name cannot be found or bound in the Context