public class ControlPanel extends Object implements ActionListener, PropertyChangeListener, WindowListener
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
ControlPanel(OTSDEVSSimulatorInterface simulator,
WrappableSimulation wrappableSimulation)
Decorate a SimpleSimulator with a different set of control buttons.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent actionEvent) |
void |
autoPauseSimulator()
Pause the simulator.
|
protected void |
fixButtons()
Update the enabled state of all the buttons.
|
ColorControlPanel |
getColorControlPanel()
Access the ColorControlPanel of this ControlPanel.
|
SwitchableGTUColorer |
getGTUColorer()
Access the SwitchableGTUColorer of this ControlPanel.
|
nl.tudelft.simulation.dsol.simulators.DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> |
getSimulator() |
Font |
getTimeFont() |
void |
installWindowCloseHandler()
Install a handler for the window closed event that stops the simulator (if it is running).
|
void |
propertyChange(PropertyChangeEvent evt) |
void |
windowActivated(WindowEvent e) |
void |
windowClosed(WindowEvent e) |
void |
windowClosing(WindowEvent e) |
void |
windowDeactivated(WindowEvent e) |
void |
windowDeiconified(WindowEvent e) |
void |
windowIconified(WindowEvent e) |
void |
windowOpened(WindowEvent e) |
public ControlPanel(OTSDEVSSimulatorInterface simulator, WrappableSimulation wrappableSimulation)
simulator
- SimpleSimulator; the simulatorwrappableSimulation
- WrappableSimulation; if non-null, the restart button should workpublic final SwitchableGTUColorer getGTUColorer()
public final ColorControlPanel getColorControlPanel()
public final void installWindowCloseHandler()
public final void actionPerformed(ActionEvent actionEvent)
actionPerformed
in interface ActionListener
protected final void fixButtons()
public final void autoPauseSimulator()
public final void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public final nl.tudelft.simulation.dsol.simulators.DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> getSimulator()
public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
public final void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public final void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public final void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public final void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public final void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public final void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
public final Font getTimeFont()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.