public class Diagram extends Object
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.
Constructor and Description |
---|
Diagram(Set<Short> streams)
Construct a new diagram.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isGrass(int i)
Report if object is inaccessible to all traffic.
|
static void |
main(String[] args)
Test the Diagram code.
|
static JCheckBox |
makeCheckBox(int stream,
boolean initialState)
Make a check box to switch a particular stream number on or off.
|
BufferedImage |
render()
Create a BufferedImage and render the schematic on it.
|
public Diagram(Set<Short> streams) throws TrafficLightException
streams
- Set<Short>; the streams (numbered according to the Dutch standard) that cross the intersection.TrafficLightException
- when a route is invalidpublic static final boolean isGrass(int i)
i
- int; the number of the objectpublic BufferedImage render()
public static void main(String[] args)
args
- String[]; the command line arguments (not used)public static JCheckBox makeCheckBox(int stream, boolean initialState)
stream
- int; the stream numberinitialState
- boolean; if true; the check box will be checkedCopyright © 2014–2019 Delft University of Technology. All rights reserved.