fix: Animate custom panel
This commit is contained in:
@@ -333,6 +333,12 @@ public class TestingList extends Panel {
|
||||
String property;
|
||||
properties = props;
|
||||
|
||||
//custom panel
|
||||
property = props.getProperty("customPanel");
|
||||
//System.out.println("load customPanel: " + property);
|
||||
property = property.replace("\"","");
|
||||
loadCustomPanel(property);
|
||||
|
||||
//list filter
|
||||
property = props.getProperty("listFilter");
|
||||
//System.out.println("load listFilter: " + property);
|
||||
@@ -342,11 +348,6 @@ public class TestingList extends Panel {
|
||||
property = property.replace("\"","");
|
||||
loadListFilter(Paths.get(TESTS_CONFIG_DEFAULT_DIR.toString(), property).toFile());
|
||||
}
|
||||
//custom panel
|
||||
property = props.getProperty("customPanel");
|
||||
//System.out.println("load customPanel: " + property);
|
||||
property = property.replace("\"","");
|
||||
loadCustomPanel(property);
|
||||
|
||||
//show Enabled Tests Only
|
||||
property = props.getProperty("showEnabledTestsOnly");
|
||||
@@ -1569,7 +1570,6 @@ public class TestingList extends Panel {
|
||||
Class[] cArg = new Class[1];
|
||||
cArg[0] = String.class;
|
||||
Method animate = customPanel.getClass().getMethod("animate", cArg);
|
||||
System.out.println("method = " + animate.toString());
|
||||
animate.invoke(customPanel, deviceName);
|
||||
} catch (NoSuchMethodException ex) {
|
||||
System.out.println("animateCustomPanel(): "+String.valueOf(ex));
|
||||
@@ -1593,6 +1593,9 @@ public class TestingList extends Panel {
|
||||
* Note: the custom panel must have the public method "animate(String deviceName)"
|
||||
*/
|
||||
public void animateCustomPanel(){
|
||||
Component customPanel = getCustomPanel();
|
||||
//if no custom panel: nothing to do
|
||||
if(customPanel==null) return;
|
||||
//scan the table to see if only one device name is present
|
||||
String sDeviceName = "";
|
||||
String sRowDeviceName = "";
|
||||
@@ -1615,6 +1618,7 @@ public class TestingList extends Panel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* put the test result in table
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user