Package org.opentrafficsim.draw.gtu
Class GtuGeneratorQueueAnimation
- java.lang.Object
-
- org.opentrafficsim.draw.core.TextAnimation
-
- org.opentrafficsim.draw.gtu.GtuGeneratorQueueAnimation
-
- All Implemented Interfaces:
Serializable
,Locatable
public class GtuGeneratorQueueAnimation extends TextAnimation
Animator that displays generation queues as numbers.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.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 28 dec. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opentrafficsim.draw.core.TextAnimation
TextAnimation.ContrastToBackground, TextAnimation.ScaleDependentRendering
-
-
Field Summary
-
Fields inherited from class org.opentrafficsim.draw.core.TextAnimation
RENDERALWAYS, RENDERWHEN1, RENDERWHEN10, RENDERWHEN100
-
-
Constructor Summary
Constructors Constructor Description GtuGeneratorQueueAnimation(GtuGeneratorQueue source, SimulatorInterface.TimeDoubleUnit simulator)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextAnimation
clone(Locatable newSource, SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the TextAnimation and return a copy for the new source on the new simulator.void
paint(Graphics2D graphics, ImageObserver observer)
paint() method so it can be overridden or extended.-
Methods inherited from class org.opentrafficsim.draw.core.TextAnimation
destroy, getBounds, getColor, getDx, getDy, getFont, getFontSize, getLocation, getScaleDependentRendering, getSource, getText, getTextAlignment, isFlip, isRotate, isScale, isTranslate, setColor, setFlip, setRotate, setScale, setText, setTranslate, setXY
-
-
-
-
Constructor Detail
-
GtuGeneratorQueueAnimation
public GtuGeneratorQueueAnimation(GtuGeneratorQueue source, SimulatorInterface.TimeDoubleUnit simulator) throws NamingException, RemoteException
Constructor.- Parameters:
source
- GTUGenerator; generatorsimulator
- SimulatorInterface.TimeDoubleUnit; simulator- Throws:
NamingException
- when animation context cannot be created or retrievedRemoteException
- when remote context cannot be found
-
-
Method Detail
-
paint
public void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
paint() method so it can be overridden or extended.- Overrides:
paint
in classTextAnimation
- Parameters:
graphics
- Graphics2D; the graphics objectobserver
- ImageObserver; the observer- Throws:
RemoteException
- on network exception
-
clone
public TextAnimation clone(Locatable newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws RemoteException, NamingException
Clone the TextAnimation and return a copy for the new source on the new simulator.- Specified by:
clone
in classTextAnimation
- Parameters:
newSource
- Locatable; the new source to link to the text animationnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator to register the animation on- Returns:
- TextAnimation; a copy of this TextAnimation
- Throws:
RemoteException
- when remote animation cannot be reachedNamingException
- when animation name cannot be found or bound in the Context
-
-