Class CrossingTrafficLightsSwing

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, UNITS

    public class CrossingTrafficLightsSwing
    extends OTSSimulationApplication<CrossingTrafficLightsModel>
    implements UNITS
    Demonstration of a crossing with traffic lights.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2016-10-28 16:34:11 +0200 (Fri, 28 Oct 2016) $, @version $Revision: 2429 $, by $Author: pknoppers $, initial version 12 nov. 2014

    Author:
    Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • CrossingTrafficLightsSwing

        public CrossingTrafficLightsSwing​(java.lang.String title,
                                          OTSAnimationPanel panel,
                                          CrossingTrafficLightsModel model)
                                   throws OTSDrawingException
        Create a CrossingTrafficLights Swing application.
        Parameters:
        title - String; the title of the Frame
        panel - OTSAnimationPanel; the tabbed panel to display
        model - CrossingTrafficLightsModel; the model
        Throws:
        OTSDrawingException - on animation error
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Main program.
        Parameters:
        args - String[]; the command line arguments (not used)
      • demo

        public static void demo​(boolean exitOnClose)
        Start the demo.
        Parameters:
        exitOnClose - boolean; when running stand-alone: true; when running as part of a demo: false