public class DefaultCarAnimation.Text extends TextAnimation
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
Text(Locatable source,
String text,
float dx,
float dy,
TextAlignment textAlignment,
Color color,
SimulatorInterface.TimeDoubleUnit simulator) |
Modifier and Type | Method and Description |
---|---|
TextAnimation |
clone(Locatable newSource,
SimulatorInterface.TimeDoubleUnit newSimulator) |
DirectedPoint |
getLocation() |
void |
paint(Graphics2D graphics,
ImageObserver observer) |
String |
toString() |
destroy, getBounds, getColor, getDx, getDy, getFont, getFontSize, getSource, getText, getTextAlignment, isFlip, isRotate, isScale, isTranslate, setColor, setFlip, setRotate, setScale, setText, setTranslate
public Text(Locatable source, String text, float dx, float dy, TextAlignment textAlignment, Color color, SimulatorInterface.TimeDoubleUnit simulator) throws RemoteException, NamingException
source
- the object for which the text is displayedtext
- the text to displaydx
- the horizontal movement of the text, in metersdy
- the vertical movement of the text, in meterstextAlignment
- where to place the textcolor
- the color of the textsimulator
- the simulatorNamingException
- when animation context cannot be created or retrievedRemoteException
- - when remote context cannot be foundpublic final void paint(Graphics2D graphics, ImageObserver observer) throws RemoteException
paint
in class TextAnimation
RemoteException
public DirectedPoint getLocation() throws RemoteException
getLocation
in interface Locatable
getLocation
in class TextAnimation
RemoteException
public TextAnimation clone(Locatable newSource, SimulatorInterface.TimeDoubleUnit newSimulator) throws RemoteException, NamingException
clone
in class TextAnimation
RemoteException
NamingException
Copyright © 2014–2018 Delft University of Technology. All rights reserved.