Commit 666f06f9139558579908c218a6518fba18707d81

Authored by Jean-Michel Glorian
1 parent 6527ace8
Exists in master

possibility to define nbMax result

src/main/java/eu/omp/irap/vespa/epntapclient/gui/GUIController.java
... ... @@ -47,6 +47,8 @@ public class GUIController extends EpnTapController implements ViewListener {
47 47 /** The URL of the service corresponding to the selected table. */
48 48 private String selectedTableServiceURL;
49 49  
  50 + private int nbMaxResult = 10;
  51 +
50 52  
51 53 public GUIController() {
52 54 super();
... ... @@ -128,10 +130,24 @@ public class GUIController extends EpnTapController implements ViewListener {
128 130 * Update the query area with a working ADQL query, based on the parameters list.
129 131 */
130 132 private void updateQueryArea() {
131   - String query = Queries.getQuery(selectedTableName, paramValues, 10);
  133 + String query = Queries.getQuery(selectedTableName, paramValues, getNbMaxResult());
132 134 mainView.getRequestPanel().updateQueryArea(query);
133 135 }
134 136  
  137 + /**
  138 + * @return the nb max of result
  139 + */
  140 + public int getNbMaxResult() {
  141 + return nbMaxResult;
  142 + }
  143 +
  144 + /**
  145 + * set the nb max of result for a query
  146 + */
  147 + public void setNbMaxResult(int nb) {
  148 + nbMaxResult = nb;
  149 + }
  150 +
135 151 public void updateService(String serviceURL, String tableName) {
136 152 if (!tableName.equals(selectedTableName)) {
137 153 selectedTableServiceURL = serviceURL;
... ...