73 public abstract boolean setColor(
float red,
float green,
float blue,
float alpha);
125 public abstract boolean setBuffer(
float width,
float height);
143 public abstract boolean setOffset(
float width,
float height);
180 public abstract boolean setOutlineColor(
float red,
float green,
float blue,
float alpha);
218 private final long nativeRef;
219 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
221 private CppProxy(
long nativeRef)
223 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
224 this.nativeRef = nativeRef;
227 private native
void nativeDestroy(
long nativeRef);
228 public void _djinni_private_destroy()
230 boolean destroyed = this.destroyed.getAndSet(
true);
231 if (!destroyed) nativeDestroy(this.nativeRef);
233 protected void finalize() throws
java.lang.Throwable
235 _djinni_private_destroy();
244 assert !this.destroyed.get() :
"trying to use a destroyed object";
245 return native_setPosition(this.nativeRef, point);
247 private native
boolean native_setPosition(
long _nativeRef,
LocationPoint point);
252 assert !this.destroyed.get() :
"trying to use a destroyed object";
253 return native_setPositionAnimated(this.nativeRef, point, duration, type);
258 public boolean setColor(
float red,
float green,
float blue,
float alpha)
260 assert !this.destroyed.get() :
"trying to use a destroyed object";
261 return native_setColor(this.nativeRef, red, green, blue, alpha);
263 private native
boolean native_setColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
266 public boolean setRadius(
float radius)
268 assert !this.destroyed.get() :
"trying to use a destroyed object";
269 return native_setRadius(this.nativeRef, radius);
271 private native
boolean native_setRadius(
long _nativeRef,
float radius);
274 public boolean setCollisionEnabled(
boolean enabled)
276 assert !this.destroyed.get() :
"trying to use a destroyed object";
277 return native_setCollisionEnabled(this.nativeRef, enabled);
279 private native
boolean native_setCollisionEnabled(
long _nativeRef,
boolean enabled);
282 public boolean setBuffer(
float width,
float height)
284 assert !this.destroyed.get() :
"trying to use a destroyed object";
285 return native_setBuffer(this.nativeRef, width, height);
287 private native
boolean native_setBuffer(
long _nativeRef,
float width,
float height);
290 public boolean setOffset(
float width,
float height)
292 assert !this.destroyed.get() :
"trying to use a destroyed object";
293 return native_setOffset(this.nativeRef, width, height);
295 private native
boolean native_setOffset(
long _nativeRef,
float width,
float height);
298 public boolean setPriority(
float priority)
300 assert !this.destroyed.get() :
"trying to use a destroyed object";
301 return native_setPriority(this.nativeRef, priority);
303 private native
boolean native_setPriority(
long _nativeRef,
float priority);
306 public boolean setOutlineColor(
float red,
float green,
float blue,
float alpha)
308 assert !this.destroyed.get() :
"trying to use a destroyed object";
309 return native_setOutlineColor(this.nativeRef, red, green, blue, alpha);
311 private native
boolean native_setOutlineColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
314 public boolean setOutlineRadius(
float radius)
316 assert !this.destroyed.get() :
"trying to use a destroyed object";
317 return native_setOutlineRadius(this.nativeRef, radius);
319 private native
boolean native_setOutlineRadius(
long _nativeRef,
float radius);
322 public boolean setOutlineAlpha(
float alpha)
324 assert !this.destroyed.get() :
"trying to use a destroyed object";
325 return native_setOutlineAlpha(this.nativeRef, alpha);
327 private native
boolean native_setOutlineAlpha(
long _nativeRef,
float alpha);
334 assert !this.destroyed.get() :
"trying to use a destroyed object";
335 return native_getId(this.nativeRef);
337 private native
int native_getId(
long _nativeRef);
340 public MapObjectType getType()
342 assert !this.destroyed.get() :
"trying to use a destroyed object";
343 return native_getType(this.nativeRef);
345 private native MapObjectType native_getType(
long _nativeRef);
348 public byte[] getData()
350 assert !this.destroyed.get() :
"trying to use a destroyed object";
351 return native_getData(this.nativeRef);
353 private native
byte[] native_getData(
long _nativeRef);
356 public boolean setVisible(
boolean visible)
358 assert !this.destroyed.get() :
"trying to use a destroyed object";
359 return native_setVisible(this.nativeRef, visible);
361 private native
boolean native_setVisible(
long _nativeRef,
boolean visible);
364 public boolean setInteractive(
boolean interactive)
366 assert !this.destroyed.get() :
"trying to use a destroyed object";
367 return native_setInteractive(this.nativeRef, interactive);
369 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
372 public void setData(
byte[] data)
374 assert !this.destroyed.get() :
"trying to use a destroyed object";
375 native_setData(this.nativeRef, data);
377 private native
void native_setData(
long _nativeRef,
byte[] data);
380 public boolean setTitle(String title)
382 assert !this.destroyed.get() :
"trying to use a destroyed object";
383 return native_setTitle(this.nativeRef, title);
385 private native
boolean native_setTitle(
long _nativeRef, String title);
388 public boolean setAlpha(
float alpha)
390 assert !this.destroyed.get() :
"trying to use a destroyed object";
391 return native_setAlpha(this.nativeRef, alpha);
393 private native
boolean native_setAlpha(
long _nativeRef,
float alpha);