49 public abstract boolean setColor(
float red,
float green,
float blue,
float alpha);
62 private final long nativeRef;
63 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
65 private CppProxy(
long nativeRef)
67 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
68 this.nativeRef = nativeRef;
71 private native
void nativeDestroy(
long nativeRef);
72 public void _djinni_private_destroy()
74 boolean destroyed = this.destroyed.getAndSet(
true);
75 if (!destroyed) nativeDestroy(this.nativeRef);
77 protected void finalize() throws
java.lang.Throwable
79 _djinni_private_destroy();
88 assert !this.destroyed.get() :
"trying to use a destroyed object";
89 return native_setPosition(this.nativeRef, point);
91 private native
boolean native_setPosition(
long _nativeRef,
LocationPoint point);
96 assert !this.destroyed.get() :
"trying to use a destroyed object";
97 return native_setPositionAnimated(this.nativeRef, point, duration, type);
102 public boolean setColor(
float red,
float green,
float blue,
float alpha)
104 assert !this.destroyed.get() :
"trying to use a destroyed object";
105 return native_setColor(this.nativeRef, red, green, blue, alpha);
107 private native
boolean native_setColor(
long _nativeRef,
float red,
float green,
float blue,
float alpha);
110 public boolean setRadius(
float radius)
112 assert !this.destroyed.get() :
"trying to use a destroyed object";
113 return native_setRadius(this.nativeRef, radius);
115 private native
boolean native_setRadius(
long _nativeRef,
float radius);
122 assert !this.destroyed.get() :
"trying to use a destroyed object";
123 return native_getId(this.nativeRef);
125 private native
int native_getId(
long _nativeRef);
128 public MapObjectType getType()
130 assert !this.destroyed.get() :
"trying to use a destroyed object";
131 return native_getType(this.nativeRef);
133 private native MapObjectType native_getType(
long _nativeRef);
136 public byte[] getData()
138 assert !this.destroyed.get() :
"trying to use a destroyed object";
139 return native_getData(this.nativeRef);
141 private native
byte[] native_getData(
long _nativeRef);
144 public boolean setVisible(
boolean visible)
146 assert !this.destroyed.get() :
"trying to use a destroyed object";
147 return native_setVisible(this.nativeRef, visible);
149 private native
boolean native_setVisible(
long _nativeRef,
boolean visible);
152 public boolean setInteractive(
boolean interactive)
154 assert !this.destroyed.get() :
"trying to use a destroyed object";
155 return native_setInteractive(this.nativeRef, interactive);
157 private native
boolean native_setInteractive(
long _nativeRef,
boolean interactive);
160 public boolean setStyle(String style)
162 assert !this.destroyed.get() :
"trying to use a destroyed object";
163 return native_setStyle(this.nativeRef, style);
165 private native
boolean native_setStyle(
long _nativeRef, String style);
168 public void setData(
byte[] data)
170 assert !this.destroyed.get() :
"trying to use a destroyed object";
171 native_setData(this.nativeRef, data);
173 private native
void native_setData(
long _nativeRef,
byte[] data);
176 public boolean setTitle(String title)
178 assert !this.destroyed.get() :
"trying to use a destroyed object";
179 return native_setTitle(this.nativeRef, title);
181 private native
boolean native_setTitle(
long _nativeRef, String title);