class DetectorImage extends Object implements TrafCODObject, nl.tudelft.simulation.event.EventListenerInterface
| Constructor and Description |
|---|
DetectorImage(TrafCODDisplay display,
Point2D center,
String description)
Construct a new DetectorImage.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Graphics2D g2)
Draw yourself at the indicated location/
|
void |
notify(nl.tudelft.simulation.event.EventInterface event) |
String |
toolTipHit(int testX,
int testY)
Check if the given coordinates hit the TrafCODObject.
|
public DetectorImage(TrafCODDisplay display, Point2D center, String description)
display - TrafCODDisplay; the TrafCOD display on which this detector image will be renderedcenter - Point2D; the center location of the detector image on the TrafCOD displaydescription - String; name of the detector (displayed as tool tip text)public void draw(Graphics2D g2)
draw in interface TrafCODObjectg2 - Graphics2D; the graphics contextpublic void notify(nl.tudelft.simulation.event.EventInterface event)
throws RemoteException
notify in interface nl.tudelft.simulation.event.EventListenerInterfaceRemoteExceptionpublic String toolTipHit(int testX, int testY)
toolTipHit in interface TrafCODObjecttestX - int; the x-coordinatetestY - int; the y-coordinateCopyright © 2014–2017 Delft University of Technology. All rights reserved.