diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java b/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java index 3f31526..298be92 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java @@ -37,6 +37,15 @@ public class EpnTapController { */ public EpnTapController() { view = new EpnTapMainView(); + + String[] sColumns = { "service name", "service value" }; + String[][] sValues = { { "s1", "s2" }, { "789", "357" } }; + + String[] rColumns = { "result name", "result value" }; + String[][] rValues = { { "r1", "r2" }, { "123", "456" } }; + + view.fillServices(sColumns, sValues); + view.fillResults(rColumns, rValues); } /** diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java index 7cc7601..57b2b2b 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java @@ -49,15 +49,25 @@ public class EpnTapMainView extends JPanel { results = new VOTableView(); queryArea = new JTextArea(""); - String[] sColumns = { "service name", "service value" }; - String[][] sValues = { { "s1", "s2" }, { "789", "357" } }; - services.buildArray(sColumns, sValues); + buildWindow(); + } - String[] rColumns = { "result name", "result value" }; - String[][] rValues = { { "r1", "r2" }, { "123", "456" } }; - results.buildArray(rColumns, rValues); + /** + * @param columns The name of each column to fill the Service table. + * @param values A 2D array, where the first dimension represents the rows of the Services + * table. The second one represents each element, in the same order as the `columns`. + */ + public void fillServices(String[] columns, Object[][] values) { + services.buildArray(columns, values); + } - buildWindow(); + /** + * @param columns The name of each column to fill the Results table. + * @param values A 2D array, where the first dimension represents the rows of the Results table. + * The second one represents each element, in the same order as the `columns`. + */ + public void fillResults(String[] columns, Object[][] values) { + results.buildArray(columns, values); } /** -- libgit2 0.21.2