public class StraightSwing extends OTSSimulationApplication<StraightModel> implements UNITS
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.
$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $,
initial version 12 nov. 2014
JFrame.AccessibleJFrame
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
closed, DEFAULT_COLORER, frameProperties
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABAMPERE, ABCOULOMB, ABOHM, ABVOLT, ACRE, AMPERE, AMPERE_HOUR, ANGSTROM, ARCMINUTE, ARCSECOND, ARE, ASTRONOMICAL_UNIT, ATMOSPHERE_STANDARD, ATMOSPHERE_TECHNICAL, ATOMIC_UNIT, ATTOMETER, ATTOSECOND, BAR, BARYE, BTU_ISO, BTU_IT, CALORIE, CALORIE_IT, CENTESIMAL_ARCMINUTE, CENTESIMAL_ARCSECOND, CENTIARE, CENTIMETER, CENTIMETER_MERCURY, COULOMB, CUBIC_ATTOMETER, CUBIC_CENTIMETER, CUBIC_DECIMETER, CUBIC_DEKAMETER, CUBIC_FEET_PER_MINUTE, CUBIC_FEET_PER_SECOND, CUBIC_FEMTOMETER, CUBIC_FOOT, CUBIC_HECTOMETER, CUBIC_INCH, CUBIC_INCH_PER_MINUTE, CUBIC_INCH_PER_SECOND, CUBIC_KILOMETER, CUBIC_LIGHTYEAR, CUBIC_MEGAMETER, CUBIC_METER, CUBIC_METER_PER_DAY, CUBIC_METER_PER_HOUR, CUBIC_METER_PER_MINUTE, CUBIC_METER_PER_SECOND, CUBIC_MICROMETER, CUBIC_MILE, CUBIC_MILLIMETER, CUBIC_NANOMETER, CUBIC_PARSEC, CUBIC_PICOMETER, CUBIC_YARD, DALTON, DAY, DECIMETER, DEGREE, DEGREE_CELSIUS, DEGREE_FAHRENHEIT, DEGREE_RANKINE, DEGREE_REAUMUR, DEKAMETER, DYNE, EMU, ENERGY_ELECTRONVOLT, ENERGY_EXAELECTRONVOLT, ENERGY_GIGAELECTRONVOLT, ENERGY_KILOELECTRONVOLT, ENERGY_MEGAELECTRONVOLT, ENERGY_MICROELECTRONVOLT, ENERGY_MILLIELECTRONVOLT, ENERGY_PETAELECTRONVOLT, ENERGY_TERAELECTRONVOLT, ERG, ERG_PER_SECOND, ESU, FARADAY, FEMTOGRAM, FEMTOMETER, FEMTOSECOND, FEMTOWATT, FEMTOWATT_HOUR, FOOT, FOOT_MERCURY, FOOT_PER_HOUR, FOOT_PER_MINUTE, FOOT_PER_SECOND, FOOT_PER_SECOND_2, FOOT_POUND_FORCE, FOOT_POUND_FORCE_PER_HOUR, FOOT_POUND_FORCE_PER_MINUTE, FOOT_POUND_FORCE_PER_SECOND, FRANKLIN, GAL, GALLON_IMP, GALLON_PER_DAY, GALLON_PER_HOUR, GALLON_PER_MINUTE, GALLON_PER_SECOND, GALLON_US_FLUID, GIGAGRAM, GIGAHERTZ, GIGAJOULE, GIGAOHM, GIGAVOLT, GIGAWATT, GIGAWATT_HOUR, GRAD, GRAM, GRAM_PER_CENTIMETER_3, HECTARE, HECTOMETER, HECTOPASCAL, HERTZ, HORSEPOWER_METRIC, HOUR, INCH, INCH_MERCURY, INCH_PER_HOUR, INCH_PER_MINUTE, INCH_PER_SECOND, INCH_PER_SECOND_2, INCH_POUND_FORCE, JOULE, KELVIN, KG_PER_METER_3, KGF_PER_SQUARE_MM, KILOAMPERE, KILOAMPERE_HOUR, KILOCALORIE, KILOGRAM, KILOGRAM_FORCE, KILOGRAM_PER_SECOND, KILOHERTZ, KILOJOULE, KILOMETER, KILOOHM, KILOPASCAL, KILOVOLT, KILOWATT, KILOWATT_HOUR, KM_PER_HOUR, KM_PER_HOUR_2, KM_PER_SECOND, KNOT, KNOT_PER_SECOND, LIGHTYEAR, LITER, LITER_PER_DAY, LITER_PER_HOUR, LITER_PER_MINUTE, LITER_PER_SECOND, MASS_ELECTRONVOLT, MASS_EXAELECTRONVOLT, MASS_GIGAELECTRONVOLT, MASS_KILOELECTRONVOLT, MASS_MEGAELECTRONVOLT, MASS_MICROELECTRONVOLT, MASS_MILLIELECTRONVOLT, MASS_PETAELECTRONVOLT, MASS_TERAELECTRONVOLT, MEGAAMPERE, MEGAAMPERE_HOUR, MEGAGRAM, MEGAHERTZ, MEGAJOULE, MEGAMETER, MEGAOHM, MEGAVOLT, MEGAWATT, MEGAWATT_HOUR, METER, METER_KILOGRAM_FORCE, METER_PER_HOUR, METER_PER_SECOND, METER_PER_SECOND_2, MICROAMPERE, MICROCOULOMB, MICROGRAM, MICROJOULE, MICROMETER, MICROOHM, MICROSECOND, MICROVOLT, MICROWATT, MICROWATT_HOUR, MILE, MILE_PER_HOUR, MILE_PER_HOUR_2, MILE_PER_HOUR_PER_SECOND, MILE_PER_MINUTE, MILE_PER_SECOND, MILE_PER_SECOND_2, MILLIAMPERE, MILLIAMPERE_HOUR, MILLIAMPERE_SECOND, MILLIBAR, MILLICOULOMB, MILLIGRAM, MILLIJOULE, MILLIMETER, MILLIMETER_MERCURY, MILLIOHM, MILLISECOND, MILLIVOLT, MILLIWATT, MILLIWATT_HOUR, MINUTE, NANOAMPERE, NANOCOULOMB, NANOGRAM, NANOJOULE, NANOMETER, NANOOHM, NANOSECOND, NANOVOLT, NANOWATT, NANOWATT_HOUR, NAUTICAL_MILE, NEWTON, NEWTON_METER, OHM, OUNCE, OUNCE_FORCE, OUNCE_IMP_FLUID, OUNCE_US_FLUID, PARSEC, PASCAL, PER_ANGSTROM, PER_ASTRONOMICAL_UNIT, PER_ATTOMETER, PER_ATTOSECOND, PER_CENTIMETER, PER_DAY, PER_DECIMETER, PER_DEKAMETER, PER_FEMTOMETER, PER_FEMTOSECOND, PER_FOOT, PER_HECTOMETER, PER_HOUR, PER_INCH, PER_KILOMETER, PER_LIGHTYEAR, PER_MEGAMETER, PER_METER, PER_MICROMETER, PER_MICROSECOND, PER_MILE, PER_MILLIMETER, PER_MILLISECOND, PER_MINUTE, PER_NANOMETER, PER_NANOSECOND, PER_NAUTICAL_MILE, PER_PARSEC, PER_PICOMETER, PER_PICOSECOND, PER_SECOND, PER_WEEK, PER_YARD, PERCENT, PETAGRAM, PETAJOULE, PETAWATT, PETAWATT_HOUR, PICOCOULOMB, PICOGRAM, PICOJOULE, PICOMETER, PICOSECOND, PICOWATT, PICOWATT_HOUR, PIEZE, PINT_IMP, PINT_US_FLUID, POUND, POUND_FOOT, POUND_FORCE, POUND_INCH, POUND_PER_SECOND, POUND_PER_SQUARE_FOOT, POUND_PER_SQUARE_INCH, QUART_IMP, QUART_US_FLUID, RADIAN, RPM, SECOND, SQUARE_ATTOMETER, SQUARE_CENTIMETER, SQUARE_DECIMETER, SQUARE_DEGREE, SQUARE_DEKAMETER, SQUARE_FEMTOMETER, SQUARE_FOOT, SQUARE_HECTOMETER, SQUARE_INCH, SQUARE_KILOMETER, SQUARE_MEGAMETER, SQUARE_METER, SQUARE_MICROMETER, SQUARE_MILE, SQUARE_MILLIMETER, SQUARE_NANOMETER, SQUARE_NAUTICAL_MILE, SQUARE_PICOMETER, SQUARE_YARD, STANDARD_GRAVITY, STATAMPERE, STATCOULOMB, STATOHM, STATVOLT, STERADIAN, STHENE, STHENE_METER, STHENE_METER_PER_SECOND, TERAGRAM, TERAHERTZ, TERAJOULE, TERAWATT, TERAWATT_HOUR, TON_FORCE, TON_LONG, TON_METRIC, TON_SHORT, TONNE, TORR, VOLT, WATT, WATT_HOUR, WEEK, YARD
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
StraightSwing(String title,
OTSAnimationPanel panel,
StraightModel model)
Create a Straight Swing application.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addStatisticsTabs(OTSSimulatorInterface simulator)
Add the statistics tabs.
|
protected void |
addTabs() |
static void |
demo(boolean exitOnClose)
Start the demo.
|
static void |
main(String[] args)
Main program.
|
animateNetwork, getAnimationPanel, setAnimationToggles
getAppearance, getModel, isClosed, makeAnimationRectangle, setAppearance, setExitOnClose
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFont, postEvent
public StraightSwing(String title, OTSAnimationPanel panel, StraightModel model) throws OTSDrawingException
title
- String; the title of the Framepanel
- OTSAnimationPanel; the tabbed panel to displaymodel
- StraightModel; the modelOTSDrawingException
- on animation errorprotected void addTabs()
addTabs
in class OTSSimulationApplication<StraightModel>
public static void main(String[] args)
args
- String[]; the command line arguments (not used)public static void demo(boolean exitOnClose)
exitOnClose
- boolean; when running stand-alone: true; when running as part of a demo: falseprotected final void addStatisticsTabs(OTSSimulatorInterface simulator)
simulator
- OTSSimulatorInterface; the simulator on which sampling can be scheduledCopyright © 2014–2019 Delft University of Technology. All rights reserved.