38 public abstract boolean setColor(
float red,
float green,
float blue,
float alpha);
51 private final long nativeRef;
52 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
54 private CppProxy(
long nativeRef)
56 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
57 this.nativeRef = nativeRef;
60 private native
void nativeDestroy(
long nativeRef);
61 public void _djinni_private_destroy()
63 boolean destroyed = this.destroyed.getAndSet(
true);
64 if (!destroyed) nativeDestroy(this.nativeRef);
66 protected void finalize() throws
java.lang.Throwable
68 _djinni_private_destroy();
77 assert !this.destroyed.get() :
"trying to use a destroyed object";
78 return native_setPolygon(this.nativeRef, polygon);
80 private native
boolean native_setPolygon(
long _nativeRef,
LocationPolygon polygon);
83 public boolean setColor(
float red,
float green,
float blue,
float alpha)
85 assert !this.destroyed.get() :
"trying to use a destroyed object";
86 return native_setColor(this.nativeRef, red, green, blue, alpha);
88 private native
boolean native_setColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
91 public boolean setOrder(
int order)
93 assert !this.destroyed.get() :
"trying to use a destroyed object";
94 return native_setOrder(this.nativeRef, order);
96 private native
boolean native_setOrder(
long _nativeRef,
int order);
103 assert !this.destroyed.get() :
"trying to use a destroyed object";
104 return native_getId(this.nativeRef);
106 private native
int native_getId(
long _nativeRef);
109 public MapObjectType getType()
111 assert !this.destroyed.get() :
"trying to use a destroyed object";
112 return native_getType(this.nativeRef);
114 private native MapObjectType native_getType(
long _nativeRef);
117 public byte[] getData()
119 assert !this.destroyed.get() :
"trying to use a destroyed object";
120 return native_getData(this.nativeRef);
122 private native
byte[] native_getData(
long _nativeRef);
125 public boolean setVisible(
boolean visible)
127 assert !this.destroyed.get() :
"trying to use a destroyed object";
128 return native_setVisible(this.nativeRef, visible);
130 private native
boolean native_setVisible(
long _nativeRef,
boolean visible);
133 public boolean setInteractive(
boolean interactive)
135 assert !this.destroyed.get() :
"trying to use a destroyed object";
136 return native_setInteractive(this.nativeRef, interactive);
138 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
141 public void setData(
byte[] data)
143 assert !this.destroyed.get() :
"trying to use a destroyed object";
144 native_setData(this.nativeRef, data);
146 private native
void native_setData(
long _nativeRef,
byte[] data);
149 public boolean setTitle(String title)
151 assert !this.destroyed.get() :
"trying to use a destroyed object";
152 return native_setTitle(this.nativeRef, title);
154 private native
boolean native_setTitle(
long _nativeRef, String title);
157 public boolean setAlpha(
float alpha)
159 assert !this.destroyed.get() :
"trying to use a destroyed object";
160 return native_setAlpha(this.nativeRef, alpha);
162 private native
boolean native_setAlpha(
long _nativeRef,
float alpha);