ch.sahits.game.graphic.display.util
Class ClickablePolygon
java.lang.Object
ch.sahits.game.graphic.display.util.ClickablePolygon
public class ClickablePolygon
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
polygon
private final NamedPolygon polygon
action
private final Runnable action
ClickablePolygon
public ClickablePolygon(NamedPolygon polygon,
Runnable action)
isInside
public boolean isInside(Point p)
- check if the point is inside the polygon
- Parameters:
p - Point
- Returns:
- true if p is inside the polygon
execute
public void execute()
- Execute the action associated with the polygon
getPolygon
public NamedPolygon getPolygon()
Copyright © 2011 Sahits GmbH. All Rights Reserved.