214 private final long nativeRef;
215 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
217 private CppProxy(
long nativeRef)
219 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
220 this.nativeRef = nativeRef;
223 private native
void nativeDestroy(
long nativeRef);
224 public void _djinni_private_destroy()
226 boolean destroyed = this.destroyed.getAndSet(
true);
227 if (!destroyed) nativeDestroy(this.nativeRef);
229 protected void finalize() throws
java.lang.Throwable
231 _djinni_private_destroy();
240 assert !this.destroyed.get() :
"trying to use a destroyed object";
241 return native_addIconMapObject(this.nativeRef, iconMapObject);
243 private native
boolean native_addIconMapObject(
long _nativeRef,
IconMapObject iconMapObject);
246 public boolean removeIconMapObject(
IconMapObject iconMapObject)
248 assert !this.destroyed.get() :
"trying to use a destroyed object";
249 return native_removeIconMapObject(this.nativeRef, iconMapObject);
251 private native
boolean native_removeIconMapObject(
long _nativeRef,
IconMapObject iconMapObject);
256 assert !this.destroyed.get() :
"trying to use a destroyed object";
257 native_clear(this.nativeRef);
259 private native
void native_clear(
long _nativeRef);
262 public void setEnabled(
boolean enabled)
264 assert !this.destroyed.get() :
"trying to use a destroyed object";
265 native_setEnabled(this.nativeRef, enabled);
267 private native
void native_setEnabled(
long _nativeRef,
boolean enabled);
270 public boolean isEnabled()
272 assert !this.destroyed.get() :
"trying to use a destroyed object";
273 return native_isEnabled(this.nativeRef);
275 private native
boolean native_isEnabled(
long _nativeRef);
278 public void setRadius(
float radius)
280 assert !this.destroyed.get() :
"trying to use a destroyed object";
281 native_setRadius(this.nativeRef, radius);
283 private native
void native_setRadius(
long _nativeRef,
float radius);
286 public float getRadius()
288 assert !this.destroyed.get() :
"trying to use a destroyed object";
289 return native_getRadius(this.nativeRef);
291 private native
float native_getRadius(
long _nativeRef);
294 public boolean setInteractive(
boolean interactive)
296 assert !this.destroyed.get() :
"trying to use a destroyed object";
297 return native_setInteractive(this.nativeRef, interactive);
299 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
302 public boolean setClusterSize(
float width,
float height)
304 assert !this.destroyed.get() :
"trying to use a destroyed object";
305 return native_setClusterSize(this.nativeRef, width, height);
307 private native
boolean native_setClusterSize(
long _nativeRef,
float width,
float height);
310 public void addListener(ClusterMapObjectControllerListener listener)
312 assert !this.destroyed.get() :
"trying to use a destroyed object";
313 native_addListener(this.nativeRef, listener);
315 private native
void native_addListener(
long _nativeRef, ClusterMapObjectControllerListener listener);
318 public void removeListener(ClusterMapObjectControllerListener listener)
320 assert !this.destroyed.get() :
"trying to use a destroyed object";
321 native_removeListener(this.nativeRef, listener);
323 private native
void native_removeListener(
long _nativeRef, ClusterMapObjectControllerListener listener);
326 public ArrayList<ClusterMapObject> getClusters()
328 assert !this.destroyed.get() :
"trying to use a destroyed object";
329 return native_getClusters(this.nativeRef);
331 private native ArrayList<ClusterMapObject> native_getClusters(
long _nativeRef);