Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 36f52c80b7ac |
children | 28df64078f27 |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java Thu Jan 18 20:10:59 2018 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java Thu Jan 18 20:12:01 2018 +0100 @@ -74,11 +74,13 @@ /** Service handle to clone and add artifacts to collection. */ LoadArtifactServiceAsync loadArtifactService = GWT.create( - org.dive4elements.river.client.client.services.LoadArtifactService.class); + org.dive4elements.river.client.client.services + .LoadArtifactService.class); /** Service to remove artifacts from collection. */ RemoveArtifactServiceAsync removeArtifactService = GWT.create( - org.dive4elements.river.client.client.services.RemoveArtifactService.class); + org.dive4elements.river.client.client.services + .RemoveArtifactService.class); public DatacageTwinPanel(User user) { @@ -116,7 +118,10 @@ * @param from string in format as shown above. * @return recommendation from input string. */ - public Recommendation createRecommendationFromString(String from, String factory) { + public Recommendation createRecommendationFromString( + String from, + String factory + ) { // TODO Construct "real" filter. String[] parts = unbracket(from).split(";"); Recommendation.Filter filter = new Recommendation.Filter(); @@ -160,7 +165,8 @@ /** - * Creates the graphical representation and interaction widgets for the data. + * Creates the graphical representation and interaction widgets + * for the data. * @param dataList the data. * @return graphical representation and interaction widgets for data. */ @@ -189,7 +195,9 @@ Data data = dataList.get(0); this.dataName = data.getLabel(); for (int i = 0; i < dataList.size(); i++) { - if (dataList.get(i) != null && dataList.get(i).getItems() != null) { + if (dataList.get(i) != null + && dataList.get(i).getItems() != null + ) { if (dataList.get(i).getItems() != null) { populateGridFromString( dataList.get(i).getItems()[0].getStringValue(), @@ -258,7 +266,9 @@ @Override public void onRecordClick(final RecordClickEvent event) { // Just handle remove-clicks - if(!event.getField().getName().equals(removeField.getName())) { + if(!event.getField().getName() + .equals(removeField.getName()) + ) { return; } trackRemoved(event.getRecord()); @@ -285,7 +295,8 @@ */ public void adjustRecommendation(Recommendation recommendation) { // XXX: THIS IS AN EVIL HACK TO MAKE W-DIFFERENCES WORK AGAIN! - // TODO: Throw all this code away and do it with server side recommendations! + // TODO: Throw all this code away and do it with server side + // recommendations! recommendation.setTargetOut("w_differences"); if (recommendation.getIDs() != null) { @@ -350,8 +361,10 @@ } } - final Recommendation[] toClone = ar.toArray(new Recommendation[ar.size()]); - final Recommendation[] toUse = all.toArray(new Recommendation[all.size()]); + final Recommendation[] toClone = ar.toArray( + new Recommendation[ar.size()]); + final Recommendation[] toUse = all.toArray( + new Recommendation[all.size()]); // Find out whether "old" artifacts have to be removed. List<String> artifactIdsToRemove = new ArrayList<String>(); @@ -360,10 +373,14 @@ Recommendation second = rp.getSecond(); for (Recommendation recommendation: toUse) { - if (first != null && first.getIDs().equals(recommendation.getIDs())) { + if (first != null + && first.getIDs().equals(recommendation.getIDs()) + ) { first = null; } - if (second != null && second.getIDs().equals(recommendation.getIDs())) { + if (second != null + && second.getIDs().equals(recommendation.getIDs()) + ) { second = null; } @@ -469,7 +486,10 @@ } - protected String createDataString(String artifact, Recommendation recommendation) { + protected String createDataString( + String artifact, + Recommendation recommendation + ) { return createDataString(artifact, recommendation, "staticwkms"); }