public class BloodHoundToolLink extends java.lang.Object implements MapItem.OnGroupChangedListener, MapItem.OnVisibleChangedListener
BloodHoundLink
,
which handles bloodhound links which were created by selecting the bloodhound
button in the radial menu for range and bearing lines.
Currently, this class has the capability to be in "R&B line mode", or "route mode",
whereas a BloodHoundLink
is always an R&B line.Modifier and Type | Class and Description |
---|---|
static class |
BloodHoundToolLink.OnDeleteListener |
Modifier and Type | Field and Description |
---|---|
RangeAndBearingMapItem |
line |
Route |
route |
java.lang.String |
uid |
Constructor and Description |
---|
BloodHoundToolLink(BloodHoundPreferences prefs,
java.lang.String uid,
PointMapItem startItem,
PointMapItem endItem,
BloodHoundToolLink.OnDeleteListener onDelete) |
Modifier and Type | Method and Description |
---|---|
void |
delete() |
boolean |
isLine()
Returns whether or not this link is currently in line mode.
|
boolean |
isRoute()
Returns whether or not this link is currently in route moe.
|
void |
onItemAdded(MapItem item,
MapGroup newParent) |
void |
onItemRemoved(MapItem item,
MapGroup oldParent) |
void |
onVisibleChanged(MapItem item) |
void |
setColor(int color)
Sets the color of the bloodhound link.
|
void |
setPlanner(RoutePlannerInterface planner)
Sets the route planner to use for route mode for this link.
|
void |
toggleRoute()
Toggles the state of the bloodhound link.
|
void |
toggleRoute(java.lang.Runnable onSuccessListener,
java.lang.Runnable onRouteCancelled,
<any> onException)
Toggles the state of the bloodhound link.
|
public RangeAndBearingMapItem line
public final Route route
public java.lang.String uid
public BloodHoundToolLink(BloodHoundPreferences prefs, java.lang.String uid, PointMapItem startItem, PointMapItem endItem, BloodHoundToolLink.OnDeleteListener onDelete)
public void setColor(int color)
public boolean isLine()
public boolean isRoute()
public void setPlanner(RoutePlannerInterface planner)
public void toggleRoute()
public void toggleRoute(java.lang.Runnable onSuccessListener, java.lang.Runnable onRouteCancelled, <any> onException)
onSuccessListener
- Callback to preform some action on successful route generation.public void delete()
public void onItemAdded(MapItem item, MapGroup newParent)
onItemAdded
in interface MapItem.OnGroupChangedListener
public void onItemRemoved(MapItem item, MapGroup oldParent)
onItemRemoved
in interface MapItem.OnGroupChangedListener
public void onVisibleChanged(MapItem item)
onVisibleChanged
in interface MapItem.OnVisibleChangedListener