54 public abstract boolean setColor(
float red,
float green,
float blue,
float alpha);
75 private final long nativeRef;
76 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
78 private CppProxy(
long nativeRef)
80 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
81 this.nativeRef = nativeRef;
84 private native
void nativeDestroy(
long nativeRef);
85 public void _djinni_private_destroy()
87 boolean destroyed = this.destroyed.getAndSet(
true);
88 if (!destroyed) nativeDestroy(this.nativeRef);
90 protected void finalize() throws
java.lang.Throwable
92 _djinni_private_destroy();
101 assert !this.destroyed.get() :
"trying to use a destroyed object";
102 return native_setPolygon(this.nativeRef, polygon);
104 private native
boolean native_setPolygon(
long _nativeRef,
LocationPolygon polygon);
107 public boolean setColor(
float red,
float green,
float blue,
float alpha)
109 assert !this.destroyed.get() :
"trying to use a destroyed object";
110 return native_setColor(this.nativeRef, red, green, blue, alpha);
112 private native
boolean native_setColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
115 public boolean setOrder(
int order)
117 assert !this.destroyed.get() :
"trying to use a destroyed object";
118 return native_setOrder(this.nativeRef, order);
120 private native
boolean native_setOrder(
long _nativeRef,
int order);
127 assert !this.destroyed.get() :
"trying to use a destroyed object";
128 return native_getId(this.nativeRef);
130 private native
int native_getId(
long _nativeRef);
133 public MapObjectType getType()
135 assert !this.destroyed.get() :
"trying to use a destroyed object";
136 return native_getType(this.nativeRef);
138 private native MapObjectType native_getType(
long _nativeRef);
141 public byte[] getData()
143 assert !this.destroyed.get() :
"trying to use a destroyed object";
144 return native_getData(this.nativeRef);
146 private native
byte[] native_getData(
long _nativeRef);
149 public boolean setVisible(
boolean visible)
151 assert !this.destroyed.get() :
"trying to use a destroyed object";
152 return native_setVisible(this.nativeRef, visible);
154 private native
boolean native_setVisible(
long _nativeRef,
boolean visible);
157 public boolean setInteractive(
boolean interactive)
159 assert !this.destroyed.get() :
"trying to use a destroyed object";
160 return native_setInteractive(this.nativeRef, interactive);
162 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
165 public void setData(
byte[] data)
167 assert !this.destroyed.get() :
"trying to use a destroyed object";
168 native_setData(this.nativeRef, data);
170 private native
void native_setData(
long _nativeRef,
byte[] data);
173 public boolean setTitle(String title)
175 assert !this.destroyed.get() :
"trying to use a destroyed object";
176 return native_setTitle(this.nativeRef, title);
178 private native
boolean native_setTitle(
long _nativeRef, String title);
181 public boolean setAlpha(
float alpha)
183 assert !this.destroyed.get() :
"trying to use a destroyed object";
184 return native_setAlpha(this.nativeRef, alpha);
186 private native
boolean native_setAlpha(
long _nativeRef,
float alpha);