38 public abstract boolean setColor(
float red,
float green,
float blue,
float alpha);
42 private final long nativeRef;
43 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
45 private CppProxy(
long nativeRef)
47 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
48 this.nativeRef = nativeRef;
51 private native
void nativeDestroy(
long nativeRef);
52 public void _djinni_private_destroy()
54 boolean destroyed = this.destroyed.getAndSet(
true);
55 if (!destroyed) nativeDestroy(this.nativeRef);
57 protected void finalize() throws
java.lang.Throwable
59 _djinni_private_destroy();
68 assert !this.destroyed.get() :
"trying to use a destroyed object";
69 return native_setPolygon(this.nativeRef, polygon);
71 private native
boolean native_setPolygon(
long _nativeRef,
LocationPolygon polygon);
74 public boolean setColor(
float red,
float green,
float blue,
float alpha)
76 assert !this.destroyed.get() :
"trying to use a destroyed object";
77 return native_setColor(this.nativeRef, red, green, blue, alpha);
79 private native
boolean native_setColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
86 assert !this.destroyed.get() :
"trying to use a destroyed object";
87 return native_getId(this.nativeRef);
89 private native
int native_getId(
long _nativeRef);
92 public MapObjectType getType()
94 assert !this.destroyed.get() :
"trying to use a destroyed object";
95 return native_getType(this.nativeRef);
97 private native MapObjectType native_getType(
long _nativeRef);
100 public byte[] getData()
102 assert !this.destroyed.get() :
"trying to use a destroyed object";
103 return native_getData(this.nativeRef);
105 private native
byte[] native_getData(
long _nativeRef);
108 public boolean setVisible(
boolean visible)
110 assert !this.destroyed.get() :
"trying to use a destroyed object";
111 return native_setVisible(this.nativeRef, visible);
113 private native
boolean native_setVisible(
long _nativeRef,
boolean visible);
116 public boolean setInteractive(
boolean interactive)
118 assert !this.destroyed.get() :
"trying to use a destroyed object";
119 return native_setInteractive(this.nativeRef, interactive);
121 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
124 public boolean setStyle(String style)
126 assert !this.destroyed.get() :
"trying to use a destroyed object";
127 return native_setStyle(this.nativeRef, style);
129 private native
boolean native_setStyle(
long _nativeRef, String style);
132 public void setData(
byte[] data)
134 assert !this.destroyed.get() :
"trying to use a destroyed object";
135 native_setData(this.nativeRef, data);
137 private native
void native_setData(
long _nativeRef,
byte[] data);
140 public boolean setTitle(String title)
142 assert !this.destroyed.get() :
"trying to use a destroyed object";
143 return native_setTitle(this.nativeRef, title);
145 private native
boolean native_setTitle(
long _nativeRef, String title);