Commit f324194d authored by Ben Boeckel's avatar Ben Boeckel

Wrapping/Java: leverage the new module system

parent bc647b5f
This diff is collapsed.
# This file is automatically generated by CMake VTK_WRAP_JAVA
SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}
@VTK_JAVA_DEPENDENCIES_FILE@
)
......@@ -40,28 +40,6 @@ execute_process(
COMMAND "@JAVA_ARCHIVE@" -cf "@CMAKE_INSTALL_PREFIX@/vtk-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@-${NATIVE_NAME}.jar" -C "@CMAKE_INSTALL_PREFIX@/${NATIVE_NAME}" .
)
set(VTK_JAVA_CLEANUP_INSTALL "@VTK_JAVA_CLEANUP_INSTALL@")
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT "@CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT@")
if (NOT VTK_JAVA_CLEANUP_INSTALL AND NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Remove un-wanted files
execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_INSTALL_PREFIX}/bin"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_INSTALL_PREFIX}/lib"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_INSTALL_PREFIX}/share"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_INSTALL_PREFIX}/include"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove_directory "${CMAKE_INSTALL_PREFIX}/www"
)
endif()
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy pom.xml "${CMAKE_INSTALL_PREFIX}/pom.xml"
)
......@@ -69,4 +47,4 @@ execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy MAVEN-README.txt "${CMAKE_INSTALL_PREFIX}/README.txt"
)
message("Java repackaging done")
\ No newline at end of file
message("Java repackaging done")
cmake_minimum_required(VERSION 3.3)
file(GLOB vtk_java_files "${VTK_BINARY_DIR}/java/vtk/*.java")
file(GLOB vtk_java_rendering_files "${VTK_BINARY_DIR}/java/vtk/rendering/*.java")
file(GLOB vtk_java_rendering_awt_files "${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java")
file(GLOB vtk_java_sample_files "${VTK_BINARY_DIR}/java/vtk/sample/*.java")
set(all_vtk_java_files vtk_java_files vtk_java_rendering_files vtk_java_rendering_awt_files vtk_java_sample_files)
if(VTK_JAVA_SWT_COMPONENT)
file(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
list(APPEND all_vtk_java_files vtk_java_swt_files)
endif()
if(VTK_JAVA_JOGL_COMPONENT)
file(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
list(APPEND vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/sample/rendering/JoglConeRendering.java")
list(APPEND all_vtk_java_files vtk_java_jogl_files)
endif()
set(CMAKE_CONFIGURABLE_FILE_CONTENT)
foreach( java_file IN LISTS ${all_vtk_java_files} )
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}\"${java_file}\"\n")
endforeach()
configure_file(
"${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${RSP_FILENAME}"
@ONLY)
if (VTK_WRAP_JAVA)
add_subdirectory(Java)
endif ()
find_package(Java REQUIRED QUIET COMPONENTS Runtime Development)
set(java_simple_test_names
ConcurrencyGC
JavaDelete
ManualGC
JavaGCAndDelete)
set(java_test_names
Regression
${java_simple_test_names})
set(vtk_java_class_output
"${CMAKE_CURRENT_BINARY_DIR}/class")
set(java_test_files)
set(java_test_classes)
foreach (java_test IN LISTS java_test_names)
list(APPEND java_test_files
"${CMAKE_CURRENT_SOURCE_DIR}/vtk/test/${java_test}.java")
list(APPEND java_test_classes
"${vtk_java_class_output}/vtk/test/${java_test}.class")
endforeach ()
# Compile Java Tests
add_custom_command(
OUTPUT ${java_test_classes}
COMMAND ${Java_JAVAC_EXECUTABLE}
-classpath "${vtk_jar_file}"
-source "${VTK_JAVA_SOURCE_VERSION}"
-target "${VTK_JAVA_TARGET_VERSION}"
-d "${vtk_java_class_output}"
${java_test_files}
DEPENDS "${vtk_jar_file}"
${java_test_files}
COMMENT "Compiling Java Tests")
add_custom_target(vtkJavaTests ALL
DEPENDS
${java_test_classes})
set(classpath_separator ":")
if (WIN32)
set(classpath_separator "\\;")
endif ()
set(vtk_test_classpath
"${vtk_jar_file}${classpath_separator}${vtk_java_class_output}")
if (TARGET VTK::RenderingOpenGL2)
ExternalData_add_test("${_vtk_build_TEST_DATA_TARGET}"
NAME vtkJavaTests-Regression
COMMAND "${Java_JAVA_EXECUTABLE}"
-classpath "${vtk_test_classpath}"
vtk.test.Regression
-D "${CMAKE_BINARY_DIR}/ExternalData"
-V "DATA{../Data/Baseline/Cone.png}"
-T "${CMAKE_BINARY_DIR}/Testing/Temporary")
endif ()
foreach (java_simple_test IN LISTS java_simple_test_names)
add_test(
NAME "vtkJavaTests-${java_simple_test}"
COMMAND "${Java_JAVA_EXECUTABLE}"
-classpath "${vtk_test_classpath}"
"vtk.test.${java_simple_test}"
-T "${CMAKE_BINARY_DIR}/Testing/Temporary")
endforeach ()
#include "vtkSystemIncludes.h"
int main()
{
return 0;
}
......@@ -73,7 +73,7 @@ public class vtkJavaTesting {
String[] kits = vtkSettings.GetKits();
int cc;
for (cc = 0; cc < kits.length; cc++) {
vtkJavaTesting.LoadLibrary(lpath, "vtk" + kits[cc] + "Java", verbose);
vtkJavaTesting.LoadLibrary(lpath, kits[cc] + "Java", verbose);
}
vtkJavaTesting.Tester = new vtk.vtkTesting();
for (cc = 0; cc < args.length; cc++) {
......
......@@ -16,7 +16,7 @@ import java.io.File;
*/
public enum vtkNativeLibrary {
@VTK_JAVA_NATIVE_LIBRARIES@
@vtk_java_native_libraries@
/**
* Try to load all library
......@@ -27,9 +27,7 @@ public enum vtkNativeLibrary {
boolean isEveryThingLoaded = true;
for (vtkNativeLibrary lib : values()) {
try {
if(lib.IsBuilt()) {
lib.LoadLibrary();
}
lib.LoadLibrary();
} catch (UnsatisfiedLinkError e) {
isEveryThingLoaded = false;
e.printStackTrace();
......@@ -67,10 +65,9 @@ public enum vtkNativeLibrary {
outputError.SetInstance(outputError);
}
private vtkNativeLibrary(String nativeLibraryName, boolean built) {
private vtkNativeLibrary(String nativeLibraryName) {
this.nativeLibraryName = nativeLibraryName;
this.loaded = false;
this.built = built;
}
/**
......@@ -105,13 +102,6 @@ public enum vtkNativeLibrary {
return loaded;
}
/**
* @return true if the module was enabled and therefore build
*/
public boolean IsBuilt() {
return built;
}
/**
* @return the library name
*/
......@@ -132,5 +122,4 @@ public enum vtkNativeLibrary {
private String nativeLibraryName;
private boolean loaded;
private boolean built;
}
......@@ -46,6 +46,6 @@ public class vtkSettings
public static String[] GetKits()
{
return vtkSettings.Split("@KITS@", ";");
return vtkSettings.Split("@_vtk_java_all_wrapped_modules@", ";");
}
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkJavaAwt.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkJavaAwt_h
#define vtkJavaAwt_h
// for use with JAWT
#include "jawt_md.h"
#define VTK_JAVA_DEBUG
// On OS X, disable deprecation warnings since JAWT_GetAWT() is deprecated.
#if defined(__APPLE__) && defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#if defined(_WIN32)
#define WIN32_JAWT_LOCK_HACK
#endif
#if defined(WIN32_JAWT_LOCK_HACK)
#define WJLH_MAX_COUNT (32)
#define WJLH_HASH_FUNC(E,C,H) {\
jclass cls = E->GetObjectClass(C);\
jmethodID mid = E->GetMethodID(cls, "hashCode", "()I");\
H = E->CallIntMethod(C, mid); }
# include "vtkWindows.h"
int WJLH_init_check = 0;
# include <map> // STL Header
std::map<int,int> WJLH_lock_map;
#endif
extern "C" JNIEXPORT jint JNICALL
Java_vtk_vtkPanel_RenderCreate(JNIEnv *env, jobject canvas, jobject id0)
{
#if defined(WIN32_JAWT_LOCK_HACK)
int hash;
WJLH_HASH_FUNC(env, canvas, hash);
WJLH_lock_map[hash] = 0;
#endif
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo* dsi;
jint lock;
// get the render window pointer
vtkRenderWindow *temp0;
temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,id0));
/* Get the AWT */
awt.version = JAWT_VERSION_1_3;
if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
{
#ifndef VTK_JAVA_DEBUG
printf("AWT Not found\n");
#endif
return 1;
}
/* Get the drawing surface */
ds = awt.GetDrawingSurface(env, canvas);
if (ds == NULL)
{
#ifndef VTK_JAVA_DEBUG
printf("NULL drawing surface\n");
#endif
return 1;
}
/* Lock the drawing surface */
lock = ds->Lock(ds);
if((lock & JAWT_LOCK_ERROR) != 0)
{
#ifndef VTK_JAVA_DEBUG
printf("Error locking surface\n");
#endif
awt.FreeDrawingSurface(ds);
return 1;
}
/* Get the drawing surface info */
dsi = ds->GetDrawingSurfaceInfo(ds);
if (dsi == NULL)
{
printf("Error getting surface info\n");
ds->Unlock(ds);
awt.FreeDrawingSurface(ds);
return 1;
}
// Here is the win32 drawing code
#if defined(_WIN32)
temp0->Finalize();
JAWT_Win32DrawingSurfaceInfo* dsi_win;
dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
temp0->SetWindowId((void *)dsi_win->hwnd);
temp0->SetDisplayId((void *)dsi_win->hdc);
// also set parent id to avoid border sizes being added
temp0->SetParentId((void *)dsi_win->hdc);
// use mac code
#elif defined(__APPLE__)
JAWT_DrawingSurfaceInfo* dsi_mac;
dsi_mac = (JAWT_DrawingSurfaceInfo*)dsi->platformInfo;
// temp0->SetWindowId(dsi_mac->cocoaViewRef); // Wrong but allow compilation
// otherwise use X11 code
#else
JAWT_X11DrawingSurfaceInfo* dsi_x11;
dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
temp0->SetDisplayId((void *)dsi_x11->display);
temp0->SetWindowId((void *)dsi_x11->drawable);
temp0->SetParentId((void *)dsi_x11->display);
#endif
/* Free the drawing surface info */
ds->FreeDrawingSurfaceInfo(dsi);
/* Unlock the drawing surface */
ds->Unlock(ds);
/* Free the drawing surface */
awt.FreeDrawingSurface(ds);
#if defined(WIN32_JAWT_LOCK_HACK)
if (WJLH_init_check == 0)
{
WJLH_init_check = 1;
}
WJLH_lock_map[hash] = 1;
#endif
return 0;
}
extern "C" JNIEXPORT jint JNICALL
Java_vtk_rendering_awt_vtkInternalAwtComponent_RenderCreate(JNIEnv *env, jobject canvas, jobject id0)
{
#if defined(WIN32_JAWT_LOCK_HACK)
int hash;
WJLH_HASH_FUNC(env, canvas, hash);
WJLH_lock_map[hash] = 0;
#endif
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo* dsi;
jint lock;
// get the render window pointer
vtkRenderWindow *temp0;
temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,id0));
/* Get the AWT */
awt.version = JAWT_VERSION_1_3;
if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
{
#ifndef VTK_JAVA_DEBUG
printf("AWT Not found\n");
#endif
return 1;
}
/* Get the drawing surface */
ds = awt.GetDrawingSurface(env, canvas);
if (ds == NULL)
{
#ifndef VTK_JAVA_DEBUG
printf("NULL drawing surface\n");
#endif
return 1;
}
/* Lock the drawing surface */
lock = ds->Lock(ds);
if((lock & JAWT_LOCK_ERROR) != 0)
{
#ifndef VTK_JAVA_DEBUG
printf("Error locking surface\n");
#endif
awt.FreeDrawingSurface(ds);
return 1;
}
/* Get the drawing surface info */
dsi = ds->GetDrawingSurfaceInfo(ds);
if (dsi == NULL)
{
printf("Error getting surface info\n");
ds->Unlock(ds);
awt.FreeDrawingSurface(ds);
return 1;
}
// Here is the win32 drawing code
#if defined(_WIN32)
temp0->Finalize();
JAWT_Win32DrawingSurfaceInfo* dsi_win;
dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
temp0->SetWindowId((void *)dsi_win->hwnd);
temp0->SetDisplayId((void *)dsi_win->hdc);
// also set parent id to avoid border sizes being added
temp0->SetParentId((void *)dsi_win->hdc);
// use mac code
#elif defined(__APPLE__)
JAWT_DrawingSurfaceInfo* dsi_mac;
dsi_mac = (JAWT_DrawingSurfaceInfo*)dsi->platformInfo;
// temp0->SetWindowId(dsi_mac->cocoaViewRef); // Wrong but allow compilation
// otherwise use X11 code
#else
JAWT_X11DrawingSurfaceInfo* dsi_x11;
dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
temp0->SetDisplayId((void *)dsi_x11->display);
temp0->SetWindowId((void *)dsi_x11->drawable);
temp0->SetParentId((void *)dsi_x11->display);
#endif
/* Free the drawing surface info */
ds->FreeDrawingSurfaceInfo(dsi);
/* Unlock the drawing surface */
ds->Unlock(ds);
/* Free the drawing surface */
awt.FreeDrawingSurface(ds);
#if defined(WIN32_JAWT_LOCK_HACK)
if (WJLH_init_check == 0)
{
WJLH_init_check = 1;
}
WJLH_lock_map[hash] = 1;
#endif
return 0;
}
// Lock must be called prior to render or anything which might
// cause vtkRenderWindow to make an XLib call or to call Render().
// The Lock() and UnLock() functions are necessary for drawing in
// JAWT, but they also provide a form of mutex locking so that multiple
// java threads are prevented from accessing X at the same time. The only
// requirement JAWT has is that all operations on a JAWT_DrawingSurface
// MUST be performed from the same thread as the call to GetDrawingSurface.
extern "C" JNIEXPORT jint JNICALL
Java_vtk_vtkPanel_Lock(JNIEnv *env,
jobject canvas)
{
JAWT awt;
JAWT_DrawingSurface* ds;
jint lock;
/* Get the AWT */
awt.version = JAWT_VERSION_1_3;
if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
{
#ifndef VTK_JAVA_DEBUG
printf("AWT Not found\n");
#endif
return 1;
}
/* Get the drawing surface */
ds = awt.GetDrawingSurface(env, canvas);
if (ds == NULL)
{
#ifndef VTK_JAVA_DEBUG
printf("NULL drawing surface\n");
#endif
return 1;
}
#if defined(WIN32_JAWT_LOCK_HACK)
int hash;
WJLH_HASH_FUNC(env, canvas, hash);
if (WJLH_init_check && WJLH_lock_map[hash] > WJLH_MAX_COUNT)
{
env->MonitorEnter(canvas);
}
else
{
#endif
/* Lock the drawing surface */
lock = ds->Lock(ds);
if((lock & JAWT_LOCK_ERROR) != 0)
{
#ifndef VTK_JAVA_DEBUG
printf("Error locking surface\n");
#endif
awt.FreeDrawingSurface(ds);
return 1;
}
#if defined(WIN32_JAWT_LOCK_HACK)
}
#endif
return 0;
}
// UnLock() must be called after a Lock() and execution of a
// function which might change the drawing surface. See Lock().
extern "C" JNIEXPORT jint JNICALL
Java_vtk_vtkPanel_UnLock(JNIEnv *env,
jobject canvas)
{
JAWT awt;
JAWT_DrawingSurface* ds;
/* Get the AWT */
awt.version = JAWT_VERSION_1_3;
if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
{
#ifndef VTK_JAVA_DEBUG
printf("AWT Not found\n");
#endif
return 1;
}
/* Get the drawing surface */
ds = awt.GetDrawingSurface(env, canvas);
if (ds == NULL)
{
#ifndef VTK_JAVA_DEBUG
printf("NULL drawing surface\n");
#endif
return 1;
}
#if defined(WIN32_JAWT_LOCK_HACK)
int hash;
WJLH_HASH_FUNC(env, canvas, hash);
if (WJLH_init_check && WJLH_lock_map[hash] > WJLH_MAX_COUNT)
{
env->MonitorExit(canvas);
}
else
{
if (WJLH_init_check) WJLH_lock_map[hash]++;
#endif
/* Unlock the drawing surface */
ds->Unlock(ds);
#if defined(WIN32_JAWT_LOCK_HACK)
}
#endif
/* Free the drawing surface */
awt.FreeDrawingSurface(ds);
return 0;
}
// Undo disabling of deprecation warning.
#if defined(__APPLE__) && defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif
// VTK-HeaderTest-Exclude: vtkJavaAwt.h
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: vtkJavaUtil.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkJavaUtil_h
#define vtkJavaUtil_h
#include "vtkSystemIncludes.h"
#include <jni.h>
#include "vtkCommand.h"
#include "vtkWrappingJavaModule.h"
#include <string>
extern VTKWRAPPINGJAVA_EXPORT jlong q(JNIEnv *env,jobject obj);
extern VTKWRAPPINGJAVA_EXPORT void *vtkJavaGetPointerFromObject(JNIEnv *env,jobject obj);
extern VTKWRAPPINGJAVA_EXPORT char *vtkJavaUTFToChar(JNIEnv *env, jstring in);
extern VTKWRAPPINGJAVA_EXPORT bool vtkJavaUTFToString(JNIEnv *env, jstring in, std::string &out);
extern VTKWRAPPINGJAVA_EXPORT jstring vtkJavaMakeJavaString(JNIEnv *env, const char *in);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfFloatFromFloat(JNIEnv *env,
const float *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfDoubleFromFloat(JNIEnv *env,
const float *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfDoubleFromDouble(JNIEnv *env,
const double *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfShortFromShort(JNIEnv *env, const short *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromInt(JNIEnv *env, const int *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromIdType(JNIEnv *env, const vtkIdType *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromLongLong(JNIEnv *env, const long long *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromSignedChar(JNIEnv *env, const signed char *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfLongFromLong(JNIEnv *env, const long *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfByteFromUnsignedChar(JNIEnv *env, const unsigned char *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfByteFromChar(JNIEnv *env, const char *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfCharFromChar(JNIEnv *env, const char *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfUnsignedCharFromUnsignedChar(JNIEnv *env, const unsigned char *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfUnsignedIntFromUnsignedInt(JNIEnv *env, const unsigned int *arr, int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfUnsignedShortFromUnsignedShort(JNIEnv *env, const unsigned short *ptr,int size);
extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfUnsignedLongFromUnsignedLong(JNIEnv *env, const unsigned long *arr, int size);
// this is the void pointer parameter passed to the vtk callback routines on
// behalf of the Java interface for callbacks.
struct vtkJavaVoidFuncArg
{
JavaVM *vm;
jobject uobj;
jmethodID mid;
} ;
extern VTKWRAPPINGJAVA_EXPORT void vtkJavaVoidFunc(void *);
extern VTKWRAPPINGJAVA_EXPORT void vtkJavaVoidFuncArgDelete(void *);
class VTKWRAPPINGJAVA_EXPORT vtkJavaCommand : public vtkCommand
{
public:
static vtkJavaCommand *New() { return new vtkJavaCommand; };
void SetGlobalRef(jobject obj) { this->uobj = obj; };
void SetMethodID(jmethodID id) { this->mid = id; };
void AssignJavaVM(JNIEnv *env) { env->GetJavaVM(&(this->vm)); };
void Execute(vtkObject *, unsigned long, void *);
JavaVM *vm;
jobject uobj;
jmethodID mid;
protected:
vtkJavaCommand();
~vtkJavaCommand();
};
#endif
// VTK-HeaderTest-Exclude: vtkJavaUtil.h
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment