mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-14 15:57:12 -06:00
macOS fullWindowContent mode:
- added title bar buttons placeholder
- added client property to root pane that contains title bar buttons bounds
- undone toolbar extensions from commit ea2447dcb7
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
jfieldID getFieldID( JNIEnv *env, const char* className, const char* fieldName, const char* fieldSignature ) {
|
||||
// NSLog( @"getFieldID %s %s %s", className, fieldName, fieldSignature );
|
||||
jclass findClass( JNIEnv *env, const char* className, bool globalRef ) {
|
||||
// NSLog( @"findClass %s", className );
|
||||
|
||||
jclass cls = env->FindClass( className );
|
||||
if( cls == NULL ) {
|
||||
@@ -32,7 +32,22 @@ jfieldID getFieldID( JNIEnv *env, const char* className, const char* fieldName,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
jfieldID fieldID = env->GetFieldID( cls, fieldName, fieldSignature );
|
||||
if( globalRef )
|
||||
cls = reinterpret_cast<jclass>( env->NewGlobalRef( cls ) );
|
||||
|
||||
return cls;
|
||||
}
|
||||
|
||||
jfieldID getFieldID( JNIEnv *env, const char* className, const char* fieldName, const char* fieldSignature, bool staticField ) {
|
||||
// NSLog( @"getFieldID %s %s %s", className, fieldName, fieldSignature );
|
||||
|
||||
jclass cls = findClass( env, className, false );
|
||||
if( cls == NULL )
|
||||
return NULL;
|
||||
|
||||
jfieldID fieldID = staticField
|
||||
? env->GetStaticFieldID( cls, fieldName, fieldSignature )
|
||||
: env->GetFieldID( cls, fieldName, fieldSignature );
|
||||
if( fieldID == NULL ) {
|
||||
NSLog( @"FlatLaf: failed to lookup field '%s' of type '%s' in class '%s'", fieldName, fieldSignature, className );
|
||||
env->ExceptionDescribe(); // print stack trace
|
||||
@@ -42,3 +57,22 @@ jfieldID getFieldID( JNIEnv *env, const char* className, const char* fieldName,
|
||||
|
||||
return fieldID;
|
||||
}
|
||||
|
||||
jmethodID getMethodID( JNIEnv *env, jclass cls, const char* methodName, const char* methodSignature, bool staticMethod ) {
|
||||
// NSLog( @"getMethodID %s %s", methodName, methodSignature );
|
||||
|
||||
if( cls == NULL )
|
||||
return NULL;
|
||||
|
||||
jmethodID methodID = staticMethod
|
||||
? env->GetStaticMethodID( cls, methodName, methodSignature )
|
||||
: env->GetMethodID( cls, methodName, methodSignature );
|
||||
if( methodID == NULL ) {
|
||||
NSLog( @"FlatLaf: failed to lookup method '%s' of type '%s'", methodName, methodSignature );
|
||||
env->ExceptionDescribe(); // print stack trace
|
||||
env->ExceptionClear();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return methodID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user