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 {
26 public abstract void setSublocationId(int id);
27
35 public abstract Point screenPositionToMeters(android.graphics.PointF point);
36
45 public abstract android.graphics.PointF metersToScreenPosition(Point point, boolean clipToViewport);
46
54
62 public abstract boolean removeCircleMapObject(CircleMapObject circleMapObject);
63
71
79 public abstract boolean removeIconMapObject(IconMapObject iconMapObject);
80
88
96 public abstract boolean removePolygonMapObject(PolygonMapObject polygonMapObject);
97
105
113 public abstract boolean removePolylineMapObject(PolylineMapObject polylineMapObject);
114
122
130 public abstract boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject);
131
137 public abstract void removeAllMapObjects();
138
146 public abstract void pickMapObjectAt(android.graphics.PointF point);
147
155 public abstract void pickMapFeatureAt(android.graphics.PointF point);
156
164 public abstract void addPickListener(PickListener listener);
165
172 public abstract void removePickListener(PickListener listener);
173
181 public abstract void addInputListener(InputListener listener);
182
189 public abstract void removeInputListener(InputListener listener);
190
198 public abstract void addCameraListener(CameraListener listener);
199
206 public abstract void removeCameraListener(CameraListener listener);
207
216 public abstract void flyTo(Camera camera, int duration, CameraCallback callback);
217
225 public abstract boolean selectMapFeature(String featureId);
226
234 public abstract boolean deselectMapFeature(String featureId);
235
241 public abstract void deselectAllMapFeatures();
242
251 public abstract void applyFilter(String filter, String layer);
252
262 public abstract void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback);
263
270 public abstract float getZoomFactor();
271
278 public abstract void setZoomFactor(float newZoomFactor);
279
285 public abstract float getMinZoomFactor();
286
292 public abstract void setMinZoomFactor(float newMinZoomFactor);
293
299 public abstract float getMaxZoomFactor();
300
306 public abstract void setMaxZoomFactor(float newMaxZoomFactor);
307
314 public abstract boolean getStickToBorder();
315
322 public abstract void setStickToBorder(boolean newStickToBorder);
323
330 public abstract Camera getCamera();
331
338 public abstract void setCamera(Camera newCamera);
339
345 public abstract boolean getRotateGestureEnabled();
346
352 public abstract void setRotateGestureEnabled(boolean newRotateGestureEnabled);
353
359 public abstract boolean getTiltGesturesEnabled();
360
366 public abstract void setTiltGesturesEnabled(boolean newTiltGesturesEnabled);
367
373 public abstract boolean getScrollGesturesEnabled();
374
380 public abstract void setScrollGesturesEnabled(boolean newScrollGesturesEnabled);
381
387 public abstract boolean getZoomGesturesEnabled();
388
394 public abstract void setZoomGesturesEnabled(boolean newZoomGesturesEnabled);
395
402 public abstract float getPickRadius();
403
410 public abstract void setPickRadius(float newPickRadius);
411
417 public abstract ArrayList<String> getSelectedMapFeatures();
418
426 public static void setDebugFlag(DebugFlag flag, boolean on)
427 {
428 CppProxy.setDebugFlag(flag,
429 on);
430 }
431
439 public static boolean getDebugFlag(DebugFlag flag)
440 {
441 return CppProxy.getDebugFlag(flag);
442 }
443
444 private static final class CppProxy extends LocationWindow
445 {
446 private final long nativeRef;
447 private final AtomicBoolean destroyed = new AtomicBoolean(false);
448
449 private CppProxy(long nativeRef)
450 {
451 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
452 this.nativeRef = nativeRef;
453 }
454
455 private native void nativeDestroy(long nativeRef);
456 public void _djinni_private_destroy()
457 {
458 boolean destroyed = this.destroyed.getAndSet(true);
459 if (!destroyed) nativeDestroy(this.nativeRef);
460 }
461 protected void finalize() throws java.lang.Throwable
462 {
463 _djinni_private_destroy();
464 super.finalize();
465 }
466
467 // LocationWindow methods
468
469 @Override
470 public void setSublocationId(int id)
471 {
472 assert !this.destroyed.get() : "trying to use a destroyed object";
473 native_setSublocationId(this.nativeRef, id);
474 }
475 private native void native_setSublocationId(long _nativeRef, int id);
476
477 @Override
478 public Point screenPositionToMeters(android.graphics.PointF point)
479 {
480 assert !this.destroyed.get() : "trying to use a destroyed object";
481 return native_screenPositionToMeters(this.nativeRef, point);
482 }
483 private native Point native_screenPositionToMeters(long _nativeRef, android.graphics.PointF point);
484
485 @Override
486 public android.graphics.PointF metersToScreenPosition(Point point, boolean clipToViewport)
487 {
488 assert !this.destroyed.get() : "trying to use a destroyed object";
489 return native_metersToScreenPosition(this.nativeRef, point, clipToViewport);
490 }
491 private native android.graphics.PointF native_metersToScreenPosition(long _nativeRef, Point point, boolean clipToViewport);
492
493 @Override
494 public CircleMapObject addCircleMapObject()
495 {
496 assert !this.destroyed.get() : "trying to use a destroyed object";
497 return native_addCircleMapObject(this.nativeRef);
498 }
499 private native CircleMapObject native_addCircleMapObject(long _nativeRef);
500
501 @Override
502 public boolean removeCircleMapObject(CircleMapObject circleMapObject)
503 {
504 assert !this.destroyed.get() : "trying to use a destroyed object";
505 return native_removeCircleMapObject(this.nativeRef, circleMapObject);
506 }
507 private native boolean native_removeCircleMapObject(long _nativeRef, CircleMapObject circleMapObject);
508
509 @Override
510 public IconMapObject addIconMapObject()
511 {
512 assert !this.destroyed.get() : "trying to use a destroyed object";
513 return native_addIconMapObject(this.nativeRef);
514 }
515 private native IconMapObject native_addIconMapObject(long _nativeRef);
516
517 @Override
518 public boolean removeIconMapObject(IconMapObject iconMapObject)
519 {
520 assert !this.destroyed.get() : "trying to use a destroyed object";
521 return native_removeIconMapObject(this.nativeRef, iconMapObject);
522 }
523 private native boolean native_removeIconMapObject(long _nativeRef, IconMapObject iconMapObject);
524
525 @Override
526 public PolygonMapObject addPolygonMapObject()
527 {
528 assert !this.destroyed.get() : "trying to use a destroyed object";
529 return native_addPolygonMapObject(this.nativeRef);
530 }
531 private native PolygonMapObject native_addPolygonMapObject(long _nativeRef);
532
533 @Override
534 public boolean removePolygonMapObject(PolygonMapObject polygonMapObject)
535 {
536 assert !this.destroyed.get() : "trying to use a destroyed object";
537 return native_removePolygonMapObject(this.nativeRef, polygonMapObject);
538 }
539 private native boolean native_removePolygonMapObject(long _nativeRef, PolygonMapObject polygonMapObject);
540
541 @Override
542 public PolylineMapObject addPolylineMapObject()
543 {
544 assert !this.destroyed.get() : "trying to use a destroyed object";
545 return native_addPolylineMapObject(this.nativeRef);
546 }
547 private native PolylineMapObject native_addPolylineMapObject(long _nativeRef);
548
549 @Override
550 public boolean removePolylineMapObject(PolylineMapObject polylineMapObject)
551 {
552 assert !this.destroyed.get() : "trying to use a destroyed object";
553 return native_removePolylineMapObject(this.nativeRef, polylineMapObject);
554 }
555 private native boolean native_removePolylineMapObject(long _nativeRef, PolylineMapObject polylineMapObject);
556
557 @Override
558 public DottedPolylineMapObject addDottedPolylineMapObject()
559 {
560 assert !this.destroyed.get() : "trying to use a destroyed object";
561 return native_addDottedPolylineMapObject(this.nativeRef);
562 }
563 private native DottedPolylineMapObject native_addDottedPolylineMapObject(long _nativeRef);
564
565 @Override
566 public boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject)
567 {
568 assert !this.destroyed.get() : "trying to use a destroyed object";
569 return native_removeDottedPolylineMapObject(this.nativeRef, dottedPolylineMapObject);
570 }
571 private native boolean native_removeDottedPolylineMapObject(long _nativeRef, DottedPolylineMapObject dottedPolylineMapObject);
572
573 @Override
574 public void removeAllMapObjects()
575 {
576 assert !this.destroyed.get() : "trying to use a destroyed object";
577 native_removeAllMapObjects(this.nativeRef);
578 }
579 private native void native_removeAllMapObjects(long _nativeRef);
580
581 @Override
582 public void pickMapObjectAt(android.graphics.PointF point)
583 {
584 assert !this.destroyed.get() : "trying to use a destroyed object";
585 native_pickMapObjectAt(this.nativeRef, point);
586 }
587 private native void native_pickMapObjectAt(long _nativeRef, android.graphics.PointF point);
588
589 @Override
590 public void pickMapFeatureAt(android.graphics.PointF point)
591 {
592 assert !this.destroyed.get() : "trying to use a destroyed object";
593 native_pickMapFeatureAt(this.nativeRef, point);
594 }
595 private native void native_pickMapFeatureAt(long _nativeRef, android.graphics.PointF point);
596
597 @Override
598 public void addPickListener(PickListener listener)
599 {
600 assert !this.destroyed.get() : "trying to use a destroyed object";
601 native_addPickListener(this.nativeRef, listener);
602 }
603 private native void native_addPickListener(long _nativeRef, PickListener listener);
604
605 @Override
606 public void removePickListener(PickListener listener)
607 {
608 assert !this.destroyed.get() : "trying to use a destroyed object";
609 native_removePickListener(this.nativeRef, listener);
610 }
611 private native void native_removePickListener(long _nativeRef, PickListener listener);
612
613 @Override
614 public void addInputListener(InputListener listener)
615 {
616 assert !this.destroyed.get() : "trying to use a destroyed object";
617 native_addInputListener(this.nativeRef, listener);
618 }
619 private native void native_addInputListener(long _nativeRef, InputListener listener);
620
621 @Override
622 public void removeInputListener(InputListener listener)
623 {
624 assert !this.destroyed.get() : "trying to use a destroyed object";
625 native_removeInputListener(this.nativeRef, listener);
626 }
627 private native void native_removeInputListener(long _nativeRef, InputListener listener);
628
629 @Override
630 public void addCameraListener(CameraListener listener)
631 {
632 assert !this.destroyed.get() : "trying to use a destroyed object";
633 native_addCameraListener(this.nativeRef, listener);
634 }
635 private native void native_addCameraListener(long _nativeRef, CameraListener listener);
636
637 @Override
638 public void removeCameraListener(CameraListener listener)
639 {
640 assert !this.destroyed.get() : "trying to use a destroyed object";
641 native_removeCameraListener(this.nativeRef, listener);
642 }
643 private native void native_removeCameraListener(long _nativeRef, CameraListener listener);
644
645 @Override
646 public void flyTo(Camera camera, int duration, CameraCallback callback)
647 {
648 assert !this.destroyed.get() : "trying to use a destroyed object";
649 native_flyTo(this.nativeRef, camera, duration, callback);
650 }
651 private native void native_flyTo(long _nativeRef, Camera camera, int duration, CameraCallback callback);
652
653 @Override
654 public boolean selectMapFeature(String featureId)
655 {
656 assert !this.destroyed.get() : "trying to use a destroyed object";
657 return native_selectMapFeature(this.nativeRef, featureId);
658 }
659 private native boolean native_selectMapFeature(long _nativeRef, String featureId);
660
661 @Override
662 public boolean deselectMapFeature(String featureId)
663 {
664 assert !this.destroyed.get() : "trying to use a destroyed object";
665 return native_deselectMapFeature(this.nativeRef, featureId);
666 }
667 private native boolean native_deselectMapFeature(long _nativeRef, String featureId);
668
669 @Override
670 public void deselectAllMapFeatures()
671 {
672 assert !this.destroyed.get() : "trying to use a destroyed object";
673 native_deselectAllMapFeatures(this.nativeRef);
674 }
675 private native void native_deselectAllMapFeatures(long _nativeRef);
676
677 @Override
678 public void applyFilter(String filter, String layer)
679 {
680 assert !this.destroyed.get() : "trying to use a destroyed object";
681 native_applyFilter(this.nativeRef, filter, layer);
682 }
683 private native void native_applyFilter(long _nativeRef, String filter, String layer);
684
685 @Override
686 public void moveTo(Camera camera, int duration, AnimationType animationType, CameraCallback callback)
687 {
688 assert !this.destroyed.get() : "trying to use a destroyed object";
689 native_moveTo(this.nativeRef, camera, duration, animationType, callback);
690 }
691 private native void native_moveTo(long _nativeRef, Camera camera, int duration, AnimationType animationType, CameraCallback callback);
692
693 @Override
694 public float getZoomFactor()
695 {
696 assert !this.destroyed.get() : "trying to use a destroyed object";
697 return native_getZoomFactor(this.nativeRef);
698 }
699 private native float native_getZoomFactor(long _nativeRef);
700
701 @Override
702 public void setZoomFactor(float newZoomFactor)
703 {
704 assert !this.destroyed.get() : "trying to use a destroyed object";
705 native_setZoomFactor(this.nativeRef, newZoomFactor);
706 }
707 private native void native_setZoomFactor(long _nativeRef, float newZoomFactor);
708
709 @Override
710 public float getMinZoomFactor()
711 {
712 assert !this.destroyed.get() : "trying to use a destroyed object";
713 return native_getMinZoomFactor(this.nativeRef);
714 }
715 private native float native_getMinZoomFactor(long _nativeRef);
716
717 @Override
718 public void setMinZoomFactor(float newMinZoomFactor)
719 {
720 assert !this.destroyed.get() : "trying to use a destroyed object";
721 native_setMinZoomFactor(this.nativeRef, newMinZoomFactor);
722 }
723 private native void native_setMinZoomFactor(long _nativeRef, float newMinZoomFactor);
724
725 @Override
726 public float getMaxZoomFactor()
727 {
728 assert !this.destroyed.get() : "trying to use a destroyed object";
729 return native_getMaxZoomFactor(this.nativeRef);
730 }
731 private native float native_getMaxZoomFactor(long _nativeRef);
732
733 @Override
734 public void setMaxZoomFactor(float newMaxZoomFactor)
735 {
736 assert !this.destroyed.get() : "trying to use a destroyed object";
737 native_setMaxZoomFactor(this.nativeRef, newMaxZoomFactor);
738 }
739 private native void native_setMaxZoomFactor(long _nativeRef, float newMaxZoomFactor);
740
741 @Override
742 public boolean getStickToBorder()
743 {
744 assert !this.destroyed.get() : "trying to use a destroyed object";
745 return native_getStickToBorder(this.nativeRef);
746 }
747 private native boolean native_getStickToBorder(long _nativeRef);
748
749 @Override
750 public void setStickToBorder(boolean newStickToBorder)
751 {
752 assert !this.destroyed.get() : "trying to use a destroyed object";
753 native_setStickToBorder(this.nativeRef, newStickToBorder);
754 }
755 private native void native_setStickToBorder(long _nativeRef, boolean newStickToBorder);
756
757 @Override
758 public Camera getCamera()
759 {
760 assert !this.destroyed.get() : "trying to use a destroyed object";
761 return native_getCamera(this.nativeRef);
762 }
763 private native Camera native_getCamera(long _nativeRef);
764
765 @Override
766 public void setCamera(Camera newCamera)
767 {
768 assert !this.destroyed.get() : "trying to use a destroyed object";
769 native_setCamera(this.nativeRef, newCamera);
770 }
771 private native void native_setCamera(long _nativeRef, Camera newCamera);
772
773 @Override
774 public boolean getRotateGestureEnabled()
775 {
776 assert !this.destroyed.get() : "trying to use a destroyed object";
777 return native_getRotateGestureEnabled(this.nativeRef);
778 }
779 private native boolean native_getRotateGestureEnabled(long _nativeRef);
780
781 @Override
782 public void setRotateGestureEnabled(boolean newRotateGestureEnabled)
783 {
784 assert !this.destroyed.get() : "trying to use a destroyed object";
785 native_setRotateGestureEnabled(this.nativeRef, newRotateGestureEnabled);
786 }
787 private native void native_setRotateGestureEnabled(long _nativeRef, boolean newRotateGestureEnabled);
788
789 @Override
790 public boolean getTiltGesturesEnabled()
791 {
792 assert !this.destroyed.get() : "trying to use a destroyed object";
793 return native_getTiltGesturesEnabled(this.nativeRef);
794 }
795 private native boolean native_getTiltGesturesEnabled(long _nativeRef);
796
797 @Override
798 public void setTiltGesturesEnabled(boolean newTiltGesturesEnabled)
799 {
800 assert !this.destroyed.get() : "trying to use a destroyed object";
801 native_setTiltGesturesEnabled(this.nativeRef, newTiltGesturesEnabled);
802 }
803 private native void native_setTiltGesturesEnabled(long _nativeRef, boolean newTiltGesturesEnabled);
804
805 @Override
806 public boolean getScrollGesturesEnabled()
807 {
808 assert !this.destroyed.get() : "trying to use a destroyed object";
809 return native_getScrollGesturesEnabled(this.nativeRef);
810 }
811 private native boolean native_getScrollGesturesEnabled(long _nativeRef);
812
813 @Override
814 public void setScrollGesturesEnabled(boolean newScrollGesturesEnabled)
815 {
816 assert !this.destroyed.get() : "trying to use a destroyed object";
817 native_setScrollGesturesEnabled(this.nativeRef, newScrollGesturesEnabled);
818 }
819 private native void native_setScrollGesturesEnabled(long _nativeRef, boolean newScrollGesturesEnabled);
820
821 @Override
822 public boolean getZoomGesturesEnabled()
823 {
824 assert !this.destroyed.get() : "trying to use a destroyed object";
825 return native_getZoomGesturesEnabled(this.nativeRef);
826 }
827 private native boolean native_getZoomGesturesEnabled(long _nativeRef);
828
829 @Override
830 public void setZoomGesturesEnabled(boolean newZoomGesturesEnabled)
831 {
832 assert !this.destroyed.get() : "trying to use a destroyed object";
833 native_setZoomGesturesEnabled(this.nativeRef, newZoomGesturesEnabled);
834 }
835 private native void native_setZoomGesturesEnabled(long _nativeRef, boolean newZoomGesturesEnabled);
836
837 @Override
838 public float getPickRadius()
839 {
840 assert !this.destroyed.get() : "trying to use a destroyed object";
841 return native_getPickRadius(this.nativeRef);
842 }
843 private native float native_getPickRadius(long _nativeRef);
844
845 @Override
846 public void setPickRadius(float newPickRadius)
847 {
848 assert !this.destroyed.get() : "trying to use a destroyed object";
849 native_setPickRadius(this.nativeRef, newPickRadius);
850 }
851 private native void native_setPickRadius(long _nativeRef, float newPickRadius);
852
853 @Override
854 public ArrayList<String> getSelectedMapFeatures()
855 {
856 assert !this.destroyed.get() : "trying to use a destroyed object";
857 return native_getSelectedMapFeatures(this.nativeRef);
858 }
859 private native ArrayList<String> native_getSelectedMapFeatures(long _nativeRef);
860
861 public static native void setDebugFlag(DebugFlag flag, boolean on);
862
863 public static native boolean getDebugFlag(DebugFlag flag);
864 }
865}