Loading...
Searching...
No Matches
RouteManagerBinding.java
Go to the documentation of this file.
1package com.navigine.idl.java.internal;
2
3import com.navigine.common.NativeObject;
4import com.navigine.common.Subscription;
5import com.navigine.idl.java.LocationPoint;
6import com.navigine.idl.java.RouteListener;
7import com.navigine.idl.java.RouteManager;
8import com.navigine.idl.java.RoutePath;
9import java.util.ArrayList;
10
16{
17 private final NativeObject nativeObject;
18
22 protected RouteManagerBinding(NativeObject nativeObject)
23 {
24 this.nativeObject = nativeObject;
25 }
26
27 protected Subscription<RouteListener> weakRouteListenerSubscription = new Subscription<RouteListener>() {
28 @Override
29 public NativeObject createNativeListener(RouteListener listener) {
30 return createRouteListener(listener);
31 }
32 };
33 private static native NativeObject createRouteListener(RouteListener listener);
34
35 // RouteManager methods
36
37 @Override
39 {
40 return native_makeRoute(from, to);
41 }
42 private native RoutePath native_makeRoute(LocationPoint from, LocationPoint to);
43
44 @Override
45 public ArrayList<RoutePath> makeRoutes(LocationPoint from, ArrayList<LocationPoint> to)
46 {
47 return native_makeRoutes(from, to);
48 }
49 private native ArrayList<RoutePath> native_makeRoutes(LocationPoint from, ArrayList<LocationPoint> to);
50
51 @Override
52 public void setTarget(LocationPoint target)
53 {
54 native_setTarget(target);
55 }
56 private native void native_setTarget(LocationPoint target);
57
58 @Override
59 public void addTarget(LocationPoint target)
60 {
61 native_addTarget(target);
62 }
63 private native void native_addTarget(LocationPoint target);
64
65 @Override
66 public void cancelTarget()
67 {
68 native_cancelTarget();
69 }
70 private native void native_cancelTarget();
71
72 @Override
73 public void clearTargets()
74 {
75 native_clearTargets();
76 }
77 private native void native_clearTargets();
78
79 @Override
80 public void setGraphTag(String tag)
81 {
82 native_setGraphTag(tag);
83 }
84 private native void native_setGraphTag(String tag);
85
86 @Override
87 public String getGraphTag()
88 {
89 return native_getGraphTag();
90 }
91 private native String native_getGraphTag();
92
93 @Override
94 public ArrayList<String> getGraphTags()
95 {
96 return native_getGraphTags();
97 }
98 private native ArrayList<String> native_getGraphTags();
99
100 @Override
101 public void addRouteListener(RouteListener listener)
102 {
103 native_addRouteListener(listener);
104 }
105 private native void native_addRouteListener(RouteListener listener);
106
107 @Override
108 public void removeRouteListener(RouteListener listener)
109 {
110 native_removeRouteListener(listener);
111 }
112 private native void native_removeRouteListener(RouteListener listener);
113}