59 public abstract boolean setStyle(String style);
65 public abstract void setData(
byte[] data);
73 public abstract boolean setTitle(String title);
75 private static final class CppProxy
extends MapObject
77 private final long nativeRef;
78 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
80 private CppProxy(
long nativeRef)
82 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
83 this.nativeRef = nativeRef;
86 private native
void nativeDestroy(
long nativeRef);
87 public void _djinni_private_destroy()
89 boolean destroyed = this.destroyed.getAndSet(
true);
90 if (!destroyed) nativeDestroy(this.nativeRef);
92 protected void finalize() throws
java.lang.Throwable
94 _djinni_private_destroy();
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);
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 boolean setStyle(String style)
143 assert !this.destroyed.get() :
"trying to use a destroyed object";
144 return native_setStyle(this.nativeRef, style);
146 private native
boolean native_setStyle(
long _nativeRef, String style);
149 public void setData(
byte[] data)
151 assert !this.destroyed.get() :
"trying to use a destroyed object";
152 native_setData(this.nativeRef, data);
154 private native
void native_setData(
long _nativeRef,
byte[] data);
157 public boolean setTitle(String title)
159 assert !this.destroyed.get() :
"trying to use a destroyed object";
160 return native_setTitle(this.nativeRef, title);
162 private native
boolean native_setTitle(
long _nativeRef, String title);