Fix ToolTip not appearing on front sheet panel.
We now traverse the superclass hierarchy and search for a field with the matching annotation.
This commit is contained in:
parent
468aa7b2a0
commit
15e5efb2a0
@ -1022,16 +1022,15 @@ public class BeanInspector {
|
|||||||
String tipName = name + "TipText";
|
String tipName = name + "TipText";
|
||||||
|
|
||||||
// Find by annotation
|
// Find by annotation
|
||||||
Parameter[] parameters= target.getClass().getAnnotationsByType(Parameter.class);
|
|
||||||
Parameter parameter = BeanInspector.getAnnotationFromField(name, target.getClass(), Parameter.class);
|
Parameter parameter = BeanInspector.getAnnotationFromField(name, target.getClass(), Parameter.class);
|
||||||
if (parameter != null) {
|
if (parameter != null) {
|
||||||
return parameter.description();
|
return parameter.description();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find by deprecated TipText method
|
// Find by deprecated TipText method
|
||||||
for (int j = 0; j < methods.length; j++) {
|
for (MethodDescriptor method : methods) {
|
||||||
String mname = methods[j].getDisplayName();
|
String mname = method.getDisplayName();
|
||||||
Method meth = methods[j].getMethod();
|
Method meth = method.getMethod();
|
||||||
|
|
||||||
if (mname.equals(tipName)) {
|
if (mname.equals(tipName)) {
|
||||||
if (meth.getReturnType().equals(String.class)) {
|
if (meth.getReturnType().equals(String.class)) {
|
||||||
@ -1046,7 +1045,7 @@ public class BeanInspector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
LOGGER.log(Level.FINE, "Error calling TipText method.", ex);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -318,16 +318,6 @@ public class JMatLink extends Thread {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// **** terminate running thread ****
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void destroy() {
|
|
||||||
|
|
||||||
destroyJMatLinkB = true;
|
|
||||||
|
|
||||||
notifyAll();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void kill() {
|
public void kill() {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user