|
29 | 29 | import javafx.scene.control.Alert; |
30 | 30 | import javafx.scene.control.Button; |
31 | 31 | import javafx.scene.control.CheckBox; |
| 32 | +import javafx.scene.layout.Background; |
| 33 | +import javafx.scene.layout.BackgroundFill; |
| 34 | +import javafx.scene.layout.CornerRadii; |
32 | 35 | import javafx.scene.layout.StackPane; |
33 | 36 | import javafx.scene.layout.VBox; |
| 37 | +import javafx.scene.paint.Paint; |
34 | 38 | import javafx.stage.Stage; |
35 | 39 |
|
36 | 40 | import com.esri.arcgisruntime.concurrent.ListenableFuture; |
@@ -129,19 +133,22 @@ public void start(Stage stage) { |
129 | 133 | }); |
130 | 134 |
|
131 | 135 | // layout the controls |
132 | | - VBox controlsBox = new VBox(6); |
133 | | - controlsBox.setAlignment(Pos.CENTER); |
134 | | - controlsBox.setMaxSize(220, Double.MIN_VALUE); |
135 | | - controlsBox.getStyleClass().add("panel-region"); |
| 136 | + VBox controlsVBox = new VBox(6); |
| 137 | + controlsVBox.setBackground(new Background(new BackgroundFill(Paint.valueOf("rgba(0,0,0,0.3)"), CornerRadii.EMPTY, |
| 138 | + Insets.EMPTY))); |
| 139 | + controlsVBox.setPadding(new Insets(10.0)); |
| 140 | + controlsVBox.setAlignment(Pos.CENTER); |
| 141 | + controlsVBox.setMaxSize(220, Double.MIN_VALUE); |
| 142 | + controlsVBox.getStyleClass().add("panel-region"); |
136 | 143 | currentExtentFilterToggle.setMaxWidth(Double.MAX_VALUE); |
137 | 144 | populationFilterToggle.setMaxWidth(Double.MAX_VALUE); |
138 | 145 | queryButton.setMaxWidth(Double.MAX_VALUE); |
139 | | - controlsBox.getChildren().addAll(currentExtentFilterToggle, populationFilterToggle, queryButton); |
| 146 | + controlsVBox.getChildren().addAll(currentExtentFilterToggle, populationFilterToggle, queryButton); |
140 | 147 |
|
141 | 148 | // add the map view and control panel to stack pane |
142 | | - stackPane.getChildren().addAll(mapView, controlsBox); |
143 | | - StackPane.setAlignment(controlsBox, Pos.TOP_LEFT); |
144 | | - StackPane.setMargin(controlsBox, new Insets(10, 0, 0, 10)); |
| 149 | + stackPane.getChildren().addAll(mapView, controlsVBox); |
| 150 | + StackPane.setAlignment(controlsVBox, Pos.TOP_LEFT); |
| 151 | + StackPane.setMargin(controlsVBox, new Insets(10, 0, 0, 10)); |
145 | 152 |
|
146 | 153 | } catch (Exception e) { |
147 | 154 | // on any error, display the stack trace |
|
0 commit comments