Skip to content

Commit f6eb82a

Browse files
author
john0005
committed
Portal and Scene Samples Copyright
1 parent 9bceb98 commit f6eb82a

20 files changed

+120
-93
lines changed

src/main/java/com/esri/samples/portal/oauth/AuthenticationDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

src/main/java/com/esri/samples/portal/oauth/OAuthChallengeHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -57,7 +57,7 @@ public AuthenticationChallengeResponse handleChallenge(AuthenticationChallenge c
5757

5858
// use the authorization code to get a token
5959
OAuthTokenCredentialRequest request = new OAuthTokenCredentialRequest(
60-
config.getPortalUrl(), null, config.getClientId(),null, authorizationCode);
60+
config.getPortalUrl(), null, config.getClientId(), null, authorizationCode);
6161
OAuthTokenCredential credential = request.executeAsync().get();
6262
return new AuthenticationChallengeResponse(Action.CONTINUE_WITH_CREDENTIAL, credential);
6363
} catch (Exception e) {

src/main/java/com/esri/samples/portal/oauth/OAuthController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

src/main/java/com/esri/samples/portal/oauth/OAuthSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

src/main/java/com/esri/samples/portal/webmap_keyword_search/WebmapKeywordSearchController.java

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -18,6 +18,13 @@
1818

1919
import java.util.List;
2020

21+
import javafx.fxml.FXML;
22+
import javafx.scene.control.Alert;
23+
import javafx.scene.control.Button;
24+
import javafx.scene.control.ListCell;
25+
import javafx.scene.control.ListView;
26+
import javafx.scene.control.TextField;
27+
2128
import com.esri.arcgisruntime.concurrent.ListenableFuture;
2229
import com.esri.arcgisruntime.mapping.ArcGISMap;
2330
import com.esri.arcgisruntime.mapping.view.MapView;
@@ -26,24 +33,12 @@
2633
import com.esri.arcgisruntime.portal.PortalQueryParameters;
2734
import com.esri.arcgisruntime.portal.PortalQueryResultSet;
2835

29-
import javafx.fxml.FXML;
30-
import javafx.scene.control.Alert;
31-
import javafx.scene.control.Button;
32-
import javafx.scene.control.ListCell;
33-
import javafx.scene.control.ListView;
34-
import javafx.scene.control.TextField;
35-
3636
public class WebmapKeywordSearchController {
3737

38-
39-
@FXML
40-
private TextField keyword;
41-
@FXML
42-
private MapView mapView;
43-
@FXML
44-
private ListView<PortalItem> resultsList;
45-
@FXML
46-
private Button moreButton;
38+
@FXML private TextField keyword;
39+
@FXML private MapView mapView;
40+
@FXML private ListView<PortalItem> resultsList;
41+
@FXML private Button moreButton;
4742

4843
private Portal portal;
4944
private PortalQueryResultSet<PortalItem> portalQueryResultSet;
@@ -111,7 +106,7 @@ private void getMoreResults() {
111106
try {
112107
// replace the result set with the current set of results
113108
portalQueryResultSet = results.get();
114-
List<PortalItem> portalItems =portalQueryResultSet.getResults();
109+
List<PortalItem> portalItems = portalQueryResultSet.getResults();
115110

116111
// add set of results to list view
117112
resultsList.getItems().addAll(portalItems);
@@ -129,6 +124,7 @@ private void getMoreResults() {
129124
* Shows a Layer title in a ListView.
130125
*/
131126
private class PortalItemCell extends ListCell<PortalItem> {
127+
132128
@Override
133129
protected void updateItem(PortalItem portalItem, boolean empty) {
134130
super.updateItem(portalItem, empty);

src/main/java/com/esri/samples/portal/webmap_keyword_search/WebmapKeywordSearchSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -61,4 +61,4 @@ public static void main(String[] args) {
6161

6262
Application.launch(args);
6363
}
64-
}
64+
}

src/main/java/com/esri/samples/scene/animate_3d_graphic/Animate3dGraphicController.java

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -26,11 +26,6 @@
2626
import java.util.Map;
2727
import java.util.stream.Collectors;
2828

29-
import com.esri.arcgisruntime.geometry.*;
30-
import com.esri.arcgisruntime.mapping.*;
31-
import com.esri.arcgisruntime.mapping.view.*;
32-
import com.esri.arcgisruntime.symbology.*;
33-
3429
import javafx.animation.KeyFrame;
3530
import javafx.animation.Timeline;
3631
import javafx.application.Platform;
@@ -41,6 +36,30 @@
4136
import javafx.scene.control.ToggleButton;
4237
import javafx.util.Duration;
4338

39+
import com.esri.arcgisruntime.geometry.Point;
40+
import com.esri.arcgisruntime.geometry.PointCollection;
41+
import com.esri.arcgisruntime.geometry.Polyline;
42+
import com.esri.arcgisruntime.geometry.SpatialReference;
43+
import com.esri.arcgisruntime.geometry.SpatialReferences;
44+
import com.esri.arcgisruntime.mapping.ArcGISMap;
45+
import com.esri.arcgisruntime.mapping.ArcGISScene;
46+
import com.esri.arcgisruntime.mapping.ArcGISTiledElevationSource;
47+
import com.esri.arcgisruntime.mapping.Basemap;
48+
import com.esri.arcgisruntime.mapping.Surface;
49+
import com.esri.arcgisruntime.mapping.Viewpoint;
50+
import com.esri.arcgisruntime.mapping.view.GlobeCameraController;
51+
import com.esri.arcgisruntime.mapping.view.Graphic;
52+
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
53+
import com.esri.arcgisruntime.mapping.view.LayerSceneProperties;
54+
import com.esri.arcgisruntime.mapping.view.MapView;
55+
import com.esri.arcgisruntime.mapping.view.OrbitGeoElementCameraController;
56+
import com.esri.arcgisruntime.mapping.view.SceneView;
57+
import com.esri.arcgisruntime.symbology.ModelSceneSymbol;
58+
import com.esri.arcgisruntime.symbology.Renderer;
59+
import com.esri.arcgisruntime.symbology.SimpleLineSymbol;
60+
import com.esri.arcgisruntime.symbology.SimpleMarkerSymbol;
61+
import com.esri.arcgisruntime.symbology.SimpleRenderer;
62+
4463
public class Animate3dGraphicController {
4564

4665
// injected elements from fxml
@@ -125,7 +144,7 @@ public void initialize() {
125144
String modelURI = new File("./samples-data/bristol/Collada/Bristol.dae").getAbsolutePath();
126145
ModelSceneSymbol plane3DSymbol = new ModelSceneSymbol(modelURI, 1.0);
127146
plane3DSymbol.loadAsync();
128-
plane3D = new Graphic(new Point(0, 0, 0, WGS84), plane3DSymbol);
147+
plane3D = new Graphic(new Point(0, 0, 0, WGS84), plane3DSymbol);
129148
sceneOverlay.getGraphics().add(plane3D);
130149

131150
// create an orbit camera controller to follow the plane
@@ -137,10 +156,8 @@ public void initialize() {
137156
animation.getKeyFrames().add(new KeyFrame(Duration.millis(20), e -> animate(animationModel.nextKeyframe())));
138157

139158
// bind button properties
140-
followButton.textProperty().bind(Bindings.createStringBinding(() -> followButton.isSelected() ?
141-
"Free cam" : "Follow", followButton.selectedProperty()));
142-
playButton.textProperty().bind(Bindings.createStringBinding(() -> playButton.isSelected() ?
143-
"Stop" : "Play", playButton.selectedProperty()));
159+
followButton.textProperty().bind(Bindings.createStringBinding(() -> followButton.isSelected() ? "Free cam" : "Follow", followButton.selectedProperty()));
160+
playButton.textProperty().bind(Bindings.createStringBinding(() -> playButton.isSelected() ? "Stop" : "Play", playButton.selectedProperty()));
144161

145162
// open default mission selection
146163
changeMission();
@@ -186,8 +203,7 @@ private void changeMission() {
186203
private List<Map<String, Object>> getMissionData(String mission) {
187204

188205
// open a file reader to the mission file that automatically closes after read
189-
try (BufferedReader missionFile = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream
190-
("/csv/" + mission)))) {
206+
try (BufferedReader missionFile = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("/csv/" + mission)))) {
191207
return missionFile.lines()
192208
//ex: -156.3666517,20.6255059,999.999908,83.77659,1.05E-09,-47.766567
193209
.map(l -> l.split(","))

src/main/java/com/esri/samples/scene/animate_3d_graphic/Animate3dGraphicSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

src/main/java/com/esri/samples/scene/calculate_distance_3d/CalculateDistance3dController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

src/main/java/com/esri/samples/scene/calculate_distance_3d/CalculateDistance3dSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Esri.
2+
* Copyright 2017 Esri.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

0 commit comments

Comments
 (0)