Fix VBox to show checkbox dialog.
Get rid of exception when disposing mapview
@@ -116,9 +116,7 @@ public class StatisticalQuerySample extends Application {
StringBuilder statistics = new StringBuilder();
for (Iterator<StatisticRecord> it = result.iterator(); it.hasNext();) {
StatisticRecord record = it.next();
- record.getStatistics().forEach((key, value) ->
- statistics.append("\n").append(key).append(": ").append(value)
- );
+ record.getStatistics().forEach((key, value) -> statistics.append("\n").append(key).append(": ").append(value));
}
Alert alert = new Alert(Alert.AlertType.INFORMATION, statistics.toString());
alert.setHeaderText("Statistics");
@@ -133,8 +131,11 @@ public class StatisticalQuerySample extends Application {
// layout the controls
VBox controlsBox = new VBox(6);
controlsBox.setAlignment(Pos.CENTER);
- controlsBox.setMaxSize(200, 120);
+ controlsBox.setMaxSize(220, Double.MIN_VALUE);
controlsBox.getStyleClass().add("panel-region");
+ currentExtentFilterToggle.setMaxWidth(Double.MAX_VALUE);
+ populationFilterToggle.setMaxWidth(Double.MAX_VALUE);
+ queryButton.setMaxWidth(Double.MAX_VALUE);
controlsBox.getChildren().addAll(currentExtentFilterToggle, populationFilterToggle, queryButton);
// add the map view and control panel to stack pane
@@ -152,7 +153,7 @@ public class StatisticalQuerySample extends Application {
* Stops and releases all resources used in application.
*/
@Override
- public void stop() throws Exception {
+ public void stop() {
if (mapView != null) {
mapView.dispose();
