Commit 0b616d803c4472e628f744df5231e549f47688eb
1 parent
0d0b44fe
Exists in
master
Updtate the query textArea when selecting a new service.
Showing
3 changed files
with
9 additions
and
1 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
... | ... | @@ -95,6 +95,7 @@ public class EpnTapController { |
95 | 95 | if (!tableName.equals(selectedTableName)) { |
96 | 96 | selectedTableServiceURL = serviceURL; |
97 | 97 | selectedTableName = tableName; |
98 | + view.getRequestView().updateQueryArea(); | |
98 | 99 | logger.info("Selected table: " + selectedTableName + " - service: " |
99 | 100 | + selectedTableServiceURL); |
100 | 101 | } | ... | ... |
src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java
... | ... | @@ -107,6 +107,13 @@ public class EpnTapMainView extends JPanel { |
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | + * @return The JPanel where the GUI elements to make the request are displayed. | |
111 | + */ | |
112 | + public RequestView getRequestView() { | |
113 | + return requestView; | |
114 | + } | |
115 | + | |
116 | + /** | |
110 | 117 | * @return The JPanel where the list of services is displayed. |
111 | 118 | */ |
112 | 119 | public VOTableView getServicesView() { | ... | ... |
src/main/java/eu/omp/irap/vespa/epntapclient/view/RequestView.java
... | ... | @@ -189,7 +189,7 @@ public class RequestView extends JPanel implements ActionListener { |
189 | 189 | /** |
190 | 190 | * Update the query JTextArea according to the parameters values. |
191 | 191 | */ |
192 | - private void updateQueryArea() { | |
192 | + public void updateQueryArea() { | |
193 | 193 | String tableName = mainView.getController().getSelectedTable(); |
194 | 194 | queryArea.setText(Queries.getQuery(tableName, params, 10)); |
195 | 195 | } | ... | ... |