Interface TrafCODObject
-
- All Known Implementing Classes:
DetectorImage,TrafficLightImage
interface TrafCODObjectInterface for objects that can draw themselves onto a Graphics2D and may want to show their own tool tip text when the mouse hits them.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddraw(Graphics2D g2)Draw yourself at the indicated location.StringtoolTipHit(int testX, int testY)Check if the given coordinates hit the TrafCODObject.
-
-
-
Method Detail
-
draw
void draw(Graphics2D g2)
Draw yourself at the indicated location.- Parameters:
g2- Graphics2D; the graphics context
-
toolTipHit
String toolTipHit(int testX, int testY)
Check if the given coordinates hit the TrafCODObject. If it does return a String to be used as a tool tip text. If the coordinates do not hit this TrafCODObject return null.- Parameters:
testX- int; the x-coordinatetestY- int; the y-coordinate- Returns:
- String; the tool tip text or null if the coordinates do not hit the TrafCodObject
-
-