@@ -39,8 +39,9 @@ public class OpenMapURLSample extends Application {
3939
4040 private MapView mapView ;
4141
42- private static final String [] portalItemIDs = new String []{ "2d6fa24b357d427f9c737774e7b0f977" ,
43- "01f052c8995e4b9e889d73c3e210ebe3" , "0edea1c7bbb84ba5842d20483af11679" };
42+ private static final String [] portalItemIDs = new String [] {
43+ "01f052c8995e4b9e889d73c3e210ebe3" , "0edea1c7bbb84ba5842d20483af11679"
44+ };
4445
4546 @ Override
4647 public void start (Stage stage ) throws Exception {
@@ -65,9 +66,9 @@ public void start(Stage stage) throws Exception {
6566 // create maps using portal item IDs
6667 Portal portal = new Portal ("http://www.arcgis.com/" );
6768 List <ArcGISMap > webMaps = Stream .of (portalItemIDs )
68- .map (id -> new PortalItem (portal , id ))
69- .map (ArcGISMap ::new )
70- .collect (Collectors .toList ());
69+ .map (id -> new PortalItem (portal , id ))
70+ .map (ArcGISMap ::new )
71+ .collect (Collectors .toList ());
7172
7273 // load maps and add to combo box
7374 webMaps .forEach (map -> {
@@ -83,6 +84,7 @@ public void start(Stage stage) throws Exception {
8384
8485 // show the name of the map in the combo box
8586 webMapComboBox .setConverter (new StringConverter <ArcGISMap >() {
87+
8688 @ Override
8789 public String toString (ArcGISMap map ) {
8890 return map .getItem ().getTitle ();
@@ -94,13 +96,13 @@ public ArcGISMap fromString(String string) {
9496 }
9597 });
9698
97- webMapComboBox .setCellFactory (comboBox ->
98- new ListCell < ArcGISMap >(){
99- @ Override
100- protected void updateItem (ArcGISMap map , boolean empty ) {
101- super .updateItem (map , empty );
102- setText (empty ? "" : map .getItem ().getTitle ());
103- }
99+ webMapComboBox .setCellFactory (comboBox -> new ListCell < ArcGISMap >() {
100+
101+ @ Override
102+ protected void updateItem (ArcGISMap map , boolean empty ) {
103+ super .updateItem (map , empty );
104+ setText (empty ? "" : map .getItem ().getTitle ());
105+ }
104106 });
105107
106108 // select the web map loaded first
0 commit comments