Class LaneAnimation

    • Constructor Detail

      • LaneAnimation

        public LaneAnimation​(Lane lane,
                             SimulatorInterface.TimeDoubleUnit simulator,
                             java.awt.Color color)
                      throws javax.naming.NamingException,
                             java.rmi.RemoteException
        Animate a Lane.
        Parameters:
        lane - Lane; the lane
        simulator - SimulatorInterface.TimeDoubleUnit; the simulator
        color - Color; Color of the lane.
        Throws:
        javax.naming.NamingException - in case of registration failure of the animation
        java.rmi.RemoteException - on communication failure
    • Method Detail

      • paint

        public final void paint​(java.awt.Graphics2D graphics,
                                java.awt.image.ImageObserver observer)
        Specified by:
        paint in class Renderable2D<Lane>
      • destroy

        public final void destroy()
                           throws javax.naming.NamingException,
                                  java.rmi.RemoteException
        Specified by:
        destroy in interface Renderable2DInterface<Lane>
        Overrides:
        destroy in class Renderable2D<Lane>
        Throws:
        javax.naming.NamingException
        java.rmi.RemoteException
      • clone

        public ClonableRenderable2DInterface<Lane> clone​(Lane 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.
        Specified by:
        clone in interface ClonableRenderable2DInterface<Lane>
        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