public abstract class AbstractWrappableAnimation extends Object implements WrappableAnimation
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-26 12:11:42 +0200 (Sat, 26 Sep 2015) $, @version $Revision: 1454 $, by $Author: averbraeck $,
initial version Jun 18, 2015
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
exitOnClose
Use EXIT_ON_CLOSE when true, DISPOSE_ON_CLOSE when false on closing of the window.
|
protected OTSAnimationPanel |
panel
the tabbed panel so other tabs can be added by the classes that extend this class.
|
protected ArrayList<AbstractProperty<?>> |
properties
The properties exhibited by this simulation.
|
protected ArrayList<AbstractProperty<?>> |
savedUserModifiedProperties
The properties after (possible) editing by the user.
|
| Constructor and Description |
|---|
AbstractWrappableAnimation() |
| Modifier and Type | Method and Description |
|---|---|
SimpleAnimator |
buildAnimator(org.djunits.value.vdouble.scalar.Time.Abs startTime,
org.djunits.value.vdouble.scalar.Time.Rel warmupPeriod,
org.djunits.value.vdouble.scalar.Time.Rel runLength,
ArrayList<AbstractProperty<?>> userModifiedProperties,
Rectangle rect,
boolean eoc)
Build the animation.
|
ArrayList<AbstractProperty<?>> |
getProperties()
Retrieve a list of visible properties of the simulation.
|
ArrayList<AbstractProperty<?>> |
getUserModifiedProperties()
Retrieve a list of properties as the user has modified them.
|
protected abstract Rectangle2D.Double |
makeAnimationRectangle() |
protected abstract JPanel |
makeCharts() |
protected abstract OTSModelInterface |
makeModel(GTUColorer colorer) |
SimpleSimulatorInterface |
rebuildSimulator(Rectangle rect)
Restart (rebuild) the simulation.
|
void |
stopTimersThreads()
Stop the timers and threads that are connected when disposing of this wrappable simulation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescription, shortNameprotected ArrayList<AbstractProperty<?>> properties
protected ArrayList<AbstractProperty<?>> savedUserModifiedProperties
protected boolean exitOnClose
protected OTSAnimationPanel panel
public final SimpleAnimator buildAnimator(org.djunits.value.vdouble.scalar.Time.Abs startTime, org.djunits.value.vdouble.scalar.Time.Rel warmupPeriod, org.djunits.value.vdouble.scalar.Time.Rel runLength, ArrayList<AbstractProperty<?>> userModifiedProperties, Rectangle rect, boolean eoc) throws SimRuntimeException, NamingException
buildAnimator in interface WrappableAnimationstartTime - DoubleScalar.Abs<TimeUnit>; the start time of the simulationwarmupPeriod - DoubleScalar.Rel<TimeUnit>; the warm up period of the simulation (use new
DoubleScalar.Rel<TimeUnit>(0, SECOND) if you don't know what this is)runLength - DoubleScalar.Rel<TimeUnit>; the duration of the simulationuserModifiedProperties - ArrayList<AbstractProperty<?>>; the (possibly user-modified) properties. This list must
contain all the properties returned by getProperties(); any additional properties may be ignoredrect - the x, y, width and height for the window to rebuild. Use null for maximized screen.eoc - Use EXIT_ON_CLOSE when true, DISPOSE_ON_CLOSE when false on closing of the window.SimRuntimeException - on ???NamingException - when context for the animation cannot be createdprotected abstract JPanel makeCharts()
protected abstract OTSModelInterface makeModel(GTUColorer colorer)
colorer - the GTU colorer to use.protected abstract Rectangle2D.Double makeAnimationRectangle()
public final ArrayList<AbstractProperty<?>> getProperties()
getProperties in interface WrappableAnimationpublic final SimpleSimulatorInterface rebuildSimulator(Rectangle rect) throws SimRuntimeException, NetworkException, NamingException
rebuildSimulator in interface WrappableAnimationrect - the x, y, width and height for the window to rebuild. Use null for maximized screen.SimRuntimeException - on ???NetworkException - on Network inconsistencyNamingException - when context for the animation cannot be createdpublic final ArrayList<AbstractProperty<?>> getUserModifiedProperties()
getUserModifiedProperties in interface WrappableAnimationpublic void stopTimersThreads()
stopTimersThreads in interface WrappableAnimationCopyright © 2014–2015 Delft University of Technology. All rights reserved.