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
200
216
232 public abstract boolean removePolygonMapObject(PolygonMapObject polygonMapObject);
233
249
265 public abstract boolean removePolylineMapObject(PolylineMapObject polylineMapObject);
266
282
298 public abstract boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject);
299
315
331 public abstract boolean removeModelMapObject(ModelMapObject modelMapObject);
332
346 public abstract void removeAllMapObjects();
347
363 public abstract void pickMapObjectAt(android.graphics.PointF point);
364
380 public abstract void pickMapFeatureAt(android.graphics.PointF point);
381
397 public abstract void addPickListener(PickListener listener);
398
413 public abstract void removePickListener(PickListener listener);
414
430 public abstract void addInputListener(InputListener listener);
431
446 public abstract void removeInputListener(InputListener listener);
447
463 public abstract void addCameraListener(CameraListener listener);
464
479 public abstract void removeCameraListener(CameraListener listener);
480
496
512
527 public abstract void addBuildingListener(BuildingListener listener);
528
543 public abstract void removeBuildingListener(BuildingListener listener);
544
561 public abstract void flyTo(Camera camera, int duration, CameraCallback callback);
562
580 public abstract void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback);
581
597 public abstract boolean selectMapFeature(String featureId);
598
614 public abstract boolean deselectMapFeature(String featureId);
615
629 public abstract void deselectAllMapFeatures();
630
646 public abstract void applyLayerFilter(String layer, ArrayList<MapFilterCondition> conditions);
647
662 public abstract float getZoomFactor();
663
678 public abstract void setZoomFactor(float newZoomFactor);
679
693 public abstract float getMinZoomFactor();
694
708 public abstract void setMinZoomFactor(float newMinZoomFactor);
709
723 public abstract float getMaxZoomFactor();
724
738 public abstract void setMaxZoomFactor(float newMaxZoomFactor);
739
754 public abstract boolean getStickToBorder();
755
770 public abstract void setStickToBorder(boolean newStickToBorder);
771
786 public abstract Camera getCamera();
787
802 public abstract void setCamera(Camera newCamera);
803
817 public abstract boolean getRotateGestureEnabled();
818
832 public abstract void setRotateGestureEnabled(boolean newRotateGestureEnabled);
833
847 public abstract boolean getTiltGesturesEnabled();
848
862 public abstract void setTiltGesturesEnabled(boolean newTiltGesturesEnabled);
863
877 public abstract boolean getScrollGesturesEnabled();
878
892 public abstract void setScrollGesturesEnabled(boolean newScrollGesturesEnabled);
893
907 public abstract boolean getZoomGesturesEnabled();
908
922 public abstract void setZoomGesturesEnabled(boolean newZoomGesturesEnabled);
923
938 public abstract float getPickRadius();
939
954 public abstract void setPickRadius(float newPickRadius);
955
969 public abstract ArrayList<String> getSelectedMapFeatures();
970
986 public static void setDebugFlag(DebugFlag flag, boolean on)
987 {
988 CppProxy.setDebugFlag(flag,
989 on);
990 }
991
1007 public static boolean getDebugFlag(DebugFlag flag)
1008 {
1009 return CppProxy.getDebugFlag(flag);
1010 }
1011
1012 private static final class CppProxy extends LocationWindow
1013 {
1014 private final long nativeRef;
1015 private final AtomicBoolean destroyed = new AtomicBoolean(false);
1016
1017 private CppProxy(long nativeRef)
1018 {
1019 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
1020 this.nativeRef = nativeRef;
1021 }
1022
1023 private native void nativeDestroy(long nativeRef);
1024 public void _djinni_private_destroy()
1025 {
1026 boolean destroyed = this.destroyed.getAndSet(true);
1027 if (!destroyed) nativeDestroy(this.nativeRef);
1028 }
1029 protected void finalize() throws java.lang.Throwable
1030 {
1031 _djinni_private_destroy();
1032 super.finalize();
1033 }
1034
1035 // LocationWindow methods
1036
1037 @Override
1038 public void setSublocationId(int id)
1039 {
1040 assert !this.destroyed.get() : "trying to use a destroyed object";
1041 native_setSublocationId(this.nativeRef, id);
1042 }
1043 private native void native_setSublocationId(long _nativeRef, int id);
1044
1045 @Override
1046 public Integer getSublocationId()
1047 {
1048 assert !this.destroyed.get() : "trying to use a destroyed object";
1049 return native_getSublocationId(this.nativeRef);
1050 }
1051 private native Integer native_getSublocationId(long _nativeRef);
1052
1053 @Override
1054 public Camera getEnclosingCamera(BoundingBox boundingBox)
1055 {
1056 assert !this.destroyed.get() : "trying to use a destroyed object";
1057 return native_getEnclosingCamera(this.nativeRef, boundingBox);
1058 }
1059 private native Camera native_getEnclosingCamera(long _nativeRef, BoundingBox boundingBox);
1060
1061 @Override
1062 public Point screenPositionToMeters(android.graphics.PointF point)
1063 {
1064 assert !this.destroyed.get() : "trying to use a destroyed object";
1065 return native_screenPositionToMeters(this.nativeRef, point);
1066 }
1067 private native Point native_screenPositionToMeters(long _nativeRef, android.graphics.PointF point);
1068
1069 @Override
1070 public android.graphics.PointF metersToScreenPosition(Point point, boolean clipToViewport)
1071 {
1072 assert !this.destroyed.get() : "trying to use a destroyed object";
1073 return native_metersToScreenPosition(this.nativeRef, point, clipToViewport);
1074 }
1075 private native android.graphics.PointF native_metersToScreenPosition(long _nativeRef, Point point, boolean clipToViewport);
1076
1077 @Override
1078 public CircleMapObject addCircleMapObject()
1079 {
1080 assert !this.destroyed.get() : "trying to use a destroyed object";
1081 return native_addCircleMapObject(this.nativeRef);
1082 }
1083 private native CircleMapObject native_addCircleMapObject(long _nativeRef);
1084
1085 @Override
1086 public boolean removeCircleMapObject(CircleMapObject circleMapObject)
1087 {
1088 assert !this.destroyed.get() : "trying to use a destroyed object";
1089 return native_removeCircleMapObject(this.nativeRef, circleMapObject);
1090 }
1091 private native boolean native_removeCircleMapObject(long _nativeRef, CircleMapObject circleMapObject);
1092
1093 @Override
1094 public IconMapObject addIconMapObject()
1095 {
1096 assert !this.destroyed.get() : "trying to use a destroyed object";
1097 return native_addIconMapObject(this.nativeRef);
1098 }
1099 private native IconMapObject native_addIconMapObject(long _nativeRef);
1100
1101 @Override
1102 public boolean removeIconMapObject(IconMapObject iconMapObject)
1103 {
1104 assert !this.destroyed.get() : "trying to use a destroyed object";
1105 return native_removeIconMapObject(this.nativeRef, iconMapObject);
1106 }
1107 private native boolean native_removeIconMapObject(long _nativeRef, IconMapObject iconMapObject);
1108
1109 @Override
1110 public ClusterMapObjectController addClusterMapObjectController()
1111 {
1112 assert !this.destroyed.get() : "trying to use a destroyed object";
1113 return native_addClusterMapObjectController(this.nativeRef);
1114 }
1115 private native ClusterMapObjectController native_addClusterMapObjectController(long _nativeRef);
1116
1117 @Override
1118 public boolean removeClusterMapObjectController(ClusterMapObjectController controller)
1119 {
1120 assert !this.destroyed.get() : "trying to use a destroyed object";
1121 return native_removeClusterMapObjectController(this.nativeRef, controller);
1122 }
1123 private native boolean native_removeClusterMapObjectController(long _nativeRef, ClusterMapObjectController controller);
1124
1125 @Override
1126 public PolygonMapObject addPolygonMapObject()
1127 {
1128 assert !this.destroyed.get() : "trying to use a destroyed object";
1129 return native_addPolygonMapObject(this.nativeRef);
1130 }
1131 private native PolygonMapObject native_addPolygonMapObject(long _nativeRef);
1132
1133 @Override
1134 public boolean removePolygonMapObject(PolygonMapObject polygonMapObject)
1135 {
1136 assert !this.destroyed.get() : "trying to use a destroyed object";
1137 return native_removePolygonMapObject(this.nativeRef, polygonMapObject);
1138 }
1139 private native boolean native_removePolygonMapObject(long _nativeRef, PolygonMapObject polygonMapObject);
1140
1141 @Override
1142 public PolylineMapObject addPolylineMapObject()
1143 {
1144 assert !this.destroyed.get() : "trying to use a destroyed object";
1145 return native_addPolylineMapObject(this.nativeRef);
1146 }
1147 private native PolylineMapObject native_addPolylineMapObject(long _nativeRef);
1148
1149 @Override
1150 public boolean removePolylineMapObject(PolylineMapObject polylineMapObject)
1151 {
1152 assert !this.destroyed.get() : "trying to use a destroyed object";
1153 return native_removePolylineMapObject(this.nativeRef, polylineMapObject);
1154 }
1155 private native boolean native_removePolylineMapObject(long _nativeRef, PolylineMapObject polylineMapObject);
1156
1157 @Override
1158 public DottedPolylineMapObject addDottedPolylineMapObject()
1159 {
1160 assert !this.destroyed.get() : "trying to use a destroyed object";
1161 return native_addDottedPolylineMapObject(this.nativeRef);
1162 }
1163 private native DottedPolylineMapObject native_addDottedPolylineMapObject(long _nativeRef);
1164
1165 @Override
1166 public boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject)
1167 {
1168 assert !this.destroyed.get() : "trying to use a destroyed object";
1169 return native_removeDottedPolylineMapObject(this.nativeRef, dottedPolylineMapObject);
1170 }
1171 private native boolean native_removeDottedPolylineMapObject(long _nativeRef, DottedPolylineMapObject dottedPolylineMapObject);
1172
1173 @Override
1174 public ModelMapObject addModelMapObject()
1175 {
1176 assert !this.destroyed.get() : "trying to use a destroyed object";
1177 return native_addModelMapObject(this.nativeRef);
1178 }
1179 private native ModelMapObject native_addModelMapObject(long _nativeRef);
1180
1181 @Override
1182 public boolean removeModelMapObject(ModelMapObject modelMapObject)
1183 {
1184 assert !this.destroyed.get() : "trying to use a destroyed object";
1185 return native_removeModelMapObject(this.nativeRef, modelMapObject);
1186 }
1187 private native boolean native_removeModelMapObject(long _nativeRef, ModelMapObject modelMapObject);
1188
1189 @Override
1190 public void removeAllMapObjects()
1191 {
1192 assert !this.destroyed.get() : "trying to use a destroyed object";
1193 native_removeAllMapObjects(this.nativeRef);
1194 }
1195 private native void native_removeAllMapObjects(long _nativeRef);
1196
1197 @Override
1198 public void pickMapObjectAt(android.graphics.PointF point)
1199 {
1200 assert !this.destroyed.get() : "trying to use a destroyed object";
1201 native_pickMapObjectAt(this.nativeRef, point);
1202 }
1203 private native void native_pickMapObjectAt(long _nativeRef, android.graphics.PointF point);
1204
1205 @Override
1206 public void pickMapFeatureAt(android.graphics.PointF point)
1207 {
1208 assert !this.destroyed.get() : "trying to use a destroyed object";
1209 native_pickMapFeatureAt(this.nativeRef, point);
1210 }
1211 private native void native_pickMapFeatureAt(long _nativeRef, android.graphics.PointF point);
1212
1213 @Override
1214 public void addPickListener(PickListener listener)
1215 {
1216 assert !this.destroyed.get() : "trying to use a destroyed object";
1217 native_addPickListener(this.nativeRef, listener);
1218 }
1219 private native void native_addPickListener(long _nativeRef, PickListener listener);
1220
1221 @Override
1222 public void removePickListener(PickListener listener)
1223 {
1224 assert !this.destroyed.get() : "trying to use a destroyed object";
1225 native_removePickListener(this.nativeRef, listener);
1226 }
1227 private native void native_removePickListener(long _nativeRef, PickListener listener);
1228
1229 @Override
1230 public void addInputListener(InputListener listener)
1231 {
1232 assert !this.destroyed.get() : "trying to use a destroyed object";
1233 native_addInputListener(this.nativeRef, listener);
1234 }
1235 private native void native_addInputListener(long _nativeRef, InputListener listener);
1236
1237 @Override
1238 public void removeInputListener(InputListener listener)
1239 {
1240 assert !this.destroyed.get() : "trying to use a destroyed object";
1241 native_removeInputListener(this.nativeRef, listener);
1242 }
1243 private native void native_removeInputListener(long _nativeRef, InputListener listener);
1244
1245 @Override
1246 public void addCameraListener(CameraListener listener)
1247 {
1248 assert !this.destroyed.get() : "trying to use a destroyed object";
1249 native_addCameraListener(this.nativeRef, listener);
1250 }
1251 private native void native_addCameraListener(long _nativeRef, CameraListener listener);
1252
1253 @Override
1254 public void removeCameraListener(CameraListener listener)
1255 {
1256 assert !this.destroyed.get() : "trying to use a destroyed object";
1257 native_removeCameraListener(this.nativeRef, listener);
1258 }
1259 private native void native_removeCameraListener(long _nativeRef, CameraListener listener);
1260
1261 @Override
1262 public void addSublocationChangeListener(SublocationChangeListener listener)
1263 {
1264 assert !this.destroyed.get() : "trying to use a destroyed object";
1265 native_addSublocationChangeListener(this.nativeRef, listener);
1266 }
1267 private native void native_addSublocationChangeListener(long _nativeRef, SublocationChangeListener listener);
1268
1269 @Override
1270 public void removeSublocationChangeListener(SublocationChangeListener listener)
1271 {
1272 assert !this.destroyed.get() : "trying to use a destroyed object";
1273 native_removeSublocationChangeListener(this.nativeRef, listener);
1274 }
1275 private native void native_removeSublocationChangeListener(long _nativeRef, SublocationChangeListener listener);
1276
1277 @Override
1278 public void addBuildingListener(BuildingListener listener)
1279 {
1280 assert !this.destroyed.get() : "trying to use a destroyed object";
1281 native_addBuildingListener(this.nativeRef, listener);
1282 }
1283 private native void native_addBuildingListener(long _nativeRef, BuildingListener listener);
1284
1285 @Override
1286 public void removeBuildingListener(BuildingListener listener)
1287 {
1288 assert !this.destroyed.get() : "trying to use a destroyed object";
1289 native_removeBuildingListener(this.nativeRef, listener);
1290 }
1291 private native void native_removeBuildingListener(long _nativeRef, BuildingListener listener);
1292
1293 @Override
1294 public void flyTo(Camera camera, int duration, CameraCallback callback)
1295 {
1296 assert !this.destroyed.get() : "trying to use a destroyed object";
1297 native_flyTo(this.nativeRef, camera, duration, callback);
1298 }
1299 private native void native_flyTo(long _nativeRef, Camera camera, int duration, CameraCallback callback);
1300
1301 @Override
1302 public void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback)
1303 {
1304 assert !this.destroyed.get() : "trying to use a destroyed object";
1305 native_moveTo(this.nativeRef, camera, duration, animationType, callback);
1306 }
1307 private native void native_moveTo(long _nativeRef, Camera camera, int duration, AnimationType animationType, CameraCallback callback);
1308
1309 @Override
1310 public boolean selectMapFeature(String featureId)
1311 {
1312 assert !this.destroyed.get() : "trying to use a destroyed object";
1313 return native_selectMapFeature(this.nativeRef, featureId);
1314 }
1315 private native boolean native_selectMapFeature(long _nativeRef, String featureId);
1316
1317 @Override
1318 public boolean deselectMapFeature(String featureId)
1319 {
1320 assert !this.destroyed.get() : "trying to use a destroyed object";
1321 return native_deselectMapFeature(this.nativeRef, featureId);
1322 }
1323 private native boolean native_deselectMapFeature(long _nativeRef, String featureId);
1324
1325 @Override
1326 public void deselectAllMapFeatures()
1327 {
1328 assert !this.destroyed.get() : "trying to use a destroyed object";
1329 native_deselectAllMapFeatures(this.nativeRef);
1330 }
1331 private native void native_deselectAllMapFeatures(long _nativeRef);
1332
1333 @Override
1334 public void applyLayerFilter(String layer, ArrayList<MapFilterCondition> conditions)
1335 {
1336 assert !this.destroyed.get() : "trying to use a destroyed object";
1337 native_applyLayerFilter(this.nativeRef, layer, conditions);
1338 }
1339 private native void native_applyLayerFilter(long _nativeRef, String layer, ArrayList<MapFilterCondition> conditions);
1340
1341 @Override
1342 public float getZoomFactor()
1343 {
1344 assert !this.destroyed.get() : "trying to use a destroyed object";
1345 return native_getZoomFactor(this.nativeRef);
1346 }
1347 private native float native_getZoomFactor(long _nativeRef);
1348
1349 @Override
1350 public void setZoomFactor(float newZoomFactor)
1351 {
1352 assert !this.destroyed.get() : "trying to use a destroyed object";
1353 native_setZoomFactor(this.nativeRef, newZoomFactor);
1354 }
1355 private native void native_setZoomFactor(long _nativeRef, float newZoomFactor);
1356
1357 @Override
1358 public float getMinZoomFactor()
1359 {
1360 assert !this.destroyed.get() : "trying to use a destroyed object";
1361 return native_getMinZoomFactor(this.nativeRef);
1362 }
1363 private native float native_getMinZoomFactor(long _nativeRef);
1364
1365 @Override
1366 public void setMinZoomFactor(float newMinZoomFactor)
1367 {
1368 assert !this.destroyed.get() : "trying to use a destroyed object";
1369 native_setMinZoomFactor(this.nativeRef, newMinZoomFactor);
1370 }
1371 private native void native_setMinZoomFactor(long _nativeRef, float newMinZoomFactor);
1372
1373 @Override
1374 public float getMaxZoomFactor()
1375 {
1376 assert !this.destroyed.get() : "trying to use a destroyed object";
1377 return native_getMaxZoomFactor(this.nativeRef);
1378 }
1379 private native float native_getMaxZoomFactor(long _nativeRef);
1380
1381 @Override
1382 public void setMaxZoomFactor(float newMaxZoomFactor)
1383 {
1384 assert !this.destroyed.get() : "trying to use a destroyed object";
1385 native_setMaxZoomFactor(this.nativeRef, newMaxZoomFactor);
1386 }
1387 private native void native_setMaxZoomFactor(long _nativeRef, float newMaxZoomFactor);
1388
1389 @Override
1390 public boolean getStickToBorder()
1391 {
1392 assert !this.destroyed.get() : "trying to use a destroyed object";
1393 return native_getStickToBorder(this.nativeRef);
1394 }
1395 private native boolean native_getStickToBorder(long _nativeRef);
1396
1397 @Override
1398 public void setStickToBorder(boolean newStickToBorder)
1399 {
1400 assert !this.destroyed.get() : "trying to use a destroyed object";
1401 native_setStickToBorder(this.nativeRef, newStickToBorder);
1402 }
1403 private native void native_setStickToBorder(long _nativeRef, boolean newStickToBorder);
1404
1405 @Override
1406 public Camera getCamera()
1407 {
1408 assert !this.destroyed.get() : "trying to use a destroyed object";
1409 return native_getCamera(this.nativeRef);
1410 }
1411 private native Camera native_getCamera(long _nativeRef);
1412
1413 @Override
1414 public void setCamera(Camera newCamera)
1415 {
1416 assert !this.destroyed.get() : "trying to use a destroyed object";
1417 native_setCamera(this.nativeRef, newCamera);
1418 }
1419 private native void native_setCamera(long _nativeRef, Camera newCamera);
1420
1421 @Override
1422 public boolean getRotateGestureEnabled()
1423 {
1424 assert !this.destroyed.get() : "trying to use a destroyed object";
1425 return native_getRotateGestureEnabled(this.nativeRef);
1426 }
1427 private native boolean native_getRotateGestureEnabled(long _nativeRef);
1428
1429 @Override
1430 public void setRotateGestureEnabled(boolean newRotateGestureEnabled)
1431 {
1432 assert !this.destroyed.get() : "trying to use a destroyed object";
1433 native_setRotateGestureEnabled(this.nativeRef, newRotateGestureEnabled);
1434 }
1435 private native void native_setRotateGestureEnabled(long _nativeRef, boolean newRotateGestureEnabled);
1436
1437 @Override
1438 public boolean getTiltGesturesEnabled()
1439 {
1440 assert !this.destroyed.get() : "trying to use a destroyed object";
1441 return native_getTiltGesturesEnabled(this.nativeRef);
1442 }
1443 private native boolean native_getTiltGesturesEnabled(long _nativeRef);
1444
1445 @Override
1446 public void setTiltGesturesEnabled(boolean newTiltGesturesEnabled)
1447 {
1448 assert !this.destroyed.get() : "trying to use a destroyed object";
1449 native_setTiltGesturesEnabled(this.nativeRef, newTiltGesturesEnabled);
1450 }
1451 private native void native_setTiltGesturesEnabled(long _nativeRef, boolean newTiltGesturesEnabled);
1452
1453 @Override
1454 public boolean getScrollGesturesEnabled()
1455 {
1456 assert !this.destroyed.get() : "trying to use a destroyed object";
1457 return native_getScrollGesturesEnabled(this.nativeRef);
1458 }
1459 private native boolean native_getScrollGesturesEnabled(long _nativeRef);
1460
1461 @Override
1462 public void setScrollGesturesEnabled(boolean newScrollGesturesEnabled)
1463 {
1464 assert !this.destroyed.get() : "trying to use a destroyed object";
1465 native_setScrollGesturesEnabled(this.nativeRef, newScrollGesturesEnabled);
1466 }
1467 private native void native_setScrollGesturesEnabled(long _nativeRef, boolean newScrollGesturesEnabled);
1468
1469 @Override
1470 public boolean getZoomGesturesEnabled()
1471 {
1472 assert !this.destroyed.get() : "trying to use a destroyed object";
1473 return native_getZoomGesturesEnabled(this.nativeRef);
1474 }
1475 private native boolean native_getZoomGesturesEnabled(long _nativeRef);
1476
1477 @Override
1478 public void setZoomGesturesEnabled(boolean newZoomGesturesEnabled)
1479 {
1480 assert !this.destroyed.get() : "trying to use a destroyed object";
1481 native_setZoomGesturesEnabled(this.nativeRef, newZoomGesturesEnabled);
1482 }
1483 private native void native_setZoomGesturesEnabled(long _nativeRef, boolean newZoomGesturesEnabled);
1484
1485 @Override
1486 public float getPickRadius()
1487 {
1488 assert !this.destroyed.get() : "trying to use a destroyed object";
1489 return native_getPickRadius(this.nativeRef);
1490 }
1491 private native float native_getPickRadius(long _nativeRef);
1492
1493 @Override
1494 public void setPickRadius(float newPickRadius)
1495 {
1496 assert !this.destroyed.get() : "trying to use a destroyed object";
1497 native_setPickRadius(this.nativeRef, newPickRadius);
1498 }
1499 private native void native_setPickRadius(long _nativeRef, float newPickRadius);
1500
1501 @Override
1502 public ArrayList<String> getSelectedMapFeatures()
1503 {
1504 assert !this.destroyed.get() : "trying to use a destroyed object";
1505 return native_getSelectedMapFeatures(this.nativeRef);
1506 }
1507 private native ArrayList<String> native_getSelectedMapFeatures(long _nativeRef);
1508
1509 public static native void setDebugFlag(DebugFlag flag, boolean on);
1510
1511 public static native boolean getDebugFlag(DebugFlag flag);
1512 }
1513}