Loading...
Searching...
No Matches
LocationWindow.java
Go to the documentation of this file.
1package com.navigine.idl.java;
2
3import java.util.ArrayList;
4import java.util.concurrent.atomic.AtomicBoolean;
5
19public abstract class LocationWindow {
34 public abstract void setSublocationId(int id);
35
49 public abstract Integer getSublocationId();
50
65 public abstract Camera getEnclosingCamera(BoundingBox boundingBox);
66
82 public abstract Point screenPositionToMeters(android.graphics.PointF point);
83
100 public abstract android.graphics.PointF metersToScreenPosition(Point point, boolean clipToViewport);
101
117
133 public abstract boolean removeCircleMapObject(CircleMapObject circleMapObject);
134
150
166 public abstract boolean removeIconMapObject(IconMapObject iconMapObject);
167
183
199 public abstract boolean removePolygonMapObject(PolygonMapObject polygonMapObject);
200
216
232 public abstract boolean removePolylineMapObject(PolylineMapObject polylineMapObject);
233
249
265 public abstract boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject);
266
280 public abstract void removeAllMapObjects();
281
297 public abstract void pickMapObjectAt(android.graphics.PointF point);
298
314 public abstract void pickMapFeatureAt(android.graphics.PointF point);
315
331 public abstract void addPickListener(PickListener listener);
332
347 public abstract void removePickListener(PickListener listener);
348
364 public abstract void addInputListener(InputListener listener);
365
380 public abstract void removeInputListener(InputListener listener);
381
397 public abstract void addCameraListener(CameraListener listener);
398
413 public abstract void removeCameraListener(CameraListener listener);
414
430
446
461 public abstract void addBuildingListener(BuildingListener listener);
462
477 public abstract void removeBuildingListener(BuildingListener listener);
478
495 public abstract void flyTo(Camera camera, int duration, CameraCallback callback);
496
514 public abstract void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback);
515
531 public abstract boolean selectMapFeature(String featureId);
532
548 public abstract boolean deselectMapFeature(String featureId);
549
563 public abstract void deselectAllMapFeatures();
564
580 public abstract void applyLayerFilter(String layer, ArrayList<MapFilterCondition> conditions);
581
596 public abstract float getZoomFactor();
597
612 public abstract void setZoomFactor(float newZoomFactor);
613
627 public abstract float getMinZoomFactor();
628
642 public abstract void setMinZoomFactor(float newMinZoomFactor);
643
657 public abstract float getMaxZoomFactor();
658
672 public abstract void setMaxZoomFactor(float newMaxZoomFactor);
673
688 public abstract boolean getStickToBorder();
689
704 public abstract void setStickToBorder(boolean newStickToBorder);
705
720 public abstract Camera getCamera();
721
736 public abstract void setCamera(Camera newCamera);
737
751 public abstract boolean getRotateGestureEnabled();
752
766 public abstract void setRotateGestureEnabled(boolean newRotateGestureEnabled);
767
781 public abstract boolean getTiltGesturesEnabled();
782
796 public abstract void setTiltGesturesEnabled(boolean newTiltGesturesEnabled);
797
811 public abstract boolean getScrollGesturesEnabled();
812
826 public abstract void setScrollGesturesEnabled(boolean newScrollGesturesEnabled);
827
841 public abstract boolean getZoomGesturesEnabled();
842
856 public abstract void setZoomGesturesEnabled(boolean newZoomGesturesEnabled);
857
872 public abstract float getPickRadius();
873
888 public abstract void setPickRadius(float newPickRadius);
889
903 public abstract ArrayList<String> getSelectedMapFeatures();
904
920 public static void setDebugFlag(DebugFlag flag, boolean on)
921 {
922 CppProxy.setDebugFlag(flag,
923 on);
924 }
925
941 public static boolean getDebugFlag(DebugFlag flag)
942 {
943 return CppProxy.getDebugFlag(flag);
944 }
945
946 private static final class CppProxy extends LocationWindow
947 {
948 private final long nativeRef;
949 private final AtomicBoolean destroyed = new AtomicBoolean(false);
950
951 private CppProxy(long nativeRef)
952 {
953 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
954 this.nativeRef = nativeRef;
955 }
956
957 private native void nativeDestroy(long nativeRef);
958 public void _djinni_private_destroy()
959 {
960 boolean destroyed = this.destroyed.getAndSet(true);
961 if (!destroyed) nativeDestroy(this.nativeRef);
962 }
963 protected void finalize() throws java.lang.Throwable
964 {
965 _djinni_private_destroy();
966 super.finalize();
967 }
968
969 // LocationWindow methods
970
971 @Override
972 public void setSublocationId(int id)
973 {
974 assert !this.destroyed.get() : "trying to use a destroyed object";
975 native_setSublocationId(this.nativeRef, id);
976 }
977 private native void native_setSublocationId(long _nativeRef, int id);
978
979 @Override
980 public Integer getSublocationId()
981 {
982 assert !this.destroyed.get() : "trying to use a destroyed object";
983 return native_getSublocationId(this.nativeRef);
984 }
985 private native Integer native_getSublocationId(long _nativeRef);
986
987 @Override
988 public Camera getEnclosingCamera(BoundingBox boundingBox)
989 {
990 assert !this.destroyed.get() : "trying to use a destroyed object";
991 return native_getEnclosingCamera(this.nativeRef, boundingBox);
992 }
993 private native Camera native_getEnclosingCamera(long _nativeRef, BoundingBox boundingBox);
994
995 @Override
996 public Point screenPositionToMeters(android.graphics.PointF point)
997 {
998 assert !this.destroyed.get() : "trying to use a destroyed object";
999 return native_screenPositionToMeters(this.nativeRef, point);
1000 }
1001 private native Point native_screenPositionToMeters(long _nativeRef, android.graphics.PointF point);
1002
1003 @Override
1004 public android.graphics.PointF metersToScreenPosition(Point point, boolean clipToViewport)
1005 {
1006 assert !this.destroyed.get() : "trying to use a destroyed object";
1007 return native_metersToScreenPosition(this.nativeRef, point, clipToViewport);
1008 }
1009 private native android.graphics.PointF native_metersToScreenPosition(long _nativeRef, Point point, boolean clipToViewport);
1010
1011 @Override
1012 public CircleMapObject addCircleMapObject()
1013 {
1014 assert !this.destroyed.get() : "trying to use a destroyed object";
1015 return native_addCircleMapObject(this.nativeRef);
1016 }
1017 private native CircleMapObject native_addCircleMapObject(long _nativeRef);
1018
1019 @Override
1020 public boolean removeCircleMapObject(CircleMapObject circleMapObject)
1021 {
1022 assert !this.destroyed.get() : "trying to use a destroyed object";
1023 return native_removeCircleMapObject(this.nativeRef, circleMapObject);
1024 }
1025 private native boolean native_removeCircleMapObject(long _nativeRef, CircleMapObject circleMapObject);
1026
1027 @Override
1028 public IconMapObject addIconMapObject()
1029 {
1030 assert !this.destroyed.get() : "trying to use a destroyed object";
1031 return native_addIconMapObject(this.nativeRef);
1032 }
1033 private native IconMapObject native_addIconMapObject(long _nativeRef);
1034
1035 @Override
1036 public boolean removeIconMapObject(IconMapObject iconMapObject)
1037 {
1038 assert !this.destroyed.get() : "trying to use a destroyed object";
1039 return native_removeIconMapObject(this.nativeRef, iconMapObject);
1040 }
1041 private native boolean native_removeIconMapObject(long _nativeRef, IconMapObject iconMapObject);
1042
1043 @Override
1044 public PolygonMapObject addPolygonMapObject()
1045 {
1046 assert !this.destroyed.get() : "trying to use a destroyed object";
1047 return native_addPolygonMapObject(this.nativeRef);
1048 }
1049 private native PolygonMapObject native_addPolygonMapObject(long _nativeRef);
1050
1051 @Override
1052 public boolean removePolygonMapObject(PolygonMapObject polygonMapObject)
1053 {
1054 assert !this.destroyed.get() : "trying to use a destroyed object";
1055 return native_removePolygonMapObject(this.nativeRef, polygonMapObject);
1056 }
1057 private native boolean native_removePolygonMapObject(long _nativeRef, PolygonMapObject polygonMapObject);
1058
1059 @Override
1060 public PolylineMapObject addPolylineMapObject()
1061 {
1062 assert !this.destroyed.get() : "trying to use a destroyed object";
1063 return native_addPolylineMapObject(this.nativeRef);
1064 }
1065 private native PolylineMapObject native_addPolylineMapObject(long _nativeRef);
1066
1067 @Override
1068 public boolean removePolylineMapObject(PolylineMapObject polylineMapObject)
1069 {
1070 assert !this.destroyed.get() : "trying to use a destroyed object";
1071 return native_removePolylineMapObject(this.nativeRef, polylineMapObject);
1072 }
1073 private native boolean native_removePolylineMapObject(long _nativeRef, PolylineMapObject polylineMapObject);
1074
1075 @Override
1076 public DottedPolylineMapObject addDottedPolylineMapObject()
1077 {
1078 assert !this.destroyed.get() : "trying to use a destroyed object";
1079 return native_addDottedPolylineMapObject(this.nativeRef);
1080 }
1081 private native DottedPolylineMapObject native_addDottedPolylineMapObject(long _nativeRef);
1082
1083 @Override
1084 public boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject)
1085 {
1086 assert !this.destroyed.get() : "trying to use a destroyed object";
1087 return native_removeDottedPolylineMapObject(this.nativeRef, dottedPolylineMapObject);
1088 }
1089 private native boolean native_removeDottedPolylineMapObject(long _nativeRef, DottedPolylineMapObject dottedPolylineMapObject);
1090
1091 @Override
1092 public void removeAllMapObjects()
1093 {
1094 assert !this.destroyed.get() : "trying to use a destroyed object";
1095 native_removeAllMapObjects(this.nativeRef);
1096 }
1097 private native void native_removeAllMapObjects(long _nativeRef);
1098
1099 @Override
1100 public void pickMapObjectAt(android.graphics.PointF point)
1101 {
1102 assert !this.destroyed.get() : "trying to use a destroyed object";
1103 native_pickMapObjectAt(this.nativeRef, point);
1104 }
1105 private native void native_pickMapObjectAt(long _nativeRef, android.graphics.PointF point);
1106
1107 @Override
1108 public void pickMapFeatureAt(android.graphics.PointF point)
1109 {
1110 assert !this.destroyed.get() : "trying to use a destroyed object";
1111 native_pickMapFeatureAt(this.nativeRef, point);
1112 }
1113 private native void native_pickMapFeatureAt(long _nativeRef, android.graphics.PointF point);
1114
1115 @Override
1116 public void addPickListener(PickListener listener)
1117 {
1118 assert !this.destroyed.get() : "trying to use a destroyed object";
1119 native_addPickListener(this.nativeRef, listener);
1120 }
1121 private native void native_addPickListener(long _nativeRef, PickListener listener);
1122
1123 @Override
1124 public void removePickListener(PickListener listener)
1125 {
1126 assert !this.destroyed.get() : "trying to use a destroyed object";
1127 native_removePickListener(this.nativeRef, listener);
1128 }
1129 private native void native_removePickListener(long _nativeRef, PickListener listener);
1130
1131 @Override
1132 public void addInputListener(InputListener listener)
1133 {
1134 assert !this.destroyed.get() : "trying to use a destroyed object";
1135 native_addInputListener(this.nativeRef, listener);
1136 }
1137 private native void native_addInputListener(long _nativeRef, InputListener listener);
1138
1139 @Override
1140 public void removeInputListener(InputListener listener)
1141 {
1142 assert !this.destroyed.get() : "trying to use a destroyed object";
1143 native_removeInputListener(this.nativeRef, listener);
1144 }
1145 private native void native_removeInputListener(long _nativeRef, InputListener listener);
1146
1147 @Override
1148 public void addCameraListener(CameraListener listener)
1149 {
1150 assert !this.destroyed.get() : "trying to use a destroyed object";
1151 native_addCameraListener(this.nativeRef, listener);
1152 }
1153 private native void native_addCameraListener(long _nativeRef, CameraListener listener);
1154
1155 @Override
1156 public void removeCameraListener(CameraListener listener)
1157 {
1158 assert !this.destroyed.get() : "trying to use a destroyed object";
1159 native_removeCameraListener(this.nativeRef, listener);
1160 }
1161 private native void native_removeCameraListener(long _nativeRef, CameraListener listener);
1162
1163 @Override
1164 public void addSublocationChangeListener(SublocationChangeListener listener)
1165 {
1166 assert !this.destroyed.get() : "trying to use a destroyed object";
1167 native_addSublocationChangeListener(this.nativeRef, listener);
1168 }
1169 private native void native_addSublocationChangeListener(long _nativeRef, SublocationChangeListener listener);
1170
1171 @Override
1172 public void removeSublocationChangeListener(SublocationChangeListener listener)
1173 {
1174 assert !this.destroyed.get() : "trying to use a destroyed object";
1175 native_removeSublocationChangeListener(this.nativeRef, listener);
1176 }
1177 private native void native_removeSublocationChangeListener(long _nativeRef, SublocationChangeListener listener);
1178
1179 @Override
1180 public void addBuildingListener(BuildingListener listener)
1181 {
1182 assert !this.destroyed.get() : "trying to use a destroyed object";
1183 native_addBuildingListener(this.nativeRef, listener);
1184 }
1185 private native void native_addBuildingListener(long _nativeRef, BuildingListener listener);
1186
1187 @Override
1188 public void removeBuildingListener(BuildingListener listener)
1189 {
1190 assert !this.destroyed.get() : "trying to use a destroyed object";
1191 native_removeBuildingListener(this.nativeRef, listener);
1192 }
1193 private native void native_removeBuildingListener(long _nativeRef, BuildingListener listener);
1194
1195 @Override
1196 public void flyTo(Camera camera, int duration, CameraCallback callback)
1197 {
1198 assert !this.destroyed.get() : "trying to use a destroyed object";
1199 native_flyTo(this.nativeRef, camera, duration, callback);
1200 }
1201 private native void native_flyTo(long _nativeRef, Camera camera, int duration, CameraCallback callback);
1202
1203 @Override
1204 public void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback)
1205 {
1206 assert !this.destroyed.get() : "trying to use a destroyed object";
1207 native_moveTo(this.nativeRef, camera, duration, animationType, callback);
1208 }
1209 private native void native_moveTo(long _nativeRef, Camera camera, int duration, AnimationType animationType, CameraCallback callback);
1210
1211 @Override
1212 public boolean selectMapFeature(String featureId)
1213 {
1214 assert !this.destroyed.get() : "trying to use a destroyed object";
1215 return native_selectMapFeature(this.nativeRef, featureId);
1216 }
1217 private native boolean native_selectMapFeature(long _nativeRef, String featureId);
1218
1219 @Override
1220 public boolean deselectMapFeature(String featureId)
1221 {
1222 assert !this.destroyed.get() : "trying to use a destroyed object";
1223 return native_deselectMapFeature(this.nativeRef, featureId);
1224 }
1225 private native boolean native_deselectMapFeature(long _nativeRef, String featureId);
1226
1227 @Override
1228 public void deselectAllMapFeatures()
1229 {
1230 assert !this.destroyed.get() : "trying to use a destroyed object";
1231 native_deselectAllMapFeatures(this.nativeRef);
1232 }
1233 private native void native_deselectAllMapFeatures(long _nativeRef);
1234
1235 @Override
1236 public void applyLayerFilter(String layer, ArrayList<MapFilterCondition> conditions)
1237 {
1238 assert !this.destroyed.get() : "trying to use a destroyed object";
1239 native_applyLayerFilter(this.nativeRef, layer, conditions);
1240 }
1241 private native void native_applyLayerFilter(long _nativeRef, String layer, ArrayList<MapFilterCondition> conditions);
1242
1243 @Override
1244 public float getZoomFactor()
1245 {
1246 assert !this.destroyed.get() : "trying to use a destroyed object";
1247 return native_getZoomFactor(this.nativeRef);
1248 }
1249 private native float native_getZoomFactor(long _nativeRef);
1250
1251 @Override
1252 public void setZoomFactor(float newZoomFactor)
1253 {
1254 assert !this.destroyed.get() : "trying to use a destroyed object";
1255 native_setZoomFactor(this.nativeRef, newZoomFactor);
1256 }
1257 private native void native_setZoomFactor(long _nativeRef, float newZoomFactor);
1258
1259 @Override
1260 public float getMinZoomFactor()
1261 {
1262 assert !this.destroyed.get() : "trying to use a destroyed object";
1263 return native_getMinZoomFactor(this.nativeRef);
1264 }
1265 private native float native_getMinZoomFactor(long _nativeRef);
1266
1267 @Override
1268 public void setMinZoomFactor(float newMinZoomFactor)
1269 {
1270 assert !this.destroyed.get() : "trying to use a destroyed object";
1271 native_setMinZoomFactor(this.nativeRef, newMinZoomFactor);
1272 }
1273 private native void native_setMinZoomFactor(long _nativeRef, float newMinZoomFactor);
1274
1275 @Override
1276 public float getMaxZoomFactor()
1277 {
1278 assert !this.destroyed.get() : "trying to use a destroyed object";
1279 return native_getMaxZoomFactor(this.nativeRef);
1280 }
1281 private native float native_getMaxZoomFactor(long _nativeRef);
1282
1283 @Override
1284 public void setMaxZoomFactor(float newMaxZoomFactor)
1285 {
1286 assert !this.destroyed.get() : "trying to use a destroyed object";
1287 native_setMaxZoomFactor(this.nativeRef, newMaxZoomFactor);
1288 }
1289 private native void native_setMaxZoomFactor(long _nativeRef, float newMaxZoomFactor);
1290
1291 @Override
1292 public boolean getStickToBorder()
1293 {
1294 assert !this.destroyed.get() : "trying to use a destroyed object";
1295 return native_getStickToBorder(this.nativeRef);
1296 }
1297 private native boolean native_getStickToBorder(long _nativeRef);
1298
1299 @Override
1300 public void setStickToBorder(boolean newStickToBorder)
1301 {
1302 assert !this.destroyed.get() : "trying to use a destroyed object";
1303 native_setStickToBorder(this.nativeRef, newStickToBorder);
1304 }
1305 private native void native_setStickToBorder(long _nativeRef, boolean newStickToBorder);
1306
1307 @Override
1308 public Camera getCamera()
1309 {
1310 assert !this.destroyed.get() : "trying to use a destroyed object";
1311 return native_getCamera(this.nativeRef);
1312 }
1313 private native Camera native_getCamera(long _nativeRef);
1314
1315 @Override
1316 public void setCamera(Camera newCamera)
1317 {
1318 assert !this.destroyed.get() : "trying to use a destroyed object";
1319 native_setCamera(this.nativeRef, newCamera);
1320 }
1321 private native void native_setCamera(long _nativeRef, Camera newCamera);
1322
1323 @Override
1324 public boolean getRotateGestureEnabled()
1325 {
1326 assert !this.destroyed.get() : "trying to use a destroyed object";
1327 return native_getRotateGestureEnabled(this.nativeRef);
1328 }
1329 private native boolean native_getRotateGestureEnabled(long _nativeRef);
1330
1331 @Override
1332 public void setRotateGestureEnabled(boolean newRotateGestureEnabled)
1333 {
1334 assert !this.destroyed.get() : "trying to use a destroyed object";
1335 native_setRotateGestureEnabled(this.nativeRef, newRotateGestureEnabled);
1336 }
1337 private native void native_setRotateGestureEnabled(long _nativeRef, boolean newRotateGestureEnabled);
1338
1339 @Override
1340 public boolean getTiltGesturesEnabled()
1341 {
1342 assert !this.destroyed.get() : "trying to use a destroyed object";
1343 return native_getTiltGesturesEnabled(this.nativeRef);
1344 }
1345 private native boolean native_getTiltGesturesEnabled(long _nativeRef);
1346
1347 @Override
1348 public void setTiltGesturesEnabled(boolean newTiltGesturesEnabled)
1349 {
1350 assert !this.destroyed.get() : "trying to use a destroyed object";
1351 native_setTiltGesturesEnabled(this.nativeRef, newTiltGesturesEnabled);
1352 }
1353 private native void native_setTiltGesturesEnabled(long _nativeRef, boolean newTiltGesturesEnabled);
1354
1355 @Override
1356 public boolean getScrollGesturesEnabled()
1357 {
1358 assert !this.destroyed.get() : "trying to use a destroyed object";
1359 return native_getScrollGesturesEnabled(this.nativeRef);
1360 }
1361 private native boolean native_getScrollGesturesEnabled(long _nativeRef);
1362
1363 @Override
1364 public void setScrollGesturesEnabled(boolean newScrollGesturesEnabled)
1365 {
1366 assert !this.destroyed.get() : "trying to use a destroyed object";
1367 native_setScrollGesturesEnabled(this.nativeRef, newScrollGesturesEnabled);
1368 }
1369 private native void native_setScrollGesturesEnabled(long _nativeRef, boolean newScrollGesturesEnabled);
1370
1371 @Override
1372 public boolean getZoomGesturesEnabled()
1373 {
1374 assert !this.destroyed.get() : "trying to use a destroyed object";
1375 return native_getZoomGesturesEnabled(this.nativeRef);
1376 }
1377 private native boolean native_getZoomGesturesEnabled(long _nativeRef);
1378
1379 @Override
1380 public void setZoomGesturesEnabled(boolean newZoomGesturesEnabled)
1381 {
1382 assert !this.destroyed.get() : "trying to use a destroyed object";
1383 native_setZoomGesturesEnabled(this.nativeRef, newZoomGesturesEnabled);
1384 }
1385 private native void native_setZoomGesturesEnabled(long _nativeRef, boolean newZoomGesturesEnabled);
1386
1387 @Override
1388 public float getPickRadius()
1389 {
1390 assert !this.destroyed.get() : "trying to use a destroyed object";
1391 return native_getPickRadius(this.nativeRef);
1392 }
1393 private native float native_getPickRadius(long _nativeRef);
1394
1395 @Override
1396 public void setPickRadius(float newPickRadius)
1397 {
1398 assert !this.destroyed.get() : "trying to use a destroyed object";
1399 native_setPickRadius(this.nativeRef, newPickRadius);
1400 }
1401 private native void native_setPickRadius(long _nativeRef, float newPickRadius);
1402
1403 @Override
1404 public ArrayList<String> getSelectedMapFeatures()
1405 {
1406 assert !this.destroyed.get() : "trying to use a destroyed object";
1407 return native_getSelectedMapFeatures(this.nativeRef);
1408 }
1409 private native ArrayList<String> native_getSelectedMapFeatures(long _nativeRef);
1410
1411 public static native void setDebugFlag(DebugFlag flag, boolean on);
1412
1413 public static native boolean getDebugFlag(DebugFlag flag);
1414 }
1415}