#include <scilab/modules/renderer/src/jni/BottomXTicksDrawerGL.hxx>
Public Member Functions | |
| BottomXTicksDrawerGL (JavaVM *jvm_) | |
| BottomXTicksDrawerGL (JavaVM *jvm_, jobject JObj) | |
| ~BottomXTicksDrawerGL () | |
| void | synchronize () |
| void | endSynchronize () |
| void | display () |
| void | initializeDrawing (long figureIndex) |
| void | endDrawing () |
| void | show (long figureIndex) |
| void | destroy (long figureIndex) |
| void | setFigureIndex (long figureIndex) |
| double | drawTicks (double *ticksPositions, int ticksPositionsSize, char **ticksLabels, int ticksLabelsSize, double *subticksPositions, int subticksPositionsSize) |
| double | drawTicks (double *ticksPositions, int ticksPositionsSize, char **ticksLabels, int ticksLabelsSize, char **labelsExponents, int labelsExponentsSize, double *subticksPositions, int subticksPositionsSize) |
| void | setAxesBounds (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax) |
| void | setAxisParameters (long lineStyle, float lineWidth, long lineColor, long fontType, double fontSize, long fontColor) |
Static Public Member Functions | |
| static const std::string | className () |
Private Member Functions | |
| JNIEnv * | getCurrentEnv () |
Private Attributes | |
| JavaVM * | jvm |
| jobject | instance |
| jclass | instanceClass |
| jmethodID | voiddisplayID |
| jmethodID | voidinitializeDrawingjintID |
| jmethodID | voidendDrawingID |
| jmethodID | voidshowjintID |
| jmethodID | voiddestroyjintID |
| jmethodID | voidsetFigureIndexjintID |
| jmethodID | jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID |
| jclass | stringArrayClass |
| jmethodID | jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID |
| jmethodID | voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID |
| jmethodID | voidsetAxisParametersjintjfloatjintjintjdoublejintID |
Definition at line 49 of file BottomXTicksDrawerGL.hxx.
| org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::BottomXTicksDrawerGL | ( | JavaVM * | jvm_ | ) |
Create a wrapping of the object from a JNIEnv. It will call the default constructor
| JEnv_ | the Java Env |
Definition at line 59 of file BottomXTicksDrawerGL.cpp.
References className(), getCurrentEnv(), instance, instanceClass, jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID, jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID, jvm, NULL, stringArrayClass, voiddestroyjintID, voiddisplayID, voidendDrawingID, voidinitializeDrawingjintID, voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID, voidsetAxisParametersjintjfloatjintjintjdoublejintID, voidsetFigureIndexjintID, and voidshowjintID.
00059 { 00060 jmethodID constructObject = NULL ; 00061 jobject localInstance ; 00062 jclass localClass ; 00063 const std::string construct="<init>"; 00064 const std::string param="()V"; 00065 jvm=jvm_; 00066 00067 JNIEnv * curEnv = getCurrentEnv(); 00068 00069 localClass = curEnv->FindClass( this->className().c_str() ) ; 00070 if (localClass == NULL) { 00071 std::cerr << "Could not get the Class " << this->className() << std::endl; 00072 exit(EXIT_FAILURE); 00073 } 00074 00075 this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass) ; 00076 if (this->instanceClass == NULL) { 00077 std::cerr << "Could not create a Global Ref of " << this->className() << std::endl; 00078 exit(EXIT_FAILURE); 00079 } 00080 00081 /* localClass is not needed anymore */ 00082 curEnv->DeleteLocalRef(localClass); 00083 00084 constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; 00085 if(constructObject == NULL){ 00086 std::cerr << "Could not retrieve the constructor of the class " << this->className() << " with the profile : " << construct << param << std::endl; 00087 exit(EXIT_FAILURE); 00088 } 00089 00090 localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; 00091 if(localInstance == NULL){ 00092 std::cerr << "Could not instantiate the object " << this->className() << " with the constructor : " << construct << param << std::endl; 00093 exit(EXIT_FAILURE); 00094 } 00095 00096 this->instance = curEnv->NewGlobalRef(localInstance) ; 00097 if(this->instance == NULL){ 00098 std::cerr << "Could not create a new global ref of " << this->className() << std::endl; 00099 exit(EXIT_FAILURE); 00100 } 00101 /* localInstance not needed anymore */ 00102 curEnv->DeleteLocalRef(localInstance); 00103 00104 /* Methods ID set to NULL */ 00105 voiddisplayID=NULL; 00106 voidinitializeDrawingjintID=NULL; 00107 voidendDrawingID=NULL; 00108 voidshowjintID=NULL; 00109 voiddestroyjintID=NULL; 00110 voidsetFigureIndexjintID=NULL; 00111 jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID=NULL; 00112 00113 jclass localStringArrayClass = curEnv->FindClass("Ljava/lang/String;"); 00114 stringArrayClass = (jclass) curEnv->NewGlobalRef(localStringArrayClass); 00115 curEnv->DeleteLocalRef(localStringArrayClass); 00116 jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID=NULL; 00117 voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID=NULL; 00118 voidsetAxisParametersjintjfloatjintjintjdoublejintID=NULL; 00119 00120 00121 }

| org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::BottomXTicksDrawerGL | ( | JavaVM * | jvm_, | |
| jobject | JObj | |||
| ) |
Create a wrapping of an already existing object from a JNIEnv. The object must have already been instantiated
| JEnv_ | the Java Env | |
| JObj | the object |
Definition at line 123 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), instance, instanceClass, jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID, jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID, jvm, NULL, stringArrayClass, voiddestroyjintID, voiddisplayID, voidendDrawingID, voidinitializeDrawingjintID, voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID, voidsetAxisParametersjintjfloatjintjintjdoublejintID, voidsetFigureIndexjintID, and voidshowjintID.
00123 { 00124 jvm=jvm_; 00125 00126 JNIEnv * curEnv = getCurrentEnv(); 00127 00128 jclass localClass = curEnv->GetObjectClass(JObj); 00129 this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass); 00130 curEnv->DeleteLocalRef(localClass); 00131 00132 if (this->instanceClass == NULL) { 00133 std::cerr << "Could not create a Global Ref of " << this->instanceClass << std::endl; 00134 exit(EXIT_FAILURE); 00135 00136 } 00137 00138 this->instance = curEnv->NewGlobalRef(JObj) ; 00139 if(this->instance == NULL){ 00140 std::cerr << "Could not create a new global ref of " << this->instanceClass << std::endl; 00141 exit(EXIT_FAILURE); 00142 } 00143 /* Methods ID set to NULL */ 00144 voiddisplayID=NULL; 00145 voidinitializeDrawingjintID=NULL; 00146 voidendDrawingID=NULL; 00147 voidshowjintID=NULL; 00148 voiddestroyjintID=NULL; 00149 voidsetFigureIndexjintID=NULL; 00150 jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID=NULL; 00151 00152 jclass localStringArrayClass = curEnv->FindClass("Ljava/lang/String;"); 00153 stringArrayClass = (jclass) curEnv->NewGlobalRef(localStringArrayClass); 00154 curEnv->DeleteLocalRef(localStringArrayClass); 00155 jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID=NULL; 00156 voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID=NULL; 00157 voidsetAxisParametersjintjfloatjintjintjdoublejintID=NULL; 00158 00159 00160 }

| org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::~BottomXTicksDrawerGL | ( | ) |
Definition at line 50 of file BottomXTicksDrawerGL.cpp.
00050 { 00051 JNIEnv * curEnv = NULL; 00052 this->jvm->AttachCurrentThread((void **) &curEnv, NULL); 00053 00054 curEnv->DeleteGlobalRef(this->instance); 00055 curEnv->DeleteGlobalRef(this->instanceClass); 00056 curEnv->DeleteGlobalRef(this->stringArrayClass);}
| JNIEnv * org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::getCurrentEnv | ( | ) | [private] |
Get the environment matching to the current thread.
Definition at line 43 of file BottomXTicksDrawerGL.cpp.
Referenced by BottomXTicksDrawerGL(), destroy(), display(), drawTicks(), endDrawing(), endSynchronize(), initializeDrawing(), setAxesBounds(), setAxisParameters(), setFigureIndex(), show(), and synchronize().
00043 { 00044 JNIEnv * curEnv = NULL; 00045 this->jvm->AttachCurrentThread((void **) &curEnv, NULL); 00046 return curEnv; 00047 }

| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::synchronize | ( | ) |
Enter monitor associated with the object. Equivalent of creating a "synchronized(obj)" scope in Java.
Definition at line 165 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), and instance.
00165 { 00166 if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { 00167 std::cerr << "Fail to enter monitor." << std::endl; 00168 exit(EXIT_FAILURE); 00169 } 00170 }

| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::endSynchronize | ( | ) |
Exit monitor associated with the object. Equivalent of ending a "synchronized(obj)" scope.
Definition at line 173 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), and instance.
00173 { 00174 if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { 00175 std::cerr << "Fail to exit monitor." << std::endl; 00176 exit(EXIT_FAILURE); 00177 } 00178 }

| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::display | ( | void | ) |
Definition at line 182 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voiddisplayID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::display().
00182 { 00183 00184 JNIEnv * curEnv = getCurrentEnv(); 00185 00186 if (voiddisplayID==NULL) { /* Use the cache Luke */ voiddisplayID = curEnv->GetMethodID(this->instanceClass, "display", "()V" ) ; 00187 if (voiddisplayID == NULL) { 00188 std::cerr << "Could not access to the method " << "display" << std::endl; 00189 exit(EXIT_FAILURE); 00190 } 00191 } 00192 curEnv->CallVoidMethod( this->instance, voiddisplayID ); 00193 00194 if (curEnv->ExceptionOccurred()) { 00195 curEnv->ExceptionDescribe() ; 00196 } 00197 00198 00199 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::initializeDrawing | ( | long | figureIndex | ) |
Definition at line 201 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidinitializeDrawingjintID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::initializeDrawing().
00201 { 00202 00203 JNIEnv * curEnv = getCurrentEnv(); 00204 00205 if (voidinitializeDrawingjintID==NULL) { /* Use the cache Luke */ voidinitializeDrawingjintID = curEnv->GetMethodID(this->instanceClass, "initializeDrawing", "(I)V" ) ; 00206 if (voidinitializeDrawingjintID == NULL) { 00207 std::cerr << "Could not access to the method " << "initializeDrawing" << std::endl; 00208 exit(EXIT_FAILURE); 00209 } 00210 } 00211 curEnv->CallVoidMethod( this->instance, voidinitializeDrawingjintID ,figureIndex); 00212 00213 if (curEnv->ExceptionOccurred()) { 00214 curEnv->ExceptionDescribe() ; 00215 } 00216 00217 00218 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::endDrawing | ( | void | ) |
Definition at line 220 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidendDrawingID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::endDrawing().
00220 { 00221 00222 JNIEnv * curEnv = getCurrentEnv(); 00223 00224 if (voidendDrawingID==NULL) { /* Use the cache Luke */ voidendDrawingID = curEnv->GetMethodID(this->instanceClass, "endDrawing", "()V" ) ; 00225 if (voidendDrawingID == NULL) { 00226 std::cerr << "Could not access to the method " << "endDrawing" << std::endl; 00227 exit(EXIT_FAILURE); 00228 } 00229 } 00230 curEnv->CallVoidMethod( this->instance, voidendDrawingID ); 00231 00232 if (curEnv->ExceptionOccurred()) { 00233 curEnv->ExceptionDescribe() ; 00234 } 00235 00236 00237 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::show | ( | long | figureIndex | ) |
Definition at line 239 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidshowjintID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::show().
00239 { 00240 00241 JNIEnv * curEnv = getCurrentEnv(); 00242 00243 if (voidshowjintID==NULL) { /* Use the cache Luke */ voidshowjintID = curEnv->GetMethodID(this->instanceClass, "show", "(I)V" ) ; 00244 if (voidshowjintID == NULL) { 00245 std::cerr << "Could not access to the method " << "show" << std::endl; 00246 exit(EXIT_FAILURE); 00247 } 00248 } 00249 curEnv->CallVoidMethod( this->instance, voidshowjintID ,figureIndex); 00250 00251 if (curEnv->ExceptionOccurred()) { 00252 curEnv->ExceptionDescribe() ; 00253 } 00254 00255 00256 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::destroy | ( | long | figureIndex | ) |
Definition at line 258 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voiddestroyjintID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::destroy().
00258 { 00259 00260 JNIEnv * curEnv = getCurrentEnv(); 00261 00262 if (voiddestroyjintID==NULL) { /* Use the cache Luke */ voiddestroyjintID = curEnv->GetMethodID(this->instanceClass, "destroy", "(I)V" ) ; 00263 if (voiddestroyjintID == NULL) { 00264 std::cerr << "Could not access to the method " << "destroy" << std::endl; 00265 exit(EXIT_FAILURE); 00266 } 00267 } 00268 curEnv->CallVoidMethod( this->instance, voiddestroyjintID ,figureIndex); 00269 00270 if (curEnv->ExceptionOccurred()) { 00271 curEnv->ExceptionDescribe() ; 00272 } 00273 00274 00275 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::setFigureIndex | ( | long | figureIndex | ) |
Definition at line 277 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidsetFigureIndexjintID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::setFigureIndex().
00277 { 00278 00279 JNIEnv * curEnv = getCurrentEnv(); 00280 00281 if (voidsetFigureIndexjintID==NULL) { /* Use the cache Luke */ voidsetFigureIndexjintID = curEnv->GetMethodID(this->instanceClass, "setFigureIndex", "(I)V" ) ; 00282 if (voidsetFigureIndexjintID == NULL) { 00283 std::cerr << "Could not access to the method " << "setFigureIndex" << std::endl; 00284 exit(EXIT_FAILURE); 00285 } 00286 } 00287 curEnv->CallVoidMethod( this->instance, voidsetFigureIndexjintID ,figureIndex); 00288 00289 if (curEnv->ExceptionOccurred()) { 00290 curEnv->ExceptionDescribe() ; 00291 } 00292 00293 00294 }


| double org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::drawTicks | ( | double * | ticksPositions, | |
| int | ticksPositionsSize, | |||
| char ** | ticksLabels, | |||
| int | ticksLabelsSize, | |||
| double * | subticksPositions, | |||
| int | subticksPositionsSize | |||
| ) |
Definition at line 296 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID, NULL, res, and stringArrayClass.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::drawTicks().
00296 { 00297 00298 JNIEnv * curEnv = getCurrentEnv(); 00299 00300 if (jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID==NULL) { /* Use the cache Luke */ jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID = curEnv->GetMethodID(this->instanceClass, "drawTicks", "([D[Ljava/lang/String;[D)D" ) ; 00301 if (jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID == NULL) { 00302 std::cerr << "Could not access to the method " << "drawTicks" << std::endl; 00303 exit(EXIT_FAILURE); 00304 } 00305 } 00306 jdoubleArray ticksPositions_ = curEnv->NewDoubleArray( ticksPositionsSize ) ; 00307 curEnv->SetDoubleArrayRegion( ticksPositions_, 0, ticksPositionsSize, (jdouble*) ticksPositions ) ; 00308 jclass stringArrayClass = curEnv->FindClass("Ljava/lang/String;"); 00309 00310 // create java array of strings. 00311 jobjectArray ticksLabels_ = curEnv->NewObjectArray( ticksLabelsSize, stringArrayClass, NULL); 00312 if (ticksLabels_ == NULL) 00313 { 00314 std::cerr << "Could not allocate Java string array, memory full." << std::endl; 00315 exit(EXIT_FAILURE); 00316 } 00317 00318 // convert each char * to java strings and fill the java array. 00319 for ( int i = 0; i < ticksLabelsSize; i++) 00320 { 00321 jstring TempString = curEnv->NewStringUTF( ticksLabels[i] ); 00322 if (TempString == NULL) 00323 { 00324 std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; 00325 exit(EXIT_FAILURE); 00326 } 00327 00328 curEnv->SetObjectArrayElement( ticksLabels_, i, TempString); 00329 00330 // avoid keeping reference on to many strings 00331 curEnv->DeleteLocalRef(TempString); 00332 } 00333 jdoubleArray subticksPositions_ = curEnv->NewDoubleArray( subticksPositionsSize ) ; 00334 curEnv->SetDoubleArrayRegion( subticksPositions_, 0, subticksPositionsSize, (jdouble*) subticksPositions ) ; 00335 00336 jdouble res = (jdouble) curEnv->CallDoubleMethod( this->instance, jdoubledrawTicksjdoubleArrayjobjectArrayjdoubleArrayID ,ticksPositions_, ticksLabels_, subticksPositions_); 00337 00338 if (curEnv->ExceptionOccurred()) { 00339 curEnv->ExceptionDescribe() ; 00340 } 00341 00342 curEnv->DeleteLocalRef(stringArrayClass); 00343 curEnv->DeleteLocalRef(ticksPositions_); 00344 curEnv->DeleteLocalRef(ticksLabels_); 00345 curEnv->DeleteLocalRef(subticksPositions_); 00346 00347 return res; 00348 00349 }


| double org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::drawTicks | ( | double * | ticksPositions, | |
| int | ticksPositionsSize, | |||
| char ** | ticksLabels, | |||
| int | ticksLabelsSize, | |||
| char ** | labelsExponents, | |||
| int | labelsExponentsSize, | |||
| double * | subticksPositions, | |||
| int | subticksPositionsSize | |||
| ) |
Definition at line 351 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID, NULL, res, and stringArrayClass.
00351 { 00352 00353 JNIEnv * curEnv = getCurrentEnv(); 00354 00355 if (jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID==NULL) { /* Use the cache Luke */ jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID = curEnv->GetMethodID(this->instanceClass, "drawTicks", "([D[Ljava/lang/String;[Ljava/lang/String;[D)D" ) ; 00356 if (jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID == NULL) { 00357 std::cerr << "Could not access to the method " << "drawTicks" << std::endl; 00358 exit(EXIT_FAILURE); 00359 } 00360 } 00361 jdoubleArray ticksPositions_ = curEnv->NewDoubleArray( ticksPositionsSize ) ; 00362 curEnv->SetDoubleArrayRegion( ticksPositions_, 0, ticksPositionsSize, (jdouble*) ticksPositions ) ; 00363 jclass stringArrayClass = curEnv->FindClass("Ljava/lang/String;"); 00364 00365 // create java array of strings. 00366 jobjectArray ticksLabels_ = curEnv->NewObjectArray( ticksLabelsSize, stringArrayClass, NULL); 00367 if (ticksLabels_ == NULL) 00368 { 00369 std::cerr << "Could not allocate Java string array, memory full." << std::endl; 00370 exit(EXIT_FAILURE); 00371 } 00372 00373 // convert each char * to java strings and fill the java array. 00374 for ( int i = 0; i < ticksLabelsSize; i++) 00375 { 00376 jstring TempString = curEnv->NewStringUTF( ticksLabels[i] ); 00377 if (TempString == NULL) 00378 { 00379 std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; 00380 exit(EXIT_FAILURE); 00381 } 00382 00383 curEnv->SetObjectArrayElement( ticksLabels_, i, TempString); 00384 00385 // avoid keeping reference on to many strings 00386 curEnv->DeleteLocalRef(TempString); 00387 } 00388 00389 // create java array of strings. 00390 jobjectArray labelsExponents_ = curEnv->NewObjectArray( labelsExponentsSize, stringArrayClass, NULL); 00391 if (labelsExponents_ == NULL) 00392 { 00393 std::cerr << "Could not allocate Java string array, memory full." << std::endl; 00394 exit(EXIT_FAILURE); 00395 } 00396 00397 // convert each char * to java strings and fill the java array. 00398 for ( int i = 0; i < labelsExponentsSize; i++) 00399 { 00400 jstring TempString = curEnv->NewStringUTF( labelsExponents[i] ); 00401 if (TempString == NULL) 00402 { 00403 std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; 00404 exit(EXIT_FAILURE); 00405 } 00406 00407 curEnv->SetObjectArrayElement( labelsExponents_, i, TempString); 00408 00409 // avoid keeping reference on to many strings 00410 curEnv->DeleteLocalRef(TempString); 00411 } 00412 jdoubleArray subticksPositions_ = curEnv->NewDoubleArray( subticksPositionsSize ) ; 00413 curEnv->SetDoubleArrayRegion( subticksPositions_, 0, subticksPositionsSize, (jdouble*) subticksPositions ) ; 00414 00415 jdouble res = (jdouble) curEnv->CallDoubleMethod( this->instance, jdoubledrawTicksjdoubleArrayjobjectArrayjobjectArrayjdoubleArrayID ,ticksPositions_, ticksLabels_, labelsExponents_, subticksPositions_); 00416 00417 if (curEnv->ExceptionOccurred()) { 00418 curEnv->ExceptionDescribe() ; 00419 } 00420 00421 curEnv->DeleteLocalRef(stringArrayClass); 00422 curEnv->DeleteLocalRef(ticksPositions_); 00423 curEnv->DeleteLocalRef(ticksLabels_); 00424 curEnv->DeleteLocalRef(labelsExponents_); 00425 curEnv->DeleteLocalRef(subticksPositions_); 00426 00427 return res; 00428 00429 }

| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::setAxesBounds | ( | double | xMin, | |
| double | xMax, | |||
| double | yMin, | |||
| double | yMax, | |||
| double | zMin, | |||
| double | zMax | |||
| ) |
Definition at line 431 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::setAxesBounds().
00431 { 00432 00433 JNIEnv * curEnv = getCurrentEnv(); 00434 00435 if (voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID==NULL) { /* Use the cache Luke */ voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID = curEnv->GetMethodID(this->instanceClass, "setAxesBounds", "(DDDDDD)V" ) ; 00436 if (voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID == NULL) { 00437 std::cerr << "Could not access to the method " << "setAxesBounds" << std::endl; 00438 exit(EXIT_FAILURE); 00439 } 00440 } 00441 curEnv->CallVoidMethod( this->instance, voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID ,xMin, xMax, yMin, yMax, zMin, zMax); 00442 00443 if (curEnv->ExceptionOccurred()) { 00444 curEnv->ExceptionDescribe() ; 00445 } 00446 00447 00448 }


| void org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::setAxisParameters | ( | long | lineStyle, | |
| float | lineWidth, | |||
| long | lineColor, | |||
| long | fontType, | |||
| double | fontSize, | |||
| long | fontColor | |||
| ) |
Definition at line 450 of file BottomXTicksDrawerGL.cpp.
References getCurrentEnv(), NULL, and voidsetAxisParametersjintjfloatjintjintjdoublejintID.
Referenced by sciGraphics::BottomXTicksDrawerJavaMapper::setAxisParamerters().
00450 { 00451 00452 JNIEnv * curEnv = getCurrentEnv(); 00453 00454 if (voidsetAxisParametersjintjfloatjintjintjdoublejintID==NULL) { /* Use the cache Luke */ voidsetAxisParametersjintjfloatjintjintjdoublejintID = curEnv->GetMethodID(this->instanceClass, "setAxisParameters", "(IFIIDI)V" ) ; 00455 if (voidsetAxisParametersjintjfloatjintjintjdoublejintID == NULL) { 00456 std::cerr << "Could not access to the method " << "setAxisParameters" << std::endl; 00457 exit(EXIT_FAILURE); 00458 } 00459 } 00460 curEnv->CallVoidMethod( this->instance, voidsetAxisParametersjintjfloatjintjintjdoublejintID ,lineStyle, lineWidth, lineColor, fontType, fontSize, fontColor); 00461 00462 if (curEnv->ExceptionOccurred()) { 00463 curEnv->ExceptionDescribe() ; 00464 } 00465 00466 00467 }


| static const std::string org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::className | ( | ) | [inline, static] |
Get class name to use for static methods
Definition at line 133 of file BottomXTicksDrawerGL.hxx.
Referenced by BottomXTicksDrawerGL().

JavaVM* org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::jvm [private] |
Definition at line 51 of file BottomXTicksDrawerGL.hxx.
Referenced by BottomXTicksDrawerGL(), getCurrentEnv(), and ~BottomXTicksDrawerGL().
Definition at line 52 of file BottomXTicksDrawerGL.hxx.
Referenced by BottomXTicksDrawerGL(), endSynchronize(), and synchronize().
jmethodID org_scilab_modules_renderer_subwinDrawing::BottomXTicksDrawerGL::voiddisplayID [private] |